IRDA/IRCOMM on a TiBook patch

6 messages, 2 authors, 2001-10-20 · open the first message on its own page

IRDA/IRCOMM on a TiBook patch

From: Till Straumann <hidden>
Date: 2001-10-16 10:47:41

Hi all.

I (and I believe other people as well) had problems
setting up IRDA/IRCOMM on a TiBook / 2.4.12-benh and
older 2.4 series kernels [on powerpc].

As far as I could find out there are several problems:

1) There seems to be a timing problem when opening
   the irda port which prevents it from being properly
   initialized.

   When I run "irattach /dev/ttyS1 -s 1", my Nokia 8890
   is never discovered. However, when I issue a 'cat /dev/ttyS1',
   prior to starting irattach (i.e. by opening the device
   [and holding it open until irattach starts]),
   things are properly initialized
   and discovery works. Putting 'mdelay(100);' somewhere
   in macserial.c:rs_open() does the job. However, I have
   not yet figured out what exactly causes the problem.
   A user space work-around involves patching irattach.c

2) There is an endianness bug. A possible solution is attached.

3) When applying 1) and 2), IRCOMM works provided that
   /proc/sys/net/irda/max_baud_rate is clamped to 57600.
   Apparently, there is another problem in 'macserial.c' where speeds
   higher than 57600 are treated especially.

Has somebody out there investigated on this?

-- Till.

PS: I'm not on this mailing list, please CC

Re: IRDA/IRCOMM on a TiBook patch

From: Michel Dänzer <hidden>
Date: 2001-10-19 01:02:27

On Tue, 2001-10-16 at 12:47, Till Straumann wrote:
I (and I believe other people as well) had problems
setting up IRDA/IRCOMM on a TiBook / 2.4.12-benh and
older 2.4 series kernels [on powerpc].

As far as I could find out there are several problems:

1) There seems to be a timing problem when opening
   the irda port which prevents it from being properly
   initialized.

   When I run "irattach /dev/ttyS1 -s 1", my Nokia 8890
   is never discovered. However, when I issue a 'cat /dev/ttyS1',
   prior to starting irattach (i.e. by opening the device
   [and holding it open until irattach starts]),
   things are properly initialized
   and discovery works. Putting 'mdelay(100);' somewhere
   in macserial.c:rs_open() does the job. However, I have
   not yet figured out what exactly causes the problem.
   A user space work-around involves patching irattach.c

2) There is an endianness bug. A possible solution is attached.
Your patch seems to be missing a bit (in qos.c IIRC) though.
3) When applying 1) and 2), IRCOMM works provided that
   /proc/sys/net/irda/max_baud_rate is clamped to 57600.
   Apparently, there is another problem in 'macserial.c' where speeds
   higher than 57600 are treated especially.
Have you managed to do anything 'real' yet? I tried your patch, and it
does seem to improve things, irdadump seems to show data from my Palm,
but I haven't succeeded to synchronize yet.


--
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: IRDA/IRCOMM on a TiBook patch

From: Till Straumann <hidden>
Date: 2001-10-19 06:37:32

Michel Dänzer wrote:
On Tue, 2001-10-16 at 12:47, Till Straumann wrote:
quoted
I (and I believe other people as well) had problems
setting up IRDA/IRCOMM on a TiBook / 2.4.12-benh and
older 2.4 series kernels [on powerpc].

As far as I could find out there are several problems:

1) There seems to be a timing problem when opening
   the irda port which prevents it from being properly
   initialized.

   When I run "irattach /dev/ttyS1 -s 1", my Nokia 8890
   is never discovered. However, when I issue a 'cat /dev/ttyS1',
   prior to starting irattach (i.e. by opening the device
   [and holding it open until irattach starts]),
   things are properly initialized
   and discovery works. Putting 'mdelay(100);' somewhere
   in macserial.c:rs_open() does the job. However, I have
   not yet figured out what exactly causes the problem.
   A user space work-around involves patching irattach.c

2) There is an endianness bug. A possible solution is attached.
Your patch seems to be missing a bit (in qos.c IIRC) though.
What is it missing? Please, be a little bit more verbose :-)
quoted
3) When applying 1) and 2), IRCOMM works provided that
   /proc/sys/net/irda/max_baud_rate is clamped to 57600.
   Apparently, there is another problem in 'macserial.c' where speeds
   higher than 57600 are treated especially.
Have you managed to do anything 'real' yet? I tried your patch, and it
does seem to improve things, irdadump seems to show data from my Palm,
but I haven't succeeded to synchronize yet.
Sure - I can open a modem connection to my cellphone and issue any AT
command I want. However, I have to take care of all of the three issues
mentioned. (I.e. use patched irattach, use patched kernel and
echo 57600 > /proc/sys/net/irda/max_baud_rate).

-- Till
--
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: IRDA/IRCOMM on a TiBook patch

From: Michel Dänzer <hidden>
Date: 2001-10-19 14:10:42

On Fri, 2001-10-19 at 08:37, Till Straumann wrote:
Michel Dänzer wrote:
quoted
On Tue, 2001-10-16 at 12:47, Till Straumann wrote:
quoted
I (and I believe other people as well) had problems
setting up IRDA/IRCOMM on a TiBook / 2.4.12-benh and
older 2.4 series kernels [on powerpc].

As far as I could find out there are several problems:

1) There seems to be a timing problem when opening
   the irda port which prevents it from being properly
   initialized.

   When I run "irattach /dev/ttyS1 -s 1", my Nokia 8890
   is never discovered. However, when I issue a 'cat /dev/ttyS1',
   prior to starting irattach (i.e. by opening the device
   [and holding it open until irattach starts]),
   things are properly initialized
   and discovery works. Putting 'mdelay(100);' somewhere
   in macserial.c:rs_open() does the job. However, I have
   not yet figured out what exactly causes the problem.
   A user space work-around involves patching irattach.c

2) There is an endianness bug. A possible solution is attached.
Your patch seems to be missing a bit (in qos.c IIRC) though.
What is it missing? Please, be a little bit more verbose :-)
The same thing you're doing for the other files, i.e. replace param->pv.b
by param->pv.b.ll and param->pv.s by param->pv.s.l . The build fails for
that file otherwise.

I'm talking about net/irda/qos.c BTW.

quoted
quoted
3) When applying 1) and 2), IRCOMM works provided that
   /proc/sys/net/irda/max_baud_rate is clamped to 57600.
   Apparently, there is another problem in 'macserial.c' where speeds
   higher than 57600 are treated especially.
Have you managed to do anything 'real' yet? I tried your patch, and it
does seem to improve things, irdadump seems to show data from my Palm,
but I haven't succeeded to synchronize yet.
Sure - I can open a modem connection to my cellphone and issue any AT
command I want. However, I have to take care of all of the three issues
mentioned. (I.e. use patched irattach, use patched kernel and
echo 57600 > /proc/sys/net/irda/max_baud_rate).
I have done the latter two and used cat to work around the first. I see
something with irdadump but none of the pilot sync tools work. I'm
afraid they're broken on PPC yet. :(


--
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: IRDA/IRCOMM on a TiBook patch (UPDATED)

From: Till Straumann <hidden>
Date: 2001-10-19 17:24:14

Michel Dänzer wrote:
On Fri, 2001-10-19 at 08:37, Till Straumann wrote:
quoted
Michel Dänzer wrote:
quoted
On Tue, 2001-10-16 at 12:47, Till Straumann wrote:
quoted
I (and I believe other people as well) had problems
setting up IRDA/IRCOMM on a TiBook / 2.4.12-benh and
older 2.4 series kernels [on powerpc].

As far as I could find out there are several problems:

1) There seems to be a timing problem when opening
   the irda port which prevents it from being properly
   initialized.

   When I run "irattach /dev/ttyS1 -s 1", my Nokia 8890
   is never discovered. However, when I issue a 'cat /dev/ttyS1',
   prior to starting irattach (i.e. by opening the device
   [and holding it open until irattach starts]),
   things are properly initialized
   and discovery works. Putting 'mdelay(100);' somewhere
   in macserial.c:rs_open() does the job. However, I have
   not yet figured out what exactly causes the problem.
   A user space work-around involves patching irattach.c

2) There is an endianness bug. A possible solution is attached.
Your patch seems to be missing a bit (in qos.c IIRC) though.
What is it missing? Please, be a little bit more verbose :-)
The same thing you're doing for the other files, i.e. replace param->pv.b
by param->pv.b.ll and param->pv.s by param->pv.s.l . The build fails for
that file otherwise.
Oops - thanks for pointing this out. I had fixed it but forgotten to
keep
the original version and therefore, the patch generator  missed that
one...
I'm talking about net/irda/qos.c BTW.
quoted
quoted
quoted
3) When applying 1) and 2), IRCOMM works provided that
   /proc/sys/net/irda/max_baud_rate is clamped to 57600.
   Apparently, there is another problem in 'macserial.c' where speeds
   higher than 57600 are treated especially.
Have you managed to do anything 'real' yet? I tried your patch, and it
does seem to improve things, irdadump seems to show data from my Palm,
but I haven't succeeded to synchronize yet.
Sure - I can open a modem connection to my cellphone and issue any AT
command I want. However, I have to take care of all of the three issues
mentioned. (I.e. use patched irattach, use patched kernel and
echo 57600 > /proc/sys/net/irda/max_baud_rate).
I have done the latter two and used cat to work around the first. I see
something with irdadump but none of the pilot sync tools work. I'm
afraid they're broken on PPC yet. :(
Hmm - I still have one of the old PalmPilot devices without irda. What
exactly
do you see with irdadump? (Forgive me the stupid question: you have set
PILOT_PORT to /dev/ircomm0, right?)

--Till

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: IRDA/IRCOMM on a TiBook patch (UPDATED)

From: Michel Dänzer <hidden>
Date: 2001-10-20 01:13:00

On Fri, 2001-10-19 at 19:24, Till Straumann wrote:
Michel Dänzer wrote:
quoted
On Fri, 2001-10-19 at 08:37, Till Straumann wrote:
quoted
Michel Dänzer wrote:
quoted
Have you managed to do anything 'real' yet? I tried your patch, and it
does seem to improve things, irdadump seems to show data from my Palm,
but I haven't succeeded to synchronize yet.
Sure - I can open a modem connection to my cellphone and issue any AT
command I want. However, I have to take care of all of the three issues
mentioned. (I.e. use patched irattach, use patched kernel and
echo 57600 > /proc/sys/net/irda/max_baud_rate).
I have done the latter two and used cat to work around the first. I see
something with irdadump but none of the pilot sync tools work. I'm
afraid they're broken on PPC yet. :(
Hmm - I still have one of the old PalmPilot devices without irda. What
exactly do you see with irdadump? (Forgive me the stupid question: you
have set PILOT_PORT to /dev/ircomm0, right?)
No, of course I hadn't... I still don't, but now /dev/pilot points to
it. I was foolishly thinking it should point to /dev/ttyS1 as well.

So now I just finished synchronizing my Palm from within Linux for the
first time! There goes the last reason to boot into MacOS. :)

Thanks so much, I hope this gets integrated and the macserial driver
propoerly fixed soon.


--
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help