From: Roger B. <ro...@ro...> - 2004-02-22 21:33:25
|
Stephen Wood wrote: > Is there a clean way to trap communications timeouts so that I can try > reinitializing communications or such? The problem is what to do. In the case of the VX4400, the communications timeout happens while reading the response, and to me seems to be an issue with buffer management on the phone. This means that it has already done the action sent in the command, and it would be wrong to retry some of the commands (for example the one that goes to the next phonebook entry, deleting a file, listing the next directory etc). The LGE driver on Windows works around the problem by sending a read URB (USB request block) before sending any write which means the phone already has a read buffer allocated or something. I tried doing something similar with libusb using multi-threading and it didn't work. I don't think libusb is designed to be multi-threaded (well maybe version 1.0 will do the trick). So that kind of thing can only be in a real OS level device driver. I am out of ideas on what do about this problem. You may want to try the device on Windows and see if the same problems occur. If they don't then someting will be going on in the device driver to work around it. Roger |