# IrDA woes [solved - 04Dec02]

## duff

I'm having some serious problem getting my IR port to work on my laptop.  According to the manufacturer's webpage, the I/O controller is a National Semiconductor PC8739X (not sure what the X is, there's no chip info in the manual). First, my BIOS setting are as follows:

```
Serial Port B:

Mode: FIR

I/O Base Addr: 0x2F8

IRQ: 3

DMA: 0
```

Not sure why it's port B..I have no other serial ports (no 9 pin RS-232's)..but  anway.

After logging in, I check dmesg and I see this:

 *dmesg wrote:*   

> 
> 
> ttyS00 at 0x03f8 (irq = 4) is a 16550A
> 
> ttyS01 at 0x02f8 (irq = 3) is a 8250
> ...

 

So my IR device is at /dev/ttyS1, yes?

According to the IrDA HOWTO, if you're using FIR mode you don't have to use irattach to load modules, so I just use "modprobe ircomm-tty" and get the following (extra debugging info is compiled in):

 *lsmod wrote:*   

> 
> 
> ```
> 
> ircomm-tty             35776   0  (autoclean) (unused)
> ...

 

 */var/logs wrote:*   

> 
> 
> [kernel] IrCOMM protocol (Dag Brattli)
> 
> 

 

 *dmesg wrote:*   

> 
> 
> irda_init()
> 
> IrCOMM protocol (Dag Brattli)
> ...

 

Next, I try to attach to the device, so:

```
# irattach /dev/ttyS1 -s
```

 *lsmod wrote:*   

> 
> 
> ```
> 
> irtty                   8768   2  (autoclean)
> ...

 

 */var/logs wrote:*   

> 
> 
> [kernel] IrDA: Registered device irda0
> 
> [irattach] executing: 'echo 1 > /proc/sys/net/irda/discovery'
> ...

 

 *dmesg wrote:*   

> 
> 
> IrDA: Registered device irda0
> 
> irtty_net_open()
> ...

 

So far it looks OK, but when I try to load the driver it gets screwy:

```

# modprobe nsc-ircc io=0x2f8 irq=3 dma=0

```

Which spits out

 *stderr wrote:*   

> 
> 
> /lib/modules/2.4.20-acpi-r5/kernel/drivers/net/irda/nsc-ircc.o: init_module: No such device
> 
> Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
> ...

 

 :Sad: 

 */var/logs wrote:*   

> 
> 
> [kernel] nsc-ircc, Found chip at base=0x02e
> 
> 

 

 *dmesg wrote:*   

> 
> 
> nsc-ircc, Found chip at base=0x02e
> 
> nsc-ircc, driver loaded (Dag Brattli)
> ...

 

 I've also tried chaing the IO, IRQ, and DMA in the BIOS, but I get the same errors.

I've tried to be detailed as possible, does anybody have any suggestions?  What am I doing wrong?! I just want to sync my Palm with Evolution!  :Confused: Last edited by duff on Wed Dec 04, 2002 4:54 pm; edited 1 time in total

----------

## duff

Ok, I've almost got this working (i hope).

I'm actually getting irdadump to spit reasonable junk:

```
18:28:15.580016 xid:cmd ffffffff < f1751e1f S=6 s=0 (14) 

18:28:15.670016 xid:cmd ffffffff < f1751e1f S=6 s=1 (14) 

18:28:15.760014 xid:cmd ffffffff < f1751e1f S=6 s=2 (14) 

18:28:15.850015 xid:cmd ffffffff < f1751e1f S=6 s=3 (14) 

18:28:15.850033 xid:rsp 6bba978d > f1751e1f S=6 s=3 vader hint=0400 [ Computer ] (21) 

18:28:15.930013 xid:cmd ffffffff < f1751e1f S=6 s=4 (14) 

18:28:16.020015 xid:cmd ffffffff < f1751e1f S=6 s=5 (14) 

18:28:16.120016 xid:cmd ffffffff < f1751e1f S=6 s=* IrCOMM hint=8204 [ PDA/Palmtop IrCOMM ] (23) 

18:28:16.160015 snrm:cmd ca=fe pf=1 6bba978d < f1751e1f new-ca=84 (32) 

18:28:16.160041 ua:rsp ca=84 pf=1 6bba978d > f1751e1f (31) 

18:28:16.740016 rr:cmd < ca=84 pf=1 nr=0 (2) 

18:28:16.740033 rr:rsp > ca=84 pf=1 nr=0 (2) 

18:28:16.760014 i:cmd  < ca=84 pf=1 nr=0 ns=0 LM slsap=01 dlsap=00 CONN_CMD (6) 

18:28:16.760045 i:rsp  > ca=84 pf=1 nr=1 ns=0 LM slsap=00 dlsap=01 CONN_RSP (6) 

18:28:16.780019 i:cmd  < ca=84 pf=1 nr=1 ns=1 LM slsap=01 dlsap=00 GET_VALUE_BY_CLASS: "IrDA:IrCOMM" "IrDA:TinyTP:LsapSel" (37) 

```

(repeat)

This is "irdadump irda0" with my PalmIIIc hot syncing.

But now I want to sync this with Evolution.  Yes, I had "pda" in my USE variable when it emerged. So I run gnomecc (fluxbox is my wm),  click on Pilot Link, and set the type to IrDA.  In the next panel, I just click "No" and put in my user name and click next,  and then a bunch of junk goes to my terminal:

```
gpilotd-WARNING **: Could not open device Cradle (/dev/pilot): reason: "Device or resource busy".

gpilotd-Message: gpilotd: corba: set_user_info(cradle=Cradle,survival=0,timeout=0

gpilotd-Message: gpilotd: corba:               device = Cradle,

gpilotd-Message: gpilotd: corba:               user_id = 1000,

gpilotd-Message: gpilotd: corba:               user    = eduffy)

gpilotd-Message: gpilotd: assigned handle num 1
```

And just to show that I do have the correct permissions:

```
# ls -l /dev/pilot

lr-xr-xr-x    1 root     root           10 Nov 15 03:40 /dev/pilot -> /dev/ttyS1

# ls -l /dev/ttyS1 

lr-xr-xr-x    1 root     root            5 Nov 15 08:40 /dev/ttyS1 -> tts/1

# ls -l /dev/tts/1

crw-------    1 eduffy   uucp       4,  65 Dec 31  1969 /dev/tts/1

```

Is the irattach running screwing me over?

```
# ps -A | grep irattach

 4758 ?        00:00:00 irattach

```

If I kill it, I don't get the resource busy message, but still nothing happens, and I can't irdadump anymore.

Oh, and I turned off FIR, and just stuck with IrDA.

Anyone got an idea...anyone??

----------

## duff

Ok, finally got it syncing with Evolution!! Just in case this is helpful for anybody else, you attach the ir device to /dev/ttyS1 but in gnomecc you tell it to watch /dev/ircomm0.

----------

