Technology - Shuttle PC - Install Infrared device alt.os.linux.suse discussion with Tarper

From: mjb
Newsgroups: alt.os.linux.suse
Subject: how do I configure a USB device?
Date: Fri, 05 May 2006 11:00:54 +0100

Hi,

I need some help in configuring an infra red to USB adapter on suse 10.0.

It seems to have been detected at low level by YaST when I plug in to USB
but YaST automatically went into 'Network Card Configuration' which does
not seem appropriate.

I cant find anything in YaST that helps with USB, it does have a IrDA
configuration page but that seems to assume a serial interface.

I did some seaching on the web and found that I need to type the following
command to start the driver each time the device is plugged in to the usb
port:

rcirda start

How can I call this when the device is plugged in to usb?
The article that I found suggested I need to add the two files at the bottom
of this message:

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?

Also, do you know how to set this up as fast infra red (FIR) as opposed to
slow infra red (SIR)?

Martin

----------------------
files I tried adding without any effect:

/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


From: tarper
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Fri, 05 May 2006 17:05:32 +0200

Hello Martin,

since you didn't specify details about what kind of device you are trying to
connect, I assume you are still hunting for the right question to pose for
solving your problem.

mjb wrote:

> Hi,
>
> I need some help in configuring an infra red to USB adapter on suse 10.0.
>
> It seems to have been detected at low level by YaST when I plug in to USB
> but YaST automatically went into 'Network Card Configuration' which does
> not seem appropriate.

Why not? Obviously your USB adapter is recognized as a network device. So it
may be able to exchange (send AND receive) data with mobile devices, e.g. a
cell phone, PDA or notebook. Here multi point (network) connection.

> I cant find anything in YaST that helps with USB, it does have a IrDA
> configuration page but that seems to assume a serial interface.

See above, here point-to-point (modem) connection.

Depending on what you want to connect to your computer, let YAST configure
one of them, either network or serial.

IR-remote controls are a completely different story, since they only
"listen" to the light.

Greetings
Tarper


From: mjb
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Fri, 05 May 2006 17:27:55 +0100

Hello Tarper,

Thank you for replying.

> since you didn't specify details about what kind of device you are trying
> to connect, I assume you are still hunting for the right question to pose
> for solving your problem.

I am trying to use this infra red to USB adapter to synchronise my PC(SUSE
10) with a palm PDA.
I've got various problems setting up KPilot, and I would appreciate any help
in doing that, but I thought it would help to keep things simple if I tried
to sort out the low level USB problems first.

The question I was trying to ask is "how do I start up the driver (rcirda
start) when USB starts up?"
and "How do I configure it (SIR or FIR)"

By the way, I have installed the irda package.

>> It seems to have been detected at low level by YaST when I plug in to USB
>> but YaST automatically went into 'Network Card Configuration' which does
>> not seem appropriate.
> Why not? Obviously your USB adapter is recognized as a network device. So
> it may be able to exchange (send AND receive) data with mobile devices,
> e.g. a cell phone, PDA or notebook. Here multi point (network) connection.

I thought that YaST Network Card Configuration was about configuring things
like Ethernet Controllers? YaST started up this page but did not add any
devices to it, if I click on 'add' it does have the option to add a USB
device but the it asks questions about IP addresses? I'm not trying to
piggyback an IP connection over an infrared link or anything complicated
like that.

> Depending on what you want to connect to your computer, let YAST
> configure one of them, either network or serial.

I still cant find anything in YaST that does what I want!

Thanks,
Martin


From: tarper
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Fri, 05 May 2006 22:52:32 +0200

Hello Martin,

mjb wrote:

> I still cant find anything in YaST that does what I want!

Maybe you simply lack information about how your device is recognized and/or
assigned. Do a

tail -f /var/log/messages

to watch what happens when you connect your USB-device to your computer.
Does it assign a device name? Is it a serial device or a network device?
The same can be done with system tools like usbview.

Besides that, I found something that might give you some additional hint for
tracking down the problem back stage. The guy sees his IR-device via
ifconfig, so it seems to be correct, that it is configured as a network
device.

http://www.pilot-link.org/node/202

Sure it is Fedora, but the core of all distributions is quite the same.

Greetings
Tarper


From: mjb
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Sat, 06 May 2006 09:02:44 +0100

Thanks Tarper,

>> I still cant find anything in YaST that does what I want!
> Maybe you simply lack information about how your device is recognized
> and/or assigned. Do a
> 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

So where do I tell it about the configuration? according to the notes for
the irda package it needs to call:
/usr/sbin/rcirda start
to start the IrDA service. But where can I put this command so that it is
called every time the device is plugged in to usb?

I have read the SUSE Administration guide, chapter on the Hotplug System,
but I failed to find any enlightenment there.

Also, thank you for the url link, there are some things for me to try there,
but since I'm no expert at command line tools it may take me some time.

Martin


From: tarper
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Sat, 06 May 2006 17:02:09 +0200

Hello Martin,

mjb wrote:

> I did this and got:
[...]
> May 6 08:05:28 linux kernel: drivers/net/irda/stir4200.c: IrDA:
----------------------------------------^^^
This is treated as a network device...

> Registered SigmaTel device irda0
> May 6 08:05:33 linux ifup: No configuration found for irda0
...but starting it failed due to lack of configuration

> So where do I tell it about the configuration?

The easiest way to configure a network device is letting YaST do the job.
The more complicated one is to do it manually by creating a configuration
file in /etc/sysconfig/network. If you are online via DSL, you had to
configure your network card as eth0 before being able to assign your DSL
connection to it. Guess this is similar.

> According to the notes for
> the irda package it needs to call:
> /usr/sbin/rcirda start

This is only the low level start script being called by the runlevel script
system of Unix/Linux. Guess you won't have to bother about this after
configuration, since it will be invoked automatically. At the moment this
is beyond our focus.

> to start the IrDA service. But where can I put this command so that it is
> called every time the device is plugged in to usb?

Did you connect/disconnect your IR-dongle more than once while looking at
tail -f /var/log/messages? The system reacted with messages as above
listed? So your IR-dongle is already being recognized correctly and already
tries to perform the appropriate actions.

> I have read the SUSE Administration guide, chapter on the Hotplug System,
> but I failed to find any enlightenment there.

My personal experience: When there is no information at all, it may be too
simple for me to grasp. Because I expect it to be more complicated...

Greetings
Tarper


From: mjb
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Sat, 06 May 2006 18:10:07 +0100

> The easiest way to configure a network device is letting YaST do the job.
> The more complicated one is to do it manually by creating a configuration
> file in /etc/sysconfig/network. If you are online via DSL, you had to
> configure your network card as eth0 before being able to assign your DSL
> connection to it. Guess this is similar.

Yes, I would like YaST to do the job but if I ask YaST to add a network card
it asks about IP addresses etc. Thats fine for an eithernet card but im
sure its not right for an IR-dongle. Could YaST have mis-assigned this?

>> According to the notes for
>> the irda package it needs to call:
>> /usr/sbin/rcirda start
>
> This is only the low level start script being called by the runlevel
> script system of Unix/Linux. Guess you won't have to bother about this
> after configuration, since it will be invoked automatically. At the moment
> this is beyond our focus.

I was going by the information I found on this web site:
http://csd.informatik.uni-oldenburg.de/~eagle/stir4200.html
This is what made me think that I only have to run a script to call rcirda
start.

> Did you connect/disconnect your IR-dongle more than once while looking at
> tail -f /var/log/messages? The system reacted with messages as above
> listed? So your IR-dongle is already being recognized correctly and
> already tries to perform the appropriate actions.

Yes, the same messages happen each time the device is plugged in.

Thanks,

Martin


From: tarper
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Sun, 07 May 2006 03:28:13 +0200

Hello Martin,

mjb wrote:

> I was going by the information I found on this web site:
> http://csd.informatik.uni-oldenburg.de/~eagle/stir4200.html
> This is what made me think that I only have to run a script to call rcirda
> start.

Thanks for the link! :-)) According to this page, rcirde is a link
to /etc/init.d/irda This is the runlevel startscript I mentioned.

First, as common user, do a

?> /etc/init.d/irda status

Does it say "unused" or "running"/"failed"?

If it says "unused", switch to root and do a

#>cd /etc/init.d
#>insserv irda

The latter does the following:
While booting your system invokes all startscripts of your desired default
runlevel. You can watch this by exiting the splash screen by pressing the
ESC button when you are invited to in the lower right corner of the screen.

Insserv generates these runlevel scripts by creating symbolic links in the
appropriate directories. These links all point
to /etc/init.d/<runlevel-script>, in your case irda.

Due to dependencies between these scripts, they have to be invoked in a
certain sequence. It makes no sense to start services before the required
hardware is up.

This sequence is controlled by the two figures in the name of the
runlevel-startscripts. Do a

?> ls /etc/init.d/rc5.d/*irda

for this. On my SuSE 9.3 it is

K10irda (Killscript when leaving the runlevel)

and

S12irda (Startscript when entering the runlevel)

When these scripts exist, you don't have to bother any more about starting
your rcirda manually. This will already be done automatically. According to
the header of /etc/init.d/irda in the runlevels 3 (network text mode) and 5
(network graphics mode)

> Yes, the same messages happen each time the device is plugged in.

Then let's have another try! :-))

Reboot your system to Linux.
The Splash Screen is the one after the boot manager.
It says "Press ESC for details" or so.
Then watch the runlevel scripts being started.
After "Switching to Runlevel 5" look for irda being started.
What does it say? "Running", "Failed", "Unused"?

And, just for testing, assign a private IP-address to your IR-device

192.168.10.1 as IP-address
255.255.255.0 as network
Gateway as IP-address if needed, or just empty.

By definition this is a private network address, not being accessible
through the internet, because it is used by thousands of people at the same
time. So no fear to use it.

Your "USB/IR bridge" as pronounced in the web is in fact a network device.
TCP/IP is only one of many transfer protocols being available for network
devices, but obviously necessary to start the device. What kind of transfer
protocol is used later, may be a completely different story.

I'm online via DSL. To configure DSL, I first had to configure my ethernet
card to come up. But this TCP/IP connection is never used. It is simply a
place for anchoring my real network service: PPPoE (PPP over Ethernet).

If it really doesn't help us, all you need to do afterwards is delete the
configuration of irda0 in YaST.

Greetings
Tarper


From: mjb
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Sun, 07 May 2006 18:38:27 +0100

Tarper,

Thanks very much for your patience, still not working yet, I have done what
you suggested as follows:

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 then restarted the machine, it did not respond to esc (I think this might
be because the keyboard is itself USB and therefore wont have any effect
until USB is initialised)

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
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.
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
bootsplash: status on console 0 changed to on
<snip>
ACPI: Power Button (CM) [PWRB]
IrCOMM protocol (Dag Brattli)
nvidia: module not supported by Novell, setting U taint flag.
nvidia: module license 'NVIDIA' taints kernel.
ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [APC3] -> GSI 18 (level, low) ->
IRQ
66
PCI: Setting latency timer of device 0000:01:00.0 to 64
NVRM: loading NVIDIA Linux x86_64 NVIDIA Kernel Module 1.0-8178 Wed Dec 14
16:
58:07 PST 2005
eth0: no IPv6 routers present
IA-32 Microcode Update Driver: v1.14 <tigran@veritas.com>
IA-32 Microcode Update Driver v1.14 unregistered
it87: Found IT8712F chip at 0x290, revision 6
it87 2-0290: Detected broken BIOS defaults, disabling PWM interface
drivers/usb/input/hid-core.c: usb_submit_urb(ctrl) failed
drivers/usb/input/hid-core.c: timeout initializing reports
<snip>
input: USB HID v1.10 Device [ABBAHOME USB Keyboard] on usb-0000:00:02.0-1
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.01:USB HID core driver

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

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:

linux:~> tail -f /var/log/messages
May 7 16:14:55 linux kernel: drivers/net/irda/stir4200.c: irda0: FIFO
register read error: -110
May 7 16:14:55 linux kernel: usb 2-2: USB disconnect, address 3
May 7 16:14:55 linux ifdown: Interface not available and no configuration
found.
May 7 16:14:58 linux kernel: usb 2-2: new full speed USB device using
ohci_hcd and address 4
May 7 16:14:58 linux kernel: usb 2-2: device descriptor read/64, error -110
May 7 16:14:58 linux kernel: SigmaTel STIr4200 IRDA/USB found at address 4,
Vendor: 66f, Product: 4200
May 7 16:14:58 linux kernel: drivers/net/irda/stir4200.c: IrDA: Registered
SigmaTel device irda0
May 7 16:15:03 linux ifup: No configuration found for irda0
May 7 16:15:18 linux kernel: usb 2-2: USB disconnect, address 4
May 7 16:15:18 linux ifdown: Interface not available and no configuration
found.
May 7 16:15:59 linux kernel: usb 2-2: new full speed USB device using
ohci_hcd and address 5
May 7 16:15:59 linux kernel: SigmaTel STIr4200 IRDA/USB found at address 5,
Vendor: 66f, Product: 4200
May 7 16:15:59 linux kernel: drivers/net/irda/stir4200.c: IrDA: Registered
SigmaTel device irda0
May 7 16:16:05 linux ifup: No configuration found for irda0
May 7 16:16:31 linux kernel: usb 2-2: USB disconnect, address 5
May 7 16:16:31 linux ifdown: Interface not available and no configuration
found.
May 7 16:16:39 linux kernel: usb 2-2: new full speed USB device using
ohci_hcd and address 6
May 7 16:16:39 linux kernel: SigmaTel STIr4200 IRDA/USB found at address 6,
Vendor: 66f, Product: 4200
May 7 16:16:39 linux kernel: drivers/net/irda/stir4200.c: IrDA: Registered
SigmaTel device irda0
May 7 16:16:44 linux ifup: No configuration found for irda0

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.

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.

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

Anyway I hope you are not regretting helping me with this, it must seem like
a full time job, I do appreciate your help though. Can you think of
anything else to try?

Thanks, Martin


From: tarper
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Mon, 08 May 2006 00:30:01 +0200

Hello Martin,

mjb wrote:

> Tarper,
>
> Thanks very much for your patience, still not working yet, I have done
> what you suggested as follows:
>
> 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 #

So automation of rcirda is done! :-))

> I then restarted the machine, it did not respond to esc (I think this
> might be because the keyboard is itself USB and therefore wont have any
> effect until USB is initialised)

Oups...! How do you access the BIOS in case of emergency? Makes me look at
my PS/2 keyboards in a completely different light...

> 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 files
being 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.

And alas, fraudy hardware is also common in the meantime. I own a
PCI-TV-card, which introduces itself as a BT878 card. Taken literally on
startup, none of the expected tuner chips gets found. There is none on the
card. Obviously I purchased a TV card with a "software tuner" on the
Windows "Driver-CD".

> Would a
> usb to serial device or a usb storage device be a network card?

Connecting things to the USB port is allways a thrilling procedure to me,
because you never know:

1. Is it recognized?
2. How is it recognized?
3. What device file is assigned?

That's why tail -f /var/log/messages has turned out to be my standard screen
for activities like that.

USB to 9pin-serial should be a serial device. I seem to remember that
something like /dev/ttyS21 was assigned by some old SuSE version.

A storage device is very interesting. Because according to the naming
convention of Linux, USB-storage devices are treated as
SCSI-devices: /dev/sda*

I never had the chance yet, but just for fun: What would you expect a
camcorder with USB interface to appear? Might be a webcam, might be a
storage device, might be something not (yet) supported by Linux.

That's why I'm quite fearful buying USB-devices. I can't afford this way of
gambling any more. And alas, most of the cheap peripherals are fraudy.

So feel happy that you picked some piece of solid hardware with your
bridge! :-))

Greetings
Tarper


From: mjb
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Tue, 09 May 2006 09:50:17 +0100

Hi Tarper,

> #>cd /etc/init.d
> #>insserv irda
> The latter does the following:
> While booting your system invokes all startscripts of your desired default
> runlevel. You can watch this by exiting the splash screen by pressing the
> ESC button when you are invited to in the lower right corner of the
> screen.
> Insserv generates these runlevel scripts by creating symbolic links in the
> appropriate directories. These links all point
> to /etc/init.d/<runlevel-script>, in your case irda.

I had a look at the /etc/init.d/rc5.d/K11irda and /etc/init.d/rc5.d/S12irda
files, as you say, 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) I've put a summary at the end of
this page:
https://www.euclideanspace.com/tech/pc/shuttle/mods/irda/
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) ?

This is getting very complicated, but I am learning a lot, I therefore
created the following web page to keep track of what I have done (and in
the hope it may be useful to others)
https://www.euclideanspace.com/tech/pc/shuttle/mods/irda/
Is it alright to include your messages as I have done?

thanks,

Martin


From: Malcolm
Subject: Re: how do I configure a USB device?
Newsgroups: alt.os.linux.suse
Date: Tue, 09 May 2006 07:14:09 -0500


Hi
You will find that all the rc* files are softlinks to the /etc/init.d
files eg rcirda = /etc/init.d/irda.

Have a look at man insserv on how to add remove (use the -v option as
well for some verbose output).

If you look at the actual script /etc/init.d/irda comment header it
provides information on dependencies etc. If you need to create a new
start script look at using the /etc/init.d/skelton template file.

--
Cheers
Malcolm


From: mjb
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Tue, 09 May 2006 18:42:13 +0100

> You will find that all the rc* files are softlinks to the /etc/init.d
> files eg rcirda = /etc/init.d/irda.

Ah, that explains why calling rcirda from irda was a bad idea. I guess it
was recursively calling itself forever.

So the file is already doing what I was trying to do (how could I have
doubted you Tarper) then why is it not working?

Do you think its time to admit defeat with this device?

Martin


From: Malcolm
Subject: Re: how do I configure a USB device?
Newsgroups: alt.os.linux.suse
Date: Tue, 09 May 2006 12:59:17 -0500


Hi
I would image that was the problem... :-)
As an aside you could always use the init=/bin/bash or 1 (one) options
at boot to get in a fix some problems.

--
Cheers
Malcolm


From: tarper
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Wed, 10 May 2006 00:43:50 +0200

Hello guys,

Malcolm wrote:

> mjb wrote:
>
>>> You will find that all the rc* files are softlinks to the
>>> /etc/init.d files eg rcirda = /etc/init.d/irda.

(translated from a German Unix page)
"The prefix "rc" stands for 'run command'. It's a relict from the first days
of computer development being adopted by some forgotten ancestor of Unix.
Maybe people would prefer "BAT", if this was to be invented today."

The first official Unix was born in 1970, a decade before MS-DOS. Some Unix
traditions reach very far back in time... :-))

The runlevel mechanism (in /etc/init.d/rc*.d) was invented later to simplify
and organize system administration. Today this mechanism is common to all
Unix systems: All Linux distros, all Solaris, HP-UX, AIX... Learned about
one, learned about all.

>> Do you think its time to admit defeat with this device?

As long as there are shots left? It's your choice, but I wouldn't. :-))

> As an aside you could always use the init=/bin/bash or 1 (one) options
> at boot to get in a fix some problems.

Right! But "init=1"? I always use "init=init 1" maybe obsolete...

Greetings
Tarper



From: tarper
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Tue, 09 May 2006 19:37:20 +0200

Hello Martin,

mjb wrote:

> http://www.euclideanspace.com/tech/pc/shuttle/mods/irda/
> Is it alright to include your messages as I have done?

Feel invited to do so! :-)) But skip the dead end roads of our solution
path. They only irritate people. So the loop of your exchanging the
running /etc/init/irda with another script doesn't require documentation.

My proposal: After all is done, we make a straight documentation how to
configure this device and how to verify it via console commands.

I guess you think too complicated. SuSE is a German abbreviation for
"Software und System-Entwicklung". They are professionals. YaST is the most
powerful system administration tool I know about. Other distributions lack
this tool. That's why admins have to climb back stages to configure things
manually.

If YaST really happans to fail, e.g. due to fraudy hardware, it still offers
you a graphical interface to change things manually, provided people know
what they are doing.

1. your Stick gets recognized as new hardware right out of the box.

2. YaST offers you the network configuration dialog, since your stick
introduces itself as a network device.

3. Since your ethernet card is configured via DHCP, you get a warning
message, that you are about to change temporary files instead of the
original ones.

4. To prevent this, all it needs to do is stopping the DHCP client service
before you add your "usb network card" with the YaST network module. Then
start the DHCP client service again, reboot and look what happens.

Then as root do

#> ifconfig

You should see irda0 together with eth0, both with assigned IP-addresses.
Provided the irda service is still being started automatically as it
already did.

If really should happen what you fear, crippeling your network connection,
all you need to do is delete your network card configurations via YaST and
reboot to be sure. It then gets offered again as "not yet configured". To
configure it again is simply choosing DHCP in the YaST configuration
dialogue.

All configuration of eth0 already comes from outside, e.g. some WLAN-router
or cable modem acting as a DHCP server.

Greetings

Tarper


From: mjb
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Wed, 10 May 2006 09:19:17 +0100

Tarper,

> I guess you think too complicated. SuSE is a German abbreviation for
> "Software und System-Entwicklung". They are professionals. YaST is the
> most powerful system administration tool I know about. Other distributions
> lack this tool. That's why admins have to climb back stages to configure
> things manually.

I think we are making progress (but it does not work yet). I humbly
apologise for doubting YaST and you.

I configured a network card as you suggested.

Data is being transmitted in both directions but there seem to be protocol
errors at a higher level (overruns).

What is really impressive is that as soon as I configured it gkrellm (which
I leave running) automatically detected it and showed a graph of the data
in each direction.

When I configured the card I set the Device Type to USB (although YaST does
not seem to like it) I got a message saying: "You have changed the
interface type from the one that has been detected. This only makes sense
if you know that the detection is wrong" I clicked on 'Continue' (still
doubting YaST!).

It could be that I have set something wrong in the network card or perhaps
there is a wrong setting in KPilot or in the Palm itself. Do I need to try
all combinations of parameter settings or is there a better way to see what
is going on.

> Feel invited to do so! :-)) But skip the dead end roads of our solution
> path. They only irritate people. So the loop of your exchanging the
> running /etc/init/irda with another script doesn't require documentation.

I have continued to add a complete record of what I have done to:
https://www.euclideanspace.com/tech/pc/shuttle/mods/irda/
I like to keep a full record for my own record, I have leared a lot even
from the dead ends, such as rcirda. However I agree it needs to be tidied
up for public consumption.

> My proposal: After all is done, we make a straight documentation how to
> configure this device and how to verify it via console commands.

That would be good.
I think that in general there is a need for two types of documentation (Im
not suggesting we write it!):
1) how to configure a specific device on a specific distribution.
2) more general information for end users (a bit like the SUSE
Administrators Guide which came as a printed copy in the good old days)

But the Administrators Guide never seems to have the information that I
need, for instance I would like to understand more about:
* what configuration scripts gets called when the OS goes into a different
mode (init 3, init 5) I have learned about this in this thread - thanks.
* what configuration scripts gets called when USB devices are plugged and
unplugged.
* how do devices know what high level protocols to use?
* why do USB configurations sometimes disappear (not in this case)
* how are configuration files linked to hardware.
* how are configuration files linked to drivers.
* how does auto-mount work? how does a device appear as a file drive?
When I search for this type of information on the web, the results seems to
aimed at people building their own distribution or modules rather than end
users.

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:632 errors:0 dropped:0 overruns:0 frame:0
TX packets:543 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:142619 (139.2 Kb) TX bytes:38461 (37.5 Kb)
Interrupt:217 Base address:0xc000

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:90 errors:1355 dropped:0 overruns:1355 frame:0
TX packets:3787 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:8
RX bytes:1854 (1.8 Kb) TX bytes:57585 (56.2 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:104 errors:0 dropped:0 overruns:0 frame:0
TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6720 (6.5 Kb) TX bytes:6720 (6.5 Kb)

linux:~ #


From: tarper
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Thu, 11 May 2006 03:20:52 +0200

Hello Martin,

mjb wrote:

> I would like to understand more about:
> * what configuration scripts gets called when the OS goes into a different
> mode (init 3, init 5) I have learned about this in this thread - thanks.
> * what configuration scripts gets called when USB devices are plugged and
> unplugged.
> * how do devices know what high level protocols to use?
> * why do USB configurations sometimes disappear (not in this case)
> * how are configuration files linked to hardware.
> * how are configuration files linked to drivers.
> * how does auto-mount work? how does a device appear as a file drive?
> When I search for this type of information on the web, the results seems
> to aimed at people building their own distribution or modules rather than
> end users.

Let me take this as a kind of shopping list to answer you later :-))
I'm about to build up my own webserver and this will be one of the core
contents. :-))

> 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:90 errors:1355 dropped:0 overruns:1355 frame:0
^^^^ receiving from Palm ^^^^
> TX packets:3787 errors:0 dropped:0 overruns:0 carrier:0
^^^^ transmitting to Palm ^^^^^
> collisions:0 txqueuelen:8
> RX bytes:1854 (1.8 Kb) TX bytes:57585 (56.2 Kb)
^^^^ both directions used ^^^^

You only get overruns in receiving data from the palm. Transmission is
already working.

So my first approach would be looking at the Palm if I can throttle data
transmission there. Better slow and stable than fast and buggy.

I discovered similar effects when I had a mixed network configuration with
cards running 10Mb/s and 100Mb/s on my local network. The direction
slow->fast would work allright, but fast->slow would get errors at mass.

I've seen in one of your postings, that your USB device was connected to the
fast USB port. Is it still so? Would be another try changing this to
standard USB and see what happens. I'm not sure by now, which side of your
bridge SIR/FIR is about.

Greetings
Tarper


From: mjb
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Thu, 11 May 2006 10:26:17 +0100

> I'm about to build up my own webserver and this will be one of the
> core contents. :-))

I will look forward to that, I think it will be very useful.

> So my first approach would be looking at the Palm if I can throttle data
> transmission there. Better slow and stable than fast and buggy.

I cant find anything in the palm setup to configure speed or SIR/FIR.

according to this page:
http://www.clarinetsys.com/en/improve-ir-performance.htm
It says "Two systems involve in the infrared communication will negotiate
the speed during the establishing stage and automatically adopt the highest
speed both can support."

It also says: "Linux, Mac, EPOC, and all of the Microsoft's OS including
PocketPC support both SIR and FIR in its IrDA protocol stack. Although Palm
supports SIR, it has not delivered FIR capability yet so it is difficult to
prove if Palm OS can support the FIR protocol. The IrDA protocol stack
supposedly is independent of SIR and FIR -- it is the device's infrared
driver that determines whether it is going to use the SIR or FIR transfer
rate. Therefore, it is very likely Palm OS supports both. Palm's licensee
should confirm with Palm before incorporating FIR circuitry."

according to this page:
http://www.fuschlberger.net/ir/
The stir4200.c kernel module has the following parameters in the
config-file:
CONFIG_IRDA=m
CONFIG_USB_IRDA=m
CONFIG_SIGMATEL_FIR=m

How can I find out how SUSE have compiled this? have they compiled it to
support FIR? If so, will it revert back to SIR as it should according to
the above quote.

My USB-IR dongle supports both SIR and FIR.

> I've seen in one of your postings, that your USB device was connected to
the
> fast USB port. Is it still so? Would be another try changing this to
> standard USB and see what happens.

I did not intend to imply that, I am using USB ports built into my computer,
they are all USB2, no hubs. The USB-IR dongle is USB 1.1 which should
throttle back the speed.

> I'm not sure by now, which side of your
> bridge SIR/FIR is about.

From the above reference it looks like its the infrared driver at each end
that negotiate SIR or FIR.

I think that the gkrellm graph, that appeared, might give some clues about
the problem.

What I see is regular orange pulses, I take this to be the linux driver
polling. When I switch on the Palm I see blue blocks which I take to be
replies from the palm.

The interesting thing is that this happens, even when KPilot is not running,
I cant get KPilot to make any different to this at all.
Could it be that the device driver or IrDA protocol stack are doing this
polling independently. When they get a response, if they don't have an
application to pass on their data too, their buffer might fill up and
overflow?

How can I check that KPilot is communicating with IrDA?

KPilot setup parameters are:
Configuration - General Setup - Device -
Pilot device: irda0
Speed: 57600
Workarounds: Zire 31, 72, Tungsten T5
Encoding: Western European ( iso 8859-15 )

Thanks,

Martin


From: tarper
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Fri, 12 May 2006 05:46:19 +0200

Hello Martin,

mjb wrote:

> I cant find anything in the palm setup to configure speed or SIR/FIR.

It's SIR when you get offered a serial configuration data set. It's FIR,
when you can configure a network connection using the IRDA device. Learned
about it tonight. :-))

> according to this page:
> http://www.clarinetsys.com/en/improve-ir-performance.htm
> It says "Two systems involve in the infrared communication will negotiate
> the speed during the establishing stage and automatically adopt the
> highest speed both can support."

Provided they play in the same league. So within SIR between 9600 bps and
115200 bps OR within FIR between 1,15 Mbps and 4Mbps. As I learned today,
SIR and FIR devices exclude each other by protocol:

<http://www.teco.edu/~markus/dasa/irda/sirfir.htm>
<english>
1.2 SIR / FIR - Bit Transmission Layer

For the bit transmission layer IRDA published two standards so far:
SIR(Serial IR Physical Layer) and FIR(Fast IR Physical Layer)

Both provide a directed point-to-point connection over a distance at abt. 1m
emitting IR light at an angle of 30°. The average error rate at a distance
of 1m is 10^-9 as well in a typical office environment with neon light as
also being exposed to sunlight. Especially protected devices provide data
exchange even exposed to electromagnetic fields of level 3 due to IEC
801.3.

1.2.1 Serial IR Physical Layer - SIR
The SIR standard was was explicitly designed to provide a cheap solution for
IR transmission. Therefore it simply uses the serial interface implemented
in every computer to be connected with some special IrDA-SIR hardware.

This hardware consists of a coder/decoder and the IR transmitter/receiver,
converting the asynchronous data stream originating from the serial
interface (must be 1 start bit, 8 data bits, no parity, 1 stop bit) in IR
light pulses, whereas a '0' is coded by an IR-impulse, a '1' by no
IR-impulse. Impulses have a fixed wave length between 0.85µm and 0.9µm, at
a minimal duration of 1.6µs and a maximum duration of 3/16 the transmission
time for a whole bit, which itself is proportional to the data transfer
rate.

IrDA-SIR is a halfduplex system. Since it is connected to the common serial
interface of a PC(UART 16550), data transfer rates refer to the control of
this interface and are limited to 115200bps.

1.2.2 Fast IR Physical Layer - FIR
FIR, often also called high speed extensions, is an extension of the SIR
standard. providing data transfer rates from 1.15Mbps to 4Mbps. Of course
this is no longer feasable over the serial interface with its UART 16550.
It needs a special communication controller for this.

Data transmission with 4 Mbps uses Pulse Position Modulation (PPM) with four
possible positions per data symbol. In addition to that, all 500ms a SIR
interaction pulse is sent to avoid and recognize interferences of SIR
transmissions and to make the SIR device capable to recognize the FIR
device.

The high speed modi are completely transparent to the layers above.
</english>
</http://www.teco.edu/~markus/dasa/irda/sirfir.htm>

> according to this page:
> http://www.fuschlberger.net/ir/
> The stir4200.c kernel module has the following parameters in the
> config-file:
> CONFIG_IRDA=m
> CONFIG_USB_IRDA=m
> CONFIG_SIGMATEL_FIR=m
>
> How can I find out how SUSE have compiled this? have they compiled it to
> support FIR?

They did. Otherwise we wouldn't have come as far as we did.

CONFIG_IRDA=m is wether to provide any IRDA support or not.
CONFIG_USB_IRDA=m is wether to provide IRDA support for USB devices or not.
CONFIG_SIGMATEL_FIR=m is wether to provide Sigmatel devices in FIR mode or
not.

Options in the kernel source configuration file may have three values:
n = do not include support
y = provide support as part of the kernel
m = provide support as a loadable module

> If so, will it revert back to SIR as it should according to
> the above quote.

Not yet, but maybe later.

> Could it be that the device driver or IrDA protocol stack are doing this
> polling independently. When they get a response, if they don't have an
> application to pass on their data too, their buffer might fill up and
> overflow?

No. They simply look permanently for new communication partners to appear.
Each one in its own league (SIR/FIR). Somehow like the hotplug system of
Linux. It's only an indicaton that your IR device is active. You might not
want it at the moment, e.g. on a trade fare, meeting a thousand of people
being 999 not interesting for you.

> KPilot setup parameters are:
> Configuration - General Setup - Device -
> Pilot device: irda0
> Speed: 57600
This can be up to 115200

Valid entries may be:
9600 (DTR during handshake)
14400
28800
57600
115200

In the meantime I suspect, that the Linux side yet ONLY provides FIR, but no
SIR, since the configuration of the "amateur league" is still missing.

Maybe now, having a running configuration of a FIR device (network), this
might be the base to configure the SIR device (serial) upon it to provide a
fallback feature. Sounds crude: Does the IrDA configuration offer something
new since the IrDA network device is up?

Greetings
Tarper


From: mjb
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Fri, 12 May 2006 18:28:48 +0100

> Sounds crude: Does the IrDA configuration offer
> something new since the IrDA network device is up?

Success !!! It works !!!

The IrDA configuration still looked the same but it eventually led me to the
answer.

I think the main issue was that KPilot needs to talk to /dev/ircomm0
instead of irda0.

I have added what happend today to the end of:
https://www.euclideanspace.com/tech/pc/shuttle/mods/irda/
Todays events start at: 'YaST Infrared Device' heading

I know that this file is not very user friendly (and much too big) in its
current state.
Do you think it would be useful to others if it was tidied it up?
I don't want to overlap with your planed website, so I would appreciate your
ideas on the best way to make this information available to others, if that
would be useful.

I really appreciate all your help - thanks very much.

Martin


From: tarper
Newsgroups: alt.os.linux.suse
Subject: Re: how do I configure a USB device?
Date: Sat, 13 May 2006 04:09:13 +0200

Hello Martin,

mjb wrote:

> I know that this file is not very user friendly (and much too big) in its
> current state.
> Do you think it would be useful to others if it was tidied it up?

Sure. I saved your page as "entire page" with Mozilla, so that all pictures
go into a directory named like the saved page itself. That way I discovered
that your title for it is from the previous one you created. To coordinate
documentation we should switch to PM, since this would be run OT. The mine
above is valid.

> I don't want to overlap with your planed website, so I would appreciate
> your ideas on the best way to make this information available to others,
> if that would be useful.

Even if it would overlap, redundance is what makes the web live. Since you
own a Palm and a USB/IdDA bridge, it's your content how to show how to
"marry" these devices to a synchronisation chain. It's higly important to
let people know, that a Belkin USB/IrDA bridge works on Linux and how this
is done. Hardware compatibility databases tend to be not up-to-date.

I'm a professional supporter and a Linuxer since the old days of kernel
0.99pl12 (1993). It's my content to explain how things work on Linux in
terms "younger" Linuxers will understand it. But I'm still far away from
the point to publish what we developed together. I'm creating a brand new
structure to be my personal mindfood pages. Private, funny, sarcastic,
creative. Genuine rubbish! And since I don't aim to be mentioned by search
engines, I'm free to use every technique web development offers.

I develop "hardest first", so there isn't much to show at the moment, but
feel free to have a look with Mozilla at http://mindfood.dynips.net to
hear(!) what I mean. This time the core feature of my site will be playing
background music like a web radio while visitors surf, changing smoothly
chosen titles while visitors walk down the menu structure of the music part
of my site. Planned to be done with Flash in a zero frame by a controlling
PHP script using session management.

Greetings
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.