Compared to Wi-Fi Shield, Arduino GSM Shield is Practical as It Opens the Door Towards Real IoT. We Need to Control Things Over Internet. You can live without Wi-Fi. The basic theory is very important to know – what is Ethernet, what is Wi-Fi, Wi-Fi vs Ethernet, GSM, GPRS, TCP etc.
Arduino GSM Shield : Why We Prefer it Over Wi-Fi Shield
Wi-Fi is for creation of Wireless LAN. There is no meaning of playing with so basic networking with limitation of range. With only one Arduino UNO board, Arduino GSM Shield is far better option despite it costs higher than Wi-Fi Shield. You can add a Static IP address like normal networking. We can control it over real internet not Wi-Fi.
Wi-Fi Shield is good for connecting between two Arduino UNO or other variations of microcontroller based boards.
---
WiFi, in very short, can not send data or receive data over few hundred KMs apart. You’ll argue that the usage of Wi-Fi Shield is different. Very much true. Biggest question possibly you have in mind :
Is Arduino 3G Shield Available?
Answer is yes for third party shield, no for official. If you can handle, 3G is obviously better as instead of GPRS, usually they have support for WCDMA, HSPA 3G. Connection speed is far higher even on Arduino. More funny information for you – ZTE MF190 model like 3G modems actually can be interfaced with Arduino. If you have some extra 3G Modems and working capability, web searching capabilities, actually you might not need Arduino GSM Shield at all.
We are not Instructables or AdaFruit. We have nothing to sell. It is possible to use 3G Modem as the popular models support flashing with OpenWrt.
But we are talking about buying Arduino GSM Shield, not building a 3G interface with ZTE USB Modem. You need not to break ZTE MF190 model, as it working model in 2015, it should remain in the market still 2018 or so. There are lower models from Huawei and ZTE, those works fine. You are not going to reach even 1 mbps speed by any means. You need an USB Host Shield 2.0 for Arduino.
More funny, you can actually do interfacing with an Android device!
You should avoid official Arduino forum to talk about USB Modem if you are newbie. Open Source and Free Software project has differences. You can ask at any third party blogs and forums who has closer guides.
You target need matters.
Arduino GSM Shield : Getting Started With DIY IoT
It does not matter whether you purchase original Arduino GSM Shield or a Clone Shield at fraction of price. Thing is practically the same. AT Commands are simple textual commands sent to the GPRS modem over its serial interface (UART), so you can use any serial terminal software to communicate with it.
Follow few steps to set up the hardware system. Insert an activated SIM card to SIM Card Holder. A 6 Pin Holder for SIM Cards. Both 1.8 volts and 3.0 volts SIM Cards are supported by SIM900, the SIM card voltage type is automatically detected. Make sure the antenna have installed properly in the antenna interface. The GPRS shield can be controlled via hardware serial port or software serial port of Arduino. Here we use the software serial port as default. Choose it by inserting jumper caps as written on product’s official description. Plug to Arduino
Stack the GPRS Shield onto Arduino. Power up Arduino by USB cable or DC Jack. The Power-on indicator LED should light up once connected.
The GPRS Shield comes with all accessories that you need to get started with sending data over the GSM network except an Arduino board and a GSM SIM Card. If you want to make voice calls, you would also require a headset with microphone. Exactly like the USB Modems.
This is the official code for getting started with GPRS connection :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | // include the GSM library #include <GSM.h> // PIN number if necessary #define PINNUMBER "" // APN information obrained from your network provider #define GPRS_APN "GPRS_APN" // replace with your GPRS APN #define GPRS_LOGIN "login" // replace with your GPRS login #define GPRS_PASSWORD "password" // replace with your GPRS password // initialize the library instances GSMClient client; GPRS gprs; GSM gsmAccess; // This example downloads the URL "http://arduino.cc/latest.txt" char server[] = "arduino.cc"; // the base URL char path[] = "/latest.txt"; // the path int port = 80; // the port, 80 for HTTP void setup() { // initialize serial communications Serial.begin(9600); Serial.println("Starting Arduino web client."); // connection state boolean notConnected = true; // Start GSM shield // pass the PIN of your SIM as a parameter of gsmAccess.begin() while(notConnected) { if((gsmAccess.begin(PINNUMBER)==GSM_READY) & (gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD)==GPRS_READY)) notConnected = false; else { Serial.println("Not connected"); delay(1000); } } Serial.println("connecting..."); // if you get a connection, report back via serial: if (client.connect(server, port)) { Serial.println("connected"); // Make a HTTP request: client.print("GET "); client.print(path); client.println(" HTTP/1.0"); client.println(); } else { // if you didn't get a connection to the server: Serial.println("connection failed"); } } void loop() { // if there are incoming bytes available // from the server, read them and print them: if (client.available()) { char c = client.read(); Serial.print(c); } // if the server's disconnected, stop the client: if (!client.available() && !client.connected()) { Serial.println(); Serial.println("disconnecting."); client.stop(); // do nothing forevermore: for(;;) ; } } |
As always we say – we expect Arduino to donate the users the shields at $5.00 for helping to learning.
Tagged With Arduino gsm connection to iot , arduino gsm iot , arduino gsm vs ethernet , https://thecustomizewindows com/2015/08/arduino-gsm-shield-getting-started-with-diy-iot/