Tether BlackBerry Bold 9700 in Linux

I use Ubuntu on an iBook G4. I don't know much about X and GUI's in linux so I use the command line a lot! These are ways to tether.

USB

For this you can use either barry which is a C++ suite for tether and sync/backup stuff, or berry4all (aka bbtether) which is a python script package that does just tethering.

Well, I didn't like the dependency on python because I wanted to include this on my router so I could share my 3G. So here is my kinda rewrite: bb dot c

Simply compile it like so:

gcc -o bb bb.c -lusb

It only requires libusb-0.1. Downside is it polls. I have it set for 1ms with good results. I run it like so:

root@atom:~/bb# ./bb &
[1] 18202
root@atom:~/bb# Manufacturer: Research In Motion
Product: RIM Composite Device
Serial: 69B71E7A526112B08DF1DA03196AC89F82606929
PIN: 22082961
debug: open("/dev/ptmx")
debug: grantpt()
debug: unlockpt()
debug: ptsname_r()


MODEM ON PTS: /dev/pts/0
./ppp.sh 0
pts is ready.
Serial connection established.
Using interface ppp0
Connect: ppp0 <--> /dev/pts/0
PAP authentication succeeded
local  IP address 25.50.33.30
remote IP address 169.254.1.1
primary   DNS address 10.177.0.34
secondary DNS address 10.168.181.116

ppp.sh is just this lil thing:

ppp.sh
#!/bin/sh
 
if [ -z "$1" ]; then
  echo "need more input"
  exit
fi
sudo pppd /dev/pts/$1 local 921600 user guest password guest connect \
	"chat '' 'AT+CGDCONT=1,\"IP\",\"epc.tmobile.com\"' OK ATDT*99# CONNECT ''" \
	defaultroute noipdefault usepeerdns nodetach noproxyarp \
	ipcp-max-failure 1000 persist

Bluetooth

This is one way to find your bluetooth address

sdptool search DUN

Then bind it to a device

rfcomm bind rfcomm0 <bluetooth address>

Then run pppd on it. Below is my example, wow ;)

pppd \
	/dev/rfcomm0 local 460800 \
	user guest \
	password guest \
	connect "chat '' ATZ OK 'AT+CGDCONT=1,\"IP\",\"epc.tmobile.com\"' OK ATDT*99# CONNECT ''" \
	defaultroute replacedefaultroute noipdefault usepeerdns \
	updetach noipdefault \
	novj nodeflate noaccomp nobsdcomp noccp nopcomp \
	noproxyarp ipcp-max-failure 1000 persist

Engineering Screen

I ripped this JavaScript from some other sites. They all were full of bloat, ads, and bullshit. Just visit http://scottn.us/escreen.html and type in the stuff. Then somewhere in those menus you can see your active tunnels. Like one to blackberry.net for the phone, and one to epc.tmobile.com for this tethering. Don't break anything!

 
 
blackberry.txt · Last modified: 2011/08/28 09:47 by neutronscott
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki