From: Stephen W. <sa...@ge...> - 2004-02-23 19:59:18
|
On Mon, 2004-02-23 at 04:06, Roger Binns wrote: > > Redoing the command is not a problem for the Sanyo 5500 phonebook or > > calendar. There is no state in the reading or writing of these. > > What I recommend you do is the quickest dirtiest hack to see if it > fixes the problem. Don't commit it though :-) If it does fix it > then we can try to figure out a proper way of doing this. I'll do something. If I can keep the hack limited to com_sanyo5500, I may check it in. > > A good test is to do an entire filesystem backup. For the 4400 I > had to add a delay of 0.3 of a second before getting each file. > If you don't the processor seems to get overwhelmed or something. > The file system backup works fine, even without the 0.3 second delay. But the packets in file system mode are a bit over 256 bytes, while the phonebook protocol packets are over 1000 bytes long. (And most of that space is not used). > > If I capture the data with SnoopyPro, the packet I send to the phone is > > a single 1034 BULK_OR_INTERRUPT_TRANSFER thingy, but the response comes > > back in 4 or 5 groups. The first set of bytes almost always 99 bytes > > which might be followed by 396, 198 and 341 bytes. These counts will > > vary. > > What is the bulk limit? For the LG phones and the AudioVox CDM 8900 > it is 64 bytes per URB. Have you tried accessing the phone using libusb > rather than the acm module? How do I get the bulk limit? When I was trying the Sanyo 4900 using libusb, things would seem to happen in 64 byte chunks. It also always eventually timed out on me. When I try the libusb with the 5500, it will sometime work, but often get a usbdevicewrapper instance has no attribute 'flushInput' error. Traceback (most recent call last): File "./gui.py", line 150, in run res=call() File "./gui.py", line 91, in __call__ return apply(self.method, self.args+args, d) File "./gui.py", line 1067, in getdata i[1](results) File "./com_sanyo5500.py", line 69, in getphonebook self.sendpbcommand(req, self.protocolclass.studyresponse, writemode=True) File "./com_sanyo.py", line 186, in sendpbcommand data=self.comm.readuntil(self.pbterminator, logsuccess=False, numfailures=numretry) File "./commport.py", line 267, in readuntil self.ser.flushInput() AttributeError: _usbdevicewrapper instance has no attribute 'flushInput' Stephen |