Tethering a Blackberry Pearl in Linux

Tonight I decided to try and get on the internet using my Pearl as a GPRS modem. It took a couple hours of poking and prodding, but I managed to get it to work.

Software used:

All of those components except for pppd and chat had to be compiled and installed on my laptop, which runs Slackware 12. The order listed for the applications I had to compile is the order in which I built them, as XmBlackberry depends on OpenMotif , Xlt, and opensync. Additionally, I had to edit a large portion of the opensync directory in XmBlackberry to get it to build against that particular version of opensync, as one of the header files contained an underscore where it was referenced with a dash in XmBlackberry.

Aside from that single build snafu (or series of snafus), I largely followed this blog post, which as excellent directions that don’t directly correspond to working with AT&T’s network. Once everything is built, about all that is left relates to the differences betweeing using T-Mobile and AT&T.

Rather than producing a detailed guide like that, I’ll just note my config files, as they differ somewhat.

Here’s my chat script, which works with AT&T. I placed it in /etc/chatscripts/blackberry

ECHO ON
ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED ABORT ERROR
'' ATZ 'OK' 'AT+CGDCONT=1,"IP","WAP.CINGULAR"'
OK 'ATD*99***1#'

Next up is /etc/ppp/peers/blackberry
debug
nodetach
/dev/pts/6
115200
noauth
connect "/usr/sbin/chat -f /etc/chatscripts/blackberry"
modem
defaultroute
noipdefault
user "username"
password "password"
remotename provider
ipparam provider
persist
usepeerdns

Most of the difference here is that I specify something for username and password. These don’t seem to matter for PAP authentication with AT&T, but pppd doesn’t want to do authentication without those two options being specified with *something* in them. Additionally I specify persist so pppd will reconnect when I get disconnected.

Anyway, once you’ve plugged in your Pearl, ran bcharge -o to put it in single device mode, fired up XmBlackberry and clicked on the option menu to create the /dev/pts/* device, pointed your pppd config at that device node, and run pppd with that configuration, likely you’ll end up with magical cell phone internets!

For those lucky peope who work through all of this, your reward is a nice network device reported by ifconfig.


ppp0 Link encap:Point-to-Point Protocol
inet addr:10.121.157.122 P-t-P:10.0.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:68 (68.0 b) TX bytes:123 (123.0 b)

The only downside I’ve found is that I get kicked off consistently every two minutes. I think this might be because I don’t pay for ‘tethering’ my phone. If I intended to drop a card into my laptop to use their network frequently, I’d consider paying for it. As is, I already pay for unlimited data and I don’t plan to use my phone as a modem often. It will be handy when I’m out of town, but otherwise this is pretty cumbersome and not all that speedy.

[EDIT]

After a bit of searching, it turns out that adding
lcp-echo-failure 0
lcp-echo-interval 0

to my peer file fixes the two minute disconnect issue. Looks like pppd was defaulting to expecting an lcp echo, which didn’t happen, so it would disconnect.

This edit was made over my GPRS connection. :)

In which I am less lazy than usual

So I been prodded enough to finally do something with the 800KB of tracklogs I built up while in Greece.

this shows roughly where I went

My garmin gps unit only allows for a certain number of logs before it starts deleting things, so one day’s sailing is missing between Kythnos (ΚΥΘΝΟΣ) and Serifos (ΣΕΡΙΦΟΣ) when I neglected to boot my laptop and pull data off of the gps. Aside from that small issue and the unit losing signal between Sifnos (ΣΙΦΝΟΣ) and Ios (ΙΟΣ) when I left it in the galley, I’m very pleased with how well it logged the journey.

At any rate, perhaps now I’ll work on writing up what happened on each island, and possibly take the trip tracklog for a spin with geotagging my photos.

Ron Paul spam.

Seeing that I read digg.com more regularly than I should, I’ve noticed that people really like to call any story about Ron Paul spam, even when its on a social site whose entire purpose is to submit and vote for things you like. Given that some people seem to really like Ron Paul’s presidential candidacy, and those same people also seem to know how to use Digg, I would think that this is the natural order of things. However, this being the internet, it seems any factually baseless detraction against things you don’t like are the order of the day, and gosh darn it we have a petition too. If I don’t like it it’s spam, and it’s destroying the internet and causing global warming and making Al Gore cry.

So, tonight my spam filter jumped on the bandwagon.

Oh, and once again this is not about what went on in Greece, and for that I’m truly sorry. Really.