CrazyTB's blog

BandLuxe C120 3G Modem, from Oi Velox Plug

, , , ,

I bought a BandRich BandLuxe C120 HSDPA USB modem from Oi brazillian company. It was part of Oi Velox Plug or Oi 3GG (because the 3G from Oi is more than 3G, it is 3GG! - bah, marketing bullshit).

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 complete
And 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 device
But 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 555342439034a0820000000000000600000000000000000000000000000000
Note, 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: 0359074010287391
And 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

Windows Vista, Windows Firewall, Base Filtering Engine, vLitePython script works in terminal but not in vi?

Comments

Mad Scientist (عادل)qlue Tuesday, December 30, 2008 1:56:51 PM

So once again, the tendency to use workarounds to 'repair' microsoft flaws has backfired. Now if windows was simply compatible with the industry standards of usb devices, such problems would simply not happen. left

Unregistered user Wednesday, December 31, 2008 10:57:54 AM

Hossam Ahmed writes: 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áCrazyTerabyte Wednesday, December 31, 2008 11:14:09 AM

Sorry, I bought this modem already unlocked. I have no idea of how to unlock it.

Mad Scientist (عادل)qlue Wednesday, December 31, 2008 11:48:28 AM

The easiest way to unlock any such device is to speak to the network you bought it from. They charge a fee to unlock it. Most other methods of unlocking mobile devices are actually illegal. left

Denilson Figueiredo de SáCrazyTerabyte Wednesday, December 31, 2008 12:26:32 PM

Not always true, qlue. I spoke to one of mobile operators here and they said there is no unlocking of 3G mobile modems. They (can) only unlock phones.

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.

Mad Scientist (عادل)qlue Wednesday, December 31, 2008 3:36:16 PM

What they are actually saying is that the modem is part of a package and cannot be unlocked officially. In South Africa, for example, The mobile modem is provided free when you take a data contract. It will not work with a standard sim card intended for a mobile phone. Since the data contract is needed in order to use a modem, There is not much sense in unlocking a modem here. If you get a data contract from another provider, it already includes a modem so the only reason one would want an unlocked modem here is to use a mobile phones sim card with it. That is a contravention of the terms and conditions for accessing the mobile network.
Bare in mind that things may be different in other countries. up

Denilson Figueiredo de SáCrazyTerabyte Wednesday, December 31, 2008 3:54:49 PM

What they are actually saying is that the modem is part of a package and cannot be unlocked officially.


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. smile

Unregistered user Thursday, January 1, 2009 11:56:16 AM

Anonymous writes: Thanks for trying to help i apprciate it.

Unregistered user Thursday, January 15, 2009 11:21:54 PM

Anonymous writes: 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

Unregistered user Monday, January 19, 2009 12:32:37 PM

Anonimo writes: 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áCrazyTerabyte Monday, January 19, 2009 3:49:41 PM

Try to download the driver from BandRich site. Maybe it is more up-to-date.

Unregistered user Tuesday, January 20, 2009 8:47:05 AM

Anonimo writes: 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

Unregistered user Saturday, February 14, 2009 9:53:25 PM

Anonymous writes: FWIW Worked out of the box for me on Mac OS 10.5.6.

Unregistered user Friday, March 20, 2009 4:38:45 PM

Anonymous writes: 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..

Unregistered user Tuesday, May 19, 2009 4:30:21 AM

Anonymous writes: 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.

Unregistered user Sunday, May 31, 2009 3:54:37 AM

Anonymous writes: hi.. everyone.I Need help, how to unlock Bandluxe c120 ? thx for help.

Denilson Figueiredo de SáCrazyTerabyte Monday, June 1, 2009 12:04:08 AM

No, I don't know how to unlock that modem. Actually, I have absolutely no idea about how to do that. By the way, I don't even have that modem anymore.

Unregistered user Monday, June 8, 2009 5:56:33 AM

Anonymous writes: where i can got " how to unlock c120 bandluxe" please help .....

Unregistered user Thursday, July 9, 2009 3:31:48 AM

Kevin Tzeng writes: 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 ),

Unregistered user Friday, August 21, 2009 5:17:41 AM

ram writes: 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

Unregistered user Sunday, August 23, 2009 6:49:36 AM

josh writes: To ram: - Try annother USB port - Try on a different computer If both fails, the device is broken.

Unregistered user Monday, November 30, 2009 8:06:35 AM

Ingrid writes: Thanks for your sharing. Now I can see ttyUSB0 and ttyUSB1. Can you offer your ppp processing? Thanks.

Denilson Figueiredo de SáCrazyTerabyte Monday, November 30, 2009 2:23:09 PM

PPP processing? You mean, PPP scripts?

Sorry, I can't. I don't own this device anymore, and all I knew about it is already described in this blog post.

Unregistered user Monday, March 22, 2010 7:00:11 AM

Anonymous writes: How can i install Bandluxe c120 in Windows 7? Email me please. adi4betterlife@yahoo.co.id

Denilson Figueiredo de SáCrazyTerabyte Monday, March 22, 2010 10:22:05 AM

Ask BandRich support, not me.

Unregistered user Monday, April 5, 2010 3:44:48 AM

djunior writes: hi, im just try to sharing regarding to how to install bandluxe c120 in window 7. probably your driver still R1, you must to upgrading it to R11 or (due im on southeast asia region ). go to : http://mlwtelecom.com/support/ and enter emei : 358093021243749 and do DL for "driver Driver BandLuxe C180 untuk Windows 7/Vista/XP/2000" (it worked for C-120 as well) then install it to ur system. hope it works.cause it does to me. rgds, D.

Unregistered user Monday, June 14, 2010 5:00:02 AM

CapitalX writes: Hi Denilson, thanks for sharing! I came on this blog yesterday about 8 hours ago and i read all this great info with no luck to make the bandluxe c100 working on windows 7.So, I am here again to thank you for leading me to the solution. - plug in the Bandeluxe c100 and do the setup proceeder as normal. - After that go to device manger on windows 7 and disable the USB Mass Storage. - Then windows will recognize the 3G modem device of bandluxe. Wait until it complete installing devices. - the bandluxe connection manager will initialize the SIM and enable the connect button. very nice ....except that I have to do these steps on every time I plug in the bandluxe. OK ... I guess I can live with this but my friend ,who asked me to help him on getting his bandluxe c100 working on windows 7 at first place, is the exact problem! not bandrich or Microsoft at all. while i am telling him these steps, he starts thinking about getting a new laptop with another connector too!duh.... So, I have to find that "quick startup" option or any hack like "usb_modswich" on windows 7? BTW...I am from Saudi Arabia if anybody needs help on this just post reply or e-mail me on CapitalX101@yahoo.com Thanx again Denilson for your help,

Unregistered user Tuesday, December 28, 2010 8:13:51 AM

m.aly writes: Hello, I tried the 4th solution, it appears that my firmware does not have the option. I tried ssolution 1, and 2 didn't work, then I tried solution 3 and here is what I got 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 003 on bus 002 ... Getting the current device configuration ... OK, got current device configuration (1) Using endpoints 0x05 (out) and 0x82 (in) Using endpoints 0x05 (out) and 0x82 (in) Inquiring device details; driver will be detached ... Looking for active driver ... No driver found. Either detached before or never attached No driver found ! That is strange... how to get a driver? I am running Ubntu 9.1 karmic Thanks

Unregistered user Tuesday, June 21, 2011 9:42:42 AM

zoonet writes: Mates, how to run BrandLuxe C120 in win 7, home premium?? I have a Dell Inspiration Core i7. it's not working on that, but it works on a Dell Corei5, running win7 home premium!!! pl help

Unregistered user Saturday, December 10, 2011 7:59:56 AM

Anonymous writes: thanko

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

May 2013
S M T W T F S
April 2013June 2013
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31