Adam Plasun wrote:
Hello,

I've been working on a program that
communicates to an ACTiSYS IR interface, using the TinyTP service. My program sends and receives data very well until
it reaches around 5k of data. Then the Palm
suddenly stops receiving data and times out. I've
checked the flow of data and the ACTiSYS device
receives my requests but no response is sent back, or
maybe a response is sent but not received on the Palm
end. I looked everywhere and I can't figure out the
problem. It always stops in the same spot (around
5k of data transmitted). I guess it would help if I
was an expert in IrDA but I'm not. I've read
somewhere that maybe the problem is caused by TinyTP
credits, but I don't know how-to or when or what to do
with these credits (IrAdvanceCredit()???).
If anyone knows how to solve this problem I would
greatly appreciate it. Thank you in advance for
your response,
Adam Plasun

Sorry I'm no expert, but you could try calling IrAdvanceCredit() with 1 credit for every packet you receive on the palm...
Credits are the flow control mechanism, if you give a credit to the other side, they can send 1 more packet. I've read that the ideal number of credits initially starts at twice the number of receive buffers. I've used a similar IR dongle on a linux PC to do OBEX transfers (which use TinyTP), and I've had some success using the irdadump utility to figure out whats going on (or not, usually).


Here's part of a log of an obex transfer from my PC to my HS visor:

21:22:43.165167 (0686.23 ms) snrm:cmd ca=fe pf=1 79e9373e > 156b9d1f new-ca=66
LAP QoS: Baud Rate=115200bps Max Turn Time=500ms Data Size=2048B Window Size=7 Add BOFS=0 Min Turn Time=10000us Link Disc=12s (32)


21:22:43.271897 (0106.73 ms) ua:rsp ca=66 pf=1 79e9373e < 156b9d1f
LAP QoS: Baud Rate=115200bps Max Turn Time=500ms Data Size=512B Window Size=1 Add BOFS=5 Min Turn Time=1000us Link Disc=12s (31)


...
21:22:43.357856 (0000.02 ms) i:cmd > ca=66 pf=1 nr=2 ns=3 LM slsap=13 dlsap=02 CONN_CMD TTP credits=14 (7)


21:22:43.377366 (0019.51 ms) i:rsp < ca=66 pf=1 nr=4 ns=2 LM slsap=02 dlsap=13 CONN_RSP TTP credits=2 (7)

My interpretation of this log (could be wrong) is: the visor can send 14 packets of size <= 2048 bytes to the PC before a response is required, whereas the PC can send only 2 packets of size <= 512 bytes to the visor before a response is required.

My point is that you can maybe use the irdadump tool on your PC to figure out what's going wrong. (assuming your dongle is attached to a PC)

I haven't used the IR library directly like you are, but I'm surprised if you would have to manually advance credits to the other side... OTOH, why else have the API function...
You may want to use OBEX if you are actually just sending files (thru ExgMgr).


I thought your post would be more on-topic in comm-dev-form, so I cross-posted my reply there - maybe someone with more experience can give better feedback.

Regards,
 Dave


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to