Technology - Shuttle PC - Install Infrared device

I wanted to be able to sync to my palm computer without the hassle of plugging directly into the USB every time. (also there seems to be a bug when using the direct USB cable to Linux).

I thought Infrared would be the best option as I could leave it plugged in all the time and there are less security issues than wi-fi or bluetooth.

I decided to get this device, although expensive, it came with a cable and the postage was free.

cover Belkin F5U235QEA Belkin Usb To Infrared.

However I have not managed to get it to work with Linux as explained below.

I plugged in the Belkin F5U235qea to the USB port on the Linux system. Without me doing anything else it automatically detected the new hardware and brought up this dialog box:

plugin

I clicked on yes and it brought up the following YaST screen:

irda2

The Ethernet Controller is for my existing ethernet port, this is nothing to do with the infrared dongle, so YaST appears to have failed to install a driver. I did not know what to do at this stage so I clicked on abort.

I looked at other YaST screens such as IrDA Configuration:

yast ir

However this screen only seems to be designed for serial connected devices, so I gave up on this also.

I started the 'USB devices' program to confirm that the low level USB connection was up as follows:

usb config

I also checked the usb configuration file: /proc/bus/usb/devices has the following entry:

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=ff(vend.) Sub=01 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=066f ProdID=4200 Rev= 0.08
S: Manufacturer= Sigmatel Inc
S: Product= IrDA/USB Bridge
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=440mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=00(>ifc ) Sub=00 Prot=00 Driver=stir4200
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms

I also checked usbViewer as you can see here.

Not knowing what to do next, I decided to search the web for further information, I found the following page:

http://csd.informatik.uni-oldenburg.de/~eagle/stir4200.html

This made me realise that the irda package needs to be installed, when I checked on YaST I found that the Yast2-irda package was already installed but not the irda package:

irda3

I therefore checked the irda package and clicked on Accept.

I also found a suggestion to use dmesg to check the driver as follows:

martin@linux:~> dmesg
<snip>
usb 1-2: new full speed USB device using ohci_hcd and address 4
NET: Registered protocol family 23
SigmaTel STIr4200 IRDA/USB found at address 4, Vendor: 66f, Product: 4200
drivers/net/irda/stir4200.c: IrDA: Registered SigmaTel device irda0
usbcore: registered new driver stir4200
<snip>

As suggested by Oldenburg university/Eagle document, I edited the ir configuration file: /etc/sysconfig/irda

change IRDA_PORT="/dev/ttyS1"

to IRDA_PORT="irda0"

This document also suggests that 'rcirda start' needs to be called when the USB port is intitialised.

linux:~ # /usr/sbin/rcirda start
Starting service IrDA done
linux:~ #

The article that I found suggested I need to add these two files:

/etc/hotplug/usb/usbirda.usermap

# SigmaTel STIr4200 IRDA/USB
usbirda 0x0003 0x066f 0x4200 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00
0x00000000

/etc/hotplug/usb/usbirda

#!/bin/bash

if [ -x /usr/sbin/rcirda ]; then
if [ "${ACTION}" = "add" ]; then
/usr/sbin/rcirda start && exit 0
else
/usr/sbin/rcirda stop && exit 0
fi
fi

My /etc/hotplug/ does not already have a 'usb' subdirectory, so I created one and entered the two files below, but the don't seem to get called?

There is a /etc/hotplug/usb.rc file there already, do I need to edit that instead?

At this stage I decided to ask on the alt.os.linux.suse newsgroup, Tarper was kind enough to answer as you can see here. Here is a summary:

> tail -f /var/log/messages

I did this and got:

May 6 08:05:28 linux kernel: usb 1-2: new full speed USB device using
ohci_hcd and address 5
May 6 08:05:28 linux kernel: SigmaTel STIr4200 IRDA/USB found at address 5,
Vendor: 66f, Product: 4200
May 6 08:05:28 linux kernel: drivers/net/irda/stir4200.c: IrDA: Registered
SigmaTel device irda0
May 6 08:05:33 linux ifup: No configuration found for irda0

martin@linux:~> /etc/init.d/irda status
Checking for service IrDA: unused

I then logged in as root and typed:

linux:~ # /etc/init.d/irda status
Checking for service IrDA: unused
linux:~ # cd /etc/init.d
linux:/etc/init.d # irda status
bash: irda: command not found
linux:/etc/init.d # insserv irda
linux:/etc/init.d # ls /etc/init.d/rc5.d/*irda
/etc/init.d/rc5.d/K11irda /etc/init.d/rc5.d/S12irda
linux:/etc/init.d #

I started adding a network card using Yast. For the Configuration Name I changed the suggested default from: bus-usb to irda0, I then entered the IP address as suggested.

I then got messages like the following:

The resolver configuration file (/etc/resolv.conf) has been temporarily
modified by dhcpcd. You have two options:
Modify the current (changed) version of the file.
Press 'Accept' now and continue editing other (nonresolver) data. You could
return to this dialogue later when the above service has terminated.

At this stage I bottled out and aborted Yast. I already have an eithernet
card which is used to connect to a router/modem and I dont want to corrupt
that.

> usb 2-1: new low speed USB device using ohci_hcd and address 2
> usb 2-2: new full speed USB device using ohci_hcd and address 3
> usb 2-2: device descriptor read/64, error -110
This comes later again on testing the bridge

> Initializing USB Mass Storage driver...
> ieee1394: Host added: ID:BUS[0-00:1023] GUID[00301bb800006990]
> NET: Registered protocol family 23
> usbcore: registered new driver hiddev
> scsi4 : SCSI emulation for USB Mass Storage devices
> usb-storage: device found at 4
> usb-storage: waiting for device to settle before scanning
> usbcore: registered new driver usb-storage
> USB Mass Storage support registered.
USB-Floppy/Burner? USB-Harddisk? MP3-Player?

> SigmaTel STIr4200 IRDA/USB found at address 3, Vendor: 66f, Product: 4200
> drivers/net/irda/stir4200.c: IrDA: Registered SigmaTel device irda0
> usbcore: registered new driver stir4200
Hardware gets found and introduces itself. Driver available and running,
configuration t.b.a.

> IrCOMM protocol (Dag Brattli)
IR-protocol for serial connections

> martin@linux:~> /etc/init.d/irda status
> Checking for service IrDA: checkproc: Can not read /proc/5641/exe:
> Permission denied

This is new in SuSE10! Thank you! :-))

> I then logged on as root again:
>
> linux:~ # /etc/init.d/irda status
> Checking for service IrDA: running
>
> During the following I unplugged and plugged the IR-dongle a few times,
> there is still no configuration found and when I do this the address seems
> to increment each time I unplug and plug, as you can see:

That's no problem. It is only a counter to ensure proper working of hotpluggeable devices. If the mass storage above is an MP3-Player you can test this with it. A friend of mine has one, and on introducing him to using it with Linux I also stumbled across these increasing adresses.

> linux:~> tail -f /var/log/messages
> May 7 16:14:55 linux kernel: drivers/net/irda/stir4200.c: irda0: FIFO
> register read error: -110
This is something more irritating to me. Maybe a side effect during connection handshake...

> I started adding a network card using Yast. For the Configuration Name I
> changed the suggested default from: bus-usb to irda0, I then entered the
> IP address as you suggested.

Leave it to bus-usb. The device name irda0 will be assigned automatically. In fact there is no device file named /dev/irda0 It gets "smuggled" into the OS at runtime.

> I then got messages like the following:
>
> The resolver configuration file (/etc/resolv.conf) has been temporarily
> modified by dhcpcd. You have two options:
> Modify the current (changed) version of the file.
> Press 'Accept' now and continue editing other (nonresolver) data. You
> could return to this dialogue later when the above service has terminated.
>
> At this stage I bottled out and aborted Yast. I already have an eithernet
> card which is used to connect to a router/modem and I dont want to corrupt
> that.

That was correct. On startup dhcpcd makes a backup of the files it changes and writes them back when it ends. From outside these changes appear to be permanent, but they disappear on shutdown. Depending on what you change manually, this can lead to a mixed up network configuration since filesbeing used without change don't get backuped.

So all it needs is make dhcpcd give us back these genuine config files to change something in them.

You remember where the runlevel startscripts reside? Yes in /etc/init.d .
These scripts offer another feature being common to Unix: You can start and
stop services without having to bother about details. The sytem knows how
to do it automatically on boot and shutdown. In case of trouble you simply
have to reboot and all services get up again.

So let's tell dhcpcd (DHCP Client Daemon) to give us access to the genuine
network configuration. By stopping the service. Beware, you are then
offline until you start dhcpcd again.

Just open a console window, switch to root, change to /etc/init.d and do a

/etc/init.d#> ./dhcpcd stop

To start the service again, all you need to do is

/etc/init.d#> ./dhcpcd start

While dhcpcd being stopped, you can configure bus-usb to assign a private IP
to irda0 (some first usb network device). There shouldn't be a warning
message any more.

On starting, dhcpcd grabs the network configuration files and changes them
according to the information it gets from the DHCP server to configure eth0
automatically. Static adresses like yours for irda0 are left unchanged.

> Sorry to be so negative about the network card thing, but an IR-dongle
> seems a relatively dumb device (unlike eithernet card or modem).

It's solid hardware and at least more than a torch. According to the USB
specification it introduces itself correctly by the registers of a small
dull chip inside. This information contains the type of device
(input/printer/storage/network) and some details to help the OS recognize
it. Some devices even introduce themselves by name. It then depends on the
OS if and how the device is supported. This is common to all modern
peripheral devices being solid hardware.


I had a look at the /etc/init.d/rc5.d/K11irda and /etc/init.d/rc5.d/S12irda files mentioned above, they are not actual files but they point to /etc/init.d/irda, when I open this file (see here) I see that uses /usr/sbin/irattach. Reading the helpfile for irattach ( /usr/share/doc/packages/irda/README) see extract below, it suggests that irattach only works for the listed devices (not this device) I therefore thought this needs to be changed to rcirda start as suggested by Oldenburg university/Eagle document, I therefore renamed /etc/init.d/irda and replaced it with the following file:

#!/bin/bash

if [ -x /usr/sbin/rcirda ]; then
if [ "${ACTION}" = "add" ]; then
/usr/sbin/rcirda start && exit 0
else
/usr/sbin/rcirda stop && exit 0
fi
fi

This was a mistake! My system would not boot up, cntl-alt-f1 did not work, Failsafe boot does not work (and has never worked 9.3 and 10.0 on my system) I only managed to recover after many hours by using the Rescue system that came with the SuSE DVD and then somehow I managed to get to and delete the above file.

Is there a safe way to undo these files created by 'insserv irda' and running rcirda instead (assuming that you agree with my interpretation of the irda README files) ?

extract from /usr/share/doc/packages/irda/README

irattach

irattach uses the irtty module which connects to the Linux TTY and serial driver. This works well for most machines, but limits the speed to 115200bps (IrDA SIR mode). If you want higher speeds, you must use a special device driver for the IrDA chipset used by your machine. Currently there are not that many device drivers implemented, mostly because it's very hard to get the documentation, and the drivers are in fact quite hard to implement even if you are lucky and get the documentation for the chipset.

If you are one of the lucky people which have a chipset that is supported, then you don't need to use irattach anymore. Now you just have to insmod.

irattach is used to bind the Linux-IrDA stack to a device driver. So this is something you must do in order to use IrDA on your Linux machine. irattach must be run as root or installed setuid root, as it requires root privileges

Usage: irattach <dev> [-d dongle] [-s]

where
<dev> usually the name of a tty, but can also be a FIR device
-d dongle attaches a dongle driver (see below for more info)
-s starts discovery of remote IrDA devices

Dongles:

The currently known dongles are:

tekram Tekram IrMate IR-210B dongle
esi Extended Systems JetEye PC (ESI-9680) dongle
actisys ACTiSYS IR-220L dongle
actisys+ ACTiSYS IR-220L+ dongle
girbil Greenwich GIrBIL dongle
litelink Parallax LiteLink dongle
airport
old_belkin Belkin (old) SmartBeam dongle

Modules:

If you have compiled the IrDA stack as modules (recommended), then you will need to add these entries to your /etc/modules.conf file

# IrDA over a normal serial port, or a serial port compatible IrDA port
alias tty-ldisc-11 irtty

# IrCOMM (for printing, PPP, Minicom etc)
alias char-major-161 ircomm-tty

# To be able to attach some dongles
alias irda-dongle-0 tekram
alias irda-dongle-1 esi
alias irda-dongle-2 actisys
alias irda-dongle-3 actisys
alias irda-dongle-4 girbil
alias irda-dongle-5 litelink
alias irda-dongle-6 airport
alias irda-dongle-7 old_belkin

Network Card Configuration

As suggested I first called dhcpcd stop from root.

I started up YaST Network Card Configuration and clicked on 'add'

yast1

I set the device type to usb but somehow it seems to have got set back to Ethernet?

I then clicked on next:

yast2

I changed the Device to USB and set the static IP address:

yast3

The options under Advanced are:

Clicking on Hardware details brought up this message:

yast4

It really does not want to change to USB, but ethernet does not seem to make sense, so I clicked Continue:

yast5

I clicked on Next

yast6

Clicked on next again:

yast7

This then wrote the configuration and automatically shut down the dialog.

I then went back in to edit mode to check the configuration.

yast8

 

yast9

 

yast10

linux:~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:30:1B:B8:69:2C
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::230:1bff:feb8:692c/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16546 errors:0 dropped:0 overruns:0 frame:0
TX packets:16133 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9368647 (8.9 Mb) TX bytes:3035131 (2.8 Mb)
Interrupt:217 Base address:0x6000

irda0 Link encap:IrLAP HWaddr 00:00:00:00
inet addr:192.168.10.1 Mask:255.255.255.0
UP RUNNING NOARP MTU:2048 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:669 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:8
RX bytes:0 (0.0 b) TX bytes:10871 (10.6 Kb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:259 errors:0 dropped:0 overruns:0 frame:0
TX packets:259 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:18164 (17.7 Kb) TX bytes:18164 (17.7 Kb)

linux:~ # dhcpcd start
linux:~ #

YaST Infrared Device

Now that the network connection is setup we can check if there any changes to YaST IrDA Configuration page.

I started the configuration as follows:

YaST Control Center -> Hardware -> Infrared Device

irda

There is still no options about SIR/FIR etc.

I tried the 'test' option:

irda

The above polling sequence seems to go on indefinitely, to see a longer section, I cut & pasted to this page.

This suggests to me that a valid response is being received from the Palm (requesting irOBEX protocol?) but this seems to have no effect?

When I realised that the sequence appears to be continuous, I clicked 'close', which brought up the following:

irda

This looks promising! I clicked yes.

This brought up another dialog, very briefly, as the configuration was written. But it disappeared before I had a chance to read or capture it.

After this I tried KPilot again, but no change, it still does not work:

kpilot

irda0 never appears even when I switch on the palm. I then realised that irda0 might be the low level device name and that we may need a different device name to talk to the IR stack, I did some searching on the web and found some references to /dev/ircomm0 and /dev/ircomm1, so I went into 'Settings'->'General Setup'->'Device' and tried these names:

kpilot

the logs says they are not read-write, so I started a root session and typed:

 

linux:~ # chmod 666 /dev/ircomm0
linux:~ #

kpilot

When I pressed 'sync' on the palm i got the following error messages:

kpilot

and KPilot / Knotes crashed:

kpilot

So I disabled notes for now:

kpilot

I then tried again:

kpilot

Success !!!

 

It took over an hour to backup everything but it worked!

 

Thanks for your help Tarper.


metadata block
see also:

 

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover Build Your Own High-performance Gamers' Mod PC (Build Your Own S.).

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

 

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2017 Martin John Baker - All rights reserved - privacy policy.