[Gta04-owner] 3g internet access scripts

Kevin Hremeviuc khremeviuc at yahoo.com
Fri Jul 20 03:19:28 CEST 2012


Hi all,

Thanks to Neil Brown for telling me to use /dev/ttyHS_Control, which works a treat (I was working from an old email posted to this list which said to use /dev/ttyHS3).

Please find attached 2 scripts - one for starting internet access and the other for stopping it. They need an additional hack for reseting the nameserver when using usb0 which I'll leave up to individuals to sort out (backup /etc/resolv.conf and then restore or hardcode the nameserver ip address into the script and blitz /etc/resolv.conf). The scripts are rough and ready as at some stage I am sure there will be a better solution.


You will need to install ser2net and expect:

apt-get install ser2net
apt-get install expect

You will then need to modify the ser2net config file at /etc/ser2net.conf as  follows (keep banner, comment default serial port configs and add /dev/ttyHS_Control) and then restart it (/etc/init.d/ser2net stop|start):

BANNER:banner:\r\nser2net port \p device \d [\s] (Debian GNU/Linux)\r\n\r\n

#2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner
#2001:telnet:600:/dev/ttyS1:9600 8DATABITS NONE 1STOPBIT banner
#3000:telnet:600:/dev/ttyS0:19200 8DATABITS NONE 1STOPBIT banner
#3001:telnet:600:/dev/ttyS1:19200 8DATABITS NONE 1STOPBIT banner
127.0.0.1,3002:telnet:600:/dev/ttyHS_Control:115200 8DATABITS NONE 1STOPBIT -RTSCTS -HANGUP_WHEN_DONE -XONXOFF banner

Hope this is of some help to someone,

Kev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20120719/39fddfa4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3g_on
Type: application/octet-stream
Size: 692 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20120719/39fddfa4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3g_off
Type: application/octet-stream
Size: 171 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20120719/39fddfa4/attachment-0001.obj>


More information about the Gta04-owner mailing list