cellular modems and amd64 FreeBSD

Tyson Boellstorff perlcat at windstream.net
Mon Apr 11 06:18:32 UTC 2011


On 04/09/11 01:28, Michael Fuckner wrote:
>
> Wireless USB devices show as CDROMS, but there are a lot of ugly
> possibilities to implement this. Usually it is something like a
> SCSI-eject command telling the device to change it's class.
> Most devices today are switched by u3g, but there also is a manual way
> with usb_modeswitch (http://www.draisberghof.de/usb_modeswitch/) to
> understand what is really happening.
>
> My own experiences are written down here (in german, but the commands
> should be enough to understand what I am doing):
>
> http://michael.fuckner.net/me/blog/index.php?/archives/471-UMTS-mit-FreeBSD8.html
>
>
> Regards,
>   Michael!
>
Thank you, Michael.

I was able to make it work.

To whoever is reading this and wanting to try it, the install for 
usb_modeswitch is based upon linux' USB device handling, and so the 
install will (and should) fail. You can run make and get a binary. You 
can even download the device list at the main web page -- but the 
information there will not get you what you want.

Here's how I did that:

1) install tcl. I got by with 8.5.9

2) extract and make the executable.

3) After you have done a make in the extracted directory for 
usb_modeswitch, copy it (usb_modeswitch) to /usr/sbin, copy the 
usb_modeswitch.conf to /etc, and copy the manpage (usb_modeswitch.1) to 
/usr/share/man/man1.

4) This tool can be ran manually, and that is how you need to do it at 
first.

5) Run lsusb before plugging your device in and make a note of what is 
not there. (your device)

6) Plug your device in, run lsusb, and then you will see what your new 
device Vendor ID and Device ID is.

(In my case, a Sierra Wireless Overdrive is reported as a Vendor0x1199, 
and the device is 0x0fff)

7) Review the device_reference.txt file in the extracted directory above 
for any hints as to what to do to your device.

In my case, there is a SierraMode switch. If your vendor is listed, and 
there is a special switch, then the manpage ought to have a command line 
switch for it -- in my case, '-S'. In Michael's case, he would probably 
have had to do a '-M <STRING>' where the string in his case is 
"5553424312345678000000000000061b000000020000000000000000000000". The 
string is probably listed by your usb device vendor in the 
device_reference.txt file. Most vendors reuse the same code. If not, you 
need to get the latest data page, go to the usb_modeswitch forum, or get 
a usb sniffer, boot to windows, and see what it puts in.

8) run usb_modeswitch -v <vendorname> -d <deviceid> <switch>

9) run lsusb again. You should now have your device id. (In my case, 
0x0029).

You now should have enough to populate the /etc/usb_modeswitch.conf with 
the values to make it work.

The text I appended to mine looks like this:

default vendor = 0x1199
default product = 0x0fff
target vendor = 0x1199
target product = 0x0029
SierraMode=1
CheckSuccess=10    #got these from the 1199:0fff file that I got when I 
extracted the
NoDriverLoading=1    #lastest usb-modeswitch-data file at the 
usb_modeswitch homepage.

I do not know if those last two lines are essential -- but I do know 
that now my wireless works, which is where I stop troubleshooting.

While what I did was crude, it works, and now I will see if I can make 
it work automatically.

A final note: This utility and this doc is intended to change the 
install mode to the working mode of your usb device. It will not load 
the driver for it. That is beyond the scope of this -- my driver (ue) 
loaded automatically.

Good luck!


More information about the freebsd-usb mailing list