a pic[ google | mail | ip | ov | reg | tv | cnn ]
[ man | chr | en-en | nl-en | en-nl | h4 ]
[ pub-cvs | ic-cvs | blog | scratch | py ]
[ comp | prog | ele | gen | trav | ecs ]
[ Home | Edit | Print | Top | Topics | Help! ]
[ Home | Edit | Print | Top | Topics | Help! ]

GPRS internet on NetBSD 3.1 using Motorola V360 with USB data cable


This is a short summary (mainly for myself for when I f*ck up my disk again), explaining how to work aforementioned phone with pppd to get internet. It works on netbsd, but I don't see a reason it wouldn't work with other *nix, since it's only a matter of pppd settings and getting serial stuff through the usb port.

[ Home | Edit | Print | Top | Topics | Help! ]

disclaimer


The information contained herein is on an as-is basis, which basically means I'm not even willing to discuss it unless it's a real bright day; it works for me, so there. Etc.

I don't know anything about usb, ppp, pppd, motorola, AT commands etc, and don't even bother to capitalize words, as you can see. So don't bother me with annoying crap, pretty please.

[ Home | Edit | Print | Top | Topics | Help! ]

...so?


Well, I spose all this is pretty straightforward; however, after trying numerous sample pppd/chat configs and still getting no further, I figured it's worth a page.

[ Home | Edit | Print | Top | Topics | Help! ]

prerequisites


You will now obtain...
[ Home | Edit | Print | Top | Topics | Help! ]

and then..?


Yes, then what.

[ Home | Edit | Print | Top | Topics | Help! ]

minicom test


hook up phone, see dmesg output that an ucom device is detected, and start minicom. I used following settings:
After restarting minicom (...) you should see 'OK'; if not, try 'ATZ'. If it doesn't say 'OK', kick it, or perhaps some other process (pppd?) has the line already.

[ Home | Edit | Print | Top | Topics | Help! ]

pppd setup


I use the following files (based on some internet examples):

[ Home | Edit | Print | Top | Topics | Help! ]

/etc/ppp/peers/gprs


nodetach
debug
kdebug 7
show-password
connect /etc/ppp/peers/gprs-connect-chat
disconnect /etc/ppp/peers/gprs-disconnect-chat
/dev/ttyU0 # USB serial device, for example Orange SPV
#115200
230400
crtscts  # serial cable, Bluetooth and USB, on some occations with IrDA too
#nocrtscts  # serial cable, Bluetooth and USB, on some occations with IrDA too
defaultroute
noipdefault
usepeerdns
#novj
#nobsdcomp
#novjccomp
#nopcomp
#noaccomp

noauth
#auth
#require-pap
#papcrypt

user ""
password ""

[ Home | Edit | Print | Top | Topics | Help! ]

/etc/ppp/peers/gprs-connect-chat


(note: you can prolly use a 'chat -f' command in pppd instead of this mess)

#!/bin/sh

exec chat             \
  TIMEOUT   5       \
  ECHO    ON        \
  ABORT   '\nBUSY\r'      \
  ABORT   '\nERROR\r'     \
  ABORT   '\nNO ANSWER\r'     \
  ABORT   '\nNO CARRIER\r'    \
  ABORT   '\nNO DIALTONE\r'   \
  ABORT   '\nRINGING\r\n\r\nRINGING\r'  \
  ''    AT        \
  TIMEOUT   12        \
  OK    ATH       \
  OK    AT+CPIN? \
  OK   "AT E0" \
  OK    AT \
  OK    AT \
  OK    ATS0=0 \
  OK    AT \
  OK    AT \
  OK    "ATD*99***1#" \
  TIMEOUT 5 \
  CONNECT ""

[ Home | Edit | Print | Top | Topics | Help! ]

/etc/ppp/peers/gprs-disconnect-chat


I didn't actually pay too much attention to this; it resets the modem, and that's all it has to do, I guess. This is basically 1:1 copy of some internet example.

#!/bin/sh

exec /usr/sbin/chat -V -s -S  \
ABORT   "BUSY"    \
ABORT   "ERROR"   \
ABORT   "NO DIALTONE" \
SAY   "\nSending break to the modem\n"  \
""    "\K"    \
""    "\K"    \
""    "\K"    \
""    "\d\d+++\d\dATH"  \
SAY   "\nPDP context detached\n"

Chown/chmod all files appropriately!

[ Home | Edit | Print | Top | Topics | Help! ]

testing ppp connection


In a console window, tail -f /var/log/messages or wherever your friendly logging goes, and do

pppd call gprs

If all is ok, you should see pppd debug output, and a local/peer IP address shortly afterwards. Congratulations! :-)

[ Home | Edit | Print | Top | Topics | Help! ]

The Rest


Getting /etc/resolv.conf, default route, ip filter and whatever to work is beyond the scope of this page.

Powered by MicKI - MICKI_2008_05_09