Much ado about scripting, Linux & Eclipse: card subject to change

2010-08-16

Linux modem tethering with berry4all, Rogers 3G network, and Blackberry Bold 9000

Because I'll be out of town for the next couple days, part of my packing list included setting up tethering via my Blackberry.

First I tried barry but was unsuccessful in trying to make a successful connection.

Then I found berry4all.

I had two problems, but thanks to the extensive FAQ, I managed to solve them:

  1. Ensure your device (in my case, Blackberry Bold 9000) has its APN correctly set in Setup > Options > Advanced > TCP
  2. Ensure other network connections are disabled using route -n; ifconfig -a before attempting to connect via tethered 3G modem. See also If your PPPD does not support replacedefaultroute
  3. Ensure /etc/resolv.conf is being correctly updated with the appropriate DNS entries (I have to do this by hand at the moment, but tweaked the default /opt/bbtether/berry4all.sh script to add this line so that I can automatically update the file immediately before connecting:
    #!/bin/sh
    cp -f /etc/resolv.conf.bbtether /etc/resolv.conf
    python bbgui.py &
    where /etc/resolv.conf.bbtether contains:
    domain rogers.com
    search rogers.com
    nameserver 64.71.255.198
    #nameserver 64.71.255.253
  4. Load up a bandwidth speed test such as bandwidthplace.com and see what network speed you can get.

Admittedly, tethered speeds are nothing close to wifi speeds.

  • With Rogers 3G network and Blackberry Bold 9000 attached via USB, I managed to get about 500-2800kbps down and 100-200 kpbs up.
  • With Rogers "Exterme" cable internet access (wifi @ home) I get 9800kbps down, 960kbps up.

But at least I can surf on my laptop using the 3G network while I'm away from the office.

To disconnect wired & wifi, then tether automatically and stay connected until CTRL-C is pressed, try this script:

#!/bin/bash
if [[ $UID != 0 ]]; then
 echo "Must be run as root!"
else
 /etc/init.d/network stop
 cp /etc/resolv.conf.bbtether /etc/resolv.conf
 route -n; ifconfig

 cd /opt/bbtether; python bbtether.py rogers -P **YOUR_DEVICE_PASSWORD_HERE**

 /etc/init.d/network start
 route -n; ifconfig
fi

2010-08-11

p2 Repository Association And The Fine Art Of Forceably Enabling Disabled Sites 2: Tycho Edition

Back in February, I blogged about how to add associate sites to an update site generated w/ the Buckminster or B3 aggregator.

Since we've moved our build infrastructure to use Tycho + Maven, I had to port the script over to work there for our update site aggregation.

Here are the moving pieces:

  • pom.xml that builds the site, listing input sites as <repository> entries, and a shout-out to build.xml, below, to do extra stuff during the install phase
  • build.xml ant script called by pom.xml, above, to do additional work after the creation of the site_assembly.zip update site zip
  • aggregateSite.jbosstools.properties properties file listing the aggregate sites to add