I want to send At command throug my application to modem. Can some one please let me know how to send AT command thr my application?
Do we need Phone object to send AT command?
The ATResponseParser
class parses part of the AT command syntax used to communicate with the mobile radio hardware in a mobile handset. This is, in fact, a command syntax very much like the AT command syntax used by modems, a standard described in the 3GPP document number TS 27.007 and re开发者_如何学运维lated specifications.
I want to send below AT command to Mode.
6.5 Hangup call +CHUP
Table 13a: +CHUP action command syntax
Command
Possible response(s)
+CHUP
+CHUP=?
Please help me.
There is no method in the Android SDK to let you send AT commands directly to the modem.
All the low-level telephony workings are implemented using internal APIs.
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)
精彩评论