Dogan Ibrahim
GSM/GPRS PROJECTS
and
Ahmet Ibrahim Prof Dr Dogan Ibrahim has a BSc in electronic engineering, an MSc in automatic control engineering, and a PhD in digital signal processing. Prof Ibrahim is the author of over 60 technical books and over 200 technical articles on microcontrollers, microprocessors, and related fields.
All project software is available for free download on the Elektor website.
GSM/GPRS PROJECTS
AHMET IBRAHIM
The book will enable you to control equipment remotely by sending SMS messages from your mobile phone to the microcontroller, send the ambient temperature readings from the microcontroller to a mobile phone as SMS messages, use the GPRS commands to access the internet from a microcontroller, send temperature readings to the cloud using UDP and TCP protocols and so on. It is assumed that the reader has some basic working knowledge of the C language and the use of microcontrollers in simple projects. Although not necessary, knowledge of at least one member of the PIC microcontroller family and the Arduino Uno will be an advantage.
BASED ON PIC MICROCONTROLLERS AND ARDUINO
AND
Ahmet Ibrahim obtained his BSc degree from the Greenwich University in London. He then completed an MSc course at the same university. Ahmet has worked at many industrial organizations at various levels and is currently working in a large organization in the field of IT.
This book is aimed for the people who may want to learn how to use the GSM/GPRS modems in microcontroller based projects. Two types of popular microcontroller families are considered in the book: PIC microcontrollers, and the Arduino. The highly popular mid-performance PIC18F87J50 microcontroller is used in PIC based projects together with a GSM Click board. In addition, the SIM900 GSM/GPRS shield is used with the Arduino Uno projects. Both GSM and GPRS based projects are included in the book.
GSM/GPRS PROJECTS ● DOGAN IBRAHIM
BASED ON PIC MICROCONTROLLERS AND ARDUINO
ISBN 978-1-907920-59-2
www.elektor.com
LEARN DESIGN
Elektor International Media BV
Dogan Ibrahim and Ahmet Ibrahim LEARN DESIGN SHARE
SHARE
LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIG ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SH GN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESI ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● S
Contents
Contents PREFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 CHAPTER 1 • GSM and GPRS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.2 GSM Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.3 1G, 2G, 3G, 4G and 5G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.4 Using GSM and GPRS in Microcontroller Projects . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.5 The GPRS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 CHAPTER 2 • GSM/GPRS BOARDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.1 GSM Click Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.2 Using The GSM Click Board with a PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.3 GSM Click Board GSM AT Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.3.1 Syntax of AT Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.3.2 General Purpose AT Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.3.3 Phonebook Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.3.4 Clock Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.3.5 Alert Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.3.6 Operator and Network Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.3.7 Some Useful General Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 2.3.8 Call Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 2.3.9 Sending and Receiving SMS Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.4 SIM900 GSM/GPRS Shield for Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.4.1 SIM900 Shield GSM AT Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 2.5 Using the AT Command Tester . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 2.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 CHAPTER 3 • MICROCONTROLLER DEVELOPMENT TOOLS . . . . . . . . . . . . . . . . . . . . . 63 3.1 Software Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.1.1 Text Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
●5
GSM-GPRS 170301.indd 5
03-04-17 09:04
GSM/GPRS PROJECTS
3.1.2 Assemblers and Compilers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 3.1.3 Simulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 3.1.4 Integrated Development Environment (IDE) . . . . . . . . . . . . . . . . . . . . . . . . . . 65 3.2 Hardware Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 3.2.1 Development Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 3.2.2 Device Programmers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 3.2.3 Breadboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 3.3 Example Program for the Clicker 2 for PIC18FJ Development Board . . . . . . . . . . . 72 3.4 Example Program for the Arduino Uno Development Board . . . . . . . . . . . . . . . . . 81 3.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 3.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 CHAPTER 4 • P IC MICROCONTROLLER GSM CLICK BOARD GSM PROJECTS . . . . . . . . 84 4.1 PROJECT 1 – Sending An SMS Text Message to a Mobile Phone . . . . . . . . . . . . . . 84 4.1.1 The Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 4.1.2 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.1.3 Improved Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.2 PROJECT 2 – Sending the Temperature as SMS Text Messages . . . . . . . . . . . . . . . 98 4.2.1 The Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.2.2 The Temperature Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 4.2.3 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 4.3 PROJECT 3 – SMS Controlled Relay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 4.3.1 The Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 4.3.2 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 4.3.3 Improved Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 4.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 CHAPTER 5 • A RDUINO UNO SIM900 GSM/GPRS SHIELD GSM PROJECTS . . . . . . . . 133 5.1 PROJECT 1 – Sending SMS Text Messages to a Mobile Phone . . . . . . . . . . . . . . . 133 5.1.1 The Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 5.1.2 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 5.1.3 Modified Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 5.2 PROJECT 2 – Sending the Temperature as SMS Text Messages . . . . . . . . . . . . . . 140
●6
GSM-GPRS 170301.indd 6
03-04-17 09:04
Contents
5.2.1 The Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 5.2.2 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 5.3 PROJECT 3 – SMS Controlled Relay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 5.3.1 The Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 5.3.2 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 5.3.3 Improved Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 5.4 PROJECT 4 – Controlling Room Temperature With SMS Commands . . . . . . . . . . . 159 5.4.1 The Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 5.4.2 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 5.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 CHAPTER 6 • GPRS PROJECTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 6.1 GPRS Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 6.2 Reading the Contents of a Web Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 6.3 UDP/TCP Data Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 6.4 PROJECT 1 – Sending Temperature Data to a PC Using UDP . . . . . . . . . . . . . . . . 179 6.4.1 The Hardwares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 6.4.2 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 6.5 PROJECT 2 – Sending Temperature Data to a PC Using TCP . . . . . . . . . . . . . . . . 188 6.5.1 The Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 6.5.2 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 6.6 PROJECT 3 – Storing the temperature data on the cloud . . . . . . . . . . . . . . . . . . 196 6.6.1 The Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 6.6.2 The Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 6.6.3 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 6.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
●7
GSM-GPRS 170301.indd 7
03-04-17 09:04
PREFACE
PREFACE Mobile phones are currently owned by millions of people around the world. In developed countries people from the age of 10 to over 70 own now at least one mobile phone. Although the main aim of using a mobile phone is to communicate with family members, friends and with colleagues. Many people nowadays use mobile phones to connect to the internet to send and receive mail, to surf the internet, or to connect to social media sites such as Facebook. Nowadays, mobile phones have large colourful touch screens and they are based on fast processors such as the ARM family. Most mobile phones incorporate additional hardware features such as accelerometers, compasses, light sensors, sound sensors, GPS, and so on. Mobile phones communicate with each other and with the internet using the GSM network. Although each country has its own GSM network, in general all the networks are compatible with each other and people can use their mobile phones in every country as long as the phone operating frequency is compatible with that country’s network operating frequency. Every mobile phone includes a GSM/GPRS modem which enables the phone to communicate with the external world. With the help of the GSM modems, users can establish audio conversations and send and receive SMS text messages. In addition, the GPRS modem enables users to connect to the internet and to send and receive large files such as pictures and video over the internet. This book is aimed at people who may want to learn how to use the GSM/GPRS modems in microcontroller based projects. Two types of popular microcontroller families are considered in the book: PIC microcontrollers and the Arduino. The highly popular mid-performance PIC18F87J50 microcontroller is used in PIC based projects together with a GSM Click board. In addition, the SIM900 GSM/GPRS shield is used with the Arduino Uno projects. Both GSM and GPRS based projects are included in the book. It is assumed that the reader has some basic working knowledge of the C language and the use of microcontrollers in simple projects. Although not necessary, knowledge of at least one member of the PIC microcontroller family and the Arduino Uno will be an advantage. It will also be useful if the user has some knowledge of basic electronics. We hope that you enjoy reading the book as much as we enjoyed writing it. Dogan Ibrahim Ahmet Ibrahim London, 2017
â—?9
GSM-GPRS 170301.indd 9
03-04-17 09:04
CHAPTER 1 • GSM and GPRS
CHAPTER 1 • GSM and GPRS 1.1 Introduction
Mobile phones are owned by millions of people all over the world. They are used for a variety of purposes, such as keeping in touch with family members and friends, business data and voice communications, to get in touch with the emergency services when mobile, and for accessing the internet. Some diverse usage areas of mobile phones are: • Some health authorities provide mobile phones to the elderly for emergency use • Mobile phones are used to let family members and friends in other towns know activities such as weddings, birthdays and other social gatherings. • Some people have second mobile phones which are kept secret and used in activities such as extramarital affairs or secret dealings • Most TV channels can now be accessed using mobile phones and people use their phones to watch their favourite movies when mobile • With the help of the built-in GPS modules, mobile phones are used to track people such as children or loved ones, or to perform various surveillance operations Mobile phones are based on the GSM (Global System for Mobile communications) which is an open, digital cellular technology used for transmitting mobile data and voice over the GSM network. The GSM technology was first launched in Finland in 1991. Currently, more than 690 mobile networks provide GSM services across 213 countries. According to GSM World, there are now more than 4 billion GSM mobile phone users worldwide. In China alone, over a billion people use the GSM. Similarly, in Russia over 120 million people use the GSM technology. In Europe GSM operates in the 900MHZ and 1.8GHz bands, and in the 850MHz and 1.9GHz bands in the US. Many Latin American countries, Australia and Canada also use the 850MHz band. GSM network allows individuals to access the mobile services in their own countries and abroad. With the international roaming capabilities, people travelling abroad for holiday or for business can connect and use the GSM network of the country they happen to be. Currently, terrestrial GSM networks cover over 90% of the world’s population. A list of the GSM operators in some European countries is given in Table 1.1. Country
GSM operators
United Kingdom
O2, Vodafone, EE, Three
France
Orange, SFR, Bouygues Telecom, Free Mobile
Germany
O2, Telekom, Vodafone
Italy
TIM, Vodafone, Wind, Three
Netherlands
KPN, Vodafone, T-Mobile, Tele2
Austria
A1, T-Mobile, Three
● 11
GSM-GPRS 170301.indd 11
03-04-17 09:04
GSM/GPRS PROJECTS
Finland
Sonera, Elisa, DNA, Alcom
Greece
Cosmote, Vodafone, Wind, CYTA
Hungary
Telekom, Telenor, Vodafone
Norway
Telenor, Telia, Ice.net
Spain
Movistar, Vodafone, Orange, Yoigo
Portugal
MEO, Vodafone, NOS
Table 1.1 List of GSM operators in some European countries 1.2 GSM Network Architecture
The GSM network architecture is now a mature system and it consists of four main areas: • Mobile Station (MS) • Base-station Subsystem (BSS) • Network and Switching Subsystem (NSS) • Operation and Support Subsystem (OSS) Mobile Station (MS) Mobile station consists of the mobile phones and this is part of the network that users see and operate. The hardware consists of the mobile phone including an electronic processor, display, case, battery, and a Subscriber Identity Module (SIM) card. The SIM card stores various information such as the identity of the user on the network, phone book etc. Every mobile phone has a unique number known as the International Mobile Equipment Identity (IMEI) which is part of the phone and cannot be changed. Base Station Subsystem (BSS) The BSS is responsible for communicating with the mobile phones on the network. This unit consists of the Base Transceiver Station (BTS) and the Base Station Controller (BSC). BTS consists of the radio equipment used to communicate with the mobile phones. BSC is the interface between the BTS and the remainder of the GSM network. BSC controls a number of BTSs and it allocates channels and handles the handover mechanisms within the group of BTSs. Network Switching Subsystem (NSS) The NSS contains a number of modules such as the Mobile Services Switching Centre (MSC), Home Location Register (HLR), Visitor Location Register (VLR), Equipment Identity Register (EIR), Authentication Center (AC), Gateway Mobile Switching Center (GMSC), and the SMS Gateway (SMSG). The MSC performs tasks such as authentication, registration, call location, call routing to mobile phones and to landlines and so on. Links to other networks are also handled by the MSC. The HLR contains a database of all the details about each subscriber and there is only one HLR in a network. In addition to details, the last known locations of the subscribers are
● 12
GSM-GPRS 170301.indd 12
03-04-17 09:04
GSM/GPRS PROJECTS
CHAPTER 2 • GSM/GPRS BOARDS In this chapter we shall be looking at the details of two different types of GSM/GPRS boards that can be used in microcontroller applications: One for use with PIC microcontroller based projects, and the other one for use in Arduino based projects. 2.1 GSM Click Board
GSM click is a mikroBUS compatible small board which has a GL865-QUAD GSM/GPRS module supporting GSM/GPRS 850/900/1800/1900 MHz Quad-band frequency operation. The board contains a TXB0106 6-bit bidirectional voltage-level translator as well as a SIM card socket. We shall be using the GSM Click board in all of the PIC microcontroller based projects in this book. It is worthwhile to look at the features of the GSM Click board before it is used in microcontroller based projects. Figure 2.1 and Figure 2.2 show the front and back of the GSM Click board respectively.
Figure 2.1 GSM Click board (front)
● 20
GSM-GPRS 170301.indd 20
03-04-17 09:04
CHAPTER 2 • GSM/GPRS BOARDS
Figure 2.2: GSM Click board (back) GSM Click board has the following features: • Telit GL865 Quad GSM/GPRS chip • Serial UART interface • mikroBUS socket compatible • Built-in antenna • 2.4 GHz external SMA antenna (see Figure 2.3) • 3.5mm audio jack • 850/900/1800/1900 MHz operation • 3.3V and 5V operation • SIM card socket (see Figure 2.2) • TCP/IP protocol stack • 108 dBm sensitivity (@850/900 MHz), 107 dBm (@1800/1900 MHz) • TXB0106 voltage-level translator • Python script interpreter
● 21
GSM-GPRS 170301.indd 21
03-04-17 09:04
CHAPTER 2 • GSM/GPRS BOARDS
Figure 2.17 Displaying all configuration parameters AT+GCAP: This command displays the modem capabilities as shown in Figure 2.18. The options are:
+CGSM: GSM ETSI command set +FCLASS: Fax command set +DS: Data Service common modem command set +MS: Mobile Specific command set
Figure 2.18 Displaying modem capabilities AT&V2: This command displays the last connection statistics and connection failure reason. An example display is shown in Figure 2.19.
Figure 2.19 Command AT&V2 ATQ: This command enables or disabled the result codes. The options are:
â—? 33
GSM-GPRS 170301.indd 33
03-04-17 09:04
GSM/GPRS PROJECTS
0 - enables result codes (factory default) 1 - every result code is replaced with a <CR> 2 - disables result codes
AT\Q: This command controls the serial communication flow control. The options are: 0 1 2 3
-
no flow control software bi-directional with filtering (XON/XOFF) hardware mono-directional flow control (only CTS active) hardware bi-directional flow control (both RTS/CTS active) (factory default)
Figure 2.20 shows how the current serial communication flow control can be displayed.
Figure 2.20 Displaying the serial communication flow control AT+IPR: This command is used to set (or display) the serial communications speed (baud rate) at a fixed value. The options can be displayed as in Figure 2.21. This figure also shows how the current setting can be displayed. Notice that a 0 indicates that the auto baud rate detection is enabled (as is the case in this example).
Figure 2.21 Communications speed parameters The speed can be changed by entering the required value. For example, to change the speed to 19200, enter: AT+IPR=19200<CR> AT+ICF: This command is used to set (or display) the serial communications data format (number of data bits and parity) at fixed values. The options are displayed as in Figure 2.22. This figure also shows how the current setting can be displayed. Notice that 0,0 indicates auto detection of the data format and the parity. The options are: format,parity
â&#x2014;? 34
GSM-GPRS 170301.indd 34
03-04-17 09:04
CHAPTER 3 • MICROCONTROLLER DEVELOPMENT TOOLS
CHAPTER 3 • MICROCONTROLLER DEVELOPMENT TOOLS The development of a microcontroller based system is a complex process. Development tools are hardware and software tools which help programmers to develop and test systems in a relatively short time. Most commonly used microcontroller development tools are: editors, assemblers, compilers, debuggers, simulators, emulators, and device programmers. A typical microcontroller based development cycle starts with writing the application program using a text editor. The application program is then written using this editor and is translated into the executable code by using an assembler or a compiler. The executable code consists of binary representation of the native instructions of the target microcontroller. Large programs usually consist of several modules and these modules are combined together into a single application program using a linker. At this stage of the development, any syntax errors are detected by the assembler or the compiler and they have to be corrected before the executable code can be generated. The application program is normally uploaded into the program memory of the target microcontroller system for testing. In most applications however, a simulator is used to test the application program before it is uploaded to the actual microcontroller hardware. A simulator runs on a PC and it can be very useful for testing the logic of an algorithm or the operation of a program with limited input-output support. In general, most of the algorithmic logic errors can be removed during the simulation phase. When the programmer is happy that the program seems to be working under simulation, the next stage of the development cycle is to upload the executable code to the program memory of the target microcontroller, usually using a microcontroller programmer device. The final system is then tested with the microcontroller and its associated interface devices connected to the inputs and outputs of the microcontroller. During this cycle various software and hardware tools, such as in-circuit debuggers or in-circuit emulators can be used to analyse the operation of the program in real-time and on the actual hardware. Here, the program variables and microcontroller register contents can be examined and modified, and the program can be executed in a single-step mode. Breakpoints can be set in the program to stop the execution and examine the state of the system in real-time. Development tools for microcontrollers can be analysed in two groups: software and hardware. There are many such tools available in the market and detailed discussion of all these tools is beyond the scope of this book. In this chapter only the commonly used tools will be reviewed briefly. 3.1 Software Development Tools
Software development tools are computer programs that run on personal computers, and they help the programmer (or system developer) to create, modify, or test application programs. Some of the commonly used software development tools are: • Text editors
● 63
GSM-GPRS 170301.indd 63
03-04-17 09:04
GSM/GPRS PROJECTS
â&#x20AC;˘ Assemblers/compilers â&#x20AC;˘ Simulators 3.1.1 Text Editors
User programs (also called the source code) are created using text editors. A text editor is a computer program that runs on a PC and allows the programmer to create or modify programs and text files. Notepad is a simple text editor application program distributed with the Windows operating system and it can be used to create new programs, to modify an existing program, or to display or print a program. It is important to realize that programs used for word processing, such as the Word in Windows cannot be used as a text editor. This is because word processing programs are not true text editors as they contain special formatting characters to change the look of the characters with built-in tools such as underline, bold, italic, superscript, subscript etc. Most assemblers and compilers have highly powerful built-in text editors with special dynamic programming tools to help the programmer write readable programs free of syntax errors. Using these editors we can create a program and then assemble or compile the program without having to exit from the editor. Most such editors also provide additional features, such as automatic keyword highlighting, syntax checking, parenthesis matching, comment line identification, and so on. In addition, different parts of a program can be displayed in different colours to make the program more readable and maintainable. For example, comments can be shown in one colour, keywords in another colour, reserved program words in another colour and so on. These features can speed up the program development process since all syntax errors can be eliminated at the program development stage. 3.1.2 Assemblers and Compilers
Assemblers and compilers are very important software tools used during the development of a microcontroller based system. Assemblers generate executable native code from assembly language programs. The generated code is loaded into the program memory of the target microcontroller before the overall system can be tested. Similarly, compilers generate executable native code from high level language programs. Some of the commonly used compilers for microcontrollers are: BASIC, C, and PASCAL. Assembly language is not very popular currently and it is only used in time critical applications where the microcontroller is required to respond to external events as fast as possible, and in real-time. The main disadvantage of assembly language is that it is difficult to develop complex programs using this language. Also, it is very difficult to maintain large programs written using the assembly language. High level languages on the other hand are much easier to learn and use. Most large and complex programs nowadays are developed using a high level language. Compared to the assembly language, the main advantage of using a high level language is that the high level programs can be developed much quicker, and the developed program can easily be tested and maintained. For example, the development of a floating point multiplication routine in assembly language is a difficult and very time consuming task, requiring many lines of assembly code. On the other hand, using
â&#x2014;? 64
GSM-GPRS 170301.indd 64
03-04-17 09:04
GSM/GPRS PROJECTS
Figure 3.21 Part of the assembly listing Statistics We can see the memory usage statistics by clicking view -> statistics. Figure 3.22 shows the RAM memory usage of our program.
Figure 3.22 RAM memory usage Similarly, other statistical data such as ROM memory usage, variables, functions, function tree and so on can also be viewed. For example, Figure 3.23 shows the ROM memory usage.
â&#x2014;? 80
GSM-GPRS 170301.indd 80
03-04-17 09:04
CHAPTER 3 • MICROCONTROLLER DEVELOPMENT TOOLS
Figure 3.23 ROM memory usage Others The mikroC Pro for PIC IDE provides some other useful features such as an ASCII chart, USART terminal, 7-segment editor, interrupt assistant and so on. 3.4 Example Program for the Arduino Uno Development Board
In this section we shall be writing the same program as in section 3.3 to flash an LED on the Arduino Uno development board every second. The LED on the Arduino Uno board is at output port 13. The steps are given below: • Install the Arduino Sketch if it is not already installed • Start the Arduino sketch • Type in the program shown in Figure 3.24 /******************************************************* *
Flashing LED
*
============
* * This program flashes the LED connected to output port 13 of an * Arduino Uno development board every second * * Author: Dogan Ibrahim * Date:
January 2017
******************************************************/ int LEDpin = 13; // LED at pin 13 void setup() {
● 81
GSM-GPRS 170301.indd 81
03-04-17 09:04
GSM/GPRS PROJECTS
CHAPTER 4 • PIC MICROCONTROLLER GSM CLICK BOARD GSM PROJECTS In this Chapter we shall be looking at a few projects to see how the GSM Click board can be used in a PIC microcontroller based project. The Clicker 2 for PIC18FJ microcontroller development board described in Chapter 3 is used in all the projects in this Chapter. 4.1 PROJECT 1 – Sending An SMS Text Message to a Mobile Phone
In this project we shall be sending the text message SMS from microcontroller to a mobile phone using the GSM Click board and the Clicker 2 for PIC18FJ microcontroller development board described earlier in this book. 4.1.1 The Hardware
Figure 4.1 shows the block diagram of the project. The I/O level jumper of the GSM Click board must be connected to 3.3V (Notice that when the jumper is in this position the board can operate from a single +3.3V supply. i.e. 5V supply is not required). A SIM card is inserted into the GSM Click board. Make sure that the SIM card is not password protected, otherwise remove the password before inserting into the card GSM Click board. The GSM Click board is then plugged into mikroBUS socket 2 of the Clicker 2 for PIC18FJ development board. The circuit diagram of the project is shown in Figure 4.2 The TX and RX pins of the GSM Click board are connected to the UART pins (RC6 and RC7) of the microcontroller development board. The GSM Click board can draw over 2A peak currents during its operation. The maximum current the USB power connector can supply when connected to a PC is around 500mA. It is therefore necessary to supply external power to the board. There are two options here: either a chargeable Li-ion battery can be connected to the GSM Click board as described in the user guide, or alternatively and preferably, an external power supply at +5V that can supply 2.5A current can be connected to the Vsys pin (top right hand pin) of the GSM Click board. This was the method used in this project.
Figure 4.1 Block diagram of the project
● 84
GSM-GPRS 170301.indd 84
03-04-17 09:04
CHAPTER 4 • PIC MICROCONTROLLER GSM CLICK BOARD GSM PROJECTS
Figure 4.2 Circuit diagram of the project The pin configuration of the Clicker 2 development board mikroBUS socket 2, and the GSM Click board are as follows: Clicker
2 mikroBUS socket 2 pins RA1 RG0 RD0 RB2 RD1 RC7 (RX) RC3 RC6 (TX) RC4 RD6 RC5 RD5 3.3V 5V GND GND
GSM Click mikroBUS pins PWR GP2 RST CTS RTS TX NC RX NC NC NC NC 3.3V 5V GND GND
● 85
GSM-GPRS 170301.indd 85
03-04-17 09:04
CHAPTER 4 â&#x20AC;˘ PIC MICROCONTROLLER GSM CLICK BOARD GSM PROJECTS
Delay_Ms(200); if(Modem_Response() == OK)break; }
The remainder of the program sends the required commands to the modem and checks the response returned by the modem. Modem responses are checked inside the interrupt service routine by the state machine code. /************************************************************************ SENDING AN SMS Message TO A MOBILE PHONE ======================================== This program sends the SMS text message SMS from microcontroller to a mobile phone. The hardware is based on the Clicker 2 for PIC18F87J50 development board. In addition, a GSM Click GSM/GPRS board is used. A SIM card is inserted into the SIM card holder of the GSM click board. In addition, an antenna is connected to this board. The GSM click board is plugged into the mikroBUS socket 2 of the Clicker 2 development board. The AT commands are used to send the SMS message to the GSM click board which in turn sends the message to a mobile phone This program is operated from 48MHZ clock. An 8MHz external crystal is used as the main clock, but the clock frequency is multiplied by 6 by the onboard PLL to to give the 48MHz operating frequency. An xternal +5V (@2.5A) must be connected to the Vsys input of the board since the power supplied by the USB port is not enough to power the GSM click board. This version of the program checks the modem response. UART1 interrupts are enabled such that the interrupt service routine (ISR) is executed each time a character is received from the serial port. A State machine is formed inside the interrupt service routine that checks the modem response for every command sent to the modem. In addition, the program configures the baud rate of the modem automatically so that the modem baud rate is set to be same as the development board UART baud rate.
Author: Dogan Ibrahim Date:
February, 2017
File:
Send-SMS2.C
*************************************************************************/ // // Modem responses //
â&#x2014;? 93
GSM-GPRS 170301.indd 93
03-04-17 09:04
GSM/GPRS PROJECTS
#define OK 0 #define RDY 1 // // AT commands used in the program // char AT[] = “AT”; char No_Echo[] = “ATE0”; char Mode_Text[] = “AT+CMGF=1”; char Ch_Mode[] = “AT+CSCS=\”GSM\””; char Params[] = “AT+CSMP=17,167,0,241”; char Terminator = 0x1A; char Mobile_No[] = “AT+CMGS=\”07415987053\””; char Msg[] = “SMS from microcontroller”; // // States and State variables // char State = 0; char response_rcvd = 0; char responseID = -1; char response = -1; // // This function returns the modem response // char Modem_Response() { if(response_rcvd) { response_rcvd = 0; return responseID; } else return -1; } // // This function waits for a modem response // void Wait_Modem_Response(char resp) { while(Modem_Response() != resp); } // // This function sends a command to the modem. The command must be a string i.e.
● 94
GSM-GPRS 170301.indd 94
03-04-17 09:04
CHAPTER 5 • ARDUINO UNO SIM900 GSM/GPRS SHIELD GSM PROJECTS
CHAPTER 5 • ARDUINO UNO SIM900 GSM/GPRS SHIELD GSM PROJECTS In this Chapter we shall be looking at a few projects to see how the GSM/GPRS shield can be used in Arduino based projects. The Arduino Uno development board and the GSM/GPRS shield are used in the projects in this Chapter. 5.1 PROJECT 1 – Sending SMS Text Messages to a Mobile Phone
In this project we shall be sending the text message Hello from Arduino… to a mobile phone using the SIM900 GSM/GPRS shield and the Arduino Uno microcontroller development board described earlier in this book. 5.1.1 The Hardware
Figure 5.1 shows the block diagram of the project. The SIM900 GSM/GPR shield plugged-in to the top of the Arduino Uno. Make sure that a SIM card with no password is plugged-in to the SIM card holder located at the back of the SIM900 GSM/GPRS shield. Also, the antenna must be connected to the shield. The shield operates with +5V, but it can draw peak currents in excess of 2.0A. It is therefore necessary to connect an external 5V, 2.5A power supply to the power socket of the SIM900 GSM/GPRS shield.
Figure 5.1 Block diagram of the project Figure 5.2 shows a picture of the hardware setup.
● 133
GSM-GPRS 170301.indd 133
03-04-17 09:04
GSM/GPRS PROJECTS
Figure 5.2 Hardware setup of the project The SIM900 GSM/GPRS shield can be configured to work either using software controlled serial ports or hardware controlled serial ports (e.g. UART). In the examples in this Chapter the software serial port connections are used as shown in Section 2.4. In this configuration, pin 7 and pin 8 are the serial port receive and transmit pins respectively. Some SIM900 GSM/GPRS shields are designed to work only in certain countries. One way to check whether or not your shield is compatible with your country is to plug-in the power supply to the shield and press the ON/OFF button for 2 seconds. Wait for about 30 seconds. You should see the green power light steady ON, red status light steady ON, and the blue netlight should be flashing with 64ms ON and 3 seconds OFF time. This indicates that the modem has been registered to the local GSM network. If this is not the case you may have to upgrade the firmware in the modem chip (the instructions for doing this are beyond the scope of this book and are available on the Internet). 5.1.2 The Software
The software of the project has been developed using the Arduino sketch. Figure 5.3 shows the operation of the software as a Program Description Language (PDL).
â&#x2014;? 134
GSM-GPRS 170301.indd 134
03-04-17 09:04
CHAPTER 5 â&#x20AC;˘ ARDUINO UNO SIM900 GSM/GPRS SHIELD GSM PROJECTS
Figure 5.13 Relay Click board mounted on a breadboard 5.3.2 The Software
Figure 5.14 shows the program listing (called Relay-SMS.c). In this program the modem is operated in Immediate Response mode where as soon as an SMS is received the modem responds and sends the details of the received message. At the beginning of the program the AT commands used are defined, the relay port pin is defined and OFF and ON are defined as LOW and HIGH respectively. The setup section of the program sets the baud rate to 19200, configures port pin 2 as a digital output, and deactivates the relay to start with. Inside main program loop the modem is set to noecho and the SMS mode is set to text.
â&#x2014;? 149
GSM-GPRS 170301.indd 149
03-04-17 09:04
GSM/GPRS PROJECTS
All the existing SMS messages are deleted and the modem configured with the command AT+CNMI=1,2,0,0,0 to respond automatically whenever an SMS is received. Then an endless loop is formed using the while statement. Inside this loop function Check_Response is called to check if any SMS messages have been received. If so, variable SMS_Arrived is set to 1. The program then looks for the command strings #ON and #OFF. If #ON is detected then variable Relay_State is set to 1. If on the other hand command string #OFF is detected then variable Relay_State is cleared to 0: void Check_Response(void) { char Buffer[255]; int i = 0; while(!GSM.available())
// Wait if no data is available
{ delay(100); } while(GSM.available() > 0)
// If data is available
{ Buffer[i] = GSM.read();
i++;
} Buffer[i] = 0x0;
// Terminate with NULL
if(strstr(Buffer, “#ON”) != 0)
// If #ON detected
{ SMS_Arrived = 1; // Set SMS_Arrived flag Relay_State = 1; // Set relay state to 1 } if(strstr(Buffer, “#OFF”) != 0) // If #OFF detected { SMS_Arrived = 1; // Set SMS_Arrived flag Relay_State = 0; // Clear relay state to 0 } }
If a message has been received then the main program checks variable Relay_State and activates or deactivates the relay depending on the value of Relay_State. Variable SMS_Arrived is also cleared, ready for the next time. The above operations are repeated after 2 seconds of delay. /************************************************************************* *
CONTROL A RELAY WITH SMS MESSAGES
*
=================================
● 150
GSM-GPRS 170301.indd 150
03-04-17 09:04
CHAPTER 6 • GPRS PROJECTS
CHAPTER 6 • GPRS PROJECTS So far we have seen how to use the GSM services in various microcontroller based projects. In this Chapter we will be looking at the GPRS services and develop projects using some of these services. As we have seen earlier, GPRS is a packet oriented mobile data service on the GSM. GPRS allows mobile networks to transmit and receive IP based packets to networks, such as the Internet. GPRS allows the following services to be made: • Fast SMS messaging (30 SMS per minute, compared to about 5 to 8 SMS per minute) • Multimedia messaging (MMS • Push-to-talk over the network • Internet applications through Wireless Application Protocol (WAP) • Point-to-point (P2P) services • Pont-to-multipoint (P2M) services 6.1 GPRS Connection
A GPRS connection is established by using its Access Point Name (APN), which defines the services such as WAP, SMS, MMS, WWW, e-mail, and so on. Therefore before establishing a GPRS connection, we must specify an APN (with optional username and password). GPRS services are accessed using the AT commands. Basically, the following commands are of interest in GPRS applications (In the examples in this section the SIM900 GSM/GPSR modem is connected to a PC using a USB-TTL adapter device and the HyperTerm is used to communicate with the modem, as described in Chapter 2): • AT+CGATT: This command checks whether or not GPRS is attached, and an attachment can be made if required. As shown in Figure 6.1, AT+CGATT? returns a 0 if GPRS is not attached, and a 1 if it is attached. If not attached, use the command AT+CGATT=1 to attach the GPRS
Figure 6.1 Command AT+CGATT
● 171
GSM-GPRS 170301.indd 171
03-04-17 09:04
GSM/GPRS PROJECTS
• AT+SAPBR: This command is used to set the connection type, which is GPRS. The command format is:
AT+SAPBR=3, 1, ”Contype”, ”GPRS”
• Set up the APN. This depends on your service provider and the country you are in. In this example, a Vodafone SIM card is used (see Figure 6.2): AT+SAPBR=3, 1, “APN”, “pp.vodafone.co.uk” • Enable the GPRS (see Figure 6.2) AT+SAPBR=1,1
Figure 6.2 Specify the connection to GPRS and APN • Check if we get an IP address using command AT+SAPBR=2,1, and if so everything is successful so far (see Figure 6.3)
Figure 6.3 Check the IP address 6.2 Reading the Contents of a Web Page
Now that we have valid IP address, we can read the contents of a web page. In this example, we shall be reading the contents of the following page found on the internet: http:// chortle.ccsu.edu/java5/Notes/appendixA/htmlPart1_4.htm l” . The steps are: • Enable HTTP mode by: AT+HTTPINIT • Set the URL of the page to be read: AT+HTTPPARA=”URL”,”http://chortle.ccsu.edu/java5/Notes/ appendixA/htmlPart1_4.html”
● 172
GSM-GPRS 170301.indd 172
03-04-17 09:04
INDEX
INDEX A Accelerometer, 67 Alert sound, 37 APN, 18 Assembler, 64 ATA, 43 AT command, 28 AT command tester, 58 ATD, 42 ATE0, 31 ATE1, 31 Atmega328, 70 ATH, 43 ATQ, 33
C MGW, 48 GMR, 57 CMUT, 39 COPS, 39 CPBF, 36 CPBR, 35 CPBW, 36 CPIN, 29, 43 CRSL, 38 CSCA, 45 CSMP, 46 GSN, 57 CSQ, 40
B Base station subsystem, Bits per second, Breadboard,
D Device programmer, DS1820,
70 67
E EasyPIC V7, External antenna,
66 22
F FCLASS, Flow control,
42 27
12 27 71
C Call control, 42 CALM, 29, 37 CCLK, 37 CGATT, 171 CGMI, 31 CGMM, 29, 31 CGMR, 31 CGSN, 31 CIFSR, 177 CIMI, 32 CIPMUX, 177 CIPSEND, 178 CIPSHUT, 177 CIPSTATUS, 177 Class A, 18 Class B, 18 Class C, 18 Clock management, 37 Cloud, 196 CLVL, 38 CMGF, 45 CMGS, 46 GMI, 57
G GCAP, 33 GK865, 20 GPRS, 18 GPRS connection, 171 GPRS shield, 52 GSM click board, 20 H HTTPACTION, HTTPPARA, HTTPREAD, HTTPTERM, Hyperterm, I ICF,
173 201 173 173 26, 55
34
● 207
GSM-GPRS 170301.indd 207
03-04-17 09:04
GSM/GPRS PROJECTS
IDE, IP address, IPR, ISO 7816,
65 175 34 22
L LM35, 67 M Message encoding, MikroBUS, Mobile station, N Network and switching subsystem, Notification response, O Operation and support subsystem,
51 21, 24 12
12 113
SLED, 41 Statistics, 80 Stop bits, 27 T TCP, Telit, Text editor, Text mode, TMP36,
174, 188 21 63 45 99
U UDP, Uploading, USB-TTL,
174, 179 77 26
W Web page,
172
12
P Parity, 27 PDU mode, 49 Phonebook access, 35 PIC18F87J50, 67 Piezo buzzer, 67 Polled response, 113 Port forwarding, 180 Private key, 197 Public key, 197 R Receiving SMS, 43, 112 Relay, 109 Relay click board, 110 Router, 176 RS232, 67 S SAPBR, Sending SMS, Sending the temperature, SIM card, SIM 900, SIMCOM, Simulator,
172 43, 84 98 22 53 54 64, 78
â&#x2014;? 208
GSM-GPRS 170301.indd 208
03-04-17 09:04
Dogan Ibrahim
GSM/GPRS PROJECTS
and
Ahmet Ibrahim Prof Dr Dogan Ibrahim has a BSc in electronic engineering, an MSc in automatic control engineering, and a PhD in digital signal processing. Prof Ibrahim is the author of over 60 technical books and over 200 technical articles on microcontrollers, microprocessors, and related fields.
All project software is available for free download on the Elektor website.
GSM/GPRS PROJECTS
AHMET IBRAHIM
The book will enable you to control equipment remotely by sending SMS messages from your mobile phone to the microcontroller, send the ambient temperature readings from the microcontroller to a mobile phone as SMS messages, use the GPRS commands to access the internet from a microcontroller, send temperature readings to the cloud using UDP and TCP protocols and so on. It is assumed that the reader has some basic working knowledge of the C language and the use of microcontrollers in simple projects. Although not necessary, knowledge of at least one member of the PIC microcontroller family and the Arduino Uno will be an advantage.
BASED ON PIC MICROCONTROLLERS AND ARDUINO
AND
Ahmet Ibrahim obtained his BSc degree from the Greenwich University in London. He then completed an MSc course at the same university. Ahmet has worked at many industrial organizations at various levels and is currently working in a large organization in the field of IT.
This book is aimed for the people who may want to learn how to use the GSM/GPRS modems in microcontroller based projects. Two types of popular microcontroller families are considered in the book: PIC microcontrollers, and the Arduino. The highly popular mid-performance PIC18F87J50 microcontroller is used in PIC based projects together with a GSM Click board. In addition, the SIM900 GSM/GPRS shield is used with the Arduino Uno projects. Both GSM and GPRS based projects are included in the book.
GSM/GPRS PROJECTS ● DOGAN IBRAHIM
BASED ON PIC MICROCONTROLLERS AND ARDUINO
ISBN 978-1-907920-59-2
www.elektor.com
LEARN DESIGN
Elektor International Media BV
Dogan Ibrahim and Ahmet Ibrahim LEARN DESIGN SHARE
SHARE
LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIG ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SH GN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESI ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● S