Sunteți pe pagina 1din 2

14/07/2015

Send AT Commands to Android Phone - Stack Overflow


sign up

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.

log in

tour

help

stack overflow careers

Take the 2-minute tour

Send AT Commands to Android Phone

I want to Send AT Command to Android phone.


I know SDK does not support this.
but there are two solution :
1. change the code of Kernel and release your new Android (it seems it is so hard!)
2. LoopBack on

USB.(i

think Bluetooth is same)

About second solution , when you connect your phone to PC with


to send AT Command to GSM Modem.

USB

cable , you will see a

GSM

modem on Device Manager that help you

If we find a solution to loop back on mobile phone , we can send AT commands to GSM Modem.
Question is : HOW to loop back and what tty file on kernel will help us?
android

at-command

asked Nov 27 '11 at 6:38


M.Movaffagh
655

10

22

see that: stackoverflow.com/questions/10308130/ user1356194 Apr 25 '12 at 12:34


About solution 1, I wonder where (in which files of the kernel) is the AT command "manager" within the open
source Android? Hernn Eche Jun 18 '12 at 22:31

1 Answer

first you have to root the phone then in adb shell


su
echo -e "AT\r" > /dev/smd0
if you want to see answer use
cat /dev/smd0
i've test this command in samsung mini,cooper,s+ and it works.
if you use htc (htc rhyme tested) try to adb shell and type this command "radiooptions 13 AT" if
you want to see answer type "logcat -b radio"
try echo to /dev/smd0 for other devices
*you can use this command in sdk java code by using Runtime.exec (require su)
edited Feb 3 '12 at 19:09

answered Feb 3 '12 at 18:28


rattisuk
214

thanks... it worked. but the problem is just AT\r worked and other commands like atd123456789 does not
work. M.Movaffagh Feb 4 '12 at 5:31

http://stackoverflow.com/questions/8284067/send-at-commands-to-android-phone

1/2

14/07/2015
1

Send AT Commands to Android Phone - Stack Overflow

try ATD123456789;\r (add ; at the end of phone number) i tested and it works on samsung.and i think it
works for all of mobile rattisuk Feb 4 '12 at 16:07
you are correct, atd123456789 is a data call that does not support with the phone i checked. thanks for your
answer and regard. M.Movaffagh Feb 5 '12 at 3:23
The above works, but using cat /dev/smd0 & before the AT command is better, since sometimes the
cat command lock up the device, in case the shell TERM is using CTS/DSR as a serial control signals.
user1147688 Jun 17 '14 at 21:56

http://stackoverflow.com/questions/8284067/send-at-commands-to-android-phone

2/2

S-ar putea să vă placă și