Sim900 AT+HTTPPARA 缺少字符

Sim900 AT+HTTPPARA missing character

我正在做一个项目,我将两个变量发送到我的网站,我的网站将接收并显示它。

项目信息:Arduino + SIM900 + PHP(发送数据到网站)

我有代码可以向我的 SIM900 发送 AT 命令并显示其回复。

我的问题是,当我在串行监视器中 运行 我的代码时,URL 上的最后一个引号似乎不是 sent/printed 我的 SIM900。

这是我的代码:

#include <SoftwareSerial.h>
SoftwareSerial GPRS(5, 6);
long duration;
int distance;
const int trigPin = 10;
const int echoPin = 11;

void setup() {
  powerUp();  
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  GPRS.begin(19200);
  Serial.begin(19200);

  Serial.println("Con");
  delay(2000);
  Serial.println("Done!...");
  GPRS.flush();
  Serial.flush();

  // See if the SIM900 is ready
  GPRS.println("AT");
  delay(1000);
  toSerial();
  GPRS.print("at+cmee=2\r");
  toSerial();
  // SIM card inserted and unlocked?
  GPRS.println("AT+CPIN?");
  delay(1000);
  toSerial();

  // Is the SIM card registered?
  GPRS.println("AT+CREG?");
  delay(1000);
  toSerial();

  // Is GPRS attached?
  GPRS.println("AT+CGATT?");
  delay(1000);
  toSerial();

  // Check signal strength
  GPRS.println("AT+CSQ ");
  delay(1000);
  toSerial();

  // Set connection type to GPRS
  GPRS.println("AT+SAPBR=3,1,\"Contype\",\"GPRS\"");
  delay(2000);
  toSerial();

  // Set the APN
  GPRS.println("AT+SAPBR=3,1,\"APN\",\"internet\"");
  delay(2000);
  toSerial();

  // Enable GPRS
  GPRS.println("AT+SAPBR=1,1");
  delay(10000);
  toSerial();

  // Check to see if connection is correct and get your IP address
  GPRS.println("AT+SAPBR=2,1");
  delay(2000);
  toSerial();
}

void loop() {
  delay(10000);
  sensor();
  GPRS.println("AT+HTTPINIT\r");
  delay(1000);
  toSerial();
  GPRS.println("AT+HTTPPARA=\"CID\",1\r");
  delay(1000);
  toSerial();
  GPRS.println("AT+HTTPPARA=\"URL\",\"aclc-onlineparkingtracker.000webhostapp.com/?id=1&sts=0\r"); <--- HERE
  delay(10000);
  toSerial();
  GPRS.println("AT+HTTPACTION=0\r");
  delay(7000);
  toSerial();
  GPRS.println("AT+HTTPTERM\r");
  toSerial();
}

void toSerial() {
  while(GPRS.available()!=0) {
    Serial.write(GPRS.read());
  }
}

void powerUp() {
  pinMode(9, OUTPUT);
  digitalWrite(9, LOW);
  delay(1000);
  digitalWrite(9, HIGH);
  delay(2000);
  digitalWrite(9,LOW);
  delay(3000);
}

这是我的串行监视器中的输出:

Con
Done!...
AT

OK
at+cmee=2
AT+CPIN?

OK
AT+CREG?

+CREG: 0,1

OK
AT+CGATT?

+CGATT: 0

OK
AT+CSQ 

+CSQ: 10,0

OK
AT+SAPBR=3,1,"Contype","GPRS"

OK
AT+SAPBR=3,1,"APN","internet"

OK
AT+SAPBR=1,1

OK
AT+SAPBR=2,1

+SAPBR: 1,1,"10.32.133.18"

OK
AT+HTTPINIT


OK
AT+HTTPPARA="CID",1


OK
AT+HTTPPARA="URL","aclc-onlineparkingtracker.000webhostapp.com/?id=1&st=1 <--HERE


+CME ERROR: operation not allowed

我试过的:

更新:

我更改了这一行:

GPRS.println("AT+HTTPPARA=\"URL\",\"aclc-onlineparkingtracker.000webhostapp.com/?id=1&sts=0\r");

GPRS.println("AT+HTTPPARA=\"URL\",\"aclc-onlineparkingtracker.000webhostapp.com/?id=1&st=1\"");

我删除了 \r 并在 URL 的末尾添加了 \"