Submitted by Arthur Tyde and Bryan Abshier of Linuxcare Inc.
This will tell you how to set up a masqueraded PPP connection via. IrDA from WinCE to a Linux based notebook computer. Once you are IP connected, the rest is up to you. We put this together as a guide for Sony notebook users with Casio E-100/105 PDA's, though the procedure should work for any WinCE 2.11 device with infrared capabilities talking to any notebook. Do all the Linux side testing signed on as root, standard warnings apply.
Configure WinCE Configure a network connection for your WinCE device. Go into "Connections" and create a "Direct Connection" Name it something meaningful, for device select "Infrared Port". Go into settings and change the baud rate to 115200, this is the max for WinCE. Go to TCP/IP settings and check "Use server-assigned IP address," and "Use software compression," and "Use IP header compression" Make sure "Use Slip," is unchecked. For Name Servers, make sure "Use server-assigned addresses" is checked. Go to Start, Settings, Communications, Identification and enter something for the Device Name. (I used "cetoy") You most likely already have these values set if you have synced with a Win9x desktop using Activesynch.
Configure Linux/IrDA Set up IrDA support on your notebook (described elsewhere) and get to the point where your notebook will discover an IrDA compliant device. A good sign is the irda0 device will show up when you execute ifconfig. It will not have an IP address, this is ok.
Setup the Connection Test the discovery by setting an IrDA device in range of your IR port, wait 5 seconds, and;
For example, the Ericsson I888 World Phone with IR port enabled should immediately show something like this;
"name:I 888 WORLD ,hint:0x9104,saddr:0x838470e5,daddr:0x152dceaa"
/usr/sbin/cebox.sh - make it executable
#!/bin/sh pppd call cebox
TIMEOUT 3600 "CLIENT" "CLIENT\c" "" "SERVER\c"
/dev/ircomm0 115200 crtscts connect '/usr/sbin/chat -v -f /etc/ppp/cebox.chat' noauth local 192.168.55.101:192.168.55.100 ms-dns 10.2.0.1
Testing the connection Ok, now you can test the connection to make sure it all works. Reboot your machine, run irattach /dev/ttyS2 -s (/dev/ttyS2 being the serial port your BIOS sees the IR device as, if irattach is not running, start it) Align the IR ports, at the Linux command prompt type /usr/sbin/cebox.sh, and simultaneously press return to start cebox and double tap your connection icon in WinCE. You should get a happy message from WinCE reporting Connecting to Host, Device Connected, Authenticating User, User Authenticated and finally Connected. You should see something like this when you are connected:
irda0 Link encap:IrLAP HWaddr 06:89:d0:58 UP RUNNING NOARP MTU:2048 Metric:1 RX packets:246 errors:0 dropped:0 overruns:0 frame:0 TX packets:251 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:8 ppp0 Link encap:Point-to-Point Protocol inet addr:192.168.55.101 P-t-P:192.168.55.100 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:10 errors:0 dropped:0 overruns:0 frame:0 TX packets:10 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:10
/usr/local/bin/wince - make this executable
#!/usr/bin/perl use strict; # # Enable IrDA, start ppp0 and set up WinCE masquerading # A. Tyde - Linuxcare Inc. # print "\n-> Setting up IR infrastructure...\n"; system("killall irattach 2>/dev/null"); sleep 1; system("/usr/sbin/cebox.sh"); print " Start WinCE Serial or IR networking now!\n"; open(ECHO,">/proc/sys/net/ipv4/ip_forward") or die "Can not open /proc/sys/net/ ipv4/ip_forward"; print ECHO "1"; close (ECHO); print " Serving 192.168.55.100 to WinCE device...\n\n"; system("ipchains -F"); sleep 5; system("ipchains -P forward DENY"); system("ipchains -A forward -s 192.168.55.100/32 -j MASQ"); exit 0;