Mark, what is the expected "time lag" for the palm to connect. Mine seems to vary from a couple of seconds to "timeout".
Is this normal behaviour?
Yes, this is normal. My Palm Vx always takes a few seconds to connect, but I don't usually get timeouts. There are many things the Palm and the Empeg have to do to establish a connection, and you have to remember that IrDA is not an "instanat on" connection. They have to establish a connection, establish a connection speed (up to 115k) and transfer an OBEX object, which involves creating a session and communicating via a protocol much like HTTP. All of this takes time, you could compare it to establishing a modem connection between two PC's.
Having said that, you can do a few things to make sure that you get a good connection and no timeouts. Hardware may have a small effect on the performance, since I believe that the Palm III and such hardware is inferior to the V series, etc. YMMV with other Palm devices. In any case, any Palm's IrDA tranciever can be considered underpowered compared to your laptop's IrDA port or a dongle attached to your PC. The specs for IrDA say the max range is 1m, but that is probably in a pitch dark room with two well-powered trancievers. I have found that the ideal distance for transmitting is probably more like 2-5 inches

. I hold my Palm with the IrDA port pointing directly above the volume knob at a 90 degree angle with the facia (shot on, basically, this is the ideal recieving angle of the IrDA sensor). When I am in the car I brace my hand against the Empeg so it doesn't wiggle as much, and if there is a lot of sunlight, I shade the sensors, because I have found that sunlight interferes with the transmission. I have not experimented with different lenses, but I expect that it may have an effect on the transmission speed.
- How often does the empeg listen and is it adjustable?
Empire listens on an infinate loop that probably tries to detect an IrDA signal several times a second.
- Or straight for the jugular, can the connection ever be consistently "near instant"?
Of course anything is possible, but in order to take advantage of the Palm's built-in OBEX support and to conform to that standard of IrDA transmission (so that this app could be ported to other devices) I am not going to try and improve the connection speed. Personally I never have timeouts, and it almost always connects within 2-3 seconds. Given the frequency that I use Palantir (just a couple of times every time I use the Empeg) that is acceptable for me.
Aside from my inability to really understand WHAT I'm doing, I have to say, this is the "dogs bollox" in controlling your empeg. So KUDOS to you Mark, nice one.
Glad you like it!