GSM serial

Last time, i tried to connect serial GSM modem. The modem is working well with PC, try to send sms and dial a number using AT command. this website (http://www.developershome.com/sms/) covers very well tutorial about AT standard command.

simply, my assumption is that, android must recognize the modem, generally in linux, it is stored in file. It uses such library to do communication with the hardware, and the command is sent through specified layer in the library. there is RILD (no exact definition about it), Benno said : “although I can’t find out more details than that. rild is the radio-interface-link daemon (I think! ;) . The init files imply that you can connect a real-modem and get Android to us it, but by default it has the simulated Java radio-interface“. and here :* “rild (Radio Interface Layer daemon?) controls”. whatever definition is that, the promising is it handles radio communication in android. me myself, i defined it as Radio Interface Library Dunno(?LOL).

/system/bin/rild -l /system/lib/libreference-ril.so -- -d /dev/smd0

this pointed when there is no libhtc.so (HTC ?). check the script init.rild, so i change the device to /dev/ttymxc1 which is connected to GSM modem. the init.testmenu is working nice, with several modification inside the script. but not working from android dialpad. unless, modify the device entry in sysfs. because, andriod runtime still complain that the modem device class is not available. mine, the serial modem is located in /dev/ttymxc2 and certain node in sysfs.

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. okay, i found this from Jürgen Kilb. thanks Jürgen.

test the baudrate and set it :

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}.

i just wonder my documentation is not clear enough. for now, just listed above.

2 Comments

  1. Stanley
    Posted January 17, 2009 at 12:38 pm | Permalink

    Hi ruckuus,

    I’d love to know if the way you offered could be run on G1 device.

    Thanks in advance.

    Stanley

  2. Posted January 23, 2009 at 6:43 am | Permalink

    @Stanley, check /etc/*test* scripts and you will find some tasty path on which Android subsystem communicate with GSM stack.


Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*