Hi,

I've been attempting to get irda working on my Sony Vaio N505X (GB). I 
*think* I do have it working, but so far I have seen no sign of life from
the only other ir device I have - an Ericsson DI27 irda modem on an
Ericsson T8s phone - which at least one person has reported as working with
linux irda (linked from linux irda web pages). I've tried all manner of 
combinations of kernel + irda patch + irda utils right up to and including
the current ones, and read all that I could find on Linux irda (including 
the archives), but no luck so far. I wonder if anyone can tell me if I'm 
doing something wrong?

Whichever driver I use (irport/irtty+irattach) my ir device is not
discovered. The phone should look like a normal modem with irda
I am told. I have tried all the things that I know of - hopefully I'm
doing something stupid (:

Below, my attempts with various drives and my system config are shown. Please
skip it if it isn't interesting...

Many thanks, for Linux IRDA and for your (anticipated) comments.

Simon

-----------------------------------------------------------------------------

My system is Debian GNU/Linux 2.1 (slink) - kernel 2.2.14 with the SUSE
usb-2.3.28-for-2.2.13 USB backport and patch-2.2.14-irda1. Glibc is version
2.0.7 (19981211), and I'm currently using eiher 0.9.5 or 0.9.7 irda utils
(both seem to do the same for me). I also use pcmcia-cs Version 3.1.2.

>From my bios I know my irda port is at 0x3e8 irq 10, and Linux's serial
driver detects it with the wrong irq (so I simply setserial it correctly).

A friend with a PalmV ir-monitor program confirmed that even cat-ing to
the linux serial port produces IR output (before I had the irda patches):
        cat foo > /dev/ttyS2 
This gives a huge IR output from the port, and I use a mouse on ttyS0, so
I am sure I have the right serial device. In addition, my /proc/interrupts
shows the correct irqs in use if I fiddle with the two ports:

acronym:~# cat /proc/interrupts 
           CPU0       
  0:      33596          XT-PIC  timer
  1:       1909          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  4:        159          XT-PIC  serial
  5:          1          XT-PIC  soundblaster
  9:        312          XT-PIC  uhci
 10:          2          XT-PIC  serial
 12:       6129          XT-PIC  PS/2 Mouse
 13:          1          XT-PIC  fpu
 14:       5275          XT-PIC  ide0
NMI:          0

Here are the three things I tried - only my attempts and results with the
latest irda stuff are shown - sorry about the long output!

(1) new nsc driver
==================

I think the Vaio is nsc: reading .inf files from windows seems to indicate
this.

acronym:~# rmmod serial
acronym:~# modprobe nsc_fir io=0x3e8 irq=10

Gives:

Jan  8 23:34:52 acronym kernel: nsc_fir_find_chip(), no chip at 0x150 
Jan  8 23:34:52 acronym kernel: nsc_fir, Found NSC PC97338 chip, revision=2 
Jan  8 23:34:52 acronym kernel: nsc_fir, Wrong chip version ff 
Jan  8 23:34:52 acronym kernel: nsc_fir_find_chip(), no chip at 0x0ea 
Jan  8 23:34:52 acronym kernel: nsc_fir_find_chip(), no chip at 0x15c 
Jan  8 23:34:52 acronym kernel: nsc_fir_find_chip(), no chip at 0x02e 

So I gave up on that for now.

(2) irport (without irattach):
==============================

I insert the correct modules and DO NOT use irattach:

acronym:~# modprobe irport io=0x3e8 irq=10
acronym:~# modprobe ircomm-tty       
acronym:~# modprobe irlan

Now I have:

acronym:~# lsmod
Module                  Size  Used by
irlan                  35964   0  (unused)
ircomm-tty             28600   1 
ircomm                 12488   0  [ircomm-tty]
irport                  6016   0  (unused)
irda                  133361   0  [irlan ircomm-tty ircomm irport]

Now the ircomm0 device is registered in /proc/devices as:

161 ircomm

And setserial sees it:

acronym:~# setserial /dev/ircomm0
/dev/ircomm0, UART: 16550A, Port: 0x0000, IRQ: 0

I turn on discovery and debugging:

acronym:~# echo 1 > /proc/sys/net/irda/discovery
acronym:~# echo 1 > /proc/sys/net/irda/debug    

I try to access the ircomm0 devicei, as nothing is discovered:

acronym:~# dip -t 
DIP: Dialup IP Protocol Driver version 3.3.7p-uri (25 Dec 96)
Written by Fred N. van Kempen, MicroWalt Corporation.
Debian version 3.3.7p-2 (debian).

DIP> port ircomm0
DIP> term
[ Entering TERMINAL mode.  Use CTRL-] to get back ]

[ Back to LOCAL mode. ]
DIP> quit

The logs show:

Jan  8 23:35:43 acronym kernel: IrDA (tm) Protocols for Linux-2.2 (Dag Brattli)
Jan  8 23:35:43 acronym kernel: irport_open() 
Jan  8 23:35:43 acronym kernel: IrDA: Registered device irda0 
Jan  8 23:35:53 acronym kernel: IrCOMM protocol (Dag Brattli) 
...
Jan  8 23:44:30 acronym kernel: ircomm_tty_open(), ircomm0, count = 1 
Jan  8 23:44:30 acronym kernel: ircomm_tty_attach_cable() 
Jan  8 23:44:30 acronym kernel: ircomm_tty_ias_register() 
Jan  8 23:44:30 acronym kernel: ircomm_tty_block_til_ready(), O_NONBLOCK requested! 
Jan  8 23:45:05 acronym kernel: ircomm_tty_close() 
Jan  8 23:45:05 acronym kernel: ircomm_tty_shutdown() 
Jan  8 23:45:05 acronym kernel: ircomm_tty_detach_cable() 
Jan  8 23:45:05 acronym kernel: ircomm_close() 

[...after removing modules:]
Jan  8 23:50:21 acronym kernel: __ircomm_tty_cleanup() 
Jan  8 23:50:21 acronym kernel: ircomm_tty_shutdown() 
Jan  8 23:50:28 acronym kernel: irport_close(), Releasing Region 3e8 

And my /proc/net/irda/* show:

File: /proc/net/irda/discovery
IrLMP: Discovery log:

File: /proc/net/irda/ircomm
Instance 0:

File: /proc/net/irda/irias
LM-IAS Objects:
name: PnP, id=54082
 - Attribute name: "Comp#01", value[IAS_STRING]: "PNP8389"

 - Attribute name: "Manufacturer", value[IAS_STRING]: "Linux-IrDA Project"

 - Attribute name: "CompCnt", value[IAS_INTEGER]: 1

 - Attribute name: "DeviceID", value[IAS_STRING]: "HWP19F0"

 - Attribute name: "Name", value[IAS_STRING]: "Linux"

name: IrDA:IrCOMM, id=9027
 - Attribute name: "Parameters", value[IAS_OCT_SEQ]: octet sequence

 - Attribute name: "IrDA:TinyTP:LsapSel", value[IAS_INTEGER]: 21

name: Device, id=0
 - Attribute name: "IrLMPSupport", value[IAS_OCT_SEQ]: octet sequence

 - Attribute name: "DeviceName", value[IAS_STRING]: "Linux"

name: IrLAN, id=213556
 - Attribute name: "IrDA:TinyTP:LsapSel", value[IAS_INTEGER]: 20

File: /proc/net/irda/irlan
IrLAN instances:

File: /proc/net/irda/irlap

File: /proc/net/irda/irlmp
Unconnected LSAPs:
lsap state: LSAP_DISCONNECTED, slsap_sel: 0x15, dlsap_sel: 0xff, (IrCOMM)
lsap state: LSAP_DISCONNECTED, slsap_sel: 0x14, dlsap_sel: 0xff, (IrLAN ctrl (p))
lsap state: LSAP_DISCONNECTED, slsap_sel: 0x0, dlsap_sel: 0xff, (IrIAS srv)

Registred Link Layers:

File: /proc/net/irda/irttp
TSAP 0, stsap_sel: 15, dtsap_sel: 00
  connected: FALSE, avail credit: 0, remote credit: 0, send credit: 0
  tx packets: 0, rx packets: 0, tx_queue len: 0 rx_queue len: 0
  tx_sdu_busy: FALSE, rx_sdu_busy: FALSE
  max_seg_size: 0, tx_max_sdu_size: 0, rx_max_sdu_size: 0
  Used by (IrCOMM)

TSAP 1, stsap_sel: 14, dtsap_sel: 00
  connected: FALSE, avail credit: 0, remote credit: 0, send credit: 0
  tx packets: 0, rx packets: 0, tx_queue len: 0 rx_queue len: 0
  tx_sdu_busy: FALSE, rx_sdu_busy: FALSE
  max_seg_size: 0, tx_max_sdu_size: 0, rx_max_sdu_size: 0
  Used by (IrLAN ctrl (p))

(3) irtty with irattach:
========================

irattach is 0.9.7 (0.9.5 does the same)

I remove all irda modules from the previous test:

acronym:~# rmmod ircomm-tty
acronym:~# rmmod ircomm    
acronym:~# rmmod irlan 
acronym:~# rmmod irport
acronym:~# rmmod irda

I insert the serial module:

acronym:~# modprobe serial

I check/setup the serial ports:

acronym:~# setserial /dev/ttyS0
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
acronym:~# setserial /dev/ttyS2
/dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 4
acronym:~# setserial /dev/ttyS2 irq 10
acronym:~# setserial /dev/ttyS2
/dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 10

Insertion of irda modules:

acronym:~# modprobe ircomm-tty
acronym:~# modprobe irtty     
acronym:~# modprobe irlan

Now I have:

acronym:~# lsmod
Module                  Size  Used by
irlan                  35964   0  (unused)
irtty                   6880   0  (unused)
ircomm-tty             28600   0  (unused)
ircomm                 12488   0  [ircomm-tty]
irda                  133361   0  [irlan irtty ircomm-tty ircomm]
serial                 18200   0 

I switch debugging on:
acronym:~# echo 1 > /proc/sys/net/irda/debug 

I start up irattach (NOT irmanager) in the recommended new way:
acronym:~# /home/simon/irda/irda-utils-0.9.7/irattach/irattach /dev/ttyS2 -s 1
1.1 Tue Nov  9 15:30:55 1999 Dag Brattli

The ircomm devices are now recognised:
acronym:~# setserial /dev/ircomm0
/dev/ircomm0, UART: 16550A, Port: 0x0000, IRQ: 0

I now test the device (as nothing is discovered):

acronym:~# dip -t
DIP: Dialup IP Protocol Driver version 3.3.7p-uri (25 Dec 96)
Written by Fred N. van Kempen, MicroWalt Corporation.
Debian version 3.3.7p-2 (debian).

DIP> port ircomm0
DIP> term
[ Entering TERMINAL mode.  Use CTRL-] to get back ]

[ Back to LOCAL mode. ]
DIP> quit

My logs show:

Jan  8 23:52:51 acronym kernel: Serial driver version 4.27 with no serial options 
enabled 
Jan  8 23:52:51 acronym kernel: ttyS00 at 0x03f8 (irq = 4) is a 16550A 
Jan  8 23:52:51 acronym kernel: ttyS02 at 0x03e8 (irq = 4) is a 16550A 
Jan  8 23:53:46 acronym kernel: IrDA (tm) Protocols for Linux-2.2 (Dag Brattli)
Jan  8 23:53:46 acronym kernel: IrCOMM protocol (Dag Brattli) 
Jan  8 23:54:56 acronym irattach: Serial connection established.
Jan  8 23:54:56 acronym kernel: IrDA: Registered device irda0 
Jan  8 23:54:57 acronym irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
Jan  8 23:54:57 acronym irattach: executing: 'echo acronym > 
/proc/sys/net/irda/devname'
Jan  8 23:54:57 acronym irattach: Using device: irda0 
Jan  8 23:54:57 acronym kernel: irda_ioctl(), doing device ioctl! 
Jan  8 23:54:57 acronym kernel: irda_ioctl(), doing device ioctl! 
Jan  8 23:54:57 acronym kernel: irtty_net_open() 
Jan  8 23:54:57 acronym kernel: irlap_change_speed(), setting speed to 9600 
Jan  8 23:59:07 acronym kernel: ircomm_tty_open(), ircomm0, count = 1 
Jan  8 23:59:07 acronym kernel: ircomm_tty_attach_cable() 
Jan  8 23:59:07 acronym kernel: ircomm_tty_ias_register() 
Jan  8 23:59:07 acronym kernel: ircomm_tty_block_til_ready(), O_NONBLOCK requested! 
Jan  8 23:59:07 acronym kernel: ircomm_param_flow_control(), flow control = 0x04 
Jan  9 00:00:00 acronym kernel: ircomm_tty_close() 
Jan  9 00:00:00 acronym kernel: ircomm_tty_shutdown() 
Jan  9 00:00:00 acronym kernel: ircomm_tty_detach_cable() 
Jan  9 00:00:00 acronym kernel: ircomm_close() 

[...after stopping irattach and removing modules:]
Jan  9 00:15:51 acronym kernel: irda_ioctl(), doing device ioctl! 
Jan  9 00:15:51 acronym kernel: irda_ioctl(), doing device ioctl! 
Jan  9 00:15:51 acronym kernel: irlap_disconnect_indication(), 
reason=LAP_DISC_INDICATION 
Jan  9 00:15:51 acronym irattach: got SIGTERM or SIGINT 
Jan  9 00:15:51 acronym irattach: exiting ... 
Jan  9 00:16:09 acronym kernel: __ircomm_tty_cleanup() 
Jan  9 00:16:09 acronym kernel: ircomm_tty_shutdown() 

And my proc/net/irda/* show:

File: /proc/net/irda/discovery
IrLMP: Discovery log:

File: /proc/net/irda/ircomm
Instance 0:

File: /proc/net/irda/irias
LM-IAS Objects:
name: PnP, id=54082
 - Attribute name: "Comp#01", value[IAS_STRING]: "PNP8389"

 - Attribute name: "Manufacturer", value[IAS_STRING]: "Linux-IrDA Project"

 - Attribute name: "CompCnt", value[IAS_INTEGER]: 1

 - Attribute name: "DeviceID", value[IAS_STRING]: "HWP19F0"

 - Attribute name: "Name", value[IAS_STRING]: "Linux"

name: IrDA:IrCOMM, id=9027
 - Attribute name: "Parameters", value[IAS_OCT_SEQ]: octet sequence

 - Attribute name: "IrDA:TinyTP:LsapSel", value[IAS_INTEGER]: 18

name: Device, id=0
 - Attribute name: "IrLMPSupport", value[IAS_OCT_SEQ]: octet sequence

 - Attribute name: "DeviceName", value[IAS_STRING]: "Linux"

name: IrLAN, id=213556
 - Attribute name: "IrDA:TinyTP:LsapSel", value[IAS_INTEGER]: 16

File: /proc/net/irda/irlan
IrLAN instances:

File: /proc/net/irda/irlap
irlap0 state: LAP_NDM
  caddr: 0xe2, saddr: 0x73696113, daddr: 0x000000
  win size: 0, win: 0, line capacity: 0, bytes left: 0
  tx queue len: 0 win queue len: 0 rbusy: FALSE mbusy: FALSE
  retrans: 0 vs: 0 vr: 0 va: 0
  qos   bps     maxtt   dsize   winsize addbofs mintt   ldisc   comp
  tx    9600    0       64      1       11      0       0       0
  rx    9600    0       64      1       11      0       0       0

File: /proc/net/irda/irlmp
Unconnected LSAPs:
lsap state: LSAP_DISCONNECTED, slsap_sel: 0x12, dlsap_sel: 0xff, (IrCOMM)
lsap state: LSAP_DISCONNECTED, slsap_sel: 0x10, dlsap_sel: 0xff, (IrLAN ctrl (p))
lsap state: LSAP_DISCONNECTED, slsap_sel: 0x0, dlsap_sel: 0xff, (IrIAS srv)

Registred Link Layers:
lap state: LAP_STANDBY, saddr: 0x73696113, daddr: 0xffffffff, refcount: 0

Connected LSAPs:

File: /proc/net/irda/irttp
TSAP 0, stsap_sel: 12, dtsap_sel: 00
  connected: FALSE, avail credit: 0, remote credit: 0, send credit: 0
  tx packets: 0, rx packets: 0, tx_queue len: 0 rx_queue len: 0
  tx_sdu_busy: FALSE, rx_sdu_busy: FALSE
  max_seg_size: 0, tx_max_sdu_size: 0, rx_max_sdu_size: 0
  Used by (IrCOMM)

TSAP 1, stsap_sel: 10, dtsap_sel: 00
  connected: FALSE, avail credit: 0, remote credit: 0, send credit: 0
  tx packets: 0, rx packets: 0, tx_queue len: 0 rx_queue len: 0
  tx_sdu_busy: FALSE, rx_sdu_busy: FALSE
  max_seg_size: 0, tx_max_sdu_size: 0, rx_max_sdu_size: 0
  Used by (IrLAN ctrl (p))




_______________________________________________
Linux-IrDA mailing list  -  [EMAIL PROTECTED]
http://www4.pasta.cs.UiT.No/mailman/listinfo/linux-irda

Reply via email to