Re: Phonebook issue with motorola v3m
Jim Wilson <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <[email protected]> |
Following is a patch that fixes the getphonebook issue that posted to the list yesterday. The comment on line 293 should explain
the patch with no change in behavior for phones
without this issue.
Index: com_moto.py
===================================================================
--- com_moto.py (revision 4069)
+++ com_moto.py (working copy)
@@ -280,7 +280,7 @@
_end_idx=min(_start_idx+9, _total_entries)
_req.start_index=_start_idx
_req.end_index=_end_idx
- for _retry_cnt in range(2):
+ for _retry_cnt in range(10):
try:
self.progress(_end_idx, _total_entries,
'Reading conatct entry %d to %d'%(_start_idx, _end_idx))
@@ -290,9 +290,14 @@
break
except:
if _retry_cnt:
+ """ after 2nd retry start skipping entries in case it
+ is just certain ones that are unreadable """
+ if _retry_cnt > 2:
+ _start_idx=_start_idx+1
+ _req.start_index=_start_idx
+ self.log('Failed to read phonebook data, retrying...')
+ else:
self.log('Failed to read phonebook data')
- else:
- self.log('Failed to read phonebook data, retrying...')
self._update_mail_list(pb_book, result)
self.setmode(self.MODEMODEM)
del result['pb_list'], result['sd_dict']
> From: Jim Wilson
>
> Hi,
>
> Using 0.9.12 on fc6 (Fedora) with a v3m phone, it appears that the phone is always responding
> with the string "ERROR" any time a command attempts to access speed dial 1 in the phone book.
>
> Addoing an entry in bitpim that accidently had a 1 in the speed dial column produced an unexpected exception" which I'd
be
> glad to send along, but this issue is easy enough for the user to avoid.
>
> The bug that is hard to avoid shows up when downloading the phonebook. Since the bitpim is downloading phone entries in
chunks
> of 10, the phone's "ERROR" response to "AT+MPBR=1,10" means that NONE of the single digit speed dial
entries
> (2 ~ 9) are downloaded.
>
> As far as I know there's no way to change speeddial 1 off voicemail for this phone, or
> to get it to stop being so protective of slot 1, so it'd probably be most helpful to
> either have a way to set bitpim to start at 2, or have it try "AT+MBPR=2,10" rather than
> jumping a whole block of 10 when an ERROR string is returned.
>
> Below is the important segment of the log in case my description is not sufficient.
>
> Thanks,
>
> Jim
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV