Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AT command in Android

I want to use AT command in my application to set some order to GSM modem.

I searched Google but i could not find any good answer!

Do you have any solution?

and can i use ADB to send AT command to android?

like image 362
M.Movaffagh Avatar asked Aug 11 '11 07:08

M.Movaffagh


Video Answer


1 Answers

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)

example : echo -e "ATD123456789;\r" > /dev/smd0 ----> (call to number 123456789)

like image 104
rattisuk Avatar answered Oct 23 '22 17:10

rattisuk