BenV's notes

Slackware and dial-up through a mobile phone

by on Sep.24, 2009, under Software

This weekend we’ll be going to some abandoned part of the country because we’re “celebrating” the 50th birthday of Lotjuh’s mom. (celebrating the fact that someone is a year closer to death…. weird rituals people engage in…). Anyway, since it’s in the middle of nowhere (“Limburg”, might as well be germany or belgium as far as I’m concerned) and the information page of the abandoned place we’re staying at didn’t hint anything about internet, I’m assuming the worst. Which means no wireless, no wired, only mobile phones. (and singing people *sigh*).
However, there is still hope to play Billy vs Snakeman this weekend.

Through a mobile phone!

Lotjuh has an LG Chocolate (of which the battery is dying), and with it came a little cable that connects the device to a USB port. So hopefully I plugged it into my laptop. The one that runs pokemon os. dmesg showed some gibberish, but it was only about some kind of mass storage device it found. Bah.
The phone showed a screen with:

If you use modem, select “Connectivity-modem”

However, it didn’t respond to any keypresses. After disconnecting it again and going through the menu I finally found the holy grail that I was looking for. It was filled with candy. And modem. It was hidden at Menu -> Settings -> Connectivity -> Modem -> YES YES YES!!!
Connecting it again now gave cdc_acm 3-1:1.0: ttyACM0: USB ACM device. Woohoo!
But how do we use such a thing? And since I’m not bringing this laptop, how do we use it on slackware?

Google was more helpful this time and showed me wvdial. Sounds easy, so I got the wvstreams library and ran it through slackbuild. However, it complained about not finding Qt and readline. Qt was fixed by installing the official qt3 package and sourcing /etc/profile.d/, but readline failed because of this:

configure:8916: checking for readline in -lreadline
configure:8951: g++ -o conftest -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -Iyes/include -ldbus-1 -Lyes conftest.cpp -lreadline >&5
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../ undefined reference to `PC'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../ undefined reference to `tgetflag'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../ undefined reference to `tgetent'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../ undefined reference to `UP'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../ undefined reference to `tputs'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../ undefined reference to `tgoto'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../ undefined reference to `tgetnum'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../ undefined reference to `BC'
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../ undefined reference to `tgetstr'

This problem was quickly fixed by adding the ncurses library to the LIBS environment variable like this:

root@error:/usr/src/wvstreams-4.6# export LIBS=" -lncurses"

This time around configure didn’t complain anymore and we continued to build the package.
That also failed:

g++: /libdbus-1.a: No such file or directory
make: *** [] Error 1

No surprise that it couldn’t find libdus there. Not only that, it’s the wrong library, I don’t have the thing statically linked.
Here’s a patch that suppsedly fixes it:
[Download not found]
You’d expect it to work now, but ha! It doesn’t. Somehow it fails to set DBUS_LIBDIR to /usr/lib (or /usr/lib64 if you have a 64 bit version of slackware), so help him with it and it’ll work:

root@error:/usr/src/wvstreams-4.6# export DBUS_LIBDIR=/usr/lib

Now it should compile fine after you run configure again (I used slackbuild of course) and you’ll have the wvstreams package. (it even worked on 64 bit!)

Next the wvdial tool was pulled through slackbuild.
However, this thing doesn’t even include configure, only a Makefile. So edit the Makefile to change the paths and use make to compile.
Or take my packages if you trust me for not formatting your harddisk and rootkitting your mom:
32 bit slackware 13 package:
[Download not found]
64 bit slackware 13 package:
[Download not found]

Then finally, time to test the mobile connection!
First for the configuration of the modem, run wvdialconf and it will write a config file for you to /etc/wvdial.conf.

root@error:~# wvdialconf
Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

ttyACM0<*1>: ATQ0 V1 E1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 Z -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0<*1>: Modem Identifier: ATI -- LG Electronics Inc.
ttyACM0<*1>: Speed 4800: AT -- OK
ttyACM0<*1>: Speed 9600: AT -- OK
ttyACM0<*1>: Speed 19200: AT -- OK
ttyACM0<*1>: Speed 38400: AT -- OK
ttyACM0<*1>: Speed 57600: AT -- OK
ttyACM0<*1>: Speed 115200: AT -- OK
ttyACM0<*1>: Speed 230400: AT -- OK
ttyACM0<*1>: Speed 460800: AT -- OK
ttyACM0<*1>: Max speed is 460800; that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

Found an USB modem on /dev/ttyACM0.
/etc/wvdial.conf: Can't open '/etc/wvdial.conf' for reading: No such file or directory
/etc/wvdial.conf: ...starting with blank configuration.
Modem configuration written to /etc/wvdial.conf.
ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

Next, edit the configuration file and change the Phone, User, and Password line to reflect your account that you got from your ISP. When that’s done you can finally try to dial up!

root@error:~# wvdial
--> WvDial: Internet dialer version 1.60
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
--> Modem initialized.
--> Sending: ATDT01234567JEMOEDER
--> Waiting for carrier.
--> Carrier detected. Waiting for prompt.
1: Welcome to XS4ALL, for UUCP or terminal login, please dial 01234-56789
--> Looks like a login prompt.
--> Sending: jemoeder
--> Looks like a login prompt.
--> Sending: jemoeder
--> Looks like a password prompt.
--> Sending: (password)
Login incorrect
--> Looks like a login prompt.
--> Sending: jemoeder
--> Looks like a password prompt.
--> Sending: (password)
--> Don't know what to do! Starting pppd and hoping for the best.
--> Starting pppd at Thu Sep 24 20:21:09 2009
--> Pid of pppd: 6602
--> Using interface ppp0
--> pppd: @?0[08]@?0[08]
--> pppd: @?0[08]@?0[08]
--> pppd: @?0[08]@?0[08]
--> pppd: @?0[08]@?0[08]
--> pppd: @?0[08]@?0[08]
--> pppd: @?0[08]@?0[08]
--> local IP address 30.152.326.815
--> pppd: @?0[08]@?0[08]
--> remote IP address -
--> pppd: @?0[08]@?0[08]
--> primary DNS address
--> pppd: @?0[08]@?0[08]
--> secondary DNS address
--> pppd: @?0[08]@?0[08]

Woohoo, it logged in! At this point wvdial will be stuck until you want to disconnect (CTRL-C or kill).
Have fun paying for your expensive slow as dirt dial-up internet. But hopefully it will be good enough for me to check mail and play Billy this weekend 🙂

:, ,

Leave a Reply

You must be logged in to post a comment.


  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)