Re: Zhone doesn't show my contacts and messages after restart

2008-11-27 Thread Paul Fertser
(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" <[EMAIL PROTECTED]> writes:
> Am Wednesday 26 November 2008 21:56:19 schrieb Paul Fertser:
>> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> writes:
>> >> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> 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 ogsmdDEBUG:
got 256 bytes from: '51071",145,"004500780061006D0073"\r\n+CPBR:
37,"xxx",129,"00560054"\r\n+CPBR:
38,"xxx",145,"0041006E0074006F006E00200050006F007A0064006E00650076"\r\n+CPBR:
39,"xxx",129,"0041006E0074006F006E00200050006F007A0064006E0065007600200048"\r\n+CPBR:
40,"79'
2008.11.27 13:40:35 ogsmdDEBUG:
got 122 bytes from:
'xxx",145,"005000650072006C0061006D006F006E"\r\n+C07500650074007A0020004D"\r\n+CPBR:
220,"xxx",145,"0041007200610'
2008.11.27 13:40:35 ogsmdDEBUG:
got 32 bytes from: '070006F0076002000530059"\r\n\r\nOK\r\n'
2008.11.27 13:40:42 ogsmdDEBUG:
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(): ~~. 
Nov 27 13:40:33 debian-gta02 /usr/sbin/gsm0710muxd[27748]:
gsm0710muxd.c:374:syslogdump(): > >> 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:[EMAIL PROTECTED]


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Zhone doesn't show my contacts and messages after restart

2008-11-26 Thread Michael 'Mickey' Lauer
Yo,

Am Wednesday 26 November 2008 21:56:19 schrieb Paul Fertser:
> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> writes:
> >> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> 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.
> >>
> >> Yes, moreover after any network status change Zhone will try to reread
> >> the contacts and messages lists. But the problem is that
> >> org.freesmartphone.GSM.SIM.GetSimReady return 0 after Zhone
> >> restart.
> >
> > Which should no longer happen, if zhone is the only user of the GSM
> > resource.
>
> Well, as far as i understand, that's still not correct. Imagine i want
> to restart the phone app while using GPRS? I think it's a valid use
> case.
>
> 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.

> >> 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...

-- 
:M:

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Zhone doesn't show my contacts and messages after restart

2008-11-26 Thread Paul Fertser
Hi,

"Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> writes:
>> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> 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.
>>
>> Yes, moreover after any network status change Zhone will try to reread
>> the contacts and messages lists. But the problem is that
>> org.freesmartphone.GSM.SIM.GetSimReady return 0 after Zhone
>> restart.
>
> Which should no longer happen, if zhone is the only user of the GSM
> resource.

Well, as far as i understand, that's still not correct. Imagine i want
to restart the phone app while using GPRS? I think it's a valid use
case.

Moreover, even provided zhone is the only app using the GSM
resource, are you sure that gsm0710muxd will power-cycle the modem?
What i see in the frameworkd log is that %CSTAT "response" is never
received if i don't restart the muxer daemon. If you need a proof,
i'll attach the logs to the ticket i've created.

>> 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?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Zhone doesn't show my contacts and messages after restart

2008-11-26 Thread Michael 'Mickey' Lauer
Am Monday 24 November 2008 21:10:33 schrieb Paul Fertser:
> Hi,
>
> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> 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.
>
> Yes, moreover after any network status change Zhone will try to reread
> the contacts and messages lists. But the problem is that
> org.freesmartphone.GSM.SIM.GetSimReady return 0 after Zhone
> restart.

Which should no longer happen, if zhone is the only user of the GSM resource.

> According to log the modem doesn't send a %CSTAT status,
> though it was resetted by ATZ and answered OK on AT%CSTAT=1 request.
>
> I can send a log that shows that after a minute after ATZ the modem
> still didn't send a %CSTAT report. It didn't send it later as well (or
> else the icons in Zhone would have become highlighted).
>
> 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.



-- 
:M:

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Zhone doesn't show my contacts and messages after restart

2008-11-24 Thread Paul Fertser
Hi,

"Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> 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.

Yes, moreover after any network status change Zhone will try to reread
the contacts and messages lists. But the problem is that
org.freesmartphone.GSM.SIM.GetSimReady return 0 after Zhone
restart. According to log the modem doesn't send a %CSTAT status,
though it was resetted by ATZ and answered OK on AT%CSTAT=1 request.

I can send a log that shows that after a minute after ATZ the modem
still didn't send a %CSTAT report. It didn't send it later as well (or
else the icons in Zhone would have become highlighted).

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...

Hope this helps.

Good luck!
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Zhone doesn't show my contacts and messages after restart

2008-11-24 Thread Michael 'Mickey' Lauer
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.

-- 
:M:

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Zhone doesn't show my contacts and messages after restart

2008-11-24 Thread arne anka
>> I understand that Zhone is not a fully functional phone application
>> and it is not supposed to be. But i think that fixing this bug is not
>> too hard for those who know framework and python well :)
> [...]
>
> I noticed the same problem.


i noticed that zhone now does not know about auth anymore.
before, zhone asked the framework whether the auth already took place and  
exposed the pin gui, if not.
with ms4 zhone invariably requests auth.

as a workaround it might feasible to start zhone with
-s pin_edit
which should open the pin gui immediately and thus allow for satisfying  
zhone.










> ___
> Openmoko community mailing list
> community@lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Zhone doesn't show my contacts and messages after restart

2008-11-24 Thread Marcel
Am Monday 24 November 2008 13:33:54 schrieb Paul Fertser:
> Hi,
>
> I understand that Zhone is not a fully functional phone application
> and it is not supposed to be. But i think that fixing this bug is not
> too hard for those who know framework and python well :)
[...]

I noticed the same problem.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Zhone doesn't show my contacts and messages after restart

2008-11-24 Thread Paul Fertser
Hi,

I understand that Zhone is not a fully functional phone application
and it is not supposed to be. But i think that fixing this bug is not
too hard for those who know framework and python well :)

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. Therefore it doesn't even try to read the contacts list and
the messagebooks. I'm sorry i can't come with a proper fix but i hope
this description is useful enough to fix the bug easily.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community