USB Sniffing / Optus 3G and Linux
I'm living at my brother's new place while I'm in Australia. He doesn't have an internet connection (no home computer) and doesn't have a home phone (just uses mobile). To work around this obvious lack of connectivity I've borrowed an Optus branded GlobeTrotter 3G Quad PCMCIA card. The card is supplied as part of the Optus Wireless Connect package.
The Windows drivers and software worked immediately on my laptop but I rarely use Windows so was keen to get it working under my Linux distro.
I spent many hours trying the configurations described at the PHARscape site (and others). PPP negotiation would start but an IP address would never be allocated. I figured there was something different about the Optus 3G network but was using the Optus Access Point Name (APN) documented on the net ("internet").
I ended up sniffing the USB traffic to and from the card under Windows by using the excellent SnoopyPro USB sniffer. I captured the URBs the Windows drivers sent to first serial port endpoint on the card and then used
strings on the capture file under Linux. The AT commands used by the Windows drivers magically appeared.
It turns out that I was using the wrong APN; I should have been using "connect" instead of "internet". Once the pppd chat script was updated things started working. Fantastic!
More details on the specifics of the pppd configuration I'm using can be found on the freshfoo.com wiki.
posted: Mon, 13 Nov 2006 06:41 | permalink | comments
HTTP Auth and Selenium
I ran into a major problem straight away. Our web interface uses Basic HTTP Auth and Firefox insists on presenting a dialog to the (non-existent) user when you open a http://user:firstname.lastname@example.org/ style URL. The tests would hang waiting for the Ok button click.
After a lot of searching I finally found the network.http.phishy-userpass-length. option. When set to 255 the authentication warning dialog box isn't shown.
Selenium creates a fresh Firefox profile every time it starts Firefox so modifying the option in
about:config doesn't help. You need to edit firefox.js and add a line like
pref("network.http.phishy-userpass-length", 255);. This ensures that the option is set in any new profile. On Windows firefox.js can probably be found at
Program Files\Mozilla Firefox\defaults\prefs\firefox.js. It'll probably be at
/usr/lib/firefox-*/defaults/pref/firefox.js on a Linux machine.
I wonder if Selenium-RC could set this option in profiles it creates itself? It already seems to set a bunch of other options.
posted: Tue, 07 Nov 2006 01:58 | permalink | comments