Hardware Reference
In-Depth Information
Arduino and GSM
There are multiple ways to connect to devices wirelessly and exchange informa-
tion: Wi-Fi, Bluetooth, and Zigbee to name but a few. Most of these technologies
require the user to create an infrastructure, but there is no wireless infrastruc-
ture as extensive and as widely used as the mobile telephone network. Also,
Arduinos are small, lightweight, and mobile, making them perfect for mobile
network use. A GPS tracker on a car is only useful if it can send information
through an existing network, and is useless if it leaves your Wi-Fi zone (which
probably happens a lot for a car). However, there is a good chance that your car
will go through at least several mobile network cells during its trip, allowing
it to send data at will.
Several shields exist to achieve this. Arduino produces its GSM shield, one
that comes bundled with a SIM card from Movilforum Telefonica. The GSM
shield is unlocked, meaning that it can be used with any mobile operator, but
Movilforum Telefonica's service is international, and it has a large partner net-
work, allowing for GSM communication just about anywhere.
GSM shields connect to GSM networks but will not work on 3 G and 4 G net-
works. Although on a 2 G network, the shield enables you to make and receive
telephone calls, send and receive SMS messages, and enables data connectivity.
NOTE Data connectivity means that you can access the entire Internet, but most
mobile operators have their own internal network, meaning that your telephone is
not directly visible from the Internet. This adds a level of security to your applications
but makes it di cult to “listen” for incoming connections. A GSM device should always
initiate a connection and wait for a response.
GSM devices are often power-hungry and usually require an external power
supply. USB ports that supply 500 mA cannot keep a GSM shield powered under
heavy load; these devices often require a power supply between 700 and 1,000 mA.
To use a GSM shield, Arduino has developed a library to create connections,
send and receive data, and even manage the SIM card.
Arduino GSM Library
The Arduino GSM library is available in Arduino 1.0.4 and later. The GSM library
is a complex library with multiple header i les. It can be imported automatically
in the Arduino IDE by going to the menu Sketch
Import Library
GSM, but
doing this adds a large number of i les:
#include <GSM3MobileMockupProvider.h>
#include <GSM3ShieldV1BaseProvider.h>
 
Search WWH ::




Custom Search