Israel Alvarez wrote :
> Hi!,
> I'm trying to set up one IrDA device to communicate with one iPAQ. I'm
> programming my own app. to send and get files between them (client-server)
> and I'm not sure if I'm doing everything OK (I'd date to say I'm NOT doing
> anything OK). I'd appreciate if someone could read this and tell me what I'm
> doing wrong. I have follow the 'IR-How-to' and the 'IrDA Quick Tutorial' by
> J. Tourrilhes (great) but I'm still getting some problems.
Thanks.
> IrDA Device: Serial Dongle ActiSys IR220L+ attached to /dev/ttyS0
> Kernel: 2.4.7-10 (Red Hat 7.2)
> IrDA Utils: 0.9.14
Ok.
> The procedure I've follow:
>
>....................................................................................................................
> 1.About the kernel patch: Because the kernel comes with IrDA, ActiSys and
> Irtty modules I've not applied the patches. First I'd like to learn how get
> the device running and afterwords I thought about do it. (Has this sense or
> I'm making a big mistake???)
No, that's the right way.
> 2.Add the following stuff in /etc/modules.conf (I'm not sure if I need to
> modify this file even if I've not applied any patch so just in case I did)
>
> # cat /etc/modules.conf
> alias tty-ldisc-11 irtty
> alias irda-dongle-3 actisys #ActiSys IR-220L+
>
> ...Because my device is attached to /dev/ttyS0 I'm not going to use
> /dev/ircomm*, /dev/irlpt* or /dev/irnet, so I DID NOT add:
>
> alias char-major-161 ircomm-tty
> alias char-major-10-187 irnet
>
> ...And I DID NOT create any IrDA devices with:
>
> >mknod /dev/ircomm0 c 161 0
> >mknod /dev/ircomm0 c 161 1
> >mknod /dev/irlpt0 c 161 10
> >mknod /dev/irlpt1 c 161 11
> >mknod /dev/irnet c 10 187
>
> ...Is everything OK till the moment??.
The Howto say "do this", and you say "No I won't". It's ok to
have a critical mind, but discard the good advices of the Howt at your
own risks...
Especially that the reason you give shows that you haven't
understood what this stuff is used for (confusing lower layer of the
stack with higher layers).
> 3.Edit the /etc/sysconfig/irda to setup my personal configuration:
>
> # cat /etc/sysconfig/irda
> IRDA=yes
> DEVICE=/dev/ttyS0
> DONGLE=actisys
> DISCOVERY=yes
IMPORTANT NOTE : this will *automatically* start
irattach. Don't mix manual and automatic procedure.
If you check the Howto, you will notice that this step is
*NOT* mentioned. Creativity is good, as long as you know what you are
doing.
> ...Because my device uses ActiSys IR220L+, Should I use instead
> DONGLE=actisys+??
That won't make much difference, but you should do it.
> 6.If try to find my chip but I don't get any answer:
>
> # /usr/sbin/findchip -v
>
> ...But It doesn't bother me much, Should it??
You are using a serial dongle, findchip is only for FIR.
> 7.Now, the moment everyone was waitting for: irattach execution!
>
> # /usr/sbin/irattach /dev/ttyS0 -d actisys -s 1
> > 1.1 Tue Nov 9 15:30:55 1999 Dag Brattli
>
> ...I only get that output???, let's check the interesting /var/log/messages
>
> # cat /var/log/messages
> Dec 20 15:29:56 localhost kernel: IrDA: Registered device irda0
> Dec 20 15:29:57 localhost modprobe: modprobe: Can't locate module
> irda-dongle-3
Problem with modules.conf ?
> First, why can't it locate the module irda-dongle-3(lets say actisys+)? I
> really dislike this message, I've the premonition of this's the heart of the
> matter. Must I then apply the patch to the kernel to solve it or...??
Check you /etc/modules.conf.
> ...Let's check the other files...
>
> # cat /proc/sys/net/irda/discovery
> 1
> # cat /proc/sys/net/irda/devname
> localhost
>
> ...I guess that means one IrDA device has been discovered with 'localhost'
> name, everything looks nice here.
Wrong. Read again my tutorial, discovery doesn't happen there.
> 8.Now, THE situation is : Me, my Linux PC, my IrDA device attached to the
> serial port and aligned to my iPAQ. I'm going to program my own app. but
> only for testing I have launched the iPAQ 'Infrared Receive' application, and
> this is the IrDA traffic i obtain:
>
> # /usr/bin/irdadump /dev/ttyS0
> 14:51:29.799121 xid:rsp ef28d5dd > 000008be S=6 s=1 localhost hint=0400 [
> Computer ] (25)
> 14:51:29.939121 xid:cmd ffffffff < 000008be S=6 s=2 (14)
> 14:51:30.019121 xid:cmd ffffffff < 000008be S=6 s=3 (14)
> 14:51:30.099121 xid:cmd ffffffff < 000008be S=6 s=4 (14)
> 14:51:30.189121 xid:cmd ffffffff < 000008be S=6 s=5 (14)
> 14:51:30.279121 xid:cmd ffffffff < 000008be S=6 s=* Pocket_PC hint=8204 [
> PDA/Palmtop IrCOMM ] (26)
>
> ... the same stuff four or five times ....
>
> 14:51:34.089121 xid:cmd ef28d5dd > ffffffff S=6 s=0 (14)
> 14:51:34.179121 xid:cmd ef28d5dd > ffffffff S=6 s=1 (14)
> 14:51:34.269121 xid:cmd ef28d5dd > ffffffff S=6 s=2 (14)
> 14:51:34.359121 xid:cmd ef28d5dd > ffffffff S=6 s=3 (14)
> 14:51:34.439121 xid:rsp ef28d5dd < 000008be S=6 s=3 Pocket_PC hint=8204 [
> PDA/Palmtop IrCOMM ] (26)
> 14:51:34.449121 xid:cmd ef28d5dd > ffffffff S=6 s=4 (14)
> 14:51:34.539121 xid:cmd ef28d5dd > ffffffff S=6 s=5 (14)
Normal discovery. Things are properly configured and loaded
because you see the iPaq.
> ... but from here the 'beta-conncetion' seems to be lost(maybe it has never
> been found) ...
>
> 14:51:34.629121 xid:cmd ef28d5dd > ffffffff S=6 s=* localhost hint=0400 [
> Computer ] (25)
> 14:51:35.259121 snrm:cmd ca=fe pf=1 ef28d5dd < 000008be new-ca=ee (32)
> 14:51:35.259121 ua:rsp ca=ee pf=1 ef28d5dd > 000008be (31)
> 14:51:35.389121 rr:cmd < ca=ee pf=1 nr=0 (2)
> 14:51:35.389121 rr:rsp > ca=ee pf=1 nr=0 (2)
> 14:51:35.399121 i:cmd < ca=ee pf=1 nr=0 ns=0 LM slsap=03 dlsap=00 CONN_CMD
> (6)
> 14:51:35.399121 i:rsp > ca=ee pf=1 nr=1 ns=0 LM slsap=00 dlsap=03 CONN_RSP
> (6)
> 14:51:35.419121 i:cmd < ca=ee pf=1 nr=1 ns=1 LM slsap=03 dlsap=00
> GET_VALUE_BY_CLASS: "PegDataSquirt 1.0" "IrDA:TinyTP:LsapSel" (43)
> 14:51:35.419121 i:rsp > ca=ee pf=1 nr=2 ns=1 LM slsap=00 dlsap=03
> GET_VALUE_BY_CLASS: No such class (11)
> 14:51:35.429121 i:cmd < ca=ee pf=1 nr=2 ns=2 LM slsap=03 dlsap=00 DISC (6)
> 14:51:35.429121 rr:rsp > ca=ee pf=1 nr=3 (2)
> 14:51:35.459121 rr:cmd < ca=ee pf=1 nr=2 (2)
>
> ... and never ends ...
The iPaq tries to connect to Linux and look for a specific
application called "PegDataSquirt 1.0". Linux replies that this
application doesn't exist (No such class).
Summary : the lower layer of the IrDA stack work fine. Now,
you just need to run your favorite app on top of it.
> Third: The iPAQ infrared software trys to set up some kind of contact, but
> maybe because I'm not running any IrDA app. within my Linux PC to answer the
> iPAQ this last does not receive anything meaningful, and after few seconds
> everything mess up.
Correct.
Also : from what you are saying, it seems that the LAP
connection doesn't close. It looks like a bug that was fixed in a
later kernel.
> ia
Good luck...
Jean
_______________________________________________
Linux-IrDA mailing list - [EMAIL PROTECTED]
http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda