On Mon, Sep 25, 2000 at 03:52:40PM +0100, Dr DJ Ellis wrote:
> Dear all,
> 
> I have Linux installed on my laptop (Slackware 6.1) which has an IrDA port
> as the second serial device. I have been trying to get IrDA working for some
> weeks now. I am hampered by the fact that when I compile the kernel on the
> laptop I get Signal 11 errors and so have to do it on the desktop and then
> copy the kernal and modules over to the laptop by hand! Its a real pain!
> Anyway I can now get it to recognise my Nokia 7110 and load all the correct
> modules however /dev/ircomm0 and -1 are not useable. I cannot work out what
> is going on. Any advice would be appreciated.
> 
> I have included what I hope is useful information:
> 
> bash-2.02# uname -a
> Linux Albinoni 2.2.7 #17 Fri Apr 30 20:00:18 MEST 1999 i586 unknown   

I think the main problem is here, you need a fresh kernel with a fresh
patch.  If I'm not mistaken, 2.4.0-test6 with the file
ftp://irda.sourceforge.net/pub/irda/patches/patch-2.4-test6-irda3
applied is what you want to test.  Later 2.4.0-test kernels (8 is current I
believe?) might also work.  As for 2.2.x I honestly don't know, I've only
gotten 2.2.15pre19 to work reliably, also with some patches applied.
But 2.2.17 might be up to date, anyone?


> bash-2.02# ls /root/working/irda/
> irda-utils-0.9.9         irda-utils-0.9.9.tar.gz

You might also want to upgrade to irda-utils 0.9.10, but these haven't been
uploaded to sourceforge.  Are they still available from uit.no?


> bash-2.02# pwd
> /lib/modules/2.2.7/misc
> bash-2.02# ls ir*
> ircomm_tty.o    irlpt_client.o  irport.o
> irlpt.o         irlpt_server.o  irtty.o      
> 
> Note: underscore in ircomm_tty.o

This is the old version of IrCOMM, you need the newer one that started to
appear in 2.2.14 and has been improved since.  (ircomm.o and ircomm-tty.o)


> Extract from /etc/config.modules...
> 
> ################################################
> # IrDA Drivers
> ################################################
> # 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
> 
> Note 'ircomm-tty'. Nothing worked initially so noting the module name I
> changed this to ircomm_tty. Following this I achieved slightly more success...

You should change this back to ircomm-tty since that is what you will be
using with the newer kernel.


> bash-2.02# irmanager
> bash-2.02# ps -aux
> warning: `-' deprecated; use `ps aux', not `ps -aux'
> USER       PID %CPU %MEM  SIZE   RSS TTY STAT START   TIME COMMAND
> ..
> root       391  0.0  1.7   792   396  ?  S    12:40   0:00 irmanager
> root       396  0.1  1.7   796   400  ?  R    12:40   0:00 irattach /dev/ttyS1 -s1
> ..

You don't need irmanager with newer versions of the code..  Only run
irattach /dev/ttyS1 -s 1
to tell irattach to talk to your IrDA port at ttyS1 and to start discovery.


> The appropriate section of /var/log/messages now reads...
> 
> Sep 25 13:45:08 Albinoni irmanager: executing: '/sbin/modprobe irda'
> Sep 25 13:45:08 Albinoni kernel: IrDA (tm) Protocols for Linux-2.2 (Dag Brattli)
> Sep 25 13:45:08 Albinoni irmanager: executing: 'echo Albinoni > 
>/proc/sys/net/irda/devname'
> Sep 25 13:45:08 Albinoni irmanager: + 1.1 Tue Nov  9 15:30:55 1999 Dag Brattli
> Sep 25 13:45:08 Albinoni irmanager: + 1.1 Tue Nov  9 15:30:55 1999 Dag Brattli
> Sep 25 13:45:08 Albinoni irattach: device=/dev/ttyS1
> Sep 25 13:45:08 Albinoni irattach: SIR device
> Sep 25 13:45:08 Albinoni kernel: IrDA: Registred device irda0
> Sep 25 13:45:09 Albinoni irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
> Sep 25 13:45:09 Albinoni irattach: SIR device (2)
> Sep 25 13:45:09 Albinoni irattach: Are you using an old kernel?
> Sep 25 13:45:09 Albinoni irattach: executing: 'echo Albinoni > 
>/proc/sys/net/irda/devname'           
> 
> bash-2.02# lsmod
> Module                  Size  Used by
> irtty                   3492   2  (autoclean)
> irda                   54833   1  [irtty]
> serial                 41940   1  (autoclean)
> memstat                 1352   0  (unused)
> 
> bash-2.02# cat /proc/net/irda/discovery
> IrLMP: Discovery log:
>  
>   name: Nokia 7110, hint: PnP Compatible Modem Fax Telephony IrCOMM IrOBEX , saddr: 
>0x60826d6f, daddr: 0xf5400000

This is good!  The phone and the computer (Linux-IrDA) have found each other
and have told each other what they are capable of, respectively.


> bash-2.02# dip -t
> DIP: Dialup IP Protocol Driver version 3.3.7p-uri (25 Dec 96)
> Written by Fred N. van Kempen, MicroWalt Corporation.
>  
> DIP> port /dev/ircomm1
> DIP: tty: open(/dev/ircomm1, RW): Operation not supported by device  

Here you want to use /dev/ircomm0, which is the first IrCOMM-capable device
found.  /dev/ircomm1 would be the second and so on, if you eg. put another
phone (or printer/whatever) in front of your computer.


> Although this doesn't work, it does seem to load the correct modules...
> 
> bash-2.02# lsmod
> Module                  Size  Used by
> ircomm_tty              9796   0  (autoclean) (unused)
> ircomm                  8488   0  (autoclean) [ircomm_tty]
> irtty                   3492   2  (autoclean)
> irda                   54833   1  [ircomm_tty ircomm irtty]
> serial                 41940   1  (autoclean)
> memstat                 1352   0  (unused)          

Correct modules for your kernel version, yes.  But you really need the newer
ircomm.o and ircomm-tty.o, as stated above.


> Now, /var/log/messages has the following lines added ...
> 
> Sep 25 14:34:46 Albinoni kernel: Linux-IrDA: IrCOMM protocol ( revision:Sun Apr 18 
>00:40:19 1999 )
> Sep 25 14:34:46 Albinoni kernel: ircomm_tty: virtual tty driver for IrCOMM ( 
>revision:Sun Apr 18 17:31:53 1999 )    
> 
> The ir* devices are set up as follows ...
> 
> bash-2.02# ls -l /dev/ir*
> crw-rw-r--   1 root     uucp     161,   0 Sep 10 18:49 /dev/ircomm0
> crw-rw-r--   1 root     uucp     161,   1 Sep 10 18:49 /dev/ircomm1
> crw-rw-r--   1 root     uucp     161,  16 Sep 10 18:50 /dev/irlpt0
> crw-rw-r--   1 root     uucp     161,  17 Sep 10 18:50 /dev/irlpt1    

This is correct, for the newer version of the IrCOMM code.


> bash-2.02# cat /proc/tty/driver/IrCOMM_tty
> driver revision:Sun Apr 18 17:31:53 1999
> tx: 0 rx: 0        

As you can see, the IrCOMM TTY-driver you're using is dated Apr 18 1999,
that's really old.


> bash-2.02# ifconfig
> irda0     Link encap:UNSPEC  HWaddr 5B-45-C2-92-00-00-00-15-00-00-00-00-00-00-00-00
>           unspec addr:[NONE SET]  Mask:[NONE SET]
>           UP RUNNING NOARP  MTU:2048  Metric:1
>           RX packets:52 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:4186 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:8
>  
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           UP LOOPBACK RUNNING  MTU:3924  Metric:1
>           RX packets:24 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0          

Here you see that the interface irda0 is up, with newer kernels it will not
neccessarily be up automatically, in that case, run
ifconfig irda0 up
to start the IrDA communication.


> Thus everything seems to connect correctly, and the Nokia 7110 is detected but 
> /dev/ircomm[01] are not usable. It seems a case of so near and yet so far! What
>  am I doing wrong?
> 
> I hope there is a simple solution but if I need to patch the kernel or download
>  new software I may need some advice as to how to do it or where to get the 
>downloads. 
> I have had some problems recently as the Linux IrDA website has moved and I cannot 
> find where to download the software on the new site.
> 
> TIA

Hope this is of any use to you.  :)

//Peter

-- 
irc: CareBear\    tel: +46-40-914420
irl: Peter Stuge  gsm: +46-705-783805
_______________________________________________
Linux-IrDA mailing list  -  [EMAIL PROTECTED]
http://www4.pasta.cs.UiT.No/mailman/listinfo/linux-irda

Reply via email to