GSM modem

This is a very __stupid__ trial, using a serial modem to make it work with Android. [LOL]

GSM modem:

you can use any serial GSM modem. standard modem supports AT standard command. i test with PC first, and it worked fine. both sms function and phone function. first time i use the same cable with development board and it was not working at all. then i modified the cable, if you face the same problem, make sure the serial cable is correct as Plug/Plug Crossover :

RXD <-> TXD
TXD <-> RXD
RST <-> CTS
CTS <-> RTS

changed on one side 2 with 3 and 7 with 8.

Testing

check the baudrate with stty -F /dev/ttymxc2, connect to a PC, start a terminal prog with the correct baudrate.
then you can make echo AT > /dev/ttymxc2 and you should see it on your pc.
You can also do a getty -L 115200 /dev/ttymxc2 to open a console.

You can change the baudrate with stty -F /dev/ttymxc2 {baudrate}.

Android vs GSM

yet take a look into radio log, there are lots of interesting thing. Here is what i got :

^DRILJ
Connected to radio-interface socket
^CRILJ
[UNSL]< RADIO_STATE_CHANGED RADIO_UNAVAILABLE
^CGSM
Broadcast PHONE_INTERFACE_ADDED : GSM
^CRILJ
[0000]> GET_CURRENT_CALLS

I tried to make a call, -not too serious, i just did not plug any GSM module yet- the log look like this

^CGSM
ServiceState pollState done old state: OUT_OF_SERVICE home null null null 0 0
^CGSM
ServiceState pollState done: OUT_OF_SERVICE home null null null -1 -1  gprs:OUT_OF_SERVICE rssi: 99
^CGSM
[PhoneNotifier] ServiceState: OUT_OF_SERVICE home null null null -1 -1
^CGSM
[PhoneNotifier] DataConnection : DISCONNECTED
^CRILJ
[0000]< GET_CURRENT_CALLS error: android.telephony.gsm.CommandException: RADIO_NOT_AVAILABLE
^CGSM
dial: dialString '0168909809', mmi 'null'...
^CGSM
[PhoneNotifier] PhoneState: IDLE
^CRILJ
[0001]> SET_MUTE false
^CRILJ
[0002]> DIAL 0168909809clir: 0
^CGSM
[PhoneNotifier] PhoneState: OFFHOOK
^CGSM
[DataConnection] Stop poll NetStat
^CRILJ
[0001]< SET_MUTE error: android.telephony.gsm.CommandException: RADIO_NOT_AVAILABLE

My plan is get android to do call through GSM module.