Libelium SIM5215 Manual de usuario

Waspmote 4G
Networking Guide

-2-
v7.3
Index
Document version: v7.3 - 10/2018
© Libelium Comunicaciones Distribuidas S.L.
INDEX
1. Introduction .......................................................................................................................... 4
2. 3G (SIM5215) vs 4G (LE910) ................................................................................................... 5
3. Hardware ...............................................................................................................................6
3.1. Specications..................................................................................................................................... 6
3.2. Versions.............................................................................................................................................. 6
3.3. How to connect the module ............................................................................................................ 7
3.4. Antennas ............................................................................................................................................ 9
3.5. Power consumption........................................................................................................................ 10
3.6. Time consumption.......................................................................................................................... 10
4. Software...............................................................................................................................11
4.1. Waspmote library............................................................................................................................ 11
4.1.1. Waspmote 4G library ..........................................................................................................11
4.1.2. Class constructor.................................................................................................................11
4.1.3. API constants .......................................................................................................................11
4.1.4. API variables.........................................................................................................................12
4.1.5. API functions........................................................................................................................13
4.1.6. Error codes...........................................................................................................................13
4.2. Switching on .................................................................................................................................... 16
4.3. Switching o .................................................................................................................................... 16
4.4. SIM card............................................................................................................................................ 16
4.4.1. Entering PIN .........................................................................................................................16
4.4.2. Getting IMEI, IMSI and ICCID..............................................................................................17
4.5. Checking network connection status ........................................................................................... 18
4.6. Setting operator parameters......................................................................................................... 19
4.7. SMS ................................................................................................................................................... 19
4.7.1. Setting SMS conguration..................................................................................................19
4.7.2. Sending SMSs.......................................................................................................................20
4.7.3. Reading SMSs.......................................................................................................................20
4.7.4. Deleting SMSs ......................................................................................................................21
4.8. HTTP client ....................................................................................................................................... 22
4.8.1. HTTP connections................................................................................................................22
4.8.2. HTTP request methods.......................................................................................................23
4.8.3. Sending Waspmote frames to Meshlium via HTTP.........................................................25
4.8.4. Sending Waspmote frames to Meshlium via HTTPS.......................................................27
4.9. FTP client.......................................................................................................................................... 28

-3-
v7.3
4.9.1. Opening an FTP session .....................................................................................................28
4.9.2. FTP upload............................................................................................................................29
4.9.3. FTP download ......................................................................................................................30
4.9.4. FTP delete le.......................................................................................................................31
4.9.5. FTP working directory .........................................................................................................31
4.9.6. Closing an FTP session........................................................................................................31
4.10. TCP/UDP connections................................................................................................................... 32
4.10.1. Socket identiers...............................................................................................................32
4.10.2. Socket information structure...........................................................................................32
4.10.3. Socket status structure.....................................................................................................33
4.10.4. Creating a TCP/UDP client socket....................................................................................34
4.10.5. Creating a TCP/UDP server socket ..................................................................................35
4.10.6. Sending data......................................................................................................................36
4.10.7. Receiving data ...................................................................................................................37
4.10.8. Closing a socket.................................................................................................................38
4.10.9. SSL sockets.........................................................................................................................38
4.11. GPS ................................................................................................................................................. 41
4.11.1. Standalone or Autonomous GPS (S-GPS).......................................................................42
4.11.2. Assisted GPS (A-GPS).........................................................................................................42
4.11.3. Get GPS position ...............................................................................................................42
4.11.4. Indoor tracking using 4G and A-GPS mode (geolocation)............................................44
4.12. e-mail management functions .................................................................................................... 47
4.12.1. Reseting e-mail parameters.............................................................................................47
4.12.2. Setting the SMTP server ...................................................................................................47
4.12.3. Conguring SMTP parameters ........................................................................................47
4.12.4. Setting the sender parameters: address, username and password ..........................48
4.12.5. Saving e-mail parameters ................................................................................................48
4.12.6. Sending an e-mail..............................................................................................................48
5. Certications .......................................................................................................................50
6. Code examples and extended information .....................................................................51
7. API changelog ...................................................................................................................... 52
8. Documentation changelog ................................................................................................ 53
Index

-4-
v7.3
Introduction
1. Introduction
This guide explains the features and use of the new 4G module. This module was specically integrated for our
new product lines Waspmote v15, Plug & Sense! v15 and Meshlium v4.0, released on October 2016. The 4G module
is not compatible Waspmote v12, Plug & Sense! v12 or Meshlium 3.x.
If you are using previous versions of our products, please use the corresponding guides, available on our
Development website.
You can get more information about the generation change on the document “New generation of Libelium product
lines”. The 4G module has been integrated into the devices Waspmote OEM, Plug & Sense! and Meshlium.
The new 4G module enables the connectivity to high speed LTE, HSPA+, WCDMA cellular networks in order to
make possible the creation of the next level of worldwide compatible projects inside the new “Internet of Things”
era.
The new communication module is specially oriented to work with Internet servers, implementing internally
several application layer protocols, which make easier to send the information to the cloud. We can make HTTP
navigation, downloading and uploading content to a web server. We can also set secure connections using SSL
certicates and setting TCP/IP private sockets. In the same way, the FTP protocol is also available which is really
useful when your application requires handling les.
The module includes a GPS/GLONASS receiver, able to perform geolocation services using NMEA sentences,
oering information such as latitude, longitude, altitude and speed; that makes it perfect to perform tracking
applications.
The new 4G module oers the maximum performance of the 4G network as it uses 2 dierent antennas (normal
+ diversity) for reception (MIMO DL 2x2), choosing the best received signal at any time and getting a maximum
download speed of 100 Mbps.
We chose the LE910 chipset family from Telit as it comprises the most complete 4G/LTE set of variants released
up to date. It counts with many dierent models, each one specically designed for one market but all of them
with the same footprint:
•LE910-EUG (Europe / Brazil): CE, GCF, ANATEL
•LE910-NAG (US / Canada): FCC, IC, PTCRB, AT&T approved
•LE910-AU V2 (Australia): RCM, Telstra approved
Important note: The current stock of the LE910 4G radio that the manufacturer ‘Telit’ is distributing comprises
the v2 version which does not have GPS. The models are:
•LE910-EU V2 for Europe or Brazil
•LE910-NA V2 for US or Canada
These v2 radios are similar to the v1 ones, but support more bands and do not have a GPS receiver.
Important:
•All documents and any examples they contain are provided as-is and are subject to change without notice.
Except to the extent prohibited by law, Libelium makes no express or implied representation or warranty of
any kind with regard to the documents, and specically disclaims the implied warranties and conditions of
merchantability and tness for a particular purpose.
•The information on Libelium’s websites has been included in good faith for general informational purposes
only. It should not be relied upon for any specic purpose and no representation or warranty is given as to its
accuracy or completeness.

-5-
v7.3
3G (SIM5215) vs 4G (LE910)
2. 3G (SIM5215) vs 4G (LE910)
The new 4G module (specic for the new lines Waspmote v15, Plug & Sense! v15 and Meshlium 4.0) introduces
some changes with respect to the 3G module (available for the old lines Waspmote v12, Plug & Sense! v12,
Meshlium 3.5 and the new Waspmote v15):
•The new 4G counts with many dierent models, one specically designed for each market:
-LE910-EU (Europe / Brazil): CE, GCF, ANATEL
-LE910-NAG (US / Canada): FCC, IC, PTCRB, AT&T approved
-LE910-AU V2 (Australia): RCM, Telstra approved
•The GPS module also makes it possible to perform geo-location services using NMEA sentences, oering
information such as latitude, longitude, altitude and speed, what makes it perfect for tracking applications.
•The new 4G module oers the maximum performance of the 4G network as it uses 2 dierent antennas
(normal + diversity) for reception (MIMO DL 2x2), choosing the best received signal at any time and getting a
maximum download speed of 100 Mbps.
Features comparison:
Features [v12] 3G module (SIM5215) [v15] 4G module (LE910)
Chipset manufacturer SIMCom Telit
Cellular protocols 3G / GPRS / GSM 4G / 3G / GPRS / GSM
Certications CE, GCF, FCC, IC, PTCRB CE, GCF, ANATEL, FCC, IC, PTCRB, AT&T
Compliant, KCC, RCM, NTT DoCoMo, KDDi
GPS No Yes
Camera option Yes No
SD card Yes No
USB connectivity Yes Yes
Download max speed 384 kbps 100 Mbps
Upload max speed 384 kbps 50 Mbps
Antenna diversity No Yes
Cellular carriers (mobile
network operator) Any Any + Specially tested with AT&T, SK Telecom,
Telstra, NTT DoCoMo or KDDi
FTP Yes Yes
FTPS (Secure) Yes No
HTTP Yes Yes
HTTPS (Secure) Yes No
TCP/UDP sockets Yes Yes
SSL sockets No Yes
Mails Yes Yes
4G compatibility:
Item Compatible Notes
Waspmote 12 Yes New Waspmote API needed (v025 or newer)
Waspmote 15 Yes New Waspmote API needed (v025 or newer)
Old 3G codes No The new 4G module provides new improved
examples and libraries

-6-
v7.3
Hardware
3. Hardware
3.1. Specications
The 4G module is based on the LE910 chipset, manufactured by Telit.
The module is managed by UART and it must be connected to socket
1 (direct connection, without Expansion Board). The main features of
the module are listed below:
•Output power:
-Class 4 (2 W, 33 dBm) @ GSM 850 / 900
-Class 1 (1 W, 30 dBm) @ GSM 1800 / 1900
-Class E2 (0.5 W, 27 dBm) @ EDGE 850 / 900
-Class E2 (0.4 W, 26 dBm) @ EDGE 1800 /1900
-Class 3 (0.25 W, 24 dBm) @ UMTS
-Class 3 (0.2 W, 23 dBm) @ LTE
•Data transmission:
-LTE:
»Uplink up to 50 Mbps
»Downlink up to 100 Mbps
-HSPA+:
»Uplink up to 5.76 Mbps
»Downlink up to 42.0 Mbps
-UMTS:
»Uplink/Downlink up to 384 kbps
•Protocols:
-TCP/UDP
-HTTP
-FTP
•GPS receiver (in certain versions)
3.2. Versions
Telit has dierent versions of the LE910 chipset. Each one of them was especially designed to comply with the
RF and cellular regulations in dierent countries or regions of the world. Libelium has integrated the following
versions:
Features LE910 EUG LE910 NAG LE910 AU V2
Region Europe and Brazil USA and Canada
(Americas) Australia
Supported 4G bands B20 (800), B3 (1800), B7
(2600)
B17 (700), B5 (850), B4
(1700), B2 (1900)
B3 (1800), B7 (2600), B28
(700)
3G fall-back Yes Yes No
Supported 3G bands B5 (850), B8 (900), B1
(2100) B5 (850), B2 (1900) None
2G fall-back Yes Yes No
Supported 2G bands GSM 900, DCS 1800 GSM 850, PCS 1900 None
GPS/GLONASS Yes Yes No
Certications CE (R&TTE), GCF FCC, IC, PTCRB, AT&T RCM, Telstra
Figure : 4G module

-7-
v7.3
Hardware
Important note: The current stock of the LE910 4G radio that the manufacturer ‘Telit’ is distributing comprises
the v2 version which does not have GPS. The models are:
•LE910-EU V2 for Europe or Brazil
•LE910-NA V2 for US or Canada
These v2 radios are similar to the v1 ones, but support more bands and do not have a GPS receiver.
Features LE910 EU V2 LE910 NA V2
Region Europe USA and Canada (Americas)
Supported 4G bands B20 (800), B8 (900), B3 (1800), B1
(2100), B7 (2600)
B12 (700), B13 (700), B5 (850), B4
(1700), B2 (1900)
3G fall-back Yes Yes
Supported 3G bands B8 (900), B1 (2100) B5 (850), B2 (1900)
2G fall-back Yes No
Supported 2G bands 900 / 1800 None
GPS/GLONASS No No
3.3. How to connect the module
This module must be connected to the SOCKET1 on the Waspmote board. Like any other cellular radio, the
connection is native so the radio does not need the Expansion Radio Board.
Figure : Module connected to Waspmote in SOCKET1

-8-
v7.3
Hardware
The SIM card used in the 4G module OEM version is a “standard SIM”, also known as “mini SIM”. The next picture
shows how the SIM card must be plugged in the 4G module.
Figure : SIM card installation in OEM version
On the other hand, Plug and Sense! models with 4G radio provide a special connector in order to plug both micro
USB wire and nano SIM card for the 4G module.
Figure : SIM card installation in Plug and Sense! version
Figure : Push-push mechanism in the External SIM/USB socket

-9-
v7.3
Hardware
3.4. Antennas
The 4G module comes with 2 cellular antennas for improving the signal reception: normal (main) antenna and
diversity antenna. Besides, a 3rd antenna is also included for the GPS receiver (when it is available in the 4G
module).
All these 3 antennas are the same model and can be used in any of the 4G sockets. The operating bands of
the dipole antenna go from 698 to 960 MHz and from 1710 to 2690 MHz. The maximum gain of the antenna is
observed at 2.6 GHz: 3.4 dBi.
To get the maximum performance, it is recommended to place the antennas like that:
•The main cellular antenna should be in vertical position, pointing to the sky, in order to radiate better to the
cellular base stations around.
•The diversity cellular antenna should be in horizontal position (orthogonal, 90º, to the main antenna). Besides,
the plane where the antenna is should be also orthogonal to the main antenna’s plain. Finally, it is advised to
place this 2nd cellular antenna as fas as possible from the main antenna. These 3 measures will maximize the
gain due to reception diversity.
•The GPS antenna should be in horizontal position, because the GPS satellite signal will come from above.
Figure : 4G module antennas

-10-
v7.3
Hardware
3.5. Power consumption
The 4G module is directly powered by the battery. The next table shows the Waspmote’s peak current consumption
in dierent states of the 4G module.
State Mean power
consumption
On 100 mA
Transmitting data 400 mA
Receiving data 400 mA
Non-rechargeable batteries are not advised for the 4G module, because the high peaks of current consumption
could make the voltage of these batteries to go below 3.3 V so Waspmote would reset. The rechargeable battery
will not suer this eect as long as its level is above 20%.
3.6. Time consumption
The following table describes the mean elapsed time for some actions in a single test for several attempts:
Action Mean elapsed time
Power on ~11 s
Start data connection ~4 s
Perform HTTP GET or POST ~0.7 s
Open FTP session ~3 s
Perform FTP upload 10 kB le ~7 s
Perform FTP download 10 kB
le ~6 s
Some of these actions approximately have a xed elapsed time like powering on the module. However, the actions
related to data transmission (HTTP, FTP, etc.) are dependent on external circumstances (MNO, coverage quality,
etc) and show more variability from the mean value.
Este manual sirve para los siguientes modelos
2
Tabla de contenidos
Otros manuales de Unidad de control de Libelium
Manuales populares de Unidad de control de otras marcas

Festo
Festo Compact Performance CP-FB6-E Manual de lista de piezas

Elo TouchSystems
Elo TouchSystems DMS-SA19P-EXTME Manual de usuario

JS Automation
JS Automation MPC3034A Manual de usuario

JAUDT
JAUDT SW GII 6406 Series Guía rápida

Spektrum
Spektrum Air Module System Manual de usuario

BOC Edwards
BOC Edwards Q Series Manual de usuario

















