OK, just quickly then, for the Nokia E7

Create the pppd(8) peer file so it looks like this:

	$ cat /etc/ppp/peers/kpn
	noaccomp
	noccp
	nobsdcomp
	novj
	novjccomp
	nomagic
	nopcomp
	0.0.0.0:0.0.0.0
	/dev/cuaU0
	921600
	nodefaultroute
	lock
	noauth
	noipdefault
	user kpn
	nodeflate
	connect '/usr/sbin/chat -f /etc/ppp/peers/chat/umts.kpn'

Now create the chat script:

	$ cat /etc/ppp/peers/chat/umts.kpn 
	TIMEOUT 10
	ABORT 'ERROR'
	ABORT 'BUSY'
	ABORT 'NO CARRIER'
	'' ATZ OK
	AT+CGDCONT=1,"ip","internet",,0,0 OK
	AT+CGDATA="PPP",1 CONNECT

You'll need to add a user and password in /etc/ppp/pap-secrets, username has to match the 'user' entry from the peer file (in the above example: "kpn"); password doesn't matter much (I picked "kpn").

Now, connect your phone and switch it to Ovi Suite USB mode. With that done, the kernel should attach a umodem(4) device:

	usb_desc_iter_next: bad descriptor
	umodem0 at uhub8 port 2 configuration 1 interface 1 "Nokia E7-00" rev 2.00/1.00 addr 7
	usb_desc_iter_next: bad descriptor
	umodem0: data interface 2, has no CM over data, has break
	umodem0: status change notification available
	ucom0 at umodem0
	ugen0 at uhub8 port 2 configuration 1 "Nokia E7-00" rev 2.00/1.00 addr 7

Next step is to connect using pppd(8):

	pppd call kpn

And to disconnect (nicely), simply HUP the pppd process:

	pkill -HUP pppd

The following data is preserved for archival purposes. I do not use this setup anymore, but you can still use it as a primer to get your setup working. However, there's no guarantee whatsoever that this still works as documented.

How to connect to the internet using a mobile phone, GPRS/UMTS and OpenBSD's pppd.

I have the following gear :

Note that it's important to have the phone properly configured for this to work. In practice, this means that your phone should be able to access the internet via e.g. the built-in webbrowser.

After connecting the phone with the USB cable to your system and selecting the correct USB mode ('default'), the OpenBSD kernel should detect the following :

	umodem0 at uhub0 port 1 configuration 1 interface 1
	umodem0: Nokia Nokia 6234, rev 2.00/4.52, addr 2, iclass 2/2
	umodem0: data interface 2, has CM over data, has break
	umodem0: status change notification available
	ucom0 at umodem0

Now create a ppp0 device :

	sudo ifconfig ppp0 create

Now add yourself to the groups dialer and network :

	sudo groupmod -G network,dialer [USERID]

Create a chat(8)-script /etc/ppp/peers/chat/umts.swisscom :

	ABORT BUSY ABORT 'NO CARRIER' \
	ATDT*99# CONNECT

This will use the default connection profile from your Nokia phone (*99#) to connect to the internet. You can also configure other connection profiles (in your phone) and use these (with pppd/chat), how to do this is left as an excercise to the reader.

Make an options file for the UMTS/GPRS connection, /etc/ppp/peers/swisscom :

	/dev/cuaU0
	115200
	defaultroute
	lock
	noauth
	connect '/usr/sbin/chat -f /etc/ppp/peers/chat/umts.swisscom'

Since swisscom requires no additional authentication (being a customer is sufficient), you need not worry about username in the pppd-options file, nor about configuring the correct password in /etc/ppp/{p,ch}ap-secrets.

Now connect your phone, make sure it's on and start pppd(8) :

        pppd call swisscom

After pppd connects and gets an IP address from your provider, you should be able to connect to the internet. Note that you may have to configure the proper nameservers for use with this connection. Search the website of your mobile phone provider for this info or look here. Since you are in the groups dialer and network you don't need root permissions to connect. The best way to disconnect is to tell pppd to Hang UP with pkill -HUP pppd. This will send a TermReq to the ppp-peer and the connection will be torn down appropriately.

Please note that this may differ for different types of phones, providers and datacables (below is an old example of a serial cable).

There used to be no supported way to connect to the internet through your phone with bluetooth. As of November 2008, however, bluetooth has been enabled in GENERIC OpenBSD kernels. A description on how to set up bluetooth for dialup will appear here soon.




How to connect to XS4All using GPRS and OpenBSD's pppd.

This "Works For Me"™. I have the following :

First create an interface, ppp0 :

	sudo ifconfig ppp0 create

Now add yourself to the groups dialer and network :

	sudo groupmod -G network,dialer [USERID]

Create a chat(8)-script /etc/ppp/peers/chat/gprs.xs4all :

	ABORT BUSY ABORT 'NO CARRIER' \
	AT+CGDCONT=1,"ip","xs4all.nl" OK AT+CGDATA="PPP",1 CONNECT

Make an options file for the GPRS connection, /etc/ppp/peers/gprs :

	/dev/tty00
	115200
	defaultroute
	lock
	user [USERNAME]
	noauth
	connect '/usr/sbin/chat -f /etc/ppp/peers/chat/gprs.xs4all'

Set your username and password in /etc/ppp/pap-secrets :

	[USERNAME]	*	[PASSWORD]	*

Now connect your phone, make sure it's on and start pppd(8) :

	pppd call gprs

After pppd connects and gets an IP address from your provider, you should be able to connect to the internet. Happy Hacking !

Back to OpenBSD stuff

Powered by OpenBSD