Handhelds.org - Open source for handheld devices

UserPreferences

PPPhowto


PPP Howto

Once you've installed Familiar, you can easily establish a PPP connection over a serial line between your Linux PC and your handheld device. Instructions are written for the iPAQ, but the information is pretty general and should be useful for any handheld computer.

If you have a Windows PC, see the [WWW]Windows PPP Howto for instructions on connecting via PPP from Windows.

Quick start guide

With the recent releases of Familiar, almost everything has already been set up. Here's what you need to do to get PPP up and running between your iPAQ and a Linux machine.

For computers with only a USB connector and without an RS232 (serial) port, you may need a USB-to-serial adapter if your cradle does not support USB (and apparently sometimes the USB connection is not usable). This is very workable.

Instructions

Firstly, make sure that on your iPAQ you are not logged into a shell over the the serial line before you try to initiate a PPP connection from your desktop PC. If you are logged in, and then try to start PPP from your desktop, you will get a "Connect script failed" message. You will need getty enabled on the serial line (as it is by default, but if you have been using kbdd with a serial keyboard you may have disabled it yourself).

Now, you can run this command from your desktop (change the addresses if they clash with ones on your existing network):

/usr/sbin/pppd /dev/ttyS0 115200 192.168.0.1:192.168.0.2 nodetach local noauth nocrtscts lock user ppp connect "/usr/sbin/chat -v -t3 ogin--ogin: ppp"

Add debug as a parameter in the above if you want to see LCP debugging info (possibly useful for troubleshooting). If you see "LCP timeout sending Config-Requests", your modules are still not loaded properly or there was some other connection problem - check the system log on both ends.

Add ms-dns <dnsserverip> (replacing <dnsserverip> with the IP address of your DNS server) to have DNS configuration automatically set up on the iPAQ side. You will almost certainly need this if you want to access the internet from your iPAQ, unless you set it up manually.

A successful connection will report local and remote IP addresses.

What can I do with it?

Now that you have a PPP connection, you have full TCP/IP networking between the host and the iPAQ. You can access either one from the other using the IP addresses reported when the PPP connection was established. (I like to add the IP addresses to my desktop's /etc/hosts file so I can simply type "ipaq" rather than "192.168.1.101").

You can then log on to the iPAQ from your desktop PC's terminal by typing (in Linux):

ssh root@ipaq

where ipaq is the IP address of the iPAQ (or the name of the IP address as specified in /etc/hosts)

You will also need to enable IP forwarding on the desktop PC by executing this on the command line:

echo 1 > /proc/sys/net/ipv4/ip_forward

You can make this change permanent by setting IP_FORWARD=yes in /etc/sysconfig/sysctl. You may have to hunt around for the file; on Ubuntu (Dapper Drake), you'll want to uncomment the line that reads net/ipv4/ip_forward=1 in /etc/sysctl.conf. On Darwin (Mac OS X) the commands are slightly different and you may also have to enable "internet sharing" in the sharing control panel.

If your iPAQ still cannot ping Internet domains, you might try looking at HpIpaqH2200ssh at chapter "Access to the Internet"

Some fun things you can do with this connection include:

Troubleshooting PPP connections

Lots of "LCP EchoRep" messages

Your pppd is in debug mode. Check the /etc/ppp/options file on your desktop computer to remove the debug line.

SuSE-Linux: Connection works, but cannot ping machines on LAN or Internet

Make sure IP forwarding is active on the desktop PC. You can switch it on by setting IP_FORWARD=yes in /etc/sysconfig/sysctl. Do not forget to run SuSEconfig afterwards. If you want to be dead sure networking has recognized your changes, also reboot the desktop computer. Other showstoppers are the firewalls provided by SuSE. You might have to stop Personal-Firewall, if it is running.

Add proxyarp config directive in the /etc/ppp/peers/IPAQ file did it for me.

Configuring a Red Hat Linux host

We'll call your device ppp0 but if that's taken you can use ppp1 or ppp2 or whatever, you can make the change. You can't use wvdial since (as far as I know) wvdial insists on dialing a modem. You have to use a chat script instead.

First, create the file /etc/sysconfig/network-scripts/ifcfg-ppp0 with the following contents:

DEVICE=ppp0
IPADDR=$LOCALIPADDRESS
REMIP=$IPADDRESSOFIPAQ
DEFROUTE=no
PEERDNS=no
ONBOOT=no
USERCTL=yes
MODEMPORT=/dev/ttyS0
LINESPEED=115200
HARDFLOWCTL=no
PPPOPTIONS="user ppp ms-dns $NAMESERVER-IP-ADDRESS"

$FOO should be replaced by appropriate values for you; the "variables" I show don't exist -- so for $LOCALIPADDRESS you might put 192.168.0.1, etc. Also, the MODEMPORT definition could be wrong for you...

Next, create the file /etc/sysconfig/network-scripts/chat-ppp0 with the line:

ogin--ogin: ppp

At this point, as a normal user or as root, you should be able to run /sbin/ifup ppp0 and connect to your iPAQ.

- Michael K. Johnson

Configuring a Debian host

It should be enough to create a file /etc/ppp/peers/ipaq containing:

-detach
noauth
nocrtscts
lock
user ppp
connect '/usr/sbin/chat -v -t3 ogin--login: ppp'
/dev/ttyS0
115200
192.168.1.100:192.168.1.101

and to add yourself to the dip group. Then you can execute the command pon ipaq to connect and poff ipaq to disconnect.

The ipmasq should be installed to enable masquerarding


== SUSE ??

To get it to work for me, I had to run this command from my SuSE box:

/usr/sbin/pppd /dev/ttyS0 115200 192.168.0.150:192.168.0.240 nodetach noauth proxyarp nocrtscts user ppp connect "/usr/sbin/chat -v -t3 ogin--ogin: ppp

also, one very common problem is that ppp_async is not running. to fix this, on your ipaq, execute: modprobe ppp_async email me if you have any problems, im happy to help you on irc or something... -Ryan Johnson (email: rjfjohnsonAThotmailDOTcom)

How to access the internet from your iPAQ using IrDA

To access Internet from your IPAQ using PPP over IrDA do the following

On your Linux machine:

(Don't forget to correct the masquerading script and run it! http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/firewall-examples.html#RC.FIREWALL-2.4.X)

on IPAQ:

Tcha nan! Welcome to the internet ;-)

- Joćo Seabra (seabra at aac dot uc dot pt)