Ticket #1014 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

gsmd doesn't work in x86 platform

Reported by: sean_chiang@… Owned by: sean_chiang@…
Priority: high Milestone:
Component: gsmd Version: unspecified
Severity: normal Keywords:
Cc: buglog@…, balrogg@…, tick@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description


Attachments

gsmd_x86.log (18.3 KB) - added by sean_chiang@… 6 years ago.
strace log
more-tolerant-for-llparse-byte.patch (398 bytes) - added by sean_chiang@… 6 years ago.
avoid error when got twice '\r'

Change History

comment:1 Changed 6 years ago by balrogg@…

  • Cc balrogg@… added

It works for me. Are you getting an error from glibc about double free() and:
"Aborted." ? What are the symptoms?

Changed 6 years ago by sean_chiang@…

strace log

comment:2 Changed 6 years ago by sean_chiang@…

There's a strange observation, after read respond "OK"from modem each time, got:
read(3, "\r\r\nOK\r\n", 1024) = 7
read(3, 0x515a80, 1024) = -1 EAGAIN (Resource temporarily
unavailable)
Have no idea about this, keep digging..

comment:3 Changed 6 years ago by sean_chiang@…

When gsmd start to run in my pc, it will receive '\r' twice, hence the
llp->state will change from LLPARSE_STATE_IDLE_CR to LLPARSE_STATE_ERROR. That's
why gsmd hang. Below is the log. The same situation happen in another PC too.

Tue Nov 20 16:33:39 2007 <1> atcmd.c:654:atcmd_submit() extra-submiting command
Tue Nov 20 16:33:39 2007 <1> machine_gta01.c:72:atcmd_wakeup_modem() try to wake up
Tue Nov 20 16:33:39 2007 <1> atcmd.c:657:atcmd_submit() submitting command `ATZ'
Tue Nov 20 16:33:39 2007 <1> machine_gta01.c:64:wakeup_timer() Create wake up timer
Tue Nov 20 16:33:39 2007 <1> atcmd.c:92:llparse_byte() == 0xd ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 0 To
1) ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:92:llparse_byte() == 0xd ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 1 To
8) ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:92:llparse_byte() == 0xa ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:92:llparse_byte() == 0x4f ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:92:llparse_byte() == 0x4b ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:92:llparse_byte() == 0xd ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:92:llparse_byte() == 0xa ==
Tue Nov 20 16:33:39 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:42 2007 <1> machine_gta01.c:29:wakeup_timeout() Wakeup time out!!
Tue Nov 20 16:33:42 2007 <1> atcmd.c:594:discard_timer() Create discard timer
Tue Nov 20 16:33:42 2007 <1> atcmd.c:92:llparse_byte() == 0x41 ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:92:llparse_byte() == 0x54 ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:92:llparse_byte() == 0x5a ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:92:llparse_byte() == 0xd ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:92:llparse_byte() == 0xd ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:92:llparse_byte() == 0xa ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:92:llparse_byte() == 0x4f ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:92:llparse_byte() == 0x4b ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:92:llparse_byte() == 0xd ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:92:llparse_byte() == 0xa ==
Tue Nov 20 16:33:42 2007 <1> atcmd.c:164:llparse_byte() == llp-state (From 8 To
8) ==

Changed 6 years ago by sean_chiang@…

avoid error when got twice '\r'

comment:4 Changed 6 years ago by balrogg@…

Are you using the u-boot passthrough? There is #1005 that duplicates the
\r, we had the same problem and we first modified gsmd but if another program
uses the u-boot passthrough it will hit the same problem (not only on x86), so
it's a passthrough bug.

http://lists.openmoko.org/pipermail/openmoko-uboot/2007-September/000125.html
has a fix for u-boot.

comment:5 Changed 6 years ago by sean_chiang@…

In fact, we have GSM modem EVB, which is the same as the one on NEO device.
Hence, I didn't use u-boot passthrough.

comment:6 Changed 6 years ago by balrogg@…

Ah ok, I used gsmd with a modem that connects directly to USB (not Neo) and it
didn't send the additional \r, I guess different modems have different
deviations from the protocol. Maybe gsmd ll parser should be more tolerant to
such deviations.

comment:7 Changed 6 years ago by sean_chiang@…

  • Status changed from new to closed
  • Resolution set to fixed

It's fixed now!

Note: See TracTickets for help on using tickets.