Ticket #256 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

GSM Modem doesn't seem to work on some devices (no serial communication possible)

Reported by: philipp.zabel@… Owned by: sean_chiang@…
Priority: high Milestone:
Component: GSM Modem Version: GTA01Bv4
Severity: critical Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

I followed the HOWTO at http://wiki.openmoko.org/wiki/Manually_using_GSM but
didn't succeed to communicate with the GSM modem:

root@fic-gta01:~$ lsof | grep ttySAC0
root@fic-gta01:~$ echo "1" > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on
root@fic-gta01:~$ dmesg | tail -n 1
<6>gta01-pm-gsm gta01-pm-gsm.0: powering up GSM, thus disconnecting serial console
root@fic-gta01:~$ chown uucp.uucp /dev/ttySAC0
root@fic-gta01:~$ cu -l /dev/ttySAC0
Connected.

After this there is only silence. No "AT-Command Interpreter Ready" message and
no reaction to input. The device is S/N 000182 (Date code 20070207), the
software versions are

u-boot-gta01bv3-r3_0_0_1321.bin
uImage-2.6-moko8-r1_0_1288_0-fic-gta01.bin
openmoko-devel-image-fic-gta01-20070310234745.rootfs.jffs2

from http://buildhost.openmoko.org/tmp/deploy/images.

Change History

comment:1 Changed 12 years ago by stefan@…

I had the same problem with my P0 device. On two others it worked fine.

I send my phone to Harald next week for analyzing the problem.

comment:2 Changed 12 years ago by hrw@…

Same happens with my device.

comment:3 Changed 12 years ago by laforge@…

Ok, this is really strange. I now have received Stefan's original phone, and I
can clearly reproduce the bug. Interestingly, my GTA01Bv3 just next to it works
perfectly fine.

I'll try to do some more investigation and have a thorough conversation with the
hardware and testing folks

comment:4 Changed 12 years ago by laforge@…

  • Severity changed from normal to critical

comment:5 Changed 12 years ago by werner@…

I just got a "dead" ("undead" fit better, though) GSM modem to work on a
bv2 device by issuing, from a parallel session
stty -F /dev/ttySAC0 crtscts

System setup:

  • latest u-boot (local build, full of ugly hacks)
  • uImage-2.6-200703022008-fic-gta01.bin
  • openmoko-devel-image-fic-gta01-20070309001017.rootfs.jffs2
  • "cu" from openmoko-devel-image-fic-gta01-20070302115654.rootfs.jffs2

The same system worked fine, without needing stty, if using
openmoko-devel-image-fic-gta01-20070302115654.rootfs.jffs2

In order to avoid as much external influence as possible, I booted,
in both cases, with init=/noinit, /noinit being the following script:

#!/bin/sh -x
PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin
mount -t proc none /proc
mount -t sysfs none /sys
mkdir -p /dev/pts
mount -t devpts none /dev/pts
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/random c 1 8
mknod /dev/urandom c 1 9
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/ttySAC0 c 204 64
ifconfig lo 127.0.0.1 up
ifconfig usb0 192.168.0.202 up
dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22
sleep 3600

Thus, given that hardware, u-boot, kernel, and the "cu" binary were
identical, and there were no daemons running at all, this leaves either
glibc or some arbitrary initial condition. I've checked the strace output
of "cu" on both configurations, and they're equivalent, except for the
terminal settings. Interestingly, TCGETS had 0x0002 set in lflags on the
"new" rootfs (i.e., the one where the GSM modem didn't work), which should
be ICANON. On TCSETS[W], the "new" system lacked CRTSCTS and also CLOCAL.
(Note: I just rebooted the regular system and checked with stty -a, and
CLOCAL was set. CRTSCTS was still missing, though.)

settings.

comment:6 Changed 12 years ago by philipp.zabel@…

I tried to run cu several times after issuing stty -F /dev/ttySAC0 crtscts, and
now I get garbled output from the modem. After several lines it still hangs.
Examples:

root@fic-gta01:~$ echo 1 > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on
root@fic-gta01:~$ cu -l /dev/ttySAC0
Connected.
d Interpreter re

root@fic-gta01:~$ echo 1 > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on
root@fic-gta01:~$ cu -l /dev/ttySAC0
Connected.

OK

OK

OK

root@fic-gta01:~$ echo 1 > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on
root@fic-gta01:~$ cu -l /dev/ttySAC0
Connected.

OK
AT[6~
EAT-Command Interpreter ready

root@fic-gta01:~$ echo 1 > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on
root@fic-gta01:~$ cu -l /dev/ttySAC0
Connected.
d Interpreter ready

I also tried picocom, which didn't react after "Terminal ready", until I pressed
a key:

root@fic-gta01:~$ echo 1 > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on
root@fic-gta01:~$ picocom -b 115200 -f h -p o -d 8 -i -r -l /dev/ttySAC0
picocom v1.4

port is : /dev/ttySAC0
flowcontrol : RTS/CTS
baudrate is : 115200
parity is : odd
databits are : 8
escape is : C-a
noinit is : yes
noreset is : yes
nolock is : yes
send_cmd is : ascii_xfr -s -v -l10
receive_cmd is : rz -vv

Terminal ready
AT-Command
Interateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterateraterater

ERROR

OK

OK

OK

... and so forth until C-a C-x. Any suggestions?

comment:7 Changed 12 years ago by alphaone@…

I can reliably resolve this issue on a bv3 device with:

root@fic-gta01:~$ echo 1 > /sys/devices/platform/gta01-pm-gsm.0/power_on
root@fic-gta01:~$ cu -l /dev/ttySAC0
And then on a different console issue:
root@fic-gta01:~$ stty -F /dev/ttySAC0 crtscts

The order is important for me because cu seems to disable hardware flow control.
Also gsmd never had problems for me, so everyone who suspects hardware problems
might want to try
root@fic-gta01:~$ gsmd -F -s 115200 -p /dev/ttySAC0
and see if that returns any OK messages for the AT commands issued

comment:8 Changed 12 years ago by philipp.zabel@…

Yes! I confirm that it works when I enable flow control after starting cu. And
so does gsmd, right after booting.
I can only assume that I left the uart in a confused state, gsmd never worked
after running cu, but I never tried to run it first.

comment:9 Changed 12 years ago by hrw@…

With crtscts enabled it works.

Time to buy cheap prepaid for it.

comment:10 Changed 12 years ago by koen@…

root@fic-gta01:~$ lsof | grep ttySAC0
gsmd 1177 root 3u CHR 204,64 1001 /dev/ttySAC0
root@fic-gta01:~$ killall gsmd
root@fic-gta01:~$ lsof | grep ttySAC0
root@fic-gta01:~$ echo "1" > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on
root@fic-gta01:~$ dmesg | tail -n 1
<4>adc_read: returnung 716 0
root@fic-gta01:~$ dmesg | grep gsm
<6>gta01-pm-gsm gta01-pm-gsm.0: powering up GSM, thus disconnecting serial conso le
root@fic-gta01:~$ cu -l /dev/ttySAC0
Connected.

ERROR

OK

ERROR

ERROR

ERROR

OK

ERROR

ERROR

ERROR

OK

comment:11 Changed 12 years ago by koen@…

doing a stty -F /dev/ttySAC0 crtscts

triggers another cycle of "ERROR ERROR OK"

comment:12 Changed 12 years ago by koen@…

After stopping the kernel from spewing crap to ttySAC0 I have a working gsm modem!

comment:13 Changed 12 years ago by stefan@…

Anybody still have this problem and no luck with the stty trick?

comment:14 Changed 12 years ago by stefan@…

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

I heard about nobody with this problem again. If somebody still suffer from this
please reopen.

comment:15 Changed 12 years ago by bandan.das@…

  • Status changed from closed to reopened
  • Version changed from GTA01Bv3 to GTA01Bv4
  • Resolution fixed deleted

I have a phase 1 hardware and I haven't succeeded in making the GSM modem work
either by following the instructions listed in the wiki
(http://wiki.openmoko.org/wiki/Manually_using_GSM) or here
(http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=256). Following
the instructions from #256, however, I have managed to get a list of carriers
using AT+COPS=? (by enabling flow control after doing a cu). Also I only get the
"connected" message and never get the "Interpreter Ready" message. Here is a log:

root@fic-gta01:~$ cu -l /dev/ttySAC0
Connected.

OK

ATE1
OK
AT+CFUN=1
OK
AT+CPIN="...."
ERROR
AT+COPS
OK
AT+COPS=?
+COPS: (2,"Cingular","Cingular","310410"),(1,"T-Mobile ","T-Mobile","31026")

ATDXXXXXXXXXX
NO CARRIER
ATD+1XXXXXXXXXX
NO CARRIER
ATH
OK

Is something wrong with GTA01Bv4 or my hardware has a faulty GSM modem ?

comment:16 Changed 12 years ago by technil@…

Hi all. similar problems here. Silence after the attempt to manually connect to
/dev/ttySAC0 . In addition the GSM Antenna symbol always shows question mark in
upper right, and top menubar GSM menu choices appear to have no effect.

hardware: GTA01Bv4

Kernel:
root@fic-gta01:~$ uname -r
2.6.21.6-moko11

Modules:
root@fic-gta01:~$ ls /lib/modules/
2.6.21.6-moko11

rootfs:
uImage-2.6.21.6-moko11-r1_0_0_2688_0-fic-gta01.bin

As per the recommendation at http://wiki.openmoko.org/wiki/Manually_using_GSM I
edited /etc/inittab and commented out the getty spawn "Our default images all
have a getty running on /dev/ttySAC0, please edit /etc/inittab and disable the
getty on that port"

I noticed after reboot that the gsmd gave a "success" as boot messages scrolled
by, (previously it hung there for a while). However, when running

root@fic-gta01:~$ libgsmd-tool -m shell

After boot, I get:

libgsm-tool - (C) 2006 by Harald Welte
This program is Free Software and has ABSOLUTELY NO WARRANTY

Can't connect to gsmd

So then I invoked gsmd this way:

root@fic-gta01:~$ gsmd -F -s 115200 -p /dev/ttySAC0
gsmd - (C) 2006-2007 by Harald Welte <laforge@…>
This program is FREE SOFTWARE under the terms of GNU GPL

Mon Aug 20 22:12:22 2007 <1> machine.c:130:gsmd_machine_plugin_init() detected
'GTA01' hardware
Mon Aug 20 22:12:22 2007 <1> machine.c:72:gsmd_machine_plugin_load() loading
machine plugin "generic"
Mon Aug 20 22:12:22 2007 <1> vendor.c:75:gsmd_vendor_plugin_load() loading
vendor plugin "ti"
Mon Aug 20 22:12:22 2007 <1> machine.c:56:gsmd_machine_plugin_find() selecting
machine plugin "generic"
Mon Aug 20 22:12:23 2007 <1> atcmd.c:498:atcmd_drain() c_iflag = 0x00000000,
c_oflag = 0x00000000, c_cflag = 0x800018b2, c_lflag = 0x00000a30
Mon Aug 20 22:12:23 2007 <1> vendor.c:59:gsmd_vendor_plugin_find() selecting
vendor plugin "TI Calypso"
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command `ATE0V1'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command `ATE0'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command `ATE0V1'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+CRC=1'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+CREG=2'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+CMEE=1'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+CLIP=1'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+COLP=1'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+CMGF=0'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+CTZR=1'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT%CTZV=1'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT%CPRI=1'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT%CSQ=1'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT%CUNS=0'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT%CPI=?'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() ATE0V1' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT+CRC=1' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT+CREG=2' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT+CMEE=1' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT+CLIP=1' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT+COLP=1' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT+CMGF=0' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT+CTZR=1' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT%CTZV=1' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT%CPRI=1' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`%CSQ: 1 '(8)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:338:ml_parse() Filling mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() `AT%CSQ=1' returned
`%CSQ: 1 '
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT%CUNS=0' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`%CPI: (0-4)'(11)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:338:ml_parse() Filling mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT%CPI=3'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:12:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:12:23 2007 <1> gsmd.c:152:gsmd_test_atcb() AT%CPI=3' returned OK'
Mon Aug 20 22:12:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:12:53 2007 <1> gsmd.c:75:alive_tmr_cb() gsmd_alive timer expired
Mon Aug 20 22:12:53 2007 <3> gsmd.c:81:alive_tmr_cb() modem alive!
Mon Aug 20 22:14:29 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+COPS=0'
Mon Aug 20 22:14:29 2007 <1> atcmd.c:182:ml_parse() buf=`+CME ERROR: 3'(13)
Mon Aug 20 22:14:29 2007 <1> atcmd.c:231:ml_parse() error number 3
Mon Aug 20 22:14:29 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:14:29 2007 <1> usock.c:174:null_cmd_cb() null cmd cb
Mon Aug 20 22:14:29 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:17:23 2007 <1> gsmd.c:120:alive_interval_tmr_cb() interval
expired, starting next alive inquiry
Mon Aug 20 22:17:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command `ATE0'
Mon Aug 20 22:17:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:17:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:17:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:17:53 2007 <1> gsmd.c:75:alive_tmr_cb() gsmd_alive timer expired
Mon Aug 20 22:17:53 2007 <3> gsmd.c:81:alive_tmr_cb() modem alive!

YAY! hardware looks fine... not sure about the +CME Error but the list at
http://www.activexperts.com/activsms/sms/gsmerrorcodes/
"GSM Equipment and Network Error Codes"
suggests it is:
CME ERROR: 3 Operation not allowed

At this point I opened a new shell on the GTA01Bv4 and invoked libgsmd-tools via:

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

R
# Register
o
# Power-Off
EVENT: Netreg not searching for network
O
# Power-On
R
# Register
EVENT: Netreg searching for network
EVENT: Netreg registration denied
EVENT: Signal Quality: 99
q

The output below is from the above session in libgsmd-tools. so it seems to work
(except that i can't get on my "home" network (UNICEL in this case) :( )

Mon Aug 20 22:18:56 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+CFUN=0'
Mon Aug 20 22:18:56 2007 <1> atcmd.c:182:ml_parse() buf=`+CREG: 0'(8)
Mon Aug 20 22:18:56 2007 <1> atcmd.c:251:ml_parse() extd reply `+CREG: 0' to cmd
`+CFUN=0', must be unsolicited
Mon Aug 20 22:18:56 2007 <1> unsolicited.c:69:usock_evt_send() entering evt=5
Mon Aug 20 22:18:56 2007 <1> usock.c:53:usock_cmd_enqueue() enqueueing usock cmd
0x2ba38 for user 0x2b9d8
Mon Aug 20 22:18:56 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:18:56 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:18:56 2007 <1> usock.c:174:null_cmd_cb() null cmd cb
Mon Aug 20 22:18:56 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:18:56 2007 <1> usock.c:941:gsmd_usock_user_cb() successfully sent
cmd 0x2ba38 to user 0x2b9d8, freeing
Mon Aug 20 22:19:01 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+CFUN=1'
Mon Aug 20 22:19:04 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:19:04 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:19:04 2007 <1> usock.c:174:null_cmd_cb() null cmd cb
Mon Aug 20 22:19:04 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:19:07 2007 <1> atcmd.c:483:atcmd_submit() submitting command
`AT+COPS=0'
Mon Aug 20 22:19:07 2007 <1> atcmd.c:182:ml_parse() buf=`+CREG: 2'(8)
Mon Aug 20 22:19:07 2007 <1> atcmd.c:251:ml_parse() extd reply `+CREG: 2' to cmd
`+COPS=0', must be unsolicited
Mon Aug 20 22:19:07 2007 <1> unsolicited.c:69:usock_evt_send() entering evt=5
Mon Aug 20 22:19:07 2007 <1> usock.c:53:usock_cmd_enqueue() enqueueing usock cmd
0x2b8d0 for user 0x2b9d8
Mon Aug 20 22:19:07 2007 <1> usock.c:941:gsmd_usock_user_cb() successfully sent
cmd 0x2b8d0 to user 0x2b9d8, freeing
Mon Aug 20 22:19:32 2007 <1> atcmd.c:182:ml_parse() buf=`+CREG: 3'(8)
Mon Aug 20 22:19:32 2007 <1> atcmd.c:251:ml_parse() extd reply `+CREG: 3' to cmd
`+COPS=0', must be unsolicited
Mon Aug 20 22:19:32 2007 <1> unsolicited.c:69:usock_evt_send() entering evt=5
Mon Aug 20 22:19:32 2007 <1> usock.c:53:usock_cmd_enqueue() enqueueing usock cmd
0x2b8d0 for user 0x2b9d8
Mon Aug 20 22:19:32 2007 <1> atcmd.c:182:ml_parse() buf=`+CME ERROR: 30'(14)
Mon Aug 20 22:19:32 2007 <1> atcmd.c:231:ml_parse() error number 30
Mon Aug 20 22:19:32 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:19:32 2007 <1> usock.c:174:null_cmd_cb() null cmd cb
Mon Aug 20 22:19:32 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:19:32 2007 <1> usock.c:941:gsmd_usock_user_cb() successfully sent
cmd 0x2b8d0 to user 0x2b9d8, freeing
Mon Aug 20 22:19:32 2007 <1> atcmd.c:182:ml_parse() buf=`%CSQ: 99, 99, 0'(16)
Mon Aug 20 22:19:32 2007 <1> atcmd.c:251:ml_parse() extd reply `%CSQ: 99, 99,
0' to cmd `NONE', must be unsolicited
Mon Aug 20 22:19:32 2007 <1> vendor_ti.c:78:csq_parse() entering csq_parse
param=` 99, 99, 0'
Mon Aug 20 22:19:32 2007 <1> unsolicited.c:69:usock_evt_send() entering evt=6
Mon Aug 20 22:19:32 2007 <1> usock.c:53:usock_cmd_enqueue() enqueueing usock cmd
0x2b7e8 for user 0x2b9d8
Mon Aug 20 22:19:32 2007 <1> usock.c:941:gsmd_usock_user_cb() successfully sent
cmd 0x2b7e8 to user 0x2b9d8, freeing
Mon Aug 20 22:22:23 2007 <1> gsmd.c:120:alive_interval_tmr_cb() interval
expired, starting next alive inquiry
Mon Aug 20 22:22:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command `ATE0'
Mon Aug 20 22:22:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:22:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:22:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:22:53 2007 <1> gsmd.c:75:alive_tmr_cb() gsmd_alive timer expired
Mon Aug 20 22:22:53 2007 <3> gsmd.c:81:alive_tmr_cb() modem alive!
Mon Aug 20 22:23:52 2007 <1> usock.c:905:gsmd_usock_user_cb() EOF, this client
has just vanished
Mon Aug 20 22:27:23 2007 <1> gsmd.c:120:alive_interval_tmr_cb() interval
expired, starting next alive inquiry
Mon Aug 20 22:27:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command `ATE0'
Mon Aug 20 22:27:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:27:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:27:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:27:53 2007 <1> gsmd.c:75:alive_tmr_cb() gsmd_alive timer expired
Mon Aug 20 22:27:53 2007 <3> gsmd.c:81:alive_tmr_cb() modem alive!
Mon Aug 20 22:32:23 2007 <1> gsmd.c:120:alive_interval_tmr_cb() interval
expired, starting next alive inquiry
Mon Aug 20 22:32:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command `ATE0'
Mon Aug 20 22:32:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:32:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:32:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:32:53 2007 <1> gsmd.c:75:alive_tmr_cb() gsmd_alive timer expired
Mon Aug 20 22:32:53 2007 <3> gsmd.c:81:alive_tmr_cb() modem alive!
Mon Aug 20 22:37:23 2007 <1> gsmd.c:120:alive_interval_tmr_cb() interval
expired, starting next alive inquiry
Mon Aug 20 22:37:23 2007 <1> atcmd.c:483:atcmd_submit() submitting command `ATE0'
Mon Aug 20 22:37:23 2007 <1> atcmd.c:182:ml_parse() buf=`OK'(2)
Mon Aug 20 22:37:23 2007 <1> atcmd.c:366:ml_parse() Calling final cmd->cb()
Mon Aug 20 22:37:23 2007 <1> atcmd.c:373:ml_parse() Clearing mlbuf
Mon Aug 20 22:37:53 2007 <1> gsmd.c:75:alive_tmr_cb() gsmd_alive timer expired
Mon Aug 20 22:37:53 2007 <3> gsmd.c:81:alive_tmr_cb() modem alive!
full talloc report on 'GSMD' (total 30 bytes in 7 blocks)

operator_cache contains 1 bytes in 1 blocks (ref 0)
gsmd_user contains 1 bytes in 1 blocks (ref 0)
ucmd contains 1 bytes in 1 blocks (ref 0)
atcmds contains 1 bytes in 1 blocks (ref 0)
timers contains 25 bytes in 2 blocks (ref 0)

timer.c:162 contains 24 bytes in 1 blocks (ref 0)

All commands issued over ssh via USBnet.

Until I get a registration on the/a network I am at a bit of a loss. I will note
that no applications in the image show their interaction with gsmd in the
invocation i used above to check on the hardware (Dialer and/or GSM icon in
menubar). Offhand I don't know if they use libgsmd or if they try to send AT
commands directly to /dev/ttySAC0. I will look into it after I get some sleep.

HTH

comment:17 Changed 12 years ago by philipp.zabel@…

In both the last comments the GSM modem obviously works, so this is the wrong bug.

Bandan: Here for some reason AT+CPIN="...." fails unless you have queried the
state with AT+CPIN? before. Once you authenticated, you can start automatic
network registration with AT+COPS=0. The neo's firmware accepts AT+COPS, but I
think that is wrong. Current network selection can be queried with AT+COPS?

Andrew: I think in your log AT+COPS=0 fails with +CME ERROR: 3 because you
haven't entered the pin yet. All issues you observed are problems with the
current moko GUI software (or gsmd), but not with the modem.

comment:18 Changed 12 years ago by alphaone@…

  • Status changed from reopened to closed
  • Resolution set to fixed
  • Summary changed from GSM Modem doesn't seem to work on some devices to GSM Modem doesn't seem to work on some devices (no serial communication possible)

Closing this bug again as the GSM modem itself seems to be working everywhere.

comment:19 Changed 12 years ago by andreas@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

Unfortunately, it seems that current 2007.2 snapshots on my device have this
problem as a regression:

root@fic-gta01:~$ lsof | grep ttySAC0
root@fic-gta01:~$ echo "1" > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on
root@fic-gta01:~$ dmesg | tail -n 6
<6>gta01-pm-gsm gta01-pm-gsm.0: powering up GSM, thus disconnecting serial console
<7>modem wakeup interrupt
<4>adc_read: entering (pcf=c07d9c00, channel=0, data2=00000000)
<4>pcf50606_irq: entering(irq=53, pcf=c07d9c00): scheduling work
<4>pcf50606_work: INT1=0x40 INT2=0x00 INT3=0x01:SECOND ADCRDY
<4>adc_read: returning 715 0
root@fic-gta01:~$ chown uucp.uucp /dev/ttySAC0
root@fic-gta01:~$ cu -l /dev/ttySAC0
Connected.

From that point on, the terminal is dead.

I've gotten the modem to work in the past and even had the dialer doing dialout
once but since trying the newer updated images it's a no go.
Although there was no message about "AT-Command Interpreter Ready" during the
manual tries the device answered OK to ATZ.

The problem manifests itself with todays snapshot as well.

comment:21 Changed 12 years ago by andreas@…

Switching forward to
http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/fic-gta01/OpenMoko-openmoko-devel-image-glibc-P1-August-Snapshot-20070825-fic-gta01.rootfs.jffs2
and
http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/fic-gta01/uImage-2.6.21.6-moko11-r2-fic-gta01.bin
leaves the gsm modem in a unusable state:

Sat Aug 25 17:55:55 2007 <1> machine.c:131:gsmd_machine_plugin_init() detected
'GTA01' hardware
Sat Aug 25 17:55:55 2007 <1> machine.c:72:gsmd_machine_plugin_load() loading
machine plugin "generic"
Sat Aug 25 17:55:55 2007 <1> vendor.c:75:gsmd_vendor_plugin_load() loading
vendor plugin "ti"
Sat Aug 25 17:55:55 2007 <1> machine.c:56:gsmd_machine_plugin_find() selecting
machine plugin "generic"
Sat Aug 25 17:55:56 2007 <1> atcmd.c:561:atcmd_drain() c_iflag = 0x00000500,
c_oflag = 0x00000005, c_cflag = 0x800018b2, c_lflag = 0x00008a3b
Sat Aug 25 17:55:56 2007 <1> vendor.c:59:gsmd_vendor_plugin_find() selecting
vendor plugin "TI Calypso"
Sat Aug 25 17:55:56 2007 <1> atcmd.c:545:atcmd_submit() submitting command `ATZ'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:210:ml_parse() buf=`AT-Command Interpreter
ready'(28)
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command `ATZ'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:210:ml_parse() buf=`ATZ'(3)
Sat Aug 25 17:55:57 2007 <1> atcmd.c:229:ml_parse() ignoring echo
Sat Aug 25 17:55:57 2007 <1> atcmd.c:210:ml_parse() buf=`ATZ'(3)
Sat Aug 25 17:55:57 2007 <1> atcmd.c:229:ml_parse() ignoring echo
Sat Aug 25 17:55:57 2007 <1> atcmd.c:210:ml_parse() buf=`OK'(2)
Sat Aug 25 17:55:57 2007 <1> atcmd.c:406:ml_parse() Calling final cmd->cb()
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command `ATE0V1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CRC=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CREG=2'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CMEE=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CLIP=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+COLP=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CMGF=0'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CMGF=0'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CTZR=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT%CTZV=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT%CPRI=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT%CSQ=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT%CUNS=0'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT%CPI=?'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:415:ml_parse() Clearing mlbuf
Sat Aug 25 17:55:57 2007 <1> atcmd.c:210:ml_parse() buf=`ATE0V1'(6)
Sat Aug 25 17:55:57 2007 <1> atcmd.c:372:ml_parse() Appending buf to mlbuf
Sat Aug 25 17:55:57 2007 <1> atcmd.c:210:ml_parse() buf=`ATE0V1'(6)
Sat Aug 25 17:55:57 2007 <1> atcmd.c:372:ml_parse() Appending buf to mlbuf
Sat Aug 25 17:55:57 2007 <1> atcmd.c:210:ml_parse() buf=`OK'(2)
Sat Aug 25 17:55:57 2007 <1> atcmd.c:406:ml_parse() Calling final cmd->cb()
Sat Aug 25 17:55:57 2007 <7> gsmd.c:210:firstcmd_atcb() response 'ATE0V1
ATE0V1' to initial command invalidSat Aug 25 17:55:57 2007 <1>
atcmd.c:545:atcmd_submit() submitting command `ATE0V1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CRC=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CREG=2'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CMEE=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CLIP=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+COLP=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CMGF=0'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CMGF=0'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CTZR=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT%CTZV=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT%CPRI=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT%CSQ=1'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT%CUNS=0'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT%CPI=?'
Sat Aug 25 17:55:57 2007 <1> atcmd.c:415:ml_parse() Clearing mlbuf
Sat Aug 25 17:56:11 2007 <1> atcmd.c:545:atcmd_submit() submitting command
`AT+CFUN=1'

comment:22 Changed 12 years ago by andreas@…

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

With todays build issuing stty -F /dev/ttySAC0 crtscts from a second session
while having the cu session on another terminal successfully unhangs the modem
again.
Starting gsmd by executing "gsmd -p /dev/ttySAC0 -s 115200 -F" and subsequently
calling /etc/init.d/xserver-nodm stop and /etc/init.d/xserver-nodm start makes
the phone usable for calls.

Even though the gsmd does not work from poweron, but needs to be restarted with
the xserver as well, I'm closing this bug for no.

comment:23 Changed 12 years ago by kousue@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

I still get identical problems with gta01bv4 and the following firmware:
http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/fic-gta01/{
u-boot-gta01bv4-1.2.0+git20070917+svnr2943-r0.bin,
OpenMoko?-openmoko-devel-image-glibc-ipk-P1-September-Snapshot-20070917-fic-gta01.rootfs.jffs2,
uImage-fic-gta01-latest.bin}

Some logs:

root@fic-gta01:/$ chown uucp.uucp /dev/ttySAC0
root@fic-gta01:/$ echo 1 > /sys/bus/platform/devices/gta01-pm-gsm.0/power_on
root@fic-gta01:/$ cu -l /dev/ttySAC0
Connected.
[it hung here until, from another terminal, I issued stty -F /dev/ttySAC0 crtscts]
AT-Command Interpreter ready
AT
OK
AT+CFUN=1
OK
AT+CPIN="1234"
ERROR
AT+COPS [repositioned the cursor to the start of the line and hung for a while,
then put a newline and:]
OK
AT+COPS=? [slowly waiting...]
+COPS: (2, "ROGERS", "ROGERS", "302720")

OK
AT+COPS?
+COPS: 0,0,"ROGERS"

OK
ATD
NO CARRIER
ATD+1XXXXXXXXXX
NO CARRIERAT+COPS
OK
AT+COPS?
+COPS: 0,0,"Rogers Wireless"

OK
ATD
NO CARRIER

I'm stumped.

comment:24 Changed 12 years ago by philipp.zabel@…

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

This bug is about non-working serial communication with the GSM Modem.
As you get answers to AT commands the problem *obviously* is something else, so
closing this again.
Your issue might be an incorrectly entered PIN (note the error after
AT+CPIN="1234", try AT+CPIN? before) and maybe failed operator selection.
AT+COPS is invalid, and I think it's a firmware bug that the Calypso accepts it.
The specs say that you should use AT+COPS=0 for automatic operator selection.

comment:25 Changed 12 years ago by kousue@…

Er, with followup from roh@…, I've learned that my problem is
actually that 850MHz GSM (the only type available where I am) is not working
yet, and that that's my problem.

Note: See TracTickets for help on using tickets.