AT命令的机器人 [英] AT command in Android
问题描述
我要使用AT命令在我的应用程序设置一些以GSM调制解调器。
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!
你有什么解决办法吗?
和我可以利用亚行发送AT命令到Android?
and can i use ADB to send AT command to android?
推荐答案
首先你必须以root的手机,然后在亚行的shell
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
我的测试中三星微型此命令,铜,S +和它的作品。
i've test this command in samsung mini,cooper,s+ and it works.
如果您使用宏达电(HTC韵测试)尝试亚行shell,然后输入以下命令radiooptions 13日,如果你想看到答案类型的logcat -b广播
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"
尝试回声到/ dev / SMD0其他设备
try echo to /dev/smd0 for other devices
*可以使用的Runtime.exec(需要SU)
*you can use this command in sdk java code by using Runtime.exec (require su)
例如:echo -eATD123456789; \ r>的/ dev / SMD0 ---->(来电编号123456789)
example : echo -e "ATD123456789;\r" > /dev/smd0 ----> (call to number 123456789)
这篇关于AT命令的机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!