Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
richirich
Posts: 15
Joined: 31 Dec 2010, 13:58

Sierra A312U

Post by richirich » 13 Apr 2011, 10:58

Hi
I am having problem with Sierra A312U modem in linux.
my linux is 2.6.27.45.
usb_modeswitch version 1.1.6.
i didnt load sierra driver. Option and usbserial driver is loaded in system.

Problem is that Modeswitch command is getting failed.

Now giving output of logs step-by step--
When modem is plugged in, the kernel messages are

Apr 13 18:09:58 (none) user.info kernel: USB Universal Host Controller Interface driver v3.0
Apr 13 18:09:58 (none) user.info kernel: uhci_hcd 0000:00:1d.0: found PCI INT A -> IRQ 5
Apr 13 18:09:58 (none) user.info kernel: uhci_hcd 0000:00:1d.0: sharing IRQ 5 with 0000:00:1d.7
Apr 13 18:09:58 (none) user.debug kernel: uhci_hcd 0000:00:1d.0: setting latency timer to 64
Apr 13 18:09:58 (none) user.info kernel: uhci_hcd 0000:00:1d.0: UHCI Host Controller
Apr 13 18:09:58 (none) user.info kernel: uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 1
Apr 13 18:09:58 (none) user.info kernel: uhci_hcd 0000:00:1d.0: irq 5, io base 0x0000ac00
Apr 13 18:09:58 (none) user.info kernel: usb usb1: configuration #1 chosen from 1 choice
Apr 13 18:09:58 (none) user.info kernel: hub 1-0:1.0: USB hub found
Apr 13 18:09:58 (none) user.info kernel: hub 1-0:1.0: 2 ports detected
Apr 13 18:09:59 (none) user.info kernel: usb 1-1: new full speed USB device using uhci_hcd and address 2
Apr 13 18:09:59 (none) user.warn kernel: usb 1-1: config 1 has an invalid interface number: 9 but max is 0
Apr 13 18:09:59 (none) user.warn kernel: usb 1-1: config 1 has no interface number 0

Apr 13 18:09:59 (none) user.info kernel: usb 1-1: configuration #1 chosen from 1 choice
Apr 13 18:09:59 (none) user.info kernel: usbcore: registered new interface driver usbserial
Apr 13 18:09:59 (none) user.info kernel: usbserial: USB Serial support registered for generic
Apr 13 18:09:59 (none) user.info kernel: usbcore: registered new interface driver usbserial_generic
Apr 13 18:09:59 (none) user.info kernel: usbserial: USB Serial Driver core
Apr 13 18:09:59 (none) user.info kernel: usbserial: USB Serial support registered for GSM modem (1-port)
Apr 13 18:09:59 (none) user.info kernel: usbcore: registered new interface driver option
Apr 13 18:09:59 (none) user.info kernel: option: USB Driver for GSM modems: v0.7.2

I get clue from kernel logs that, somewhere interface error is coming.

and output of proc is
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1199 ProdID=0fff Rev= 0.00
S: Manufacturer=Sierra Wireless, Incorporated
S: Product=USB MMC Storage
S: SerialNumber=SWOC22905731
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 9 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=option
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms


....Then moving ahead i fire the modeswitch command
usb_modeswitch -v 0x1199 -p 0x0fff -S 1 -I

Looking for default devices ...
Found devices in default mode, class or configuration (1)
Accessing device 002 on bus 001 ...
Getting the current device configuration ...
Error: getting the current configuration failed (error -71). Aborting.

.....and at same time the kernel log

Apr 13 18:32:32 (none) user.debug kernel: usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd usb_ms rqt 128 rq 8 len 1 ret -71

then i tried with other command
usb_modeswitch -v 0x1199 -p 0x0fff -S 1 -I -V 0x0fff -P 0x6856

Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found devices in default mode, class or configuration (1)
Accessing device 002 on bus 001 ...
Getting the current device configuration ...
Error: getting the current configuration failed (error -84). Aborting.

...and the kernel log...

Apr 13 18:32:32 (none) user.debug kernel: usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd usb_ms rqt 128 rq 8 len 1 ret -84


So please guide me how to move further.
Thanks in advance.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 13 Apr 2011, 21:41

Your system is telling you the problem quite clearly: "invalid interface number". This makes the communication with the device impossible.

The question is: whose fault is it?

It might be:
a. the firmware of the device
b. the system (USB host, hard- or software)

It would help to use the device in a different hardware system with Linux on it and run the command "lsusb -v -d 1199:0fff" to see the interface details.


richirich
Posts: 15
Joined: 31 Dec 2010, 13:58

Post by richirich » 15 Apr 2011, 08:43

Sorry josh, i couldn't send you the lsusb interface details. Actually i am working on this modem remotely.
But my concern is usb_modeswitch command gets failed here.
Error: getting the current configuration failed (error -84). Aborting.

Below i am pasting you detail log.
# usb_ms -v 0x1199 -p 0x0fff -S 1 -W
Taking all parameters from the command line


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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x1199
DefaultProduct= 0x0fff
TargetVendor= not set
TargetProduct= not set
TargetClass= not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=1
SonyMode=0
GCTMode=0
KobilMode=0
MessageEndpoint= not set
MessageContent=""
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice enabled (default)
Success check disabled
System integration mode disabled

usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device

Looking for default devices ...
searching devices, found USB ID 1199:0fff
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 1d6b:0001
Found devices in default mode, class or configuration (1)
Accessing device 002 on bus 001 ...
Getting the current device configuration ...
USB error: error sending control message: Invalid or incomplete multibyte or wide character
Error: getting the current configuration failed (error -84). Aborting.


So my modem didnt get switched.
But strange is that when i tried it with lower version of usb_modeswitch , it gets switched.
Below is log of 1.0.6.
# ./usb_ms.old -v 0x1199 -p 0x0fff -S 1 -W
Taking all parameters from the command line


* usb_modeswitch: handle USB devices with multiple modes
* Version 1.0.6 (C) Josua Dietze 2009
* Based on libusb 0.1.12

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x1199
DefaultProduct= 0x0fff
TargetVendor= not set
TargetProduct= not set
TargetClass= not set

DetachStorageOnly=0
HuaweiMode=0
SierraMode=1
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent= not set
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice enabled (default)
Success check disabled

usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device

Looking for default devices ...
Found default devices (1)
Accessing device 002 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
USB error: could not get bound driver: No data available
No driver found. Either detached before or never attached
USB error: could not claim interface 0: No such file or directory
Could not claim interface (error -2). Skipping device inquiry
USB error: could not clear/halt ep 1: Invalid or incomplete multibyte or wide character
USB error: could not release intf 0: No such file or directory
USB error: error sending control message: Invalid or incomplete multibyte or wide character
Error: could not get description string "manufacturer"
USB error: error sending control message: Invalid or incomplete multibyte or wide character
Error: could not get description string "product"

USB description data (for identification)
-------------------------
Manufacturer:
Product:
Serial No.: SWOC22905731
-------------------------
Trying to send Sierra control message
USB error: error sending control message: Invalid or incomplete multibyte or wide character
Error: sending Sierra control message failed (error -84). Aborting.

Although it also shows some error in "sierra control message", but modem gets switched which is worth. below is output.
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1199 ProdID=68a3 Rev= 0.06
S: Manufacturer=Sierra Wireless, Incorporated
S: Product=AirCard 312U
S: SerialNumber=351828041815704
C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=83(I) Atr=03(Int.) MxPS= 64 Ivl=5ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=85(I) Atr=03(Int.) MxPS= 64 Ivl=5ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 7 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=5ms
E: Ad=88(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

And at same time kernel log ,
Apr 14 19:38:20 (none) user.debug kernel: usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd usb_ms.X.5 rqt 128 rq 6 len 255 ret -84
Apr 14 19:38:20 (none) user.debug kernel: usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd usb_ms.X.5 rqt 128 rq 6 len 255 ret -84
Apr 14 19:38:20 (none) user.debug kernel: usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd usb_ms.X.5 rqt 64 rq 11 len 0 ret -84
Apr 14 19:38:20 (none) user.info kernel: usb 1-1: USB disconnect, address 2
Apr 14 19:38:20 (none) user.info kernel: usb 1-1: new full speed USB device using uhci_hcd and address 3
Apr 14 19:38:20 (none) user.warn kernel: usb 1-1: config 1 has an invalid interface number: 7 but max is 4
Apr 14 19:38:20 (none) user.warn kernel: usb 1-1: config 1 has no interface number 2
Apr 14 19:38:20 (none) user.info kernel: usb 1-1: configuration #1 chosen from 1 choice

Although here also it is showing some error kinds of logs, but ultimately it gets switched.

So my question to you is, why the same thing is working perfectly in older version of usb_modeswitch utility and not in higher version(1.1.6) ??
kernel version is same 2.6.27 on my both testing.

I didnt test it with higher version usb_modeswitch-1.1.7. Do you think is it worth to test on higher version. Or should i stick to older version.

For sufferers of this modem on linux, i am giving my steps which gets ultimately connected.

Above after modeswitch, modem will get switched.
Then i tried to load the driver usbserial vendor=0x1199 product=0x68a3
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1199 ProdID=68a3 Rev= 0.06
S: Manufacturer=Sierra Wireless, Incorporated
S: Product=AirCard 312U
S: SerialNumber=351828041815704
C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E: Ad=83(I) Atr=03(Int.) MxPS= 64 Ivl=5ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E: Ad=85(I) Atr=03(Int.) MxPS= 64 Ivl=5ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 7 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=5ms
E: Ad=88(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

But it was not enough to eat-up my bandwidth.
Because, wvdialconf or wvdial were getting failed.
#wvdialconf
Scanning your serial ports for a modem.

Port Scan<*1>: USB0 USB1 USB2 USB3

Sorry, no modem was detected! Is it in use by another program?
Did you configure it properly with setserial?

And at same time i get error in kernel log,
Apr 14 18:32:23 (none) user.err kernel: generic ttyUSB0: usb_serial_generic_open - failed resubmitting read urb, error -2

## wvdial
--> WvDial: Internet dialer version 1.41
--> Cannot open /dev/ttyUSB2: No such file or directory

Then i tried with option, but no luck.
Then i load sierra module.
But this module didnt get attached to modem. (i guess i should tried here /sys/bus/usb-serial/drivers/sierra/new_id, it may work...dont know)

But then after so unsuccessful tries i found on net
https://sierrawireless.custhelp.com/app ... Y1eWZKaHJr

Here there is some kernel-wise patch for sierra module.
I applied that patch for my kernel. sierra version: v.1.7.36

and then sierra module gets attached to this modem and after wvdialconf and wvdial both works perfectly.
I hope this will help others too.

Thanks.

richirich
Posts: 15
Joined: 31 Dec 2010, 13:58

Post by richirich » 25 Apr 2011, 08:08

Hi josh,
I have asked you in last post regarding usb_modeswitch version for sierra modem.
How to make this modem working with latest version of usb modeswitch.

hsdpafever
Posts: 42
Joined: 05 Jun 2008, 09:52

Post by hsdpafever » 25 Apr 2011, 09:39

Hi richirich,
Is there any reason why the sierra.ko linux driver is not used?

Cheers.
-Vincent

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 25 Apr 2011, 10:01

Sorry, I must have missed your last post.

There are lots of "84" errors in your log. They are likely caused by communication problems between your device and the system.
The meaning "Invalid or incomplete multibyte or wide character" refers to the device response following the command. So there is no way to know if the command was transmitted correctly.

The new command added in usb_modeswitch 1.1.6 will abort if an error happens. But in the case of error 84 the command may have reached the device nonetheless.

I have made a little patch against 1.1.7. Put it in the source directory and apply with "patch -p1 < ....".

See if that helps.


richirich
Posts: 15
Joined: 31 Dec 2010, 13:58

Post by richirich » 25 Apr 2011, 10:01

I guess you have missed my lines.
I have written all.
I tried with kernel-2.6.27's sierra.ko but it didnt binded as driver for that modem.
The reason i see here is that this modem's vendor-product id is not defined in sierra.c

[ But here i thought , i didnt try here by echo "vid pid" > /sys/bus/usb-serial/drivers/sierra/new_id .
It may worked. Right now i have no modem, otherwise i told you the result too. ]

Then i found from net that there is patch of sierra.c to support this modem.
I mentioned the link in my last post.
I used that, then it worked.

richirich
Posts: 15
Joined: 31 Dec 2010, 13:58

Post by richirich » 25 Apr 2011, 10:25

Hi josh
Thanks for your reply.
Unfortunately currently i dont have this modem right away.
I will arrange and will tell you the result.

But i have seen the patch. It is handling for error number of -84.
But if you see in my first post, there is error number -71 also.
I think when i fire modeswitch command first time it gives -71 and in onwards modeswitch command it gives -84.
This noted pattern is just my guesswork. May be wrong.

No worry, if this patch will work. But if not (may be due to -71 error number), then i will also check after putting -71 in or condition alongwith -84).

I will tell you the result.
Thanks again.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 25 Apr 2011, 21:12

I think there is something fundamentally wrong with your system or your device. You can "override" all errors of course, but this will not solve the basic problem ...

Post Reply