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.
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.
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.
You will now obtain...
- netbsd 3.1
- ucom, uplcom and/or umodem, uhub, usb etc support in kernel. (no clue here; plugging it in reports ucom and uplcom activity here, but I guess it depends on the usb controller?)
- motorola usb data cable
- phone
- subscription to allow internet; I use Orange World, which costs EUR6 per month, allows for 25Mb (in combination with subscription) or 3Mb (with prepaid card) free data; EUR3 (w000t!) per Mb after that.
- pppd
- minicom to test connection to phone
Yes,
then what.
hook up phone, see
dmesg output that an ucom device is detected,
and start minicom. I used following settings:
- device: /dev/ttyU0
- speed: 115200 (is this relevant?)
- no hardware flowctl whatsoever
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.
I use the following files (based on some internet examples):
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 ""
(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 ""
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!
In a console window,
tail -f /var/log/messages or wherever your
friendly logging goes, and do
If all is ok, you should see pppd debug output, and a local/peer IP
address shortly afterwards.
Congratulations! :-)
Getting /etc/resolv.conf, default route, ip filter and whatever to
work is beyond the scope of this page.