Someone reported that their V3c doesn't like doing anything interesting when AT+MODE=0. They require AT+MODE=2, however on entering this mode the phone returns a strange copyright banner, which confuses us as we're expecting to see OK.
Error 1:
--------
My phone doesn't like complex AT commands.
moto-sync: --> AT+CSCS="8859-1"
moto-sync: <-- ERROR
'ember 1 of type moto-sync had an error while connecting: Error in phone command 'AT+CSCS="8859-1"
Member 2 of type file-sync just disconnected
Fix: phone needs to be in MODE=2 mode.
I changed this line:
self.__do_cmd('AT+MODE=0') # ?
to this:
self.__do_cmd('AT+MODE=2') # ?
Error 1b:
---------
Changing modes from 0->2 gives a status message AFTER it it
gives an OK signal; this status message causes the __do_cmd function to
hang as it waits for OK.
Fix:
The windows tool just inserts a delay when it issues this command:
19:58:14,232 --> AT+MODE=2<CR>
19:58:14,232 Wait 2970ms
19:58:14,262 <-- OK
19:58:14,282 Wait 495ms
19:58:14,513 <-- +MBAN: Copyright 2000-2004 Motorola, Inc.
So, I just added this loop to do_cmd to read and discard the status message:
if cmd == 'AT+MODE=2\r' and line == 'OK':
time.sleep(3)
self.__readline()