Arduino 3G GPRS屏蔽不工作

Arduino 3G GPRS屏蔽不工作,arduino,at-command,Arduino,At Command,我正在做一个3G GPRS屏蔽,这是我从ITEADSTUDIO买的。它有一个SIM5216 WCDMA模块 我现在对防护罩有以下限制 我如何理解屏蔽已成功连接到网络提供商 如何在3G屏蔽上调用AT命令 如何从3G GPRS屏蔽发送短信 请为我提供上述限制的解决方案 提前谢谢你首先,根据你帖子的风格,我想警告你,为了弄清楚如何使用你刚买的东西,没有办法用谷歌搜索你的盾牌,用你的头撞墙。在下面的帖子中,我将写下你所有问题的答案,这将给你一个领先的开始,但你仍然必须用谷歌搜索你不懂的所有东西,并尝

我正在做一个3G GPRS屏蔽,这是我从ITEADSTUDIO买的。它有一个SIM5216 WCDMA模块

我现在对防护罩有以下限制

  • 我如何理解屏蔽已成功连接到网络提供商
  • 如何在3G屏蔽上调用AT命令
  • 如何从3G GPRS屏蔽发送短信
请为我提供上述限制的解决方案


提前谢谢你首先,根据你帖子的风格,我想警告你,为了弄清楚如何使用你刚买的东西,没有办法用谷歌搜索你的盾牌,用你的头撞墙。在下面的帖子中,我将写下你所有问题的答案,这将给你一个领先的开始,但你仍然必须用谷歌搜索你不懂的所有东西,并尝试所有这些,直到永远

如果你还没有练习过arduino,请阅读“arduino入门”

1.)您可以进行几个测试。这是一个关于AT命令的教程,您可以使用AT命令对盾牌进行编程。我建议将“AT命令串行中继”上传到arduino板上,然后尝试发送或接收来自arduino的文本消息。这是我用的一个串行继电器。请注意,由于tx/rx引脚的设置不同,因此代码原样不适用于您的屏蔽。(在我的护盾上——请参阅EdStudio GPRS 2.0,tx和rx引脚设置在引脚7和8上。在您的护盾上,)幸运的是,护盾上的引脚设置可能允许您使用arduino IED附带的GSM库示例

//Serial Relay - Arduino will patch a 
//serial link between the computer and the GPRS Shield
//at 19200 bps 8-N-1
//Computer is connected to Hardware UART
//GPRS Shield is connected to the Software UART 

#include <SoftwareSerial.h>

SoftwareSerial GPRS(7, 8);
unsigned char buffer[64]; // buffer array for data recieve over serial port
int count=0;     // counter for buffer array 
void setup()
{
  GPRS.begin(19200);               // the GPRS baud rate   
  Serial.begin(19200);             // the Serial port of Arduino baud rate.

}

void loop()
{
  if (GPRS.available())              // if date is comming from softwareserial port ==> data is comming from gprs shield
  {
    while(GPRS.available())          // reading data into char array 
    {
      buffer[count++]=GPRS.read();     // writing data into array
      if(count == 64)break;
  }
    Serial.write(buffer,count);            // if no data transmission ends, write buffer to hardware serial port
    clearBufferArray();              // call clearBufferArray function to clear the storaged data from the array
    count = 0;                       // set counter of while loop to zero


  }
  if (Serial.available())            // if data is available on hardwareserial port ==> data is comming from PC or notebook
    GPRS.write(Serial.read());       // write it to the GPRS shield
}
void clearBufferArray()              // function to clear buffer array
{
  for (int i=0; i<count;i++)
    { buffer[i]=NULL;}                  // clear all index of array with command NULL
}
//串行继电器-Arduino将为
//计算机与GPRS屏蔽之间的串行链路
//在19200个基点时8-N-1
//计算机连接到硬件UART
//GPRS屏蔽连接到软件UART
#包括
软件串行GPRS(7,8);
无符号字符缓冲区[64];//用于通过串行端口接收数据的缓冲区阵列
整数计数=0;//缓冲区阵列计数器
无效设置()
{
GPRS.begin(19200);//GPRS波特率
Serial.begin(19200);//Arduino波特率的串行端口。
}
void循环()
{
if(GPRS.available())//如果数据来自软件串口==>数据来自GPRS屏蔽
{
while(GPRS.available())//将数据读入字符数组
{
buffer[count++]=GPRS.read();//将数据写入数组
如果(计数=64)中断;
}
Serial.write(buffer,count);//如果没有数据传输结束,则将缓冲区写入硬件串行端口
clearBufferArray();//调用clearBufferArray函数从数组中清除存储的数据
count=0;//将while循环的计数器设置为零
}
if(Serial.available())//如果数据在硬件上可用串行端口==>数据正在从PC或笔记本中传送
GPRS.write(Serial.read());//将其写入GPRS屏蔽
}
void clearBufferArray()//用于清除缓冲区数组的函数
{
对于(int i=0;i