I’ve had Clear for a while now, and have been using it on my commute with my netbook, an HP Mini. The connection is good with the exception of a few dead spots; however there’s one big catch for me: it only works on Windows.
So ever since I got it, I’ve been casting about for an opportunity to get things to work with Linux. I know I could ditch my Ubee modem for a Clear Spot, but then I have yet ANOTHER battery-powered device to deal with, not to mention that I’ve already paid for this modem. Besides, what kind of a geek would I be if I wasn’t trying to figure stuff out?
I’ve been following this thread for some time, and finally someone picked up on a location of some of the open source code for Beceem chipsets — which are commonly being used for the 4g USB modems.
I grabbed the package, which indeed does include a driver and connection manager for Beceem chipsets, along with raft of documentation.
I built everything according to the docs, ended up with a kernel module (drxvi314.ko), an SSL plug-in library ( libengine_beceem.so), some various tools and udev rules, and a client-server (wimaxc/wimaxd) connection manager.
I inserted the module, plugged in my Ubee PXU1900 and….
Nothing. Of course it wouldn’t be that easy.
So I started from some lsusb output:
Bus 001 Device 003: ID 0489:e016 Foxconn / Hon Hai
I started taking a look at the driver source — since it’s a USB device, there had to be some sort of reference to the vendor and product IDs somewhere, so the driver knows which devices it knows how to work with.
And sure, enough, in InterfaceInit.c:
static struct usb_device_id InterfaceUsbtable[] = {
{ USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3) },
{ USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3B) },
{ USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3L) },
{}
};
And then I noticed that there was already a patch in the package to add support for some more devices:
--- ./Interface/usb/InterfaceInit.c.dist 2010-08-19 13:10:50.000000000 -0500
+++ ./Interface/usb/InterfaceInit.c 2010-08-19 13:23:30.000000000 -0500
@@ -4,6 +4,8 @@
{ USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3) },
{ USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3B) },
{ USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3L) },
+ { USB_DEVICE(BCM_USB_VENDOR_ID_ZTE, BCM_USB_PRODUCT_ID_226) },
+ { USB_DEVICE(BCM_USB_VENDOR_ID_FOXCONN, BCM_USB_PRODUCT_ID_1901) },
{}
};
So I looked up where BCM_USB_PRODUCT_ID_1901 was coming from, and found it in InterfaceInit.h:
#define BCM_USB_PRODUCT_ID_1901 0xe017
Hey, what do you know? It’s only one off from the e016 value reported by lsusb! I added one more constant to the header:
#define BCM_USB_PRODUCT_ID_1900 0xe016
And listed that vendor/product pair in the InterfaceInit.c file:
{ USB_DEVICE(BCM_USB_VENDOR_ID_FOXCONN, BCM_USB_PRODUCT_ID_1900) },
I compiled, inserted the module, and…BLINKING LIGHTS! Little Ubee lit up green!
I took a look at /var/log/messages and…
Sep 24 21:20:52 hokusai kernel: [ 3447.228101] usb 1-2: reset high speed USB device using ehci_hcd and address 3
Sep 24 21:20:53 hokusai kernel: [ 3448.201279] Do Post chip reset setting here if it is requiredddr_init:Register Count is =48
Sep 24 21:20:53 hokusai kernel: [ 3448.207521]
Sep 24 21:20:53 hokusai kernel: [ 3448.221020] InitCardAndDownloadFirmware:CFG file downloaded
Sep 24 21:20:53 hokusai kernel: [ 3448.221763]
Sep 24 21:20:53 hokusai kernel: [ 3448.221768] /usr/src/Rel_5.2.7.3P1_USB/Source/Driver/Network/OSAL/Linux/usb/Common/nvm.c:ReadMacAddressFromNVM:420:Buffer dump of size 0x6 in the HEX:
Sep 24 21:20:53 hokusai kernel: [ 3448.221782] 00 1D 88 09 8A 42
Sep 24 21:20:53 hokusai kernel: [ 3448.221804] register_networkdev:Registering netdevice notifier
Sep 24 21:20:53 hokusai kernel: [ 3448.221812]
Sep 24 21:20:53 hokusai kernel: [ 3448.221826] register_networkdev:BCM Notifier got Registered
Sep 24 21:20:53 hokusai kernel: [ 3448.221859] ========= bcm_init (noop) ======== bcm_notify_event:Register RefCount: 5
Sep 24 21:20:53 hokusai kernel: [ 3448.225736]
Sep 24 21:20:53 hokusai kernel: [ 3448.226497] register_networkdev:Beceem Network device name is eth2!
Sep 24 21:20:54 hokusai kernel: [ 3448.506768] open_firmware_file:Got file descriptor pointer of /lib/firmware/macxvi200.bin!
Sep 24 21:20:54 hokusai kernel: [ 3448.506792] BcmFileDownload:Opened file is = /lib/firmware/macxvi200.bin and length =0x1cd120 to be downloaded at =0xbfc00000
Sep 24 21:20:54 hokusai kernel: [ 3448.506810] BcmFileDownload:download start 46b16b79
Sep 24 21:20:54 hokusai kernel: [ 3448.753786] InterfaceFileDownload:Got end of file!
Sep 24 21:20:54 hokusai kernel: [ 3448.993528] InterfaceFileReadbackFromChip:Got end of file!
Sep 24 21:20:54 hokusai kernel: [ 3448.993554] BcmFileDownload:file download done at 46b16d60
Sep 24 21:20:54 hokusai kernel: [ 3448.993561] InitCardAndDownloadFirmware:BIN file downloaded
Sep 24 21:20:54 hokusai kernel: [ 3449.003695] device_run:Sending first interrupt URB down......
Sep 24 21:20:54 hokusai kernel: [ 3449.006946] device_run:Got the mailbox interrupt ...Registering control interface...
Sep 24 21:20:54 hokusai kernel: [ 3449.006955]
Sep 24 21:20:54 hokusai kernel: [ 3449.007333] register_control_device_interface:Got Major No: 250
Sep 24 21:20:54 hokusai kernel: [ 3449.012484] usbcore: registered new interface driver usbbcm
It’s aliiiiiive! It even grabbed its firmware! We are oh so close.
Next it was time to get the connection manager working. Here’s where my limited knowledge of WiMAX is starting to hurt.
The first part was simple enough: build the connection manager, and start up the server component (details on this are in the docs inside the package):
$wimaxd -c /etc/Sprint4g/wimaxd.conf
Then fire up a client and hook it up:
$wimaxc -i
Beceem CM Server Version 1.1.6.0
>
I tried a ‘search’ (one of the commands in the ‘help’:
Network search returned 2 base stations.
Idx BSID Pre Freq BW RSSI CINR
0 01:01:00:00:02:26:42:f2 0x37 2647.000 10.000 -73 24
1 01:01:00:00:02:26:42:f3 0x57 2667.000 10.000 -86 7
Now that looks good — two different base stations to play with. At this point, I’m thinking I’m in really good shape! So let’s try to connect!
> connect
Connect request submitted for:
Center frequency 2647.000 MHz
Bandwidth 10.000 MHz
Preamble index 0x37
fingers totally crossed sixteen ways
…and nothing.
Well, not nothing, exactly, but not something I know what to do with:
--------------------- EAP Authentication ------------------
Authentication failed (key generation)
-----------------------------------------------------------
From what I can glean of how this is working, the network is trying to use EAP-TLS to authenticate my device on the network. To do that, it needs my device certificate; however I see no such cert in the distribution package on Windows which leads me to guess that it’s on the non-volatile memory of the device itself. Encrypted, of course.
The key is likely also stored on the device. Convenient. BUT. It needs a passphrase.
I’m trying the approaches suggested in the Sprint docs from the package, including generating the passphrase based on Mac ID; but I am stuck on the above — I can’t seem to get a valid key.
So I post this in the hope that someone who knows more about EAP and device certificates might be willing/able to lend a Daver a hand. My lit-up Ubee is staring at me, wanting so badly to be connected…