Drivers Bandrich



BandLuxe C120 3G Modem, from Oi Velox Plug

File Name: bp-ml-e186014-94v.exe Version: 1.0.6 Driver Date: 02 February 2017 File Size: 7,507 KB. Installs drivers and establishes a local area connection, as indicated by the Local Area Connection icon on your PC. On a Mac, no drivers are needed and the USB connection functions as a LAN connection similar to a PC (Support Mac OS 10.7 and above). To use the web-based interface to configure and manage the wireless settings, see “.


Sunday, 28. December 2008, 16:34:54
linux, driver, mobile, modem
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.Bandrich
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?

Drivers Bandrich Golf Clubs


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!

Drivers Bandrich License Test

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,

Drivers Bandrich Taylormade

+'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.

Drivers Bandrich Test


Go to Connection Manager.
Drivers bandrich golf clubsClick 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

Drivers Bandrich Drivers


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: 0359074010287391Bandrich
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
From http://my.opera.com/CrazyTerabyte/blog/2008/12/28/bandluxe-c120-3g-modem-from-oi-velox-plug