> I have been trying for some time to get Palm and PC communicating through IrDA.
This really belongs on comm-dev-forum. Which version of Palm OS and which version of Windows? Which IrDA protocol do you want to use? > On the PC side I use the following code (I am using VC 6.0): I can't help with this part - I don't do windows. :) > On the Palm side I have: > > IrOpen > IrBind > IrSetConTypeLMP > IrSetDeviceInfo > IrDiscoverReq > IrDataReq So I guess you want to use IrLMP. Be sure you set up the Windows side to use the same protocol. You need to do a connect at the LAP level and then a connect at the LMP level after you discover and before you send data. Also, you can't just make these OS calls sequentially. You need a state machine so that you can proceed with each step only after the previous step completes. You're notified when an action completes, and whether it succeeded or failed, via a callback. You should retry at least a couple of times if a call fails, either immediately or after a while. > Any sample code or suggestions are welcome. The canonical example is Till Harbaum's IR Ping: http://bodotill.suburbia.com.au/ir_ping/ir_ping.html It lets you execute each step one at a time, letting you be the state machine yourself. BeamBooks source is now public domain: http://www.appliedthought.com/beambooks/ You can download a StuffIt archive of a Mac CodeWarrior project. Use StuffIt Expander for Windows: http://www.aladdinsys.com/ to unstuff it on your PC and then look at IrConnection.c. It provides a layer over IrLMP that lets you send arbitrary chunks of data back and forth between two devices. It starts with a symmetrical connection: both sides must initiate. -- Danny @ PalmSource -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
