Author Message

<  Device Information  ~  huawei bm358 (again)

PostPosted: Wed Feb 16, 2011 12:34 pm
Posts: 4Joined: Tue Feb 15, 2011 8:37 am
Hi,
I noticed another user of this Huawei WiMAX stick gave up and returned it, lets hope I have some more time up my sleeve, and a little more patience.

Anyway, after reading the docs here, I have gotten tangled with trying to figure out what messages to try sending the stick to get it to change to a WiMAX stick (which I think is the cdc_ether module).
I am running 2.6.35 on Ubuntu Maverick, and lsusb -v gives me this for the stick:
Bus 002 Device 007: ID 12d1:380b Huawei Technologies Co., Ltd.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x12d1 Huawei Technologies Co., Ltd.
idProduct 0x380b
bcdDevice 0.01
iManufacturer 1 HUAWEI Communications
iProduct 2 HUAWEI WiMAX USB Stick
iSerial 3 08FF0004
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 300mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0001
Self Powered

and I have the usbsnoop.log from a windows XP machine here:
http://tog.swoit.as/exe/UsbSnoop.log.zip

I am stuck as to what messages to send to the stick, based on the log.
My first attempt looks like this:
/etc/usb_modeswitch.d# cat 12d1\:380b
DefaultVendor = 0x12d1
DefaultProduct = 0x380b
MessageEndpoint = 0x01
MessageContent = "001608ff0000001608ff000100180151000c000000000000000c000000010000150b00000000"

Which only generates this message in the kernel log,
kernel: [ 2878.174019] usb 2-3: usbfs: process 2880 (usb_modeswitch) did not claim interface 0 before use

Now I don't think lsusb is going to change, as the device keeps the same ID in windows wether it it a wimax stick or cdrom drive.

Can someone who understands this usbsnoop stuff tell me what other messages I need to send the device?
When I collected the above log, it seemed to switch a few times, then bluescreened, but I figured that I got enough data, seeing as it went from cdrom to wimax stick in the popups in system tray.

This stick is used for vivid wireless in Australia, which is one of the first commercial WiMAX deployments, and I think many people would love to see this working.
Any help or suggestions on what to do next would be appreciated.
I would most more of the usbsnoop log, but its 2Meg uncompressed!


Offline Profile
PostPosted: Wed Feb 16, 2011 9:20 pm
Site AdminPosts: 4880Joined: Sat Nov 03, 2007 12:30 am
The device you sniffed in Windows is not in the mode that you are seeing in Linux.

You have to check the box "List Devices Not Present" in the SniffUSB program. The device entry you want to sniff (by installing the filter) should be there, indicated as "not present" because with drivers installed it has already switched modes and returned as a different device entry.

Sorry, I can't tell you what exact name you have to look for - but the ID should be "Vid_12d1&Pid_380b".

Your sniffing log was interesting nonetheless, as it gave away some hints regarding the chipset in the stick. See the parsed version where I just converted the long bulk data to ASCII characters:
http://www.draisberghof.de/usb_modeswit ... parsed.txt

A repeating sequence was "SQN12X0" which I fed to Google and got this:
http://www.sequans.com/products-solutio ... x/sqn1210/

And what a surprise - they are delivering a software package with the chip which includes Linux drivers ! It's not clear if the end user frontend is running on Linux as well; they state the Linux drivers are intended for embedded use e.g. in standalone routers.

I have simply contacted them via their mail form and asked for separate Linux drivers. Let's see if I get any response. They are located in Paris BTW.



Offline Profile
PostPosted: Wed Feb 16, 2011 11:33 pm
Posts: 4Joined: Tue Feb 15, 2011 8:37 am
cool
here is a screenshot of my sniffing session:
http://i.imgur.com/CuWyI.jpg

And this time it generated a 40M raw log!
compressed version:
http://tog.swoit.as/exe/UsbSnoop-2.zip

Again, I don't really know where to look, but it was interesting that the screenshot shows a different usb id for the masstorage/cdrom device.
I hadn't seen that in linux before.
Anyway, I hope you can make some sense of it Josh and let me know what to do next.

My impression was the device was supported by the cdc_ether driver, given that a previous poster said he got that showing up. No idea how he did, given I haven't had any luck making it anything other than a cdrom.


Offline Profile
PostPosted: Thu Feb 17, 2011 1:14 am
Site AdminPosts: 4880Joined: Sat Nov 03, 2007 12:30 am
Hmm, can't get that screenshot - URL is OK ?


Offline Profile
PostPosted: Thu Feb 17, 2011 9:32 am
Posts: 4Joined: Tue Feb 15, 2011 8:37 am
that URL works for me. I tried it on two different machines.
It just shows the filter installed on each device, the first being 12d1:3809 ( USB Mass Storage) and the wimax being 12d1:380b (Huawei WiMAX usb Stick)

Do you think this is the clue I need?
Should I make the default 12d1:3809 and the target 12d1:380b?
in lsusb in linux I have only ever seen 12d1:380B...


Offline Profile
PostPosted: Thu Feb 17, 2011 1:11 pm
Site AdminPosts: 4880Joined: Sat Nov 03, 2007 12:30 am
Had some DNS trouble yesterday, the link was fine when I tried at work.

The point with sniffing is that you install the filter only on the initial storage device. That is the device that will receive the switching command from the driver. Usually, the resulting log is not extremely large.

So I suggest removing the filter from "3809". Then make sure the stick is unplugged. "Delete" the log to clean it.
"Start" logging and then insert the device.



Offline Profile
PostPosted: Thu Feb 17, 2011 10:58 pm
Posts: 4Joined: Tue Feb 15, 2011 8:37 am
Then back to my original question... How do I know what the 'magic' is to make it switch from the sniffer.
What things am I looking for? I assume the are _OUT transmissions, and they seem to have a target and a message, but how do you know which message to pick?


Offline Profile
PostPosted: Fri Feb 18, 2011 1:04 am
Site AdminPosts: 4880Joined: Sat Nov 03, 2007 12:30 am
Usually, the log will stop growing after the switching - because the original device is "gone", that is, it comes back as a different device.

Often, the log shows a "SURPRISE_REMOVAL" notification at the end; that's the moment when the original device is "gone". Now, the commands issued to the device right before that moment are suspicious.

No magic involved :)


Offline Profile
PostPosted: Thu Feb 24, 2011 3:29 am
Posts: 1Joined: Thu Feb 24, 2011 3:24 am
I found that simply doing 'eject /dev/sgX' (where X=SCSI device) will reset the device into CDC mode (class 2). No product ID/vendor change.

The Mac OS X drivers are labelled 'com.sequans.Sqn1130USBCDC' (i.e chipset = Sequens SQN1130) so this probably is not the same as the Huawei modems.

Unfortunately I didn't get anywhere with the CDC Ethernet driver - there is probably some more magic to make it connect to the WiMAX net.


Offline Profile
PostPosted: Thu Feb 24, 2011 11:27 pm
Site AdminPosts: 4880Joined: Sat Nov 03, 2007 12:30 am
I never heard back after my message to Sequans. Maybe they need a decent kick ?


Offline Profile
PostPosted: Tue Mar 22, 2011 3:33 am
Posts: 1Joined: Tue Mar 22, 2011 3:31 am
Any news on this? I'm very interested in making this work.


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 1
11 posts
Users browsing this forum: No registered users and 3 guests
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum