Ticket #707 (closed defect: fixed)

Opened 12 years ago

Last modified 11 years ago

modem/gsmd does not start in a reliable way (if at all) on boot

Reported by: mickey@… Owned by: mickey@…
Priority: high Milestone:
Component: gsmd Version: unspecified
Severity: blocker Keywords:
Cc: buglog@…, elrond+bugzilla.openmoko.org@…, cw@…, jserv@…, balrogg@…, tick@…, cesarb@…, cayco@…, mstevens@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

It seems impossible to find a combination of powering up / down the gsm device
node, starting / stopping gsmd, adding massive amounts of sleep to the init
script that really makes gsmd start up in a reliable way on booting the system.
I'm out of ideas and giving up on it now.

Once the system is up, powering down, up again, then restarting gsmd most of the
times work. Can this still due to the multiplexing of ttySAC0? Or is it the
timing issues as in #574? I wouldn't mind removing the serial port function
altogether if that would finally get gsmd working -- after all it's a phone.

So, can someone _please_ do anything about it?

Attachments

gsmd (1.3 KB) - added by tick@… 12 years ago.
A /etc/init.d/gsmd works for me on boot

Change History

comment:1 Changed 12 years ago by mickey@…

  • Severity changed from normal to blocker

comment:2 Changed 12 years ago by cesarb@…

  • Cc cesarb@… added

comment:3 Changed 12 years ago by laforge@…

  • Cc cayco@… added

* Bug 761 has been marked as a duplicate of this bug. *

comment:4 Changed 12 years ago by jserv@…

  • Cc jserv@… added

comment:5 Changed 12 years ago by elrond+bugzilla.openmoko.org@…

  • Cc elrond+bugzilla.openmoko.org@… added

comment:6 Changed 12 years ago by giles.jones@…

GSMD seems to start ok for me, but it won't register on the network and a
combination of power down, power up and register kills it. See long below:

Tue Sep 11 22:23:04 2007 <1> machine.c:131:gsmd_machine_plugin_init() detected
'GTA01' hardware
Tue Sep 11 22:23:04 2007 <1> machine.c:72:gsmd_machine_plugin_load() loading
machine plugin "generic"
Tue Sep 11 22:23:04 2007 <1> vendor.c:75:gsmd_vendor_plugin_load() loading
vendor plugin "ti"
Tue Sep 11 22:23:04 2007 <1> machine.c:56:gsmd_machine_plugin_find() selecting
machine plugin "generic"
Tue Sep 11 22:23:05 2007 <1> atcmd.c:561:atcmd_drain() c_iflag = 0x00000500,
c_oflag = 0x00000005, c_cflag = 0x800018b2, c_lflag = 0x00008a3b
Tue Sep 11 22:23:05 2007 <1> vendor.c:59:gsmd_vendor_plugin_find() selecting
vendor plugin "TI Calypso"
Tue Sep 11 22:23:05 2007 <1> atcmd.c:545:atcmd_submit() submitting command `ATZ'
Tue Sep 11 22:23:25 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CFUN=1'
Tue Sep 11 22:23:45 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+COPS=0'
Tue Sep 11 22:25:12 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+COPS=0'
Tue Sep 11 22:26:40 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+COPS=0'
Tue Sep 11 22:27:28 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CFUN=0'
Tue Sep 11 22:27:52 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CFUN=1'
Tue Sep 11 22:28:05 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+COPS=0'
Tue Sep 11 22:28:05 2007 <1> gsmd.c:124:alive_interval_tmr_cb() interval
expired, starting next alive inquiry
Tue Sep 11 22:28:05 2007 <1> atcmd.c:545:atcmd_submit() submitting command `AT'
Tue Sep 11 22:28:35 2007 <1> gsmd.c:79:alive_tmr_cb() gsmd_alive timer expired
Tue Sep 11 22:28:35 2007 <8> gsmd.c:82:alive_tmr_cb() modem dead!

comment:7 Changed 12 years ago by cw@…

  • Cc cw@… added

comment:8 Changed 12 years ago by tick@…

  • Cc ticktock35@… added

comment:9 Changed 12 years ago by mstevens@…

  • Cc mstevens@… added

comment:10 Changed 12 years ago by memb_moko_bz@…

Does this mean gsmd runs stable for you once started manually?
I have similar experiences as Giles, except I can get up and running, do some
network action (dial/sms/query operator etc), but suddenly gsmd seems not to
receive responses to any commands issued from the host. Unsolicited messages,
however, including LAC/CI, signal quality and ring is parsed correctly by gsmd.
Evantually, gsmd kills itself when the alive check is done.

My idea was that some buffering and/or mapping might go wrong deep in gsmd
(seems that #574 was something similar). But I would like to know whether the
sleep issue in firmware I-Fan Chen describes in #176 might cause something
similar, before investing time in analysing the buffering. Maybe some of you,
mickey/harald?, can confirm whether the Calypso can be in sleep mode at this
point at all.

comment:11 Changed 12 years ago by balrogg@…

  • Cc balrogg@… added

comment:12 Changed 12 years ago by jserv@…

  • Owner changed from laforge@… to tick@…

comment:13 Changed 12 years ago by tick@…

  • Status changed from new to assigned

comment:14 Changed 12 years ago by tick@…

  • dependson set to 788

comment:15 Changed 12 years ago by tick@…

After some testing I found some strange properties, and that may be the rule
cause why gsmd cannot starts up well.

The following is my way to test modem behaviour.
kernel:
Linux fic-gta01 2.6.22.5-moko11 #1 PREEMPT Mon Oct 22 09:44:05 UTC 2007 armv4tl
unknown
Neo: GTA01v3

  1. Not allow /etc/init.d/gsmd be called before I test. find -name '*35gsmd' -exec rm -rf {} \; find -name '*99xserver*' -exec rm -rf {} \; to ensure the environment is clean
  1. poweroff & remove usb cable & remove battery then put everything back and turn on my neo
  1. Turn on modem

echo 1 > /sys/devices/platform/gta01-pm-gsm.0/power_on

  1. ./tickminicom <-- a tiny minicom program with exactly the same uart initial

flow as gsmd
Then I will get a lot of message dump from /dev/ttySAC0 (I do not input anything
yet.)
You can find the source code at
http://linuxocarina.blogspot.com/2007/09/minicom.html

I do not input anything, but I get so many response comes from nowhere.
No wonder gsmd will out of control for the first time initiate.

The following is what I get:


root@fic-gta01:~$ echo 1 > /sys/devices/platform/gta01-pm-gsm.0/power_on
root@fic-gta01:~$ ./tickminicom
DEBUG: (util.c, 69): open_device: Try to open device /dev/ttySAC0!
DEBUG: (util.c, 48): set_baud: Open uart with speed 115200
DEBUG: (tick_minicom.c, 71): main: Open Uart and set baud rate OK!!
T-Command Interpreter ready

aterpreter ready

ERROR

ERROR

OK

OK

OK

OK

OK

OK

OK

OK

OK

OK

OK

OK

OK

OK

OK

OK


comment:16 Changed 12 years ago by mickey@…

Tick: Dou you still have console=ttyS0 in U-Boot environment? If so, then this
is probably a sign that there is a problem in the kernel serial port
multiplexing letting kernel messages go to ttyS0 even if the modem has power.

If you remove console=ttyS0, does it change? Could please someone look again at
the multiplexing stuff in kernel?

comment:17 Changed 12 years ago by tick@…

I set my bootargs as
bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 comnsole=tty0 loglevel=8

And the result is the same.

comment:18 Changed 12 years ago by tick@…

Finally, after many check I found that the share lib of my rootfs may be strange.
I compile the tickminicom statically, and it behaviour differently.
After refresh the rootfs, everything work well now @_@.

Unfortunately, I didn't find the rule cause why the lib becomes so strange.

Changed 12 years ago by tick@…

A /etc/init.d/gsmd works for me on boot

comment:19 Changed 11 years ago by tick@…

  • Owner changed from tick@… to mickey@…
  • Status changed from assigned to new

comment:20 Changed 11 years ago by tick@…

  • blocked set to 705

comment:21 Changed 11 years ago by mickey@…

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

In MUXing mode, this will be a non-issue, since the multiplexer can and does a
reset on activation. I consider this being FIXED then.

Note: See TracTickets for help on using tickets.