Linux vs. IrDA vs. Today's Handhelds

Author: Ian Barry, email: ian (at) northlodge (dot) org
Date: June 2001

Contents


Introduction

This document aims to cover some of the experiences involved in setting up Linux for IrDA communication with today's IrDA-complaint handheld devices. This work is taken from some personal experience whilst conceptually working on unspecified IrDA extensions to static, web-enabled office signage designed by Appliance Studio Ltd. and distributed by Steelcase.

This document's emphasis is on setting up network connections between handheld devices and Linux. There are several methods to accomplish this goal - the one covered in this document is the setting-up of a TCP/IP network connection with a PPP (Point to Point Protocol) connection over IrCOMM (serial emulation) over IrDA.

It is assumed that readers of this document are familiar with the Linux's standard IrDA setup as defined in the Linux IrDA HOWTO which can be found at http://www.mobilix.org/Infrared-HOWTO/Infrared-HOWTO.html. If you haven't read this document, read it first!

If people have further experiences, amendments or the like, please contact me and we'll sort it out!


Linux

Kernel

At time of writing, the latest kernel was 2.4.5-ac16. I recommend that readers follow the latest kernel in the Alan Cox (ac) branch as these seem (in my experience) to contain the latest IrDA patches. Alan's kernel patches can be found in /pub/linux/kernel/people/alan/2.4/ of your local kernel mirror (e.g. ftp.uk.kernel.org).

PPP

Setting up of the PPP daemon is a little bit of an art. This section just adds my experiences to those found in the Linux IrDA HOWTO. So if you have not read that yet - do it now otherwise you probably won't understand what I am on about.

PPP Options

I use the following options for PPP. These options should be found in a file in /etc/ppp/peers/. It can have any filename but for simplicity I chose /etc/ppp/peers/ircomm. Note: The file /etc/ppp/options should just contain the word lock and nothing else.

/dev/ircomm0
115200
noauth
modem
debug
detach
connect "/etc/ppp/mychat"
asyncmap 0xa0000
passive
nocrtscts
nocdtrcts

Connect Script

I use a custom connect script because I can debug it better. A custom script is not compulsory but I found it quite useful for hacking around. I also wanted to write a PPP script that could cope with connections from differing devices without restarting. This script will handle direct connections from incoming handhelds. It will also emulate a modem for those handhelds that only support the "irda modem" connection option.

The script is in C and can be found here. It should be compiled with gcc -O2 -o mychat mychat.c. The resulting binary should be put in /etc/ppp/ (or wherever was specified in the connect option in the PPP options file above). This script should work with the devices mentioned in this document.

Starting the PPP daemon

The PPP daemon can be started once-off with the following command. It is assumed that the Linux box has an interface 192.168.0.2/16 and a DNS server of 192.168.0.1. Replace ircomm with the name of the PPP options file above. (A script that I wrote to run this daemon continually can be found here.)

/usr/sbin/pppd call ircomm 192.168.0.2:192.168.55.100 ms-dns 192.168.0.1

Palm

Two methods for Palm IrDA connection are examined. The Direct IrDA connection is simpler and faster than the IrDA Modem Connection. Both configurations are detailed below, but should already be correctly configured as default on a new Palm. These instructions are written for the Palm Vx OS 3.5.2 but should be easily applicable to other versions.

Palm Vx Method 1 - Direct IrDA Connection

Setup

  1. In Prefs..Connection there should be a configuration called "IR to a PC/Handheld", or something similar, with the following settings:

    ModeIR (IrCOMM) to PC/Handheld
    Flow controlAutomatic
    Speed115,200 bps

  2. In Hotsync: HotSync..LANSync Prefs should be set to "LANSync". The HotSync should be set to "Local" rather than "Modem". The connection type should be set to "IR to a PC/Handheld" (see (1)).

  3. In Prefs..Network there should be a service called "Unix" with the following settings:

    Username (ignored)blank
    Password (ignored)blank (i.e. prompt)
    ConnectionIR to PC/Handheld (see (1))
    Connection typePPP
    Query DNSchecked
    IP Address: Automaticchecked
    Scriptnone

Operation

Palm Vx Method 2 - IrDA Modem Connection

Setup

  1. In Prefs..Connection there should be a configuration called "IR to Modem" or "IR to Phone", or something similar, with the following settings:

    ModeIR (IrCOMM) to Modem
    DialingTouchtone
    Flow controlAutomatic
    Speed115,200 bps
    Init stringnone

  2. In Prefs..Network there should be a service called "Unix" with the following settings:

    Username (ignored)blank
    Password (ignored)blank (i.e. prompt)
    ConnectionIR to Modem (see (1))
    Phone # (ignored)0
    Connection typePPP
    Query DNSchecked
    IP Address: Automaticchecked
    Scriptnone

  3. In Hotsync: HotSync..Modem Sync Prefs should be set to "Network". The HotSync should be set to "Modem" rather than "Local". The connection type should be set to "IR to a Modem" (see (1)).

Operation


Psion

Psion Revo - Direct IrDA Connection

Setup

  1. In Control Panel..Modems there should be something called "Infrared Mobile Phone" which should have the following settings:

    Baud115200
    Connect viaInfrared
    Fax classAuto
    Init stringATZ
    Data/Fax init stringnone
    Flow controlHardware
    Terminal detectunchecked
    Carrier detectunchecked

  2. In Control Panel..Internet there needs to be a service called "My ISP", say.

    Service connectiondirect
    Manual loginunchecked
    Username (ignored)me
    Password (ignored)none
    Get IP address from serverchecked
    Get DNS address from serverchecked
    Use login scriptunchecked
    Enable PPP extensionschecked
    Allow plain text authenticationchecked
    Use call backunchecked

Operation

  1. Open the Email application and setup an email account in the Tools menu.
  2. Select the email account in the "Folders" pane and click on "Open mailbox".
  3. Select "My ISP" (see (2)) for the Internet service.
  4. Select "Infrared mobile phone " (see (1)) for the modem.
  5. Click on OK.

HP Jornada

HP Jornada 720

This implementation is very buggy. It will not work at least 90% of the time. This is mainly due to a bad IrDA implementation in WinCE and a non standards- compliant implementation of PPP on WinCE. (As far as I know).

  1. The following may need to be added to the WinCE registry in order to create the correct modem entry in Remote Networking. NB. WinCE registry files have the .rce extension. MS WinCE PowerToys contain a Registry app.
    [HKEY_LOCAL_MACHINE\ExtModems]
    
    [HKEY_LOCAK_MACHINE\ExtModems\IR]
    "Port"="COM3:"
    "DeviceType"=dword:00000001
    "FriendlyName"="IR Connection on COM3:"
    
  2. In Remote Networking create an entry with the following settings:

    Dial-Up Connection:
    ModemIR Connection on COM3:
    Device Properties: Port Settings:
    Manual Dialunchecked
    Use terminal window before/after dialingunchecked
    Baud Rate115200
    Data Bits8
    ParityNone
    Stop Bits:1
    Flow Control?? doesn't seem to matter ??
    Device Properties: Call Options:
    Cancel the call if not connectedunchecked
    Wait for dial tone before dialingunchecked
    Extra Settingsnone
    TCP/IP Settings: General:
    Use Server-assigned IP addresschecked
    Use Slipunchecked
    Use software compressionchecked
    Use UP header compressionchecked
    TCP/IP Settings: Name Servers:
    Use Server-assigned addresseschecked



This page is hosted with a great-value UK web hosting company. Check out www.sensical.net.