I would add something to your debug to display the value of cnt after that loop has finished.

I actually have a test (I left out all the error checking code) to test for the value of cnt before continuing. It checks to make sure cnt < 10 or it shuts down. BUT (good news): I am getting a successfull OBEX_CONNECT when I build the dataBuff by hand (set all the bytes like you suggested). The htons() function is a winsock function that reverses the byte order from host byte order (little endian) to network byte order (big endian), but it looks like I do not need to do that. I'm doing tests now to see what the problem in my code is, but I think that I've got it nailed now. I'll post progress here after I mess with it some more. It's kind of tedious testing, since every time I want to run the program, I have to sync it with the Pocket PC, then take the Pocket PC out of the cradle and point it at the Empeg and beam.

Thank you very much for your help, though, I doubt if I would have found the flaw in my program if it wasn't for your help. What devices did you develop IrDA solutions for? Were they hardware-based solutions?
_________________________
Mark Cushman