Ticket #915 (closed defect: fixed)

Opened 12 years ago

Last modified 2 years ago

No RSTR responses from libgsmdtool -m atcmd

Reported by: shakthimaan@… Owned by: sean_chiang@…
Priority: normal Milestone:
Component: GSM Modem Version: GTA01Bv4
Severity: normal Keywords:
Cc: buglog@…, erin_yueh@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

No RSTR responses from libgsmdtool -m atcmd.

gsmd, most of the time, fails to start on boot-up. Have to do:

/etc/init.d/gsmd start

to start the GSM daemon. Trying

libgsmdtool -m atcmd

opens a session, but, trying AT, or AT+CGMI doesn't produce any response from
the GSM chipset. Output is like this:

OUTPUT

root@fic-gta01:~$ libgsmd-tool -m atcmd
libgsm-tool - (C) 2006 by Harald Welte
This program is Free Software and has ABSOLUTELY NO WARRANTY

AT
STR=`AT'

END =

It just stops at that. I am able to press Control+C to break out of the
application and return to the prompt. But, then gsmd gets killed (?), and I have
to start gsmd manually again:

/etc/init.d/gsmd start

to try to test the application (which again doesn't produce any RSTR responses).

Manually using GSM works:
http://wiki.openmoko.org/wiki/Manually_using_GSM

after following this step:
http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=256#c6

Using OM2007.2 (recently built on October 5, 2007) on Debian Etch (x86).

Attachments

gsmd-output-oct-8-2007-1510.txt (5.6 KB) - added by shakthimaan@… 12 years ago.
Output of "/usr/sbin/gsmd -p /dev/ttySAC0 -s 115200 -F"

Change History

comment:1 Changed 12 years ago by shakthimaan@…

OpenMoko? image:
OpenMoko?-openmoko-devel-image-glibc-P1-August-Snapshot-20070819-fic-gta01.rootfs.jffs2

Kernel image:
uImage-2.6.21.5-r3-fic-gta01.bin

uname -a:
root@fic-gta01:~$ uname -a
Linux fic-gta01 2.6.21.5-moko10 #1 PREEMPT Sun Aug 19 01:25:41 UTC 2007 armv4tl
unknown

comment:2 Changed 12 years ago by erin_yueh@…

  • Cc erin_yueh@… added

comment:3 Changed 12 years ago by erin_yueh@…

could you try these commands below?

  1. >killall gsmd
  2. > /usr/sbin/gsmd gsmd -p /dev/ttySAC0 -s 115200 -F
  3. open another terminal:

    libgsmd-tool -m atcmd
    at + cgmr

I'd like to see the gsmd debug log information and your gsm firmware version.
Thanks!

comment:4 Changed 12 years ago by erin_yueh@…

could you please try these commands below?

  1. > killall gsmd
  2. > /usr/sbin/gsmd gsmd -p /dev/ttySAC0 -s 115200 -F

[see what the debug log message here]

  1. open another terminal:

    libgsmd-tool -m atcmd
    at + cgmr

[see the firmware version]

I'd like to see the gsmd debug log information and your gsm firmware version.

Or you may try to update some files

  1. update /etc/init.d/gsmd shell script

http://buildhost.openmoko.org/OM2007.2/tmp/rootfs/etc/init.d/gsmd

Or

  1. update to the newest rootfs and kernal image

http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/fic-gta01/

OpenMoko?-openmoko-devel-image-glibc-ipk-P1-September-Snapshot-20070917-fic-gta01.rootfs.jffs2

uImage-2.6.22.5-moko11+svnr2937-r0-fic-gta01.bin


Changed 12 years ago by shakthimaan@…

Output of "/usr/sbin/gsmd -p /dev/ttySAC0 -s 115200 -F"

comment:5 Changed 12 years ago by shakthimaan@…

  1. Attached please find the file, gsmd-output-oct-8-2007-1510.txt that gives the

output of: "/usr/sbin/gsmd -p /dev/ttySAC0 -s 115200 -F".

  1. After running libgsmd-tool -m atcmd, output is:

OUTPUT

root@fic-gta01:~$ libgsmd-tool -m atcmd
libgsm-tool - (C) 2006 by Harald Welte
This program is Free Software and has ABSOLUTELY NO WARRANTY

at+cgmr
STR=`at+cgmr'

END

It hangs there. So, I used manual method, and with #256 hint [1] (using stty
-F /dev/ttySAC0 crtscts) on another terminal, I found the AT+CGMR output as follows:

+CGMR: "HW: GTA01Bv4, GSM: gsm_ac_gp_fd_pu_em_cph_ds_vc_cal35_ri_36_amd8_ts0-Moko1"

  1. I would like to use libgsmd for my test application (atmycommand in

projects.openmoko.org). So, if I use the latest images, how can I update my
build environment to your latest gsm testing build environment?

  1. From here:

http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=176#c1

it is mentioned that lgsm_passthrough() should not be used by any application,
other than testing/debugging. My application is a testing/debugging application.
So, is it ok to use the same?

[1] http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=256#c6

comment:6 Changed 12 years ago by shakthimaan@…

Comment#3/1. I updated with the latest gsm script, but, didn't get any RSTR
responses.

Comment#3/2. I then flashed the lastest images:
uboot-gta01bv4-latest.bin
OpenMoko?-openmoko-devel-image-glibc-ipk-P1-September-Snapshot-20070917-fic-gta01.rootfs.jffs2
uImage-2.6.22.5-moko11+svnr2937-r0-fic-gta01.bin

It booted fine. But, libgsmd-tool -m atcmd results in the following (after a
very long time):

BEGIN OUTPUT

root@fic-gta01:~$ libgsmd-tool -m atcmd
libgsm-tool - (C) 2006 by Harald Welte
This program is Free Software and has ABSOLUTELY NO WARRANTY

AT
STR=`AT'
RSTR=`'
ERROR reding from gsm_fd

END

comment:7 Changed 12 years ago by shakthimaan@…

Ok. The latest images work fine:
uboot-gta01bv4-latest.bin
OpenMoko?-openmoko-devel-image-glibc-ipk-P1-September-Snapshot-20070917-fic-gta01.rootfs.jffs2
uImage-2.6.22.5-moko11+svnr2937-r0-fic-gta01.bin

Only the first time it failed. I repeated it again five times, and it works! A
sample log:

BEGIN LOG

root@fic-gta01:~$ libgsmd-tool -m atcmd
libgsm-tool - (C) 2006 by Harald Welte
This program is Free Software and has ABSOLUTELY NO WARRANTY

AT
STR=`AT'
RSTR=`OK'
AT+COPS?
STR=`AT+COPS?'
RSTR=`+COPS: 0'
AT+CPIN?
STR=`AT+CPIN?'
RSTR=`+CPIN: READY'
ATE1
STR=`ATE1'
RSTR=`OK'
AT+CFUN=1
STR=`AT+CFUN=1'
RSTR=`OK'
AT+COPS
STR=`AT+COPS'
EVENT: Netreg searching for network
EVENT: Netreg registered (home network) LocationAreaCode? = 0x001A CellID = 0x1F7F
RSTR=`OK'
EVENT: Signal Quality: 26
AT+COPS=?
STR=`AT+COPS=?'
RSTR=`+COPS:
(2,"AirTel?","AirTel?","40449"),(3,"Hutch","Hutch","40413"),(3,"IDEA","IDEA","40407"),(3,"CellOne?","CellOne?","40473")'
EVENT: Signal Quality: 23
EVENT: Netreg registered (home network) LocationAreaCode? = 0x0010 CellID = 0x2015

END

comment:8 Changed 12 years ago by shakthimaan@…

Actually, on boot-up, gsmd starts, but testing with "libgsmd-tool -m atcmd"
fails with error:

BEGIN OUTPUT

root@fic-gta01:~$ libgsmd-tool -m atcmd
libgsm-tool - (C) 2006 by Harald Welte
This program is Free Software and has ABSOLUTELY NO WARRANTY

AT
STR=`AT'
RSTR=`'
ERROR reding from gsm_fd

END

gsmd doesn't run anymore after this error. I then manually start gsmd using:

/etc/init.d/gsmd start

and then "libgsmdtool -m atcmd" works fine!

Is there a difference in the way gsmd gets initialized during boot-up, compared
to using /etc/init.d/gsmd, or are there any timing issues during boot-up that
gsm doesn't get initialized properly?

comment:9 Changed 12 years ago by erin_yueh@…

  1. it seems like gsmd is not started properly. I guess it may refer to an email

from gsmd-level mail list. It's about the gsmd starting up timing problem.
http://lists.openmoko.org/pipermail/gsmd-devel/2007-October/000246.html

  1. gsmd is not running properly, so u cannot get any response from libgsmd-tool.

your gsm firmware is 'moko1' and it should be fine and stable.

  1. You can use MoKoMakefile? to have a updated building environment.

http://wiki.openmoko.org/wiki/MokoMakefile

  1. i am not sure how you will use lgsm_passthrough(). you may read this email first. http://lists.openmoko.org/pipermail/openmoko-uboot/2007-September/000109.html

comment:10 Changed 12 years ago by erin_yueh@…

from Comment #8:
when you try to use libgsmd-tool -m atcmd, could you check gsmd status first?
perhaps gsmd doesn't start yet.
eg. > ps aux | grep gsmd

root@fic-gta01:~$ ps aux | grep gsmd
root 1086 0.0 0.4 1680 632 ? S 22:20 0:00 /usr/sbin/gsmd
gsmd -p /dev/ttySAC0 -s 115200 -F
root 1113 0.0 0.4 3052 596 pts/0 R+ 22:42 0:00 grep gsmd

if you see the output is like above, the gsmd is running.

also, you can check the gsmd log file.
eg. > root@fic-gta01:~$ tail /tmp/gsm.log
Sun Oct 7 22:40:57 2007 <1> atcmd.c:411:ml_parse() Calling final cmd->cb()
Sun Oct 7 22:40:57 2007 <1> atcmd.c:420:ml_parse() Clearing mlbuf
Sun Oct 7 22:41:08 2007 <1> atcmd.c:215:ml_parse() buf=`%CSQ: 27, 99, 3'(16)
Sun Oct 7 22:41:08 2007 <1> atcmd.c:283:ml_parse() extd reply `%CSQ: 27, 99,
3' to cmd `NONE', must be unsolicited
Sun Oct 7 22:41:08 2007 <1> vendor_ti.c:78:csq_parse() entering csq_parse
param=` 27, 99, 3'
Sun Oct 7 22:41:08 2007 <1> unsolicited.c:69:usock_evt_send() entering evt=6
Sun Oct 7 22:41:08 2007 <1> usock.c:54:usock_cmd_enqueue() enqueueing usock cmd
0x36a28 for user 0x36830
Sun Oct 7 22:41:08 2007 <1> usock.c:1435:gsmd_usock_user_cb() successfully sent
cmd 0x36a28 to user 0x36830, freeing
Sun Oct 7 22:41:24 2007 <1> gsmd.c:79:alive_tmr_cb() gsmd_alive timer expired
Sun Oct 7 22:41:24 2007 <3> gsmd.c:85:alive_tmr_cb() modem alive!

comment:11 Changed 11 years ago by tick@…

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

Work for me.
I'd want to switch this into fixed.

comment:13 Changed 2 years ago by Jackiediuch

Choose payment method: Bank wire, WesternUnion?, MoneyGram?, Google Wallet, Webmoney.
88TB File Storage 0day 1990-2017.
Overal server's speed: 1 GB/s.
http://mp3dj.eu

Note: See TracTickets for help on using tickets.