BandLuxe C120 3G Modem, from Oi Velox Plug
Sunday, 28. December 2008, 16:34:54
Supposedly, this modem was supported on Linux. At least this is what the box said. The truth... well... I bet you can imagine.
Introduction
(If you are in a hurry and just want to know a quick solution that works, scroll down to Solution 4: using "Quick startup".)
Let me start by showing you a picture of the modem:

And scanned images from the box itself:


Pay attention to the supported systems! It says it is Designed for Linux, and also has Mac and its Universal binary logo. So, anyone would think this device is supported on all major platforms! Right? Not quite.
I asked a friend to plug this on his MacBook. What happens? A new drive, with Windows-only installation executables and documents... nothing else.
Does it work out of the box in Mac? Nope.
Let me try it on my pretty recent Gentoo/Linux. What do I get? A new USB CD-ROM (over scsi emulation) with Windows-only files... Pretty much the same as in Mac.
Does it work out of the box in Linux? Nope.
So, by know I already know that box has misleading advertisement.
CD contents
Let's take a look at the CD contents:

As you can see, there are drivers for most Windows versions. There are also 3 PDFs: one English manual, one Brazillian Portuguese manual, and a Quick Start Guide. The total of data is about 24MB. There is a section of these manuals that is worth reading:

Note how this table contrasts with the one at the box cover. This one only cites Windows, while the box cover says that both Linux and Mac are also supported. (the text above the table is related to Solution 4: using "Quick startup")
The version.txt file contains the following string: "103017". This string is, actually, the Connection Manager version: "1.03.017". And Connection Manager is the Windows-only software that gets installed with this device.
Exploring this device under Linux
Upon connecting BandLuxe C120 modem, this is what I get on syslog (/var/log/messages as well as dmesg):
hub 7-0:1.0: unable to enumerate USB device on port 4 usb 4-2: new full speed USB device using uhci_hcd and address 4 usb 4-2: configuration #1 chosen from 1 choice scsi5 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 4 usb-storage: waiting for device to settle before scanning usb 4-2: New USB device found, idVendor=1a8d, idProduct=1000 usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 4-2: Product: USB Mass Storage usb 4-2: Manufacturer: BandRich, Inc. usb 4-2: SerialNumber: 000000000002 usb 4-2: reset full speed USB device using uhci_hcd and address 4 scsi 5:0:0:0: CD-ROM BandLuxe CDROM 1.01 PQ: 0 ANSI: 4 scsi 5:0:0:0: Attached scsi generic sg1 type 5 usb-storage: device scan completeAnd after this I get /dev/sg1 on my system.
For some reason I don't understand well (and right now I don't care), I can't mount /dev/sg1:
root# mount /dev/sg1 /mnt/cdrom mount: /dev/sg1 is not a block deviceBut I'm pretty sure it is possible to mount this USB/SCSI/CD-ROM under Linux.
This is the relevant lsusb line:
Bus 004 Device 007: ID 1a8d:1000
Looking for Linux driver
At BandRich's website, I can find the download page for BandLuxe C120. It contains four downloads: a driver for Eee PC (Linux edition); a driver for Linux Fedora 8 (Kernel 2.6.22 or above); a driver for Windows XP(SP2), 2000(SP4), Vista; and a driver for Mac OS X.
Let's take a look at those Linux drivers. First, the Fedora 8 one.
I've downloaded the supposed driver for Fedora 8. The file is Fedora 8.zip. Its contents? Only two files: Fedora 8.pdf and ttyUSBX.pdf. Nice drivers, don't you think so?
Let's hope we have a better luck at the Eee PC driver. The file is EeePC patch.zip. It contains two PDFs and a promising bandluxe-eeepc.tar.bz2 file. Inside this tarball we have 6 files:
10-bandluxe.rules eeepc3g.sh README bandluxe.fdi option-bandluxe.ko vidpid.sed
Basically, that script will patch modules.alias (inside /lib/modules/`uname -r`) using vidpid.sed, replace the kernel/drivers/usb/serial/option.ko with an updated version, add a udev rule at /etc/udev/rules.d/10-bandluxe.rules, and add a hal file at /usr/share/hal/fdi/preprobe/20thirdparty/bandluxe.fdi.
The added udev rule seems interesting and promising:
ACTION!="add", GOTO="hso_end"
# send eject command via usb_storage driver for all BandLuxe Installation CDROM devices
SYSFS{idVendor}=="1a8d", SYSFS{idProduct}=="1000", RUN="/usr/bin/eject /dev/%k"
LABEL="hso_end"
Understanding how this device works
This device, when plugged in, identifies itself as 1a8d:1000 (vendor_id:product_id), which is just a USB Mass Storage. Upon installing the (Windows) drivers and so on, the driver will send a command to the device, which will then change its identification to 1a8d:1002, which is the actual HSDPA modem. This happens because of... can you guess it? Yes, because of Windows!
A USB device can act as many things at the same time. It could, for example, act as both USB Mass Storage and HSDPA modem at the same time. But why it doesn't? Because, in Windows, if one of its "interfaces" does not have a driver, then the entire device is disabled. So... manufacturers came up with this kinda ugly solution: a device that switches between two modes. One mode does not require special drivers (USB Mass Storage) and contains the required drivers for the other mode; and another mode which is the actual device.
One big problem with this is that non-Windows systems are left at their own luck, because the device will be recognized as a USB Mass Storage with useless files. The hope ain't lost, however! There is a tool called usb_modeswitch that will try to send the required command to force the device switch to the desired mode. In fact, it is basically a hack. It uses libusb to connect to the device and sends a hard-coded message. Nothing more. Yeah, a hack. But, yeah, it usually works.
So, my challenge now is finding a way to make BandLuxe C120 switch from product id 0x1000 to 0x1002.
Solution 1: ejecting the CD-ROM
I've contacted Leon Leong, which was the person who sent BandRich-related patches to the main Linux kernel. He explained many things, and I'm going to document those here, in order to help other people who also have this device.
First of all, he said that ejecting the CD-ROM would trigger a mode switch on the device. This explains that udev rule from Eee PC patch above. Unfortunately for me, it didn't work. Murphy seems to be by my side. eject /dev/sg1 did nothing. Leon Leong also told me to try sdparm --command=unlock /dev/sg1 ; sdparm --command=eject /dev/sg1, but no success either.
He then told me that firmware versions 052 or later would support this kind of switch. To see the firmware version I can use the Connection Manager at Windows, or I can send ATI command to the serial port using a program like minicom (after the modem has switched).
According to Connection Manager, my firmware version is 405070_001_014 Sep 05 2007, which seems quite old.
Solution 2: ignoring the device
For firmware version older than 041, you can simply ignore the CDROM.
After 5 seconds, it will automatically switch to the Modem mode.
Please patch the below code to drivers/usb/storage/unusual_devs.h
+UNUSUAL_DEV( 0x1A8D, 0x1002, 0x0000, 0x0000, +"BandRich", +"BandLuxe CDROM USB Device", +US_SC_DEVICE, US_PR_DEVICE, NULL, +US_FL_IGNORE_DEVICE ), +
If you use this method, you don't need to modify udev rules.
the old [firmware] version (prior to 041) would kick a timer for 5 seconds, if no SCSI command is received, it will switch automatically.
Guess what? It didn't work for me either...
Upgrading the firmware?
Well, probably a firmware upgrade would be a nice solution. However, to do so, you need to contact support@bandrich.com asking for the new firmware and so on... Why isn't a firmware upgrade available at BandRich download page?
Well, I've decided to not upgrade the firmware (at least not yet), so I can't give you more information.
Solution 3: using usb_modeswitch
Some guy found a quite long sequence of USB commands to trigger a mode-switch for his device. He posted his "solution" to a topic at usb_modeswitch forum. On the other hand, I found a much shorter sequence and posted it to the same forum topic.
Basically, I used SniffUsb 2.0 under Windows to get a copy of all data between Windows and the device. Then, I looked at that huge log and found two messages that did work for me.
usb_modeswitch -v 0x1a8d -p 0x1000 -V 0x1a8d -P 0x1002 -m 0x05 -r 0x82 -M 55534243109298820000000000000600000000000000000000000000000000 usb_modeswitch -v 0x1a8d -p 0x1000 -V 0x1a8d -P 0x1002 -m 0x05 -r 0x82 -M 555342439034a0820000000000000600000000000000000000000000000000Note, however, that these messages only work after usb_storage has detected the device. If, for example, I blacklist usb_storage, or prevent it from attaching itself to the device, then these two USB messages don't work.
Solution 4: using "Quick startup"
This is the easiest solution! It requires a Windows system, but you can use Windows inside a virtual machine with USB support.
Go to Connection Manager.

Click the middle icon, called Menu.

Click on Setting.

Check Quick startup and click Save.

That's it!
This Quick startup thing is a setting saved on the device itself. It will make the device identify itself always as a modem, so no switching will be required! The only drawback is that the device won't be recognized on other Windows machines until the driver is installed, or Quick startup is disabled.
Exploring this device under Linux (now as HSDPA modem)
Now that this device has switched to the modem mode, here are the relevant lines from syslog (/var/log/messages as well as dmesg):
hub 7-0:1.0: unable to enumerate USB device on port 4 usb 4-2: new full speed USB device using uhci_hcd and address 8 usb 4-2: configuration #1 chosen from 1 choice option 4-2:1.0: GSM modem (1-port) converter detected usb 4-2: GSM modem (1-port) converter now attached to ttyUSB0 option 4-2:1.1: GSM modem (1-port) converter detected usb 4-2: GSM modem (1-port) converter now attached to ttyUSB1 option 4-2:1.2: GSM modem (1-port) converter detected usb 4-2: GSM modem (1-port) converter now attached to ttyUSB2 usb 4-2: New USB device found, idVendor=1a8d, idProduct=1002 usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=20 usb 4-2: Product: BandLuxe 3.5G HSDPA Adapter usb 4-2: Manufacturer: BandRich, Inc. usb 4-2: SerialNumber: 0359074010287391And the relevant line from lsusb:
Bus 004 Device 008: ID 1a8d:1002
And now I have three new devices: /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2
For connection, I should configure PPP to use one of the ttyUSB devices (usually, the first one) and dial to *99# number, with empty username and password. If for some reason you can't get sane DNS servers from PPP, you can use the ones from OpenDNS: 208.67.222.222 and 208.67.220.220








Aadil # 30. December 2008, 13:56
Anonymous # 31. December 2008, 10:57
I'm trying to unlock this modem, i bought with a provider and it's locked, i tried to download the software and it didn't work, as i still receive invalid SIM message, any help on this ???
Denilson Figueiredo de Sá # 31. December 2008, 11:14
Aadil # 31. December 2008, 11:48
Denilson Figueiredo de Sá # 31. December 2008, 12:26
Of course there is unlocking of 3G modems (and there are some online services that unlock them for a fee), but... things might be a bit more difficult than just asking the mobile operators.
Aadil # 31. December 2008, 15:36
Bare in mind that things may be different in other countries.
Denilson Figueiredo de Sá # 31. December 2008, 15:54
I guess that what they are saying is that "we have no training on how to unlock modems, and we don't even know if it is possible to unlock them".
Yeah, things can be different in different countries.
Anonymous # 1. January 2009, 11:56
Thanks for trying to help i apprciate it.
Anonymous # 15. January 2009, 23:21
Hi Thanks for the sharing,
My bandluxe C120 were no Quick Startup option on window$ so I can not try your easiest way neither the other way.
Could you please give me another soluttion? please contact me at adisucipto{at}yahoo{dot}com
Thanks B4
Anonymous # 19. January 2009, 12:32
Also my driver haven't Quick Startup option.
Can you provide me your driver? Maybe it's newer (or older).
Many thanks,
Lello
Please contact me al lello[dot]covino[at]gmail[dot]com
Denilson Figueiredo de Sá # 19. January 2009, 15:49
Anonymous # 20. January 2009, 08:47
BandRich site has a driver without Quick Startup option....
Any Ideas?
What's your driver version?
Many thanks,
Lello
lello[dot]covino[at]gmail[dot]com
Anonymous # 14. February 2009, 21:53
FWIW
Worked out of the box for me on Mac OS 10.5.6.
Anonymous # 20. March 2009, 16:38
awesome!
i was stuck with the device being identified as a CDROM drive not as a modem
after ejecting, it worked, now it's identified as a modem
thx for the hint
keep it up..
Anonymous # 19. May 2009, 04:30
I have installed windows 7 in my notebook (NEC Versa S5600). When i plug in to the usb port, it said that doesn't support for windows 7. I have tried to find the driver. but i've got nothing. Pls help me how to install the Bandluxe C-120 in Windows 7. Thank you.
Anonymous # 31. May 2009, 03:54
hi.. everyone.I Need help, how to unlock Bandluxe c120 ? thx for help.
Denilson Figueiredo de Sá # 1. June 2009, 00:04
Anonymous # 8. June 2009, 05:56
where i can got " how to unlock c120 bandluxe" please help .....
Anonymous # 9. July 2009, 03:31
About Solution 2,
The product ID you specified should be 0x1000 rather than 0x1002.
0x1002 is the product ID of modem, not CDROM.
I have verified below patch on kernel 2.6.21.5 and 2.6.8.1 and it did work.
Besides, please be noted it is US_FL_FIX_INQUIRY instead of US_FL_IGNORE_DEVICE
UNUSUAL_DEV( 0x1A8D, 0x1000, 0x0000, 0x0000,
"BandRich",
"BandLuxe CDROM USB Device",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_INQUIRY ),
Anonymous # 21. August 2009, 05:17
i have ubuntu 9.04 in my thinkpad Z61T. When I connected Bandluxe C120, there is no light, no cd rom icon and my lsusb is as follows
Bus 001 Device 003: ID 0c45:627b Microdia PC Camera (SN9C201)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 006: ID 0a5c:2110 Broadcom Corp. Bluetooth Controller
Bus 004 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
please help how to resolve it
Anonymous # 23. August 2009, 06:49
To ram:
- Try annother USB port
- Try on a different computer
If both fails, the device is broken.
Anonymous # 30. November 2009, 08:06
Thanks for your sharing.
Now I can see ttyUSB0 and ttyUSB1.
Can you offer your ppp processing?
Thanks.
Denilson Figueiredo de Sá # 30. November 2009, 14:23
Sorry, I can't. I don't own this device anymore, and all I knew about it is already described in this blog post.