Random notes from mg

a blog by Marius Gedminas

Marius is a Python hacker. He works for Programmers of Vilnius, a small Python/Zope 3 startup. He has a personal home page at http://gedmin.as. His email is marius@gedmin.as. He does not like spam, but is not afraid of it.

Thu, 26 Jan 2006

Lightspeed EDGE-100M GPRS PCMCIA Card on Linux

Google doesn't know how to set up this card on Linux yet, so...

I use Ubuntu. Debian uses the same structure for pppd config files. Users of other distributions may have to adjust some things.

Here are the PPPD configuration files that work for me. They may contain some unnecessary things, but at least they work.

Substitute providername with any name you like, 1234 with your PIN, and apn with your GPRS APN ('banga' for Bite GSM users in Lithuania). Also, the device name might be different from /dev/ttyS2; check with dmesg | tail after you insert the card.

/etc/ppp/peers/providername:

# PPPD config file for Lightspeed EDGE-100M PCMCIA card
hide-passwd
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/providername"
debug
/dev/ttyS2
460800
crtscts
defaultroute
noipdefault
user ignored
remotename whatever
ipparam whatever

usepeerdns

# These seem to be needed to avoid spontaneous automatic disconnects after 2
# minutes on some GPRS devices.
lcp-echo-interval 0
lcp-echo-failure 0

/etc/chatscripts/providername:

# Chat file for Lightspeed EDGE-100M PCMCIA card
# (it uses the Siemens MC75 GPRS module)
ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
'' AT
OK AT+CFUN=1,1
SYSSTART AT+CPIN="1234"
OK '\c'
## # wait until the card registers with the network
## '' AT+CGREG=1
## OK '\c'
## '+CGREG: 1' '\c'
'' ATZ
OK ATX3
OK 'AT+CGDCONT=1,"IP","APN"'
OK ATDT*99***1#
CONNECT ""

You also need to add this line to /etc/ppp/pap-secrets:

ignored * ignored

To connect, type pon providername. If you get a permission error, make sure your user account belongs to the dialout group. You may monitor the progress of the connection with plog -f.

posted at 13:27 | tags: | permanent link to this entry | 0 comments

Sun, 08 Jan 2006

PySpaceWar lives!

During the last week I hacked on PySpaceWar extensively. I just released version 0.9.0 with these nice features:

It's the first time I've ever used distutils, so please let me know if it works for you.

screenshot

PySpaceWar, a game loosely inspired by the original Spacewar.

posted at 18:11 | tags: | permanent link to this entry | 0 comments