IrDA configuration for Z505HS using 2.2.18 on RedHat 6.2 (Zoot) by Jordan Ritter (12.15.00) Experienced travelers should bring: . Sony PCG-Z505HS Laptop (http://www.sony.com) . Linux kernel 2.2.18 source (ftp://ftp.kernel.org) . RedHat 6.2 (http://www.redhat.com) . irda-utils 0.9.10-1 RPM (http://findrpm.net) . pilot-link 0.9.3 source (http://pilot-link.sourceforge.net) 1. Configure your laptop's BIOS. The number one obstacle I had was the IrDA io port being shared with COM1. Boot the laptop, hit ESC when the Sony screen comes up, and hit F2 to get into the setup. Select Advanced, then IrDA, then Base I/O Address. Change it to 338. 238 is also an option, but I didn't try it. It would probably work too. For IRQ, leave it at 10 unless it is already conflicting with something else (it won't unless you've added some weird peripherals). Make note of the IRQ. Save the BIOS setup and boot. Changing this port makes all the setserial hacks and other garbage unnecessary, since IrDA and normal Serial activities will be able to coexist nicely. 2. Configure your kernel. Kernel Config (2.2.18): IrDA (infrared) support ---> Y IrDA subsystem support Y IrCOMM protocol Y IrDA Protocol options Y Cache last LSAP Y Debug information Drivers ---> Y IrTTY (uses Linux serial driver) M NSC PC87108/PC87338 As far as deciding what to compile as modules and what to put into the kernel, everything except the NSC driver itself can be put straight into the kernel. Even the NSC driver could be put into the kernel, but you'd have to hardcode the io port into the driver itself (not for the faint of heart, but I did that too and it works). You could enable other protocols and subsystems if you wanted, but the above constitutes the bare minimum I was able to specify and still get things to work. The IrDA options don't matter, I just find them useful. Compile and install the kernel. 3. Configure the module loader. Add the following lines to '/etc/conf.modules' (minus the dashes): --- alias irda0 nsc-ircc alias tty-ldisc-11 irtty alias char-major-161 ircomm-tty options nsc-ircc dongle_id=0x09 io=0x338,0x338,0x338,0x338 irq=10,10,10,10 --- In case it's not obvious, if in the BIOS you set a different port (238, for instance), or IRQ (11, for instance), change the values to match reality. In reality, only one index entry of each io and irq list needs to have the appropriate value, but I was too lazy to figure it out and having it like it is won't harm anything. 4. Make the proper /dev entries. As root (minus the dashes): --- mknod /dev/irda0 c 160 0 ln -sf /dev/irda0 /dev/pilot --- 5. Install irda-utils. Download and install the irda-utils RPM. I used 0.9.10. Or, find the source, compile and install. 6. Install pilot-link tools. Realistically, you can use anything that uses the IR port to test. I happen to have a Palm V, and palm-xfer is excellent for testing the setup. Compile and install the tools. 7. Boot new kernel. At this point, if you haven't already, reboot your laptop to the new kernel. 8. IRattach the port into existence. As root (minus the dashes): --- irattach irda0 -s1 --- At this point, you should have an active IR port. Jump to the end of these directions for my dmesg output to get an idea of what you should be seeing. 9. Test that the port is working. As root or as any user, try (minus the dashes): --- pilot-xfer -L --- If you made the symlink in step 4, then this will work. If you didn't, you'll have to add '-p /dev/irda0' in order for it to work. I recall there also being some envariable you could set, but I don't remember what it is. Just make the symlink and forget about it. Jump to the end of these directions for a screen dump of my pilot-xfer output, and what dmesg output it generated. Appendix A: Notes The irda-utils RPM installs init scripts and other stuff (irmanager, which is what the irda init script starts). I tested irmanager quickly to see if it would figure out the setup, but it didn't. I would probably just modify the irda init script to run 'irattach irda0 -s1' for start and 'killall irattach' for stop. Appendix B: Bootup dmesg output --- Linux version 2.2.18 (root@blort) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #8 Fri Dec 15 13:34:56 PST 2000 Detected 496318 kHz processor. Console: colour dummy device 80x25 Calibrating delay loop... 989.59 BogoMIPS Memory: 257116k/262080k available (1504k kernel code, 412k reserved, 2984k data, 64k init) Dentry hash table entries: 32768 (order 6, 256k) Buffer cache hash table entries: 262144 (order 8, 1024k) Page cache hash table entries: 65536 (order 6, 256k) Intel machine check architecture supported. Intel machine check reporting enabled on CPU#0. 256K L2 cache (8 way) CPU: L2 Cache: 256K CPU: Intel Pentium III (Coppermine) stepping 01 Checking 386/387 coupling... OK, FPU using exception 16 error reporting. Checking 'hlt' instruction... OK. POSIX conformance testing by UNIFIX mtrr: v1.35a (19990819) Richard Gooch (rgooch@atnf.csiro.au) PCI: PCI BIOS revision 2.10 entry at 0xfd99e PCI: Using configuration type 1 PCI: Probing PCI hardware Linux agpgart interface v0.99 (c) Jeff Hartmann agpgart: Maximum main memory to use for agp memory: 203M agpgart: Detected Intel 440BX chipset agpgart: AGP aperture is 16M @ 0x40000000 Linux NET4.0 for Linux 2.2 Based upon Swansea University Computer Society NET3.039 NET4: Unix domain sockets 1.0 for Linux NET4.0. NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP TCP: Hash tables configured (ehash 262144 bhash 65536) IrDA (tm) Protocols for Linux-2.2 (Dag Brattli) IrCOMM protocol (Dag Brattli) Initializing RT netlink socket Starting kswapd v 1.5 vesafb: framebuffer at 0xfd000000, mapped to 0xd0005000, size 2496k vesafb: mode is 1024x768x24, linelength=3072, pages=0 vesafb: protected mode interface info at c000:ae10 vesafb: scrolling: redraw vesafb: directcolor: size=0:8:8:8, shift=0:16:8:0 Console: switching to colour frame buffer device 128x48 fb0: VESA VGA frame buffer device Detected PS/2 Mouse Port. pty: 256 Unix98 ptys configured Real Time Clock Driver v1.09 Linux telephony interface: v1.00 loop: registered device at major 7 PIIX4: IDE controller on PCI bus 00 dev 39 PIIX4: not 100% native mode: will probe irqs later ide0: BM-DMA at 0xfc90-0xfc97, BIOS settings: hda:DMA, hdb:pio ide1: BM-DMA at 0xfc98-0xfc9f, BIOS settings: hdc:pio, hdd:pio hda: TOSHIBA MK1214GAP, ATA DISK drive ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 hda: TOSHIBA MK1214GAP, 11513MB w/0kB Cache, CHS=1467/255/63, UDMA Floppy drive(s): fd0 is 1.44M floppy0: no floppy controllers found scsi : 0 hosts. scsi : detected total. PPP: version 2.3.7 (demand dialling) TCP compression code copyright 1989 Regents of the University of California PPP line discipline registered. PPP BSD Compression module registered PPP Deflate Compression module registered SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256) (6 bit encapsulation enabled). CSLIP: code copyright 1989 Regents of the University of California. SLIP linefill/keepalive option. The PCI BIOS has not enabled this device! Updating PCI command 0013->0017. eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html eepro100.c: $Revision: 1.20.2.10 $ 2000/05/31 Modified by Andrey V. Savochkin and others eepro100.c: VA Linux custom, Dragan Stancevic 2000/11/15 eth0: OEM i82557/i82558 10/100 Ethernet, 08:00:46:06:73:E5, IRQ 9. Board assembly 100001-001, Physical connectors present: RJ45 Primary interface chip i82555 PHY #1. General self-test: passed. Serial sub-system self-test: passed. Internal registers self-test: passed. ROM checksum self-test: passed (0x04f4518b). Receiver lock-up workaround activated. eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html eepro100.c: $Revision: 1.20.2.10 $ 2000/05/31 Modified by Andrey V. Savochkin and others eepro100.c: VA Linux custom, Dragan Stancevic 2000/11/15 Partition check: hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 > apm: BIOS version 1.2 Flags 0x03 (Driver version 1.13) usb.c: registered new driver hid mice: PS/2 mouse device common for all mice usb.c: registered new driver usbdevfs usb.c: registered new driver hub usb.c: registered new driver usb-storage USB Mass Storage support registered. usb-uhci.c: $Revision: 1.237 $ time 13:36:20 Dec 15 2000 usb-uhci.c: High bandwidth mode enabled usb-uhci.c: USB UHCI at I/O 0xfca0, IRQ 9 usb-uhci.c: Detected 2 ports usb.c: new USB bus registered, assigned bus number 1 usb.c: USB new device connect, assigned device number 1 usb-storage.c: Searching unusual device list for (0x0, 0x0, 0x0)... usb-storage.c: -- did not find a matching device hub.c: USB hub found hub.c: 2 ports detected VFS: Mounted root (ext2 filesystem) readonly. Freeing unused kernel memory: 64k freed Adding Swap: 136512k swap-space (priority -1) --- Appendix C: pilot-xfer output --- Waiting for connection on /dev/pilot (press the HotSync button now)... Connected Reading list of databases in RAM and ROM... 'AddressDB' 'DatebookDB' 'ExpenseDB' 'LauncherDB' 'MailDB' 'MemoDB' 'ConnectionDB' 'NetworkDB' 'ToDoDB' 'Address Book' 'Calculator' 'Date Book' 'Expense' 'Graffiti' 'Launcher' 'Mail' 'Memo Pad' 'Preferences' 'Security' 'Setup' 'HotSync' 'To Do List' 'BigHAL' 'AddressCitiesDB' 'AddressCompaniesDB' 'AddressCountriesDB' 'DefConnectionDB' 'DefConnectionDBVSeries' 'IrDA Library' 'PADHTAL Library' 'NetSync' 'AMX' 'Net Library' 'SerialLib' 'psysLaunchDB' 'Graffiti ShortCuts ' 'Loopback NetIF' 'PPP NetIF' 'SLIP NetIF' 'Address Book_enUS' 'Buttons_enUS' 'Calculator_enUS' 'Date Book_enUS' 'Digitizer_enUS' 'Expense_enUS' 'Formats_enUS' 'General_enUS' 'IrComm Serial Driver_enUS' 'Launcher_enUS' 'Mail_enUS' 'Memo Pad_enUS' 'Connection_enUS' 'Network_enUS' 'Owner_enUS' 'PPP NetIF_enUS' 'Preferences_enUS' 'Palm OS Data_enUS' 'System_enUS' 'Security_enUS' 'Setup_enUS' 'ShortCuts_enUS' 'SLIP NetIF_enUS' 'HotSync_enUS' 'To Do List_enUS' '68328EZ Serial Driver_enUS' 'Buttons' 'Digitizer' 'Formats' 'General' 'Connection' 'Network' 'Owner' 'ShortCuts' 'Unsaved Preferences' 'Net Prefs' 'System' 'Cmd-nettrace' 'Cmd-ping' '68328EZ Serial Driver' 'System MIDI Sounds' 'Palm OS Data' 'Saved Preferences' 'AddressStatesDB' 'AddressTitlesDB' 'UIAppShell' 'IrComm Serial Driver' List done. --- Appendix D: dmesg output following pilot-xfer --- nsc-ircc, Found chip at base=0x398 nsc-ircc, driver loaded (Dag Brattli) IrDA: Registered device irda0 nsc-ircc, Using dongle: IBM31T1100 or Temic TFDS6000/TFDS6500 irlap_change_speed(), setting speed to 9600 ircomm_tty_attach_cable() ircomm_tty_ias_register() irlap_change_speed(), setting speed to 115200 iriap_connect_indication() irlmp_state_dtr(), Unknown event LM_LAP_CONNECT_CONFIRM ircomm_param_service_type(), services in common=04 ircomm_param_service_type(), resulting service type=0x04 ircomm_param_xon_xoff(), XON/XOFF = 0x11,0x13 ircomm_param_enq_ack(), ENQ/ACK = 0x13,0x11 ircomm_tty_check_modem_status() ircomm_param_xon_xoff(), XON/XOFF = 0x11,0x13 ircomm_param_enq_ack(), ENQ/ACK = 0x13,0x11 ircomm_tty_check_modem_status() ircomm_tty_close() ircomm_tty_shutdown() ircomm_tty_detach_cable() ircomm_close() irlap_recv_disc_frame() irlap_change_speed(), setting speed to 9600 irlap_state_ndm(), media busy! irlmp_state_standby(), Unknown event LM_LAP_IDLE_TIMEOUT ---