On the 3G shield, by default the power pin is on D8 and reset pin is on D9. Make it HIGH then it works.

if you want to play this 3G shield using SoftwareSerial on Arduino,

Try this code:

/*

Change UART control ports from Tx0 / Rx1 to Tx2 / Rx3  using SoftwareSerial
And reserve Tx0 / Rx1 for debugging */ #include <SoftwareSerial.h> #define rxPin 6
#define txPin 7 #define power_pin 8
#define reset_pin 9 SoftwareSerial mySerial(rxPin, txPin); // RX, TX char AtCommand[] = "ATI\r";
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin();
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT); // power on 3G module automatically
pinMode(power_pin, OUTPUT);
digitalWrite(power_pin, HIGH); delay(); Serial.println(AtCommand); // set the data rate for the SoftwareSerial port
mySerial.begin();
mySerial.println(AtCommand);
//mySerial.write(AtCommand);
} void loop() // run over and over
{
if (mySerial.available())
{
Serial.write(mySerial.read());
}
if (Serial.available())
{
mySerial.write(Serial.read());
}
}

if you play with this 3G shield, and you want to enable power at the setup, and change the baud rate from 115200 to 9600 on your arduino when communicating with chip SIM5126E.

Try this code:

/*

Change UART control ports from Tx0 / Rx1 to Tx2 / Rx3  using SoftwareSerial
And reserve Tx0 / Rx1 for debugging */
#include <SoftwareSerial.h> #define rxPin 6
#define txPin 7
#define baudrate 9600 #define power_pin 8
#define reset_pin 9 SoftwareSerial mySerial(rxPin, txPin); // RX, TX char AtCommand[] = "ATI\r";
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(baudrate);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT); Serial.println(AtCommand); // set the data rate for the SoftwareSerial port
Serial.println("wait 5s for modem to wake up"); // power on 3G module automatically
pinMode(power_pin, OUTPUT);
digitalWrite(power_pin, HIGH); delay();
mySerial.begin();
mySerial.println("AT+IPR=9600\r\n"); // chnage baudrate to 9600 baud Serial.println("Changing baudrate");
mySerial.begin(baudrate);
mySerial.println(AtCommand);
} void loop() // run over and over
{
if (mySerial.available())
{
Serial.write(mySerial.read());
}
if (Serial.available())
{
mySerial.write(Serial.read());
}
}

Arduino 3G shield using SoftwareSerial to control的更多相关文章

  1. Arduino 3g shield using GSM bought from ITead

    This is an old arduino 3G module bought half years ago. Its wiki: http://wiki.iteadstudio.com/ITEAD_ ...

  2. Arduino UNO开发板、Arduino CNC Shield V3.0扩展板、A4988驱动板、grbl固件使用教程

    前言 CNC Shield V3.0可用作雕刻机,3D打印机等的驱动扩展板,板上一共有4路步进电机驱动模块的插槽,可驱动4路不进电机,而每一路步进电机都只需要2个IO口,也就是说,6个IO口就可以很好 ...

  3. Welcome to LED Control Wiki

    About this project This project was developed after I had to find out that controlling my RGB ambien ...

  4. 一百元的智能家居——Asp.Net Mvc Api+讯飞语音+Android+Arduino

    大半夜的,先说些废话提提神 如今智能家居已经不再停留在概念阶段,高大上的科技公司都已经推出了自己的部分或全套的智能家居解决方案,不过就目前的现状而言,大多还停留在展厅阶段,还没有广泛的推广起来,有人说 ...

  5. Arduino 学习

    Arduino 背景可以参考官方网站www.arduino.cc 先看一个最简单的示例程序: 打开 Arduino IDE , 选择菜单:文件 -> 示例 -> 01.Basics -&g ...

  6. Arduino Nano + WIZ550io = 简易上网

    我爱Arduino Nano – 这是一个非常好外形小巧却功能齐全的Arduino Uno.然而.当我去将它连接到互联网,全部的干净利落小巧也消失在大尺寸的以太网盾底下了. 只是,我近期发现了一个更好 ...

  7. 用Arduino做一个可视化网络威胁级别指示器!

    在当今世界,网络监控器是非常重要的.互联网是个可怕的地方.人们已经采取措施以提高警戒----他们安装了入侵检测系统(IDS)比如SNORT. 通过把可视化部分从电脑中移出来,我们想让它更容易去观察.一 ...

  8. Arduino 网络时钟client

    升级! 添加了12h/24h 的开关,还有标准/ 夏令时开关!见步骤7 & 步骤8. 你是否曾想要一个和办公室时间来源全然准确的表? 这就有一个网络的办公时间server,你能够根据它并同步你 ...

  9. 为什么Arduino独占鳌头并站稳脚跟?

    出处: http://bbs.dfrobot.com.cn/thread-793-1-1.html 为什么Arduino独占鳌头并站稳脚跟? 每个月,我都会在<Make>杂志上发表几篇社论 ...

随机推荐

  1. 小记NodeJS两项小技巧(与HTTP相关)

    1,兼容HTTP1.1和HTTP1.0 区别在content-length,1.0接受定长,不接受变长,导致transfer-encodeing的chunked模式无法识别,最终导致无法识别BODY. ...

  2. (c#2.0)serialPort串口通讯

    原文:(c#2.0)serialPort串口通讯 using System; using System.Collections.Generic; using System.ComponentModel ...

  3. ios基金会-XCode温馨提示

    (一个)代号规格pragma mark 1.定义 #pragma 开头的代码是一条编译器指令,是一个特定于程序或编译器的指令. 不一定适用于其他编译器或其他环境.假设编译器不能识别该指令.则会将其忽略 ...

  4. C++ - 模板类模板成员函数(member function template)隐式处理(implicit)变化

    模板类模板成员函数(member function template)隐式处理(implicit)变化 本文地址: http://blog.csdn.net/caroline_wendy/articl ...

  5. 分享UI设计模型

    UI设计模型是可重用的界面设计解决方案,可以让开发人员少走弯路,节约不少开发时间.下面慧都小编跟大家分享6个很有用的UI设计模型资源,希望对你有用: 1.UI Patterns 由一个丹麦人开发的UI ...

  6. WebIM(1)

    WebIM系列文章 之前笔者发布的云翔在线软件平台中已经包含了一个功能相对比较齐全的WebIM,这个系列的文章就是介绍如何开发出功能类似的WebIM,在文章开始前,先介绍一下相关的技术: 1.Come ...

  7. 大约ActionContext.getContext()使用体验

    这是我在另一个人的博客看了,原来博客的时间长一点.我把它简化了一下,运营商,以方便它看起来. 为了避免与Servlet API耦合在一起,方便Action类做单元測试,Struts 2对HttpSer ...

  8. openGL剪裁区

    /** * 缓冲区工具类 */public class BufferUtil { /**  * 将浮点数组转换成字节缓冲区  */ public static ByteBuffer arr2ByteB ...

  9. java 权限 部分截图

    下载地址:http://download.csdn.net/detail/heyehuang/5857263

  10. Visual Studio 2013发布Cloud Service至Azure China

    Visual Studio 2013发布Cloud Service至Azure China <Windows Azure Platform 系列文章目录> 之前有很多网友询问我如何通过VS ...