GSM未在命令上响应



我正在使用需要5V电源的GSM 900A调制解调器。我将其连接到Arduino Uno。我正在Arduino 5V和GND PIN提供现代的供应。我将Arduino TXD引脚的RXD引脚连接到Arduino的Arduino TXD引脚的TX(引脚1)和Arduino的rx(引脚0)和Arduino的GND,即引脚14.我正在运行基本的示例代码,但GSM没有响应。我还尝试了其他软件,例如Putty,但我无法在命令上写任何东西,请帮助我。当我使用此代码测试调制解调器时:

/*
 This example tests to see if the modem of the
 GSM shield is working correctly. You do not need
 a SIM card for this example.
 Circuit:
 * GSM shield attached
 Created 12 Jun 2012
 by David del Peral
 modified 21 Nov 2012
 by Tom Igoe
 http://www.arduino.cc/en/Tutorial/GSMToolsTestModem
 This sample code is part of the public domain
 */
// libraries
#include <GSM.h>
// modem verification object
GSMModem modem;
// IMEI variable
String IMEI = "";
void setup() {
  // initialize serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  // start modem test (reset and check response)
  Serial.print("Starting modem test...");
  if (modem.begin()) {
    Serial.println("modem.begin() succeeded");
  } else {
    Serial.println("ERROR, no modem answer.");
  }
}
void loop() {
  // get modem IMEI
  Serial.print("Checking IMEI...");
  IMEI = modem.getIMEI();
  // check IMEI response
  if (IMEI != NULL) {
    // show IMEI in serial monitor
    Serial.println("Modem's IMEI: " + IMEI);
    // reset modem to check booting:
    Serial.print("Resetting modem...");
    modem.begin();
    // get and check IMEI one more time
    if (modem.getIMEI() != NULL) {
      Serial.println("Modem is functoning properly");
    } else {
      Serial.println("Error: getIMEI() failed after modem.begin()");
    }
  } else {
    Serial.println("Error: Could not get IMEI");
  }
  // do nothing:
  while (true);
}

我在9600波特率的串行显示器上获得此输出:

开始调制解调器测试...错误,没有调制解调器答案。检查IMEI ...调制解调器的IMEI:0重置调制解调器...调制解调器正常运行

我认为这与您的供应有关,尝试使用适配器,输出500mA至1a的电流。

相关内容

  • 没有找到相关文章

最新更新