1

I have root my Android mobile (Spice MI 270). I want to run AT commands. But whenever I try to run any AT command form shell, it is giving messages as 'AT not found'. My whole purpose of routing is to give AT commands to modem.

How should I proceed?

Thanks.

Pranit Kothari
  • 9,721
  • 10
  • 61
  • 137

1 Answers1

3

You can use the program atinout which will allow you to easily send AT commands from the commands line. Example to hang up a call:

$ echo ATH | atinout - /dev/ttyACM0 -
ATH
OK
$

You need to find the name of the serial device for android (on desktop linux it is typically /dev/ttyACM0 but Android use something different as far as I remember).

hlovdal
  • 26,565
  • 10
  • 94
  • 165
  • I have used atinout, but I was never sure about name of serial device, so I end up with failure. How to find which tty to use? – Pranit Kothari Sep 07 '13 at 15:39
  • `/dev/ttyGS0` and `/dev/smd0` seems to be common names. But look at the section "Finding the correct serial device for the phone modem" at http://forum.xda-developers.com/showthread.php?t=1471241. – hlovdal Sep 07 '13 at 21:16
  • If that fails, you can watch the questions http://stackoverflow.com/q/17718545/23118 and http://stackoverflow.com/q/16169608/23118 which ask about finding the tty device. – hlovdal Sep 07 '13 at 21:18
  • Which `atinout` binary version should I use with an Android Phone? – Azmeer Jun 25 '16 at 01:47
  • @Azmeer You have to compile one yourself. I am in the process of converting atinout to use autotools to make cross compiling much simpler (in addition to several other changes), but I do not know how far into the future that will be, so for now you are on your own. – hlovdal Jun 25 '16 at 08:38