HTT $ P $垫失踪的Arduino和SIM900字符 [英] HTTPREAD missing characters with Arduino and SIM900

查看:237
本文介绍了HTT $ P $垫失踪的Arduino和SIM900字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是用我的一个Arduino的SIM900模块,它是没有的字符,虽然它返回预期的字符正确的号码。我对AT + SAPBR = 1,1和AT + HTTPINIT错误,所以我不知道这是它的原因。林不知道如何可以解决这些问题。

I am using a SIM900 module with my Arduino and it is missing characters although it is returning the right number of characters expected. I have ERROR on AT+SAPBR=1,1 and AT+HTTPINIT so I am not sure if this is the reason for it. Im not sure how to fix these issues either.

AT+CGATT?

+CGATT: 1

OK
AT+CGATT=1

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

OK
AT+SAPBR=3,1,"APN","mobile.o2.co.uk"

OK
AT+SAPBR=1,1

ERROR
AT+HTTPINIT

ERROR
AT+HTTPPARA="URL","http://www.xxxxxxxxxxx.com/temp/"

OK
AT+HTTPACTION=0

OK

+HTTPACTION:1,200,56
AT+HTTPREAD

+HTTPREAD:56
{"type":"dOK

我的功能,因为他们进来,上面写着大字:

My function that reads characters as they come in:

void whileAvailable() {
  char data;
  while (SIM900.available()) {
    data=SIM900.read();
    if (data>0) Serial.print(data);
  }
}

我相信功能是读取字符但罚款我不知道为什么它是失败的查找的字符的其余部分。

I believe the function is reading characters fine however I am not sure why it is failing the find the rest of the characters

推荐答案

这是由于Arduino的UNO串行缓冲区溢出或特大您使用。增加缓冲区大小,使它们能容纳更多的字节;并且可以显示这些数据。

This is due to Serial buffer overflow of arduino uno or mega you use. Increase the buffer size so that they will accommodate more bytes; and those data can be displayed.

这篇关于HTT $ P $垫失踪的Arduino和SIM900字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆