Zhone doesn't show my contacts and messages after restart

Paul Fertser fercerpav at gmail.com
Thu Nov 27 12:20:56 CET 2008


(I CC smartphones.userland hoping to move the discussion there, it was
my fault to write about it in community, sorry)

Hi,

"Michael 'Mickey' Lauer" <mickey at openmoko.org> writes:
> Am Wednesday 26 November 2008 21:56:19 schrieb Paul Fertser:
>> "Michael 'Mickey' Lauer" <mickey at openmoko.org> writes:
>> >> "Michael 'Mickey' Lauer" <mickey at openmoko.org> writes:
>> >> > Am Monday 24 November 2008 13:33:54 schrieb Paul Fertser:
>> >> >> I think i know what happens. If i restart Zhone without restarting
>> >> >> frameworkd it never receives ReadyStatus signal from
>> >> >> org.freesmartphone.GSM.SIM because sim was ready long ago it
>> >> >> started.
>> >> >
>> >> > This should no longer be a problem as nowadays, if the last GSM user
>> >> > vanishes from the bus, the GSM resource (hence the modem) gets
>> >> > shutdown completely.
...
>> Moreover, even provided zhone is the only app using the GSM
>> resource, are you sure that gsm0710muxd will power-cycle the modem?
>
> Yes. Shutting down the resource will shut down gsm0710muxd, which in effect, 
> turns off the modem.

I'll try to provide the logs where after the Zhone restart %CSTAT
never comes but it's still possible to read the information from SIM.

In fact, as a quick work-around i added activation of SimReady to the
network registration event. What i see every time i reboot
zhone+frameworkd+gsm0710muxd is that right after the registration
zhone receives the SimReady signal and tries to read the
Phonebook. Not all entries are read, however as the sim is not really
ready yet. After some time %CSTAT finally comes and zhone rereads the
book, now with all entries present. I think i saw the same behaviour
using some simple (probably Nokia) cellphone.

Actually, i've just tried to gather the logs for the case of
restarting zhone and it seems that part of the phonebook was lost
during transfer from the phone to the ogsmd. No, really.

2008.11.27 13:40:33 ogsmd    DEBUG    <MiscChannel via /dev/pts/3>:
got 256 bytes from: '51071",145,"004500780061006D0073"\r\n+CPBR:
37,"xxxxxxx",129,"00560054"\r\n+CPBR:
38,"xxxxxxx",145,"0041006E0074006F006E00200050006F007A0064006E00650076"\r\n+CPBR:
39,"xxxxxxx",129,"0041006E0074006F006E00200050006F007A0064006E0065007600200048"\r\n+CPBR:
40,"79'
2008.11.27 13:40:35 ogsmd    DEBUG    <MiscChannel via /dev/pts/3>:
got 122 bytes from:
'xxxxxxx",145,"005000650072006C0061006D006F006E"\r\n+C07500650074007A0020004D"\r\n+CPBR:
220,"xxxxxxx",145,"0041007200610'
2008.11.27 13:40:35 ogsmd    DEBUG    <MiscChannel via /dev/pts/3>:
got 32 bytes from: '070006F0076002000530059"\r\n\r\nOK\r\n'
2008.11.27 13:40:42 ogsmd    DEBUG    <MiscChannel via /dev/pts/3>:
TIMEOUT 'AT+CPBS="SM";+CPBR=1,220' => ???

Notice the garbage right before the 220th entry. We saw something
equally weird from my other log. :(

And there's an entry number 41 as well as others (41-219) present in
the debug log:
Nov 27 13:40:33 debian-gta02 /usr/sbin/gsm0710muxd[27748]:
gsm0710muxd.c:374:syslogdump(): <s 00000000: 50 42 52 3a 20 34 31
2c-22 37 39 df 7e 7e 05 ef  PBR: 41,"79<DF>~~.<EF> 
Nov 27 13:40:33 debian-gta02 /usr/sbin/gsm0710muxd[27748]:
gsm0710muxd.c:374:syslogdump(): <s 00000010: 32 36 35 35 37 38 39
30-30 22 2c 31 34 35 2c 22  26xxxxxxx",145," 
Nov 27 13:40:33 debian-gta02 /usr/sbin/gsm0710muxd[27748]:
gsm0710muxd.c:374:syslogdump(): <s 00000020: 30 30 35 33 30 30 36
46-30 30 36 42 30 30 36 46  0053006F006B006F

etc...

I will attach the full logs later to an appropriate ticket.

I don't know how what i see is possible, but if it is what it seems to
be, then it's a serious bug that can influence anything. Why is muxing
so hard?..

>> >> As the exact documentation on %CSTAT is unavailable (thank you, TI), i
>> >> looked it up in Enfora's. It says that the %CSTAT codes will be
>> >> delivered only after power on. If it is really the case with calypso
>> >> it is no surprise that we never get SimReady signal as we don't
>> >> power-cycle the modem (ATZ seems to be not equivalent, and we can't do
>> >> $RESET). So it seems that %CSTAT should be avoided altogether...
>> >
>> > It's a question of alternatives. I don't think hammering the modem with
>> > read/write contact requests until it stops answering with 'SIM busy' is
>> > better than using %CSTAT.
>>
>> Do it once, then if 'SIM busy' received, wait for the %CSTAT. What's
>> wrong with this approach?
>
> The fact that it only works if the Calypso is in a good mood. If the timing is 
> wrong, you get an empty list of contacts...

So, the modem firmware is buggy, the documentation is absent, and
though you can probably convince the guy who can modify the firmware
to fix this bug, it would be too late (he's now busy fixing #1024, i
suppose) and you don't want to mass-upgrade it anyway. So the only
possible solution i see is to let applications get the phone- and
messagebooks anyway. You tell them that sim is probably not ready but
if they try, they can get whatever the modem gives. When %CSTAT
received, you send them a signal to reread.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com





More information about the community mailing list