Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#138213 - 29/01/2003 20:01 IrDA diagnostics - precompiled irdadump available?
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
I'm trying to make sure IrDA is working correctly on the Empeg before I start coding the irda communications portion of a program I want to write for the Palm. First off, does anyone have a precompiled irdadump binary for the empeg I can grab? I successfully cross-compiled irattach for the empeg, but I am running into a lot of problems trying to compile irdadump (not sure how to run configure correctly for the empeg).

I am running 2.00-beta13 with hijack 292. I was going to recompile the kernel to include the ir stuff, but I realized once I had downloaded the source that hijack already comes compiled with irda support. Here are lines from the bootup process:

IrDA (tm) Protocols for Linux-2.2 (Dag Brattli)

Linux-IrDA: IrCOMM protocol ( revision:Tue May 18 03:11:39 1999 )
ircomm_tty: virtual tty driver for IrCOMM ( revision:Wed May 26 00:49:11 1999 )


I would like to get the empeg talking with my Palm Vx, so I have done the following:

1. Once the player has booted up, I drop to the shell in Hyperterminal and do a irattach /dev/ttyS2 -s. This gives me the response:

IrDA: Registered device irda0

irmanager is not running!


2. I then enable discovery by doing echo 1 >/proc/sys/net/irda/discovery.

3. I then wave my Palm Vx in front of the Empeg, and the Palm displays a "Waiting for Sender" message, then that message disappears. At this stage I also tried beaming an application, and HotSync'ing via IR.

4. I cat /proc/net/irda/discovery but there is only the message:

IrLMP: Discovery log:


and nothing else.

I don't think that I am seeing what I should be, because of Hugo's post here, and information on the Developer secion of riocar.org (which came from Hugo's post).

How can I verify that my IrDA setup is correct? I know that it kinda works, because my Palm responds to it kind of, but I am worried that I am not getting anything in the discovery log.

When searching this board, I came across this post and took a few hints from it. I created the device /dev/ircomm0 with the 60 64 minor/major numbers like it is listed in /proc/tty/drivers. Here is my /proc/tty/drivers file:


empeg:/empeg/bin# cat /proc/tty/drivers
pty_slave /dev/ttyp 3 0-255 pty:slave
pty_master /dev/pty 2 0-255 pty:master
serial /dev/cua 5 64-66 serial:callout
serial /dev/ttyS 4 64-66 serial
/dev/console /dev/console 5 1 system:console
/dev/tty /dev/tty 5 0 system:/dev/tty
IrCOMM_tty /dev/irnine 60 64 serial


and here are my /dev/ir* devices:

empeg:/empeg/bin# ls -l /dev/ir*

crw-rw-r-- 1 0 0 242, 0 Jun 1 1999 /dev/ir
crw-rw-r-- 1 0 0 60, 64 Jun 16 23:38 dev/ircomm0
crw-rw-r-- 1 0 0 10, 187 May 24 17:03 /dev/irnet


If I do a cat /dev/ir I can see garbage output when I press a button on the remote.

How can I make sure that IrCOMM is working properly also? Any assistince with this would be greatly appreciated!
_________________________
Mark Cushman

Top
#138214 - 30/01/2003 00:09 Re: IrDA diagnostics - precompiled irdadump availa [Re: cushman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Well, that post of mine you linked to is just over a year old and that was the last time I messed with IrDA on the empeg so I'm not really up to speed on this. Over the past year, I have learned a couple tidbits that might help...

First problem is that the regular hijack kernel doesn't have IrDA or module support (no real demand for either). Right now, I'm running a kernel that yn0t_ compiled for me... it's Hijack v300 + audio overlay patch + IrDA.

I seem to have lost irattach along the way so I just d/l'd and recompiled it. The Makefile in irda-utils-0.9.15 doesn't look like it wants to cooperate with cross-compiling, so I just CD'd into irattach and ran make there... seemed to work ok. I tried the same for irdadump, but it complains that I don't have glib.h. I ran a find for it on the linux box I'm compiling on and it doesn't have it so I'm not sure what's up with that... mind posting a copy of your irdadump binary?

Now on the empeg, I get this:
sh-2.03# cat /proc/tty/drivers

pty_slave /dev/ttyp 3 0-255 pty:slave
pty_master /dev/pty 2 0-255 pty:master
serial /dev/cua 5 64-66 serial:callout
serial /dev/ttyS 4 64-66 serial
/dev/console /dev/console 5 1 system:console
/dev/tty /dev/tty 5 0 system:/dev/tty
ircomm /dev/ircomm 161 0-31 serial
So I made the following device:

crw-r--r-- 1 0 0 161, 0 Jan 30 00:28 /dev/ircomm0


Now when I run
irattach /dev/ttyS2 -s
it doesn't give any errors.

However, I still don't know how to use it... I open a terminal window on my PC to COM3 (my IrCOMM port using my PC's IR dongle). Pointing at the empeg, I then run
cat /dev/ircomm0
and type stuff on the PC... nothing shows up. I tried the other way 'round too, but nothing shows up. On the PC, I don't know what baud rate I should use, but if I was anywhere within an order of magnitude of the right baud rate, I should get garbage, not nothing.

I don't know how else to test IrCOMM... I have a Palm III, but what do I do on the Palm to make something show up in the terminal window that's connected to the IrCOMM port?
_________________________
--The Amigo

Top
#138215 - 30/01/2003 00:16 Re: IrDA diagnostics - precompiled irdadump availa [Re: TheAmigo]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Oh, I forgot to check the discovery thing... I apparently do get correct discovery:

sh-2.03# cat /proc/net/irda/discovery
IrLMP: Discovery log:

nickname: amigo, hint: 0x8220, saddr: 0xf00786e7, daddr: 0x4d116318
[/proc]
(that's my Palm)
and with my Pager/Phone, I get:
sh-2.03# cat /proc/net/irda/discovery

IrLMP: Discovery log:

nickname: A009 Josh Harding, hint: 0x8220, saddr: 0xf00786e7, daddr: 0xc92c4831
_________________________
--The Amigo

Top
#138216 - 30/01/2003 08:07 Re: IrDA diagnostics - precompiled irdadump availa [Re: TheAmigo]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Awesome, I knew I was doing something wrong. I had assumed that the precompiled hijack kernels included all the irda stuff, but I guess that they don't. I compiled my own kernel, and now I get discovery from my Palm and my laptop.

If I set up my Palm to hotsync via IrCOMM, and cat /dev/ircomm0 while I am doing it, I get junk output while the Palm tries to negotiate a connection with the empeg, so I'm assuming that means that /dev/ircomm0 is working.

If I do not enable discovery (the echo 1 >/proc/sys/net/irda/disovery business) I can still use IrCOMM, right? The Palm sync'ing still gives the same output anyway. Discovery is just to alert other devices in the area that an IR capable device is present, right? If you do not enable discovery, you are still able to use IrDA, correct?
_________________________
Mark Cushman

Top
#138217 - 30/01/2003 14:19 Re: IrDA diagnostics - precompiled irdadump availa [Re: TheAmigo]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
I think that I've found an answer to your terminal problems. I have done the following to ensure that IrCOMM is working correctly. Here is how to make a Palmpilot run a vt100 session over IrDA:

1. Make sure irattach has been run: irattach /dev/ttyS2

2. Make sure you have the correct device /dev/ircomm0

3. Point your Palm at your empeg and run the program ptelenet. It is a terminal communications program you can get from here. The settings in ptelenet should under Serial be IR 19200 N 8 1 with RTS/CTS (hardware) flow control, and under Terminal make sure Serial is selected.

4. Run the following: getty -Ln -l /bin/bash ircomm0 19200 vt100. getty is a debian arm binary I've attached to this message. Alternately you could find it at ftp.debain.org

You will get a bash prompt on your Palm! You should be able to communicate with your other PC in much the same way as the Palmpilot does.


Attachments
137154-getty (239 downloads)

_________________________
Mark Cushman

Top
#138218 - 01/02/2003 14:28 Re: IrDA diagnostics - precompiled irdadump availa [Re: cushman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Sweet! That works!

I can run shell commands from my Palm. Well, now I can run shell commands in the car without needing a laptop

Now I need to start programming for my pager and see how much closer I can get to my original goal.
_________________________
--The Amigo

Top
#138219 - 13/07/2003 13:05 Re: IrDA diagnostics - precompiled irdadump availa [Re: cushman]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Well, 6 months later, and I've found that I need the irdadump binary again for the Empeg. I have one that TheAmigo sent me, and I combined that with the glib 1.2 library from the Debain ftp server. That place rocks, you can get any ARM binary from there, here is the URL: ftp://ftp.debian.org/debian/dists/potato/main/binary-arm/.

I've attached a .zip file containing irdadump and libglib-1.2.so.0.0.7. You can copy irdadump any place in your PATH on the Empeg (like /bin or /usr/local/bin) and copy libglib-1.2.so.0.0.7 into /lib. You must make a symlink by doing:

ln -s libglib-1.2.so.0.0.7 libglib-1.2.so.0

at a shell prompt. Run irdadump from the shell prompt and attempt to beam something from a Palm, PC or Pocket PC and you'll see diagnostics displayed on the screen.


Attachments
168748-irdadump.zip (38 downloads)

_________________________
Mark Cushman

Top
#138220 - 20/07/2003 09:39 irdadump 0.9.15 [Re: cushman]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Okay, the irdadump I posted above is an old version, the one I've attached to this message is irdadump 0.9.15, the one that the Linux-IrDA mantainers want you to use for debugging purposes. Boy, was it a pain to get this sucker compiled. It requires glib, and cross-compiling glib for the ARM platform is rough. Not to mention that I got glib-2.2 all cross-compiled, then found out that irdadump requires glib-1.2. To make it even worse, glib-1.2 cross-compiles differently than 2.2, so I had to start all over again. Anyway, I just wanted anyone who uses this binary (probably nobody) to appreciate the work that went into it.


Attachments
169951-irdadump (136 downloads)

_________________________
Mark Cushman

Top
#138221 - 20/07/2003 09:41 Re: irdadump 0.9.15 [Re: cushman]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Grr.. file size > 200k. Attached is irdadump 0.9.15 in a zip file.


Attachments
169952-irdadump-0.9.15.zip (28 downloads)

_________________________
Mark Cushman

Top