Modem modo serial usb [duplicado]

1

Eu costumava forçar meu modem huawei E3531 a ficar em modo serial usando usb_modeswitch no meu computador Linux Ubuntu. Eu estava correndo isso:

usb_modeswitch -v 12d1 -p 1f01 -M '55534243123456780000000000000011062000000100000000000000000000'

em que 12d1 é o fornecedor de id e 1f01 é o fornecedor do produto. Ele costumava funcionar bem, então eu era capaz de enviar comandos AT ...

Agora eu mudei minha configuração para uma banana pi, usando bananian. E este comando de modos de comutação não funciona. Aqui está o que acontece

Taking all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes  * Version
1.2.3 (C) Josua Dietze 2012  * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1

DefaultProduct= 0x1f01

TargetVendor=   not set

TargetProduct=  not set

TargetClass=    not set

TargetProductList=""

DetachStorageOnly=0

HuaweiMode=0

SierraMode=0

SonyMode=0

QisdaMode=0

GCTMode=0

KobilMode=0

SequansMode=0

MobileActionMode=0

CiscoMode=0

MessageEndpoint=  not set

MessageContent="55534243123456780000000000000011060000001000000000000000000000"

NeedResponse=0

ResponseEndpoint= not set

InquireDevice disabled

Success check disabled

System integration mode disabled

usb_set_debug: Setting debugging level to 15 (on)

usb_os_find_busses: Found 004

usb_os_find_busses: Found 003

usb_os_find_busses: Found 002

usb_os_find_busses: Found 001

usb_os_find_devices: Found 002 on 004

usb_os_find_devices: Found 001 on 004

error obtaining child information: Inappropriate ioctl for device

usb_os_find_devices: Found 001 on 003

usb_os_find_devices: Found 001 on 002

usb_os_find_devices: Found 018 on 001

skipped 3 class/vendor specific interface descriptors

usb_os_find_devices: Found 004 on 001

skipped 1 class/vendor specific interface descriptors

usb_os_find_devices: Found 003 on 001

skipped 1 class/vendor specific interface descriptors

usb_os_find_devices: Found 002 on 001

usb_os_find_devices: Found 001 on 001

error obtaining child information: Inappropriate ioctl for device

error obtaining child information: Inappropriate ioctl for device

error obtaining child information: Inappropriate ioctl for device

Looking for default devices ...   searching devices, found USB ID
0403:6001

  searching devices, found USB ID 1d6b:0001

  searching devices, found USB ID 1d6b:0002

  searching devices, found USB ID 1d6b:0001

  searching devices, found USB ID 12d1:14dc

  found matching vendor ID

  searching devices, found USB ID 413c:3012

  searching devices, found USB ID 413c:2003

  searching devices, found USB ID 05e3:0608

  searching devices, found USB ID 1d6b:0002

 No devices in default mode found. Nothing to do. Bye.

Então, fazendo um lsusb, você pode ver que o dispositivo não é 12dc: 1f01, mas

Bus 001 Device 018: ID 12d1:14dc Huawei Technologies Co., Ltd.

então eu fiz um dmesg para ver o que aconteceu:

[ 3703.945245] cdc_ether 1-1.1:1.0: usb0: unregister 'cdc_ether'
usb-sw-ehci-1.1,  CDC Ethernet Device

[ 3938.661981] usb 1-1.1: new high-speed USB device number 17 using
sw-ehci

[ 3938.783662] usb 1-1.1: New USB device found, idVendor=12d1,
idProduct=1f01

[ 3938.797418] usb 1-1.1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3

[ 3938.809290] usb 1-1.1: Product: HUAWEI Mobile

[ 3938.816795] usb 1-1.1: Manufacturer: HUAWEI

[ 3938.825604] usb 1-1.1: SerialNumber: FFFFFFFFFFFFFFFF

[ 3938.891911] scsi13 : usb-storage 1-1.1:1.0

[ 3939.706889] usb 1-1.1: USB disconnect, device number 17

[ 3940.202053] usb 1-1.1: new high-speed USB device number 18 using
sw-ehci

[ 3940.323503] usb 1-1.1: New USB device found, idVendor=12d1,
idProduct=14dc

[ 3940.336703] usb 1-1.1: New USB device strings: Mfr=1, Product=2,
SerialNumber=0

[ 3940.347443] usb 1-1.1: Product: HUAWEI Mobile

[ 3940.355089] usb 1-1.1: Manufacturer: HUAWEI

[ 3940.586414] cdc_ether 1-1.1:1.0: usb0: register 'cdc_ether' at
usb-sw- ehci-1.1, CDC Ethernet Device, c2:71:b7:f9:e4:f6

[ 3940.601758] scsi14 : usb-storage 1-1.1:1.2

[ 3941.615040] scsi 14:0:0:0: Direct-Access     HUAWEI   TF CARD
Storage  2.31  PQ: 0 ANSI: 2

[ 3941.632411] sd 14:0:0:0: Attached scsi generic sg0 type 0

[ 3941.642327] sd 14:0:0:0: [sda] Attached SCSI removable disk

Então você pode ver que o modem muda seu modo (muito rápido), estou certo?

Eu tentei executar o mesmo comando usb modeswitch com o outro produto id e ele não funciona:

usb_modeswitch -v 12d1 -p 14dc -M '55534243123456780000000000000011062000000100000000000000000000'

Então, preciso que você ajude os rapazes a entender o que está acontecendo. Eu gostaria de entender melhor como o usb_modeswitch está funcionando, ou talvez encontrar uma solução com as regras do udev.

    
por Max Taylor 28.04.2015 / 13:02

1 resposta

0

Encontrei minha resposta aqui:

Huawei E3531: veja a força do sinal?

desculpa pela pergunta

    
por Max Taylor 28.04.2015 / 14:47