[ltp] irda pilot-xfer with samsung sph-i500

Dimitris Kogias linux-thinkpad@linux-thinkpad.org
Mon, 27 Dec 2004 16:27:19 -0800


Thanks for the help Marius.  Unfortunately either I'm missing something 
else about how IR drivers work in Linux or my device's IR is busted; 
more details below.

My only other Pilot, an older V, suffers from an apparent case of 
incurable Mad Digitizer Syndrome so I can't test IR comms between the 
two handhelds.

One thing I have been able to ascertain though is that when irattach is 
up, the older Pilot does respond to discovery packets (saw it ack in 
irdadump) whereas my SPH-i500 doesn't.  The i500 has "beam receive" 
enabled of course.  It seems that an IR failure on the Samsung is the 
mot likely cause at this point, but I can't confirm...

Marius Gedminas wrote:
> On Fri, Dec 24, 2004 at 12:33:44PM -0800, Dimitris Kogias wrote:
> 
>>I've been trying to run a pilot-xfer between my X31 and my PalmOS phone, 
>>a Samsung SPH-i500, using IRDA.  I've had no success so far.  Any 
>>help/hints from this or other PalmOS device users that have made it 
>>work, preferably over IRDA or even over USB, are very welcome.
> 
> 
> I have hotsync working over USB, IrDA and Bluetooth between my T23 and
> my Tungsten T.  USB is considerably faster than the other two.

I did manage to get it to work with USB after I added usb-serial and 
visor modules to the kernel config.  It's hit-and-miss, in that I need 
to try it several times before the kernel will "agree" that the device 
is there on /dev/ttyUSB1 instead of another of the usb-serial ports. 
from syslog entries it seems to be trying ttyUSB2,3,... before trying 1 
several times and succeeding.  It definitely would be nice to make this 
more reliable; hotsync voodoo?

Still, I'd like it to work over IR to remove the need for a cable, so:

> 
> 
>>I run pilot-xfer -b <some dir> -p /dev/ircomm{0,1}, and pilot-xfer 
>>prints out its "Please press the HotSync button now" message.  I tap on 
>>the hotsync button on the palm device, but it gets stuck on the "trying 
>>to connec to to desktop over IR" phase.
> 
> 
> /dev/ircomm0 works for me.
> 
> 
>>irattach is running as:
>>irattach /dev/ttyS1 -s
>>
>>The serial port is configured as:
>>d@0x19:~$ sudo setserial /dev/ttyS1
>>/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
> 
> 
> Try
> 
>   setserial /dev/ttyS1 uart none port 0 irq 0

Tried that, but with uart none, port and irq 0 I get:

Dec 27 15:56:34 0x19 irattach: tcgetattr: Input/output error
Dec 27 15:56:34 0x19 irattach: Stopping device /dev/ttyS1
Dec 27 15:56:34 0x19 irattach: ioctl(SIOCGIFFLAGS): No such device
Dec 27 15:56:34 0x19 irattach: exiting ...

After setting port 0x2f8, irq 3 and uart 16550A, irattach works:

Dec 27 15:59:41 0x19 irattach: executing: 'echo 0x19 > 
/proc/sys/net/irda/devname'
Dec 27 15:59:41 0x19 irattach: executing: 'echo 1 > 
/proc/sys/net/irda/discovery'
Dec 27 15:59:41 0x19 irattach: Starting device irda0

Note:  I'm using the SIR driver, not the "native" nsc-ircc driver (see 
module list in my original post).  AFAICT you only need to disable the 
serial port when you use the native driver.  I've tried using that, 
disabling the serial port, but didn't have any luck and since it's only 
a SIR-capable device anyway I figured it's not worth the trouble.

> 
> otherwise, AFAIU, the kernel's serial port driver will take the
> resources and the IrDA driver won't work.  Or something.  I couldn't get
> IrDA to work until I did setserial ... port 0 irq 0
> 
> HTH,
> Marius Gedminas

Dimitris.