I am trying to send AT commands on Galaxy S (I9000). The problem is that I am not sure which device is the modem. Searching into file /system/build.prop, i get that the device used by rild is /dev/ttyS0 (rild.libargs=-d /dev/ttyS0). But there is no ttyS0 file into /dev directory, and as a result I get an error when trying to send commands to it.
Executing the command cat /proc/tty/drivers I get the following results:
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaster
rfcomm /dev/rfcomm 216 0-255 serial
g_serial /dev/ttyGS 250 0 serial
ttySAC /dev/s3c2410_serial 204 64-67 serial
pty_slave /dev/pts 136 0-1048575 pty:slave
pty_master /dev/ptm 128 0-1048575 pty:master
unknown /dev/tty 4 1-63 console
From these I guess that the modem is /dev/ttyGS0. So i go on and execute via adb or terminal IDE application:
stop ril-daemon
cat /dev/ttyGS0 &
echo -e 'AT+CGSN\r' > /dev/ttyGS0.
But I get no response. I have also installed busybox and execute
echo "AT+CGSN\r" | busybox microcom -t 500 /dev/ttyGS0
but i get no response either.
Searching in this http://forum.xda-developers.com/showthread.php?t=1471241 which is the thread that everyone suggests to read, didn't really help.
Does anyone know how to communicate with the modem and get response?
P.S.: Using hyperterminal I can send AT commands, but I want to send them from a local terminal.
Thank you.