16.8.08

How to use your blackberry as a modem in Debian

[ATENTION: this blog post was updated!]

After aquiring a BlackBerry cellphone, I wanted to use it as a modem for my laptop, running Debian. I still didn't figure how to use it via bluetooth, but here's how to do it via USB:

I recommend you read all this procedure before starting


  • Install barry (so you can use the cellphone via USB, this makes it chargeable too

  • Install XmBlackBerry

  • connect your mobile phone to your computer, via USB

  • sudo XmBlackBerry

  • clicking in the options menu you'll see in the stderr (console where you
    run this app) a /dev/pts/something , which is your GPRS device

  • click "connect" and see if your phone tells you that you're connected to the desktop

  • sudo vi /etc/chatscripts/blackberry :


    ABORT BUSY ABORT ‘NO CARRIER’ ABORT VOICE ABORT ‘NO DIALTONE’ ABORT ‘NO DIAL TONE’ ABORT ‘NO ANSWER’ ABORT DELAYED ABORT ERROR
    SAY “Initializing\n”
    ” ATZ
    SAY "ATE\n"
    OK 'AT+CGDCONT=1,"IP","wap.voicestream.com"'
    OK 'AT'OK 'ATDT*99***1#'
    SAY "Dialing\n"


  • (change "device" here) sudo vi /etc/ppp/peers/blackberry


    debug debug debug
    nodetach
    /dev/pts/device
    115200
    connect "/usr/sbin/chat -f /etc/chatscripts/blackberry"
    nomultilink
    defaultroute
    noipdefault
    ipcp-restart 7
    ipcp-accept-local
    ipcp-accept-remote
    lcp-echo-interval 0
    lcp-echo-failure 999
    modem
    noauth
    nocrtscts
    noipdefault
    novj
    usepeerdns
    user ""
    password ""


  • sudo pppd call blackberry



And you're on!

Yeah, but how to install XmBlackBerry?



Here are the steps to install XmBlackBerry:

* get and install libmotif 2.3.0 debian packages here
* aptitude install xaw3dg-dev xorg-dev x11proto-print-dev autoconf libtool libopensync-dev libxp-dev libcurl4-openssl-dev libreadline5-dev
* As root, run
ln -s /usr/include/X11/Xaw3d /usr/include/X11/Xaw
* Install Xlt (tested with 13.0.13): get it here, untar it and, in its directory...
*

./configure --with-motif-libraries=/usr/X11R6/lib --prefix=/usr
make && make install

* Install XmBlackBerry:

cvs -d:pserver:anonymous@xmblackberry.cvs.sourceforge.net:/cvsroot/xmblackberry co XmBlackBerry
cd XmBlackBerry/
cvs -d :pserver:anonymous@libusb.cvs.sourceforge.net:/cvsroot/libusb co libusb
cd libusb
make && make install
cd ..
./CVSMake
./configure --enable-maintainer-mode --disable-shared --with-motif-libraries=/usr/X11R6/lib
make
sudo make install
sudo ln -s /usr/X11R6/lib/libXm.so.4 /usr/lib/libXm.so.4


And how to install Barry?



You distro should have packages for it (most have). If not...

cvs -d:pserver:anonymous@barry.cvs.sourceforge.net:/cvsroot/barry login 
cvs -z3 -d:pserver:anonymous@barry.cvs.sourceforge.net:/cvsroot/barry co -P barry
cd barrysh
buildgen.sh
./configure --prefix=/usr
make
sudo make install
sudo cp udev/*b* /etc/udev/rules.d/.