【发布时间】:2016-08-22 12:51:22
【问题描述】:
我正在使用 Arduino UNO 和 SIM900A 模块进行基于 GSM + ARDUINO 的通信。我使用以下代码拨打特定号码但没有任何反应,
void setup()
{
Serial.begin(9600);
delay(10000);
}
void loop()
{
Serial.println("ATDTxxxxxxxxxx;"); //where xxxxxxxxxx is a 10 digit mobile number
delay(30000); // wait 20 seconds.
Serial.println("ATH"); // end call
do // remove this loop at your peril
{
delay(1);
}
while (1>0);
}
而当我使用 ATDTxxxxxxxxxx 时;在 minicom 中与 SIM900A 模块通信时,我能够打电话(因为 ATDxxxxxxxxxx 给出了无运营商错误,所以我使用了“;”)。发送消息的情况类似。我在使用时收到 "+CMS ERROR: 302"
AT+ CMGF=1
AT+CMGS="Mobno." //after this i get the error.
我无法通过 minicom + SIM900A GSM 模块发送消息,我想用 Arduino 对其进行测试。我认为我的 SIM 或任一模块的设置有问题。我什至尝试重置 SIM 的设置,但没有任何结果。
【问题讨论】:
-
尝试按照教程中的信息cooking-hacks.com/index.php/documentation/tutorials/… 并注意模块上的 LED 闪烁代码。谷歌“SIM900A arduino”获取大量信息
标签: arduino gsm at-command