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. ASP.NET MVC性能优化工具 MiniProfiler

    ASP.NET MVC性能优化工具 MiniProfiler 2014年04月19日 ⁄ ASP.NET ⁄ 共 1159字 ⁄ 字号 小 中 大 ⁄ 暂无评论 ⁄ 阅读 325 views 次 MV ...

  2. json.net 比jsonIgnore 更好的方法 修改源码

    关于 JsonIgnore  问题, EF T4 模板 中 存在主外键关系 namespace WindowsFormsApplication1{    using System;    using ...

  3. 详解linux vi命令用法

    vi是所有UNIX系统都会提供的屏幕编辑器,它提供了一个视窗设备,通过它可以编辑文件.当然,对UNIX系统略有所知的人,或多或少都觉得vi超级难用,但vi是最基本的编辑器,所以希望读者能好好把它学起来 ...

  4. MVC 分页1 标准的url分页

    一. 将mvcpager ddl 引用到web服务项目中. 二. 在view加入 <%@ Import Namespace="Webdiyer.WebControls.Mvc" ...

  5. POJ 2560 Freckles Prime问题解决算法

    这个问题正在寻求最小生成树. 给定节点的坐标,那么我们需要根据各个点之间的这些坐标来计算距离. 除了这是标准的Prime算法的,能源利用Prime基本上,你可以使用Kruskal. 经典的算法必须填写 ...

  6. LeetCode之Max Points on a Line Total

    1.问题描述 Given n points on a 2D plane, find the maximum number of points that lie on the same straight ...

  7. Get Resultset from Oracle Stored procedure

    http://stackoverflow.com/questions/1170548/get-resultset-from-oracle-stored-procedure

  8. jquery 触屏滑动+定时滚动

    <!doctype html> <html> <head> <meta charset="utf-8"> <meta name ...

  9. redmine的邮件配置

    redmine的邮件配置 2012-01-04 18:09:21|  分类: 默认分类|举报|字号 订阅     redmine里要用到邮件通知,本来以为很是简单,网上也有许多教程,谁知忙活了一下午, ...

  10. 阿里云WinServer2008下配置IIS7支持php

    先送一只法克鱿给百度,百度了n多的方法都或多或少有问题. 0.php安装包 php-5.2.1-Win32.zip 下载地址 http://pan.baidu.com/s/1pJuc8YZ 最开始是p ...