background image

-18-

v6.3

Waspmote Plug & Sense! - Encapsulated Line

2.1.6. Program in minutes

In order to program the nodes an intuitive graphic interface has been developed. Developers just need to fill a web form in 

order to obtain the complete source code for the sensor nodes. This means the complete program for an specific application 

can be generated just in minutes. Check the Code Generator to see how easy it is at: 

http://www.libelium.com/development/plug_&_sense/sdk_and_applications/code_generator

Figure: Code Generator

2.1.7. Data to the Cloud

The Sensor data gathered by the Waspmote Plug & Sense! nodes is sent to the Cloud by  

Meshlium

, the Gateway router specially 

designed to connect Waspmote sensor networks to the Internet via Ethernet, WiFi and 3G interfaces.

Thanks to Meshlium’s new feature, the Sensor Parser, now it is easier to receive any frame, parse it and store the data into a local 

or external Data Base.

Figure: Meshlium

Summary of Contents for Waspmote

Page 1: ...Waspmote Technical Guide ...

Page 2: ...s 17 2 1 6 Program in minutes 18 2 1 7 Data to the Cloud 18 2 1 8 Models 19 2 1 8 1 Smart Environment 20 2 1 8 2 Smart Environment PRO 22 2 1 8 3 Smart Security 24 2 1 8 4 Smart Water 26 2 1 8 5 Smart Water Ions 28 2 1 8 6 Smart Cities 32 2 1 8 7 Smart Parking 34 2 1 8 8 Smart Agriculture 35 2 1 8 9 Ambient Control 37 2 1 8 10 Radiation Control 39 3 Hardware 40 3 1 Modular Architecture 40 3 2 Spec...

Page 3: ...de 54 7 Sensors 56 7 1 Sensors in Waspmote 56 7 1 1 Temperature 56 7 1 2 Accelerometer 57 7 2 Integration of new sensors 61 7 3 Sensor Boards 62 7 4 Power 66 8 802 15 4 ZigBee 67 8 1 XBee 802 15 4 67 8 2 XBee ZigBee 70 8 3 XBee 868 72 8 4 XBee 900 74 8 5 XBee DigiMesh 75 9 LoRaWAN 77 10 LoRa 78 10 1 RSSI 80 11 Sigfox 81 12 WiFi 82 12 1 WiFi Topologies 82 12 1 1 Access Point 82 12 1 2 When is recom...

Page 4: ...6 Operating with the modules 103 20 Expansion Radio Board 105 21 Over the Air Programming OTA 106 21 1 Overview 106 21 2 Benefits 106 21 3 Concepts 107 21 3 1 OTA with 802 15 4 ZigBee modules 107 21 3 2 OTA with 3G GPRS WiFi modules via FTP 108 21 4 OTA with 802 15 4 ZigBee modules 109 21 4 1 OTA Step by Step 109 21 4 2 OTA Shell 112 21 5 OTA with 3G GPRS WiFi modules via FTP 112 21 5 1 Procedure ...

Page 5: ...receiver 142 27 2 Meshlium 143 27 2 1 What can I do with Meshlium 143 27 2 2 How do they work together 144 27 2 2 1 Meshlium Storage Options 144 27 2 2 2 Meshlium Connection Options 144 27 2 3 Capturing and storing sensor data in Meshlium from a Waspmote sensor network 145 27 2 4 Capturer logs 159 27 2 5 Sensors 160 27 2 6 Sending XBee frames from Meshlium to Waspmote 161 27 2 7 Interacting with 3...

Page 6: ...isconnect the battery or any other power supply that is being used If using a car lighter as a power supply be sure to respect the voltage and current levels specified in the Power Supplies section When using a battery as the power supply whether in combination with a solar panel or not be sure to use the voltage and current levels specified in the Power supplies section If a software or hardware ...

Page 7: ...se the connector specified in the Power supplies section and always respect polarity Lithium battery connection Only use the connector specified in the Battery section and always respect polarity Micro SD card connection Only use 2GB maximum micro SD cards HC cards are not compatible There are many SD card models any of them has defective blocks which are ignored when using the Waspmote s SD libra...

Page 8: ...below 0 ºC batteries can supply current discharge but the charge process cannot be done In parti cular discharge range 10 60 ºC charge range 0 45 ºC It is not reccommended to have the non rechargeable batteries 13000 26000 52000 mA h connected to Waspmote when the USB cable is conneted too The reason is Waspmote will try to inject current in them if the USB is connected This is dangerous for the g...

Page 9: ... 9 v6 3 Waspmote Kit 1 3 Assembly Connect the antenna to the wireless module Place the wireless module in Waspmote Place the wireless module in Waspmote Gateway ...

Page 10: ... 10 v6 3 Waspmote Kit Connect the antenna in the GSM GPRS module Place the GSM GPRS module in Waspmote Place the SD card in Waspmote ...

Page 11: ... 11 v6 3 Waspmote Kit Connect the battery in Waspmote Connect the sensor board Switch it on ...

Page 12: ...te Kit Waspmote battery disconnection Use the pick supplied by Libelium in order to disconnect Waspmote battery Insert the pick on the slot of the battery connector and pull straight out Do not pull the battery cables ...

Page 13: ... 13 v6 3 Waspmote Kit Battery handling instructions In order to prevent from cable breaking avoid leaving battery freely suspended Use a nylon clamp in order to attach battery to Waspmote ...

Page 14: ...ference guide download the Waspmote Plug Sense Technical Guide in the Development section of the Libelium website 2 1 Quick Overview 2 1 1 Features Robust waterproof IP65 enclosure Add or change a sensor probe in seconds Solar powered with internal and external panel options Radios available ZigBee 802 15 4 WiFi 868MHz 900MHz LoRaWAN LoRa Sigfox 3G GPRS and Bluetooth Low Energy Over the air progra...

Page 15: ...ns The external solar panel is mounted on a 45º holder which ensures the maximum performance of each outdoor installation Figure Waspmote Plug Sense powered by an external solar panel For the internal option the solar panel is embedded on the front of the enclosure perfect for use where space is a major challenge Figure Internal solar panel ...

Page 16: ...y an internal solar panel 2 1 4 Programming the Nodes Waspmote Plug Sense can be reprogrammed in two ways The basic programming is done from the USB port Just connect the USB to the specific external socket and then to the computer to upload the new firmware Figure Programming a node ...

Page 17: ...mW 100dBm 10Km LoRaWAN LoRaWAN 868 900 and 433 MHz bands up to 18 5 dBm 136dBm km Typical base station range LoRa RF 868 and 900 MHz 14 dBm 137dBm 21 Km Sigfox Sigfox 868MHz 14 dBm 126dBm km Typical base station range WiFi 802 11b g 2 4GHz 0dBm 12dBm 83dBm 50m 500m GPRS Pro and GPRS GPS 850MHz 900MHz 1800MHz 1900MHz 2W Class4 850MHz 900MHz 1W Class1 1800MHz 1900MHz 109dBm Km Typical carrier range ...

Page 18: ... the Code Generator to see how easy it is at http www libelium com development plug_ _sense sdk_and_applications code_generator Figure Code Generator 2 1 7 Data to the Cloud The Sensor data gathered by theWaspmote Plug Sense nodes is sent to the Cloud by Meshlium the Gateway router specially designed to connect Waspmote sensor networks to the Internet via Ethernet WiFi and 3G interfaces Thanks to ...

Page 19: ...cific sensors This section describes each model configuration in detail showing the sensors which can be used in each case and how to connect them to Waspmote In many cases the sensor sockets accept the connection of more than one sensor probe See the compatibility table for each model configuration to choose the best probe combination for the application It is very important to remark that each s...

Page 20: ...me types of gases The main applications for this Waspmote Plug Sense configuration are city pollution measurement emissions from farms and hatcheries control of chemical and industrial processes forest fires etc Sensors are calibrated for more accurate measurements Go to the Applications section in the Libelium website for a complete list of services Figure Smart Environment Waspmote Plug Sense mo...

Page 21: ... CH2 OH H2 C4 H10 CO CH4 9237 B Humidity 9204 Atmospheric pressure 9250 C Carbon dioxide CO2 9230 D Nitrogen dioxide NO2 9238 9238 B E Ozone O3 9258 9258 B Hydrocarbons VOC 9201 9201 B Oxygen O2 9231 F Carbon monoxide CO 9229 Methane CH4 9232 Ammonia NH3 9233 Liquefied Petroleum Gases H2 CH4 ethanol isobutene 9234 Air pollutants 1 C4 H10 CH3 CH2 OH H2 CO CH4 9235 Air pollutants 2 C6 H5 CH3 H2 S CH...

Page 22: ...ated as an evolution of Smart Environment It enables the user to implement pollution air quality industrial environmental or farming projects with high requirements in terms of high accuracy reliability and measurement range as the sensors come calibrated from factory Figure Smart Environment PRO Waspmote Plug Sense model ...

Page 23: ...376 P Sulfur Dioxide SO2 Calibrated 9377 P Ammonia NH3 Calibrated 9378 P Methane CH4 and Combustible Gas Calibrated 9379 P Hydrogen H2 Calibrated 9380 P Hydrogen Sulfide H2 S Calibrated 9381 P Hydrogen Chloride HCl Calibrated 9382 P Phosphine PH3 Calibrated 9384 P Ethylene ETO Calibrated 9385 P Chlorine Cl2 Calibrated 9386 P D Particle Matter PM1 PM2 5 PM10 Dust 9387 P E Temperature Humidity and P...

Page 24: ...or this Waspmote Plug Sense configuration are perimeter access control liquid presence detection and doors and windows openings Figure Smart Security Waspmote Plug Sense model Note The probes attached in this photo could not match the final location See next table for the correct configuration ...

Page 25: ...9240 9242 Liquid presence 9243 Hall effect 9207 F Luminosity LDR 9205 Liquid level 9239 9240 9242 Liquid presence 9243 Hall effect 9207 Figure Sensor sockets configuration for Smart Security model As we see in the figure below thanks to the directionable probe the presence sensor probe PIR may be placed in different positions The sensor can be focused directly to the point we want Figure Configura...

Page 26: ...ential pH conductivity and temperature An extremely accurate turbidity sensor has been integrated as well The Smart Water Ions line is complementary for these kinds of projects enabling the control of concentration of ions like Ammonium NH4 Bromide Br Calcium Ca2 Chloride Cl Cupric Cu2 Fluoride F Iodide I Lithium Li Magnesium Mg2 Nitrate NO3 Nitrite NO2 Perchlorate ClO4 Potassium K Silver Ag Sodiu...

Page 27: ...ence B pH 9328 Oxidation Reduction Potential ORP 9329 C pH 9328 Oxidation Reduction Potential ORP 9329 D Soil Water Temperature 9255 included by default E Dissolved Oxygen DO 9327 F Conductivity 9326 Turbidity 9353 Figure Sensor sockets configuration for Smart Water model Note For more technical information about each sensor probe go to the Development section in Libelium website ...

Page 28: ...ry for these kinds of projects enabling the control of parameters like turbidity conductivity oxidation reduction potential and dissolved oxygen Take a look to the SmartWater line in the previous section Refer to Libelium website for more information There are 3 variants for Smart Water Ions Single Double and PRO This is related to the type of ion sensor that each variant can integrate Next sectio...

Page 29: ...ach sensor socket Parameter Reference A B C and D Calcium Ion Ca2 9352 Fluoride Ion F 9353 Fluoroborate Ion BF4 9354 Nitrate Ion NO3 9355 pH for Smart Water Ions 9363 E Single Junction Reference 9350 included by default F Soil Water Temperature 9255 included by default Figure Sensor sockets configuration for Smart Water Ions model single variant Note For more technical information about each senso...

Page 30: ...ensor socket Parameter Reference A B C and D Bromide Ion Br 9356 Chloride Ion Cl 9357 Cupric Ion Cu2 9358 Iodide Ion I 9360 Silver Ion Ag 9362 pH for Smart Water Ions 9363 E Double Junction Reference 9351 included by default F Soil Water Temperature 9255 included by default Figure Sensor sockets configuration for Smart Water Ions model double variant Note For more technical information about each ...

Page 31: ...O 9412 Bromide Ion Br PRO 9413 Calcium Ion Ca2 PRO 9414 Chloride Ion Cl PRO 9415 Cupric Ion Cu2 PRO 9416 Fluoride Ion F PRO 9417 Iodide Ion I PRO 9418 Lithium Ion Li PRO 9419 Magnesium Ion Mg2 PRO 9420 Nitrate Ion NO3 PRO 9421 Nitrite Ion NO2 PRO 9422 Perchlorate Ion ClO4 PRO 9423 Potassium Ion K PRO 9424 Silver Ion Ag PRO 9425 Sodium Ion Na PRO 9426 pH PRO 9411 E Reference Sensor Probe PRO 9410 i...

Page 32: ...ications for this Waspmote Plug Sense model are noise maps monitor in real time the acoustic levels in the streets of a city air quality waste management structural health smart lighting etc Refer to Libelium website for more information Figure Smart Cities Waspmote Plug Sense model ...

Page 33: ...y LDR 9205 D Noise sensor dBA 9259 F Linear displacement 9319 Ask Libelium Sales Department for more information Figure Sensor sockets configuration for Smart Cities model As we see in the figure below thanks to the directionable probe the ultrasound sensor probe may be placed in different positions The sensor can be focused directly to the point we want to measure Figure Configurations of the ult...

Page 34: ...d in terms of power consumption resulting in a long battery life Its small size and the robust and surface mount enclosure enables a fast installation without the need of digging a hole in the ground Finally the developer does not need to program the node but just configure some key parameters Remote management and bidirectional communication allow to change parameters from the Cloud Figure Plug S...

Page 35: ...ature and humidity Sensirion solar visible radiation wind speed and direction rainfall atmospheric pressure etc The main applications for thisWaspmote Plug Sense model are precision agriculture irrigation systems greenhouses weather stations etc Refer to Libelium website for more information Two variants are possible for this model normal and PRO Next section describes each configuration in detail...

Page 36: ...t Agriculture model Note For more technical information about each sensor probe go to the Development section in Libelium website PRO Sensor sockets are configured as shown in the figure below Sensor Socket Sensor probes allowed for each sensor socket Parameter Reference A Humidity Temperature Sensirion 9247 B Soil temperature 9255 C Solar radiation 9251 9257 D Soil temperature 86949 Soil moisture...

Page 37: ...ulated Line 2 1 8 9 Ambient Control This model is designed to monitor main environment parameters in an easy way Only three sensor probes are allowed for this model as shown in next table Figure Ambient Control Waspmote Plug Sense model ...

Page 38: ...t used E Not used F Not used Figure Sensor sockets configuration for Ambient Control model As we see in the figure below thanks to the directionable probe the Luminosity sensor Luxes accuracy probe may be placed in different positions The sensor can be focused directly to the light source we want to measure Figure Configurations of the Luminosity sensor probe luxes accuracy Note For more technical...

Page 39: ... For this model the Geiger tube is already included inside Waspmote so the user does not have to connect any sensor probe to the enclosure The rest of the other sensor sockets are not used Figure Radiation Control Waspmote Plug Sense model Sensor sockets are not used for this model Note For more technical information about each sensor probe go to the Development section in Libelium website ...

Page 40: ...00MHz LoRa module 868 900MHz Sigfox module 868 900MHz GSM GPRS module Quadband 850MHz 900MHz 1800MHz 1900MHz 3G GPRS module Dual Band WCDMA UMTS 900 2100 MHz and Tri Band GSM GPRS EDGE 850 900 1800 MHz WiFi module Bluetooth modules Bluetooth Low Energy and Bluetooth Pro NFC RFID module Sensor modules Sensor boards Storage module SD Memory Card 3 2 Specifications Microcontroller ATmega1281 Frequenc...

Page 41: ... 41 v6 3 Hardware Main Waspmote components Bottom side 3 3 Block Diagram Data signals Figure Waspmote block diagrams Data signals ...

Page 42: ...rational battery voltage 4 2V USB charging voltage 5 V Solar panel charging voltage 6 12 V Battery charging current from USB 100 mA max Battery charging current from solar panel 280 mA max Absolute maximum values Voltage in any pin 0 5 V 3 8 V Maximum current from any digital I O pin 40 mA USB power voltage 7V Solar panel power voltage 18V Charged battery voltage 4 2 V ...

Page 43: ... 4 ANALOG 2 3V3 SENSOR POWER GPS POWER SDA 3V3 SENSOR POWER GND DIGITAL 7 DIGITAL 5 DIGITAL 3 DIGITAL 1 ANALOG 7 ANALOG 5 ANALOG 3 ANALOG 1 5V SENSOR POWER SCL GND ANALOG 6 3V3 SENSOR GND ANALOG 7 3V3 SENSOR Figure Description of sensor connector pins Auxiliary SPI UART connector AUX SERIAL 1TX AUX SERIAL 1RX AUX SERIAL 2RX AUX SERIAL 2TX BATTERY GND SCK RXD1 TXD1 3V3 SENSOR POWER MOSI MISO Figure...

Page 44: ...og pin Digital pin ANALOG1 14 ANALOG2 15 ANALOG3 16 ANALOG4 17 ANALOG5 18 ANALOG6 19 ANALOG7 20 val analogRead ANALOG1 3 5 2 Digital Waspmote has digital pins which can be configured as input or output depending on the needs of the application The voltage values corresponding to the different digital values would be 0V for logic 0 3 3V for logic 1 The instructions for control of digital pins are s...

Page 45: ...onnected to the bus are slaves 3 5 6 SPI TheSPIportonthemicrocontrollerisusedforcommunicationwiththemicroSDcard Alloperationsusingthebusareperformed clearly by the specific library The SPI port is also available in the SPI UART connector 3 5 7 USB USB is used in Waspmote for communication with a computer or compatible USB devices This communication allows the microcontroller s program to be loaded...

Page 46: ...o 85ºC with an accuracy of 0 25 C For more information about the acquisition of this value by the microprocessor see the section Sensors in Waspmote Temperature Note the RTC s internal temperature sensor is only meant for the time derive compensation but not for common air temperature sensing we advise our Sensor Boards for that The RTC is powered by the battery When the mote is connected the RTC ...

Page 47: ...programmable LED A red indicator LED is connected to the microcontroller It is totally programmable by the user from the program code USB Power LED indicator A green LED which indicates when Waspmote is connected to a compatible USB port either for battery charging or programming When the LED is on it indicates that the USB cable is connected correctly when the USB cable is removed the LED will sw...

Page 48: ...ant when Waspmote is started The part named loop runs continuously forming an infinite loop Because of the behavior of this part of the code the use of interruptions is recommended to perform actions with Waspmote A common programming technique to save energy would be based on blocking the program either keeping the micro awake or asleep in particular cases until some of interruptions available in...

Page 49: ...l of small time intervals 16ms 32ms 64ms 128ms 256ms 500ms 1s 2s 4s 8s For intervals over 8s Deep Sleep mode the RTC is used More information about the interruptions generated by the Watchdog can be found in Energy chapter Related API libraries WaspPWR h WaspPWR cpp All information about their programming and operation can be found in the document Energy and Power Programming Guide All the documen...

Page 50: ... s internal Watchdog Asynchronous Interruptions These are not programmed so it is not known when they will be triggered Types Sensors the sensor boards can be programmed so that an alarm is triggered when a sensor reaches a certain threshold Accelerometer The accelerometer that is built into the Waspmote can be programmed so that certain events such as a fall or change of direction generate an int...

Page 51: ... Activation of this flag happens when the ifHibernate function is called which must be done at the beginning of the setup part of the code This way when Waspmote starts it tests if it is a normal start or if it is an start from the Hibernate mode Allinformationabouttheprogrammingandoperationofinterruptionscanbefoundinthedocument InterruptionProgramming Guide ...

Page 52: ...er hand each module might have up to 4 operation modes ON Normal operation mode Sleep In this mode some module functions are stopped and passed to asynchronous use normally guided by events It functions differently in each module and is specific to each one programmed by the manufacturer Hibernate In this mode all module functions are stopped and passed to asynchronous use normally guided by event...

Page 53: ...umption in this state is 55μA In this mode the microcontroller stops executing the main program The program stack where all the variables and log values are stored keep their value so when Waspmote returns to ON mode the next instruction is executed and the variable values are maintained Figure From ON to Sleep The following example would set Waspmote in the Sleep mode for 32ms The microprocessor ...

Page 54: ...d the variable values are maintained Figure From ON to Deep Sleep 6 4 Hibernate mode The main program stops the microcontroller and all the Waspmote modules are completely disconnected The only way to reactivate the device is through the previously programmed alarm in the RTC synchronous interrupt The interval for this cycle can go from seconds to minutes hours or days Almost all devices are total...

Page 55: ...t Waspmote in the Hibernate mode for 2 days 1 hour and 30 minutes The microcontroller would be switched off waiting for the RTC to switch the device on again with a synchronous interruption PWR hibernate 02 01 30 00 RTC_OFFSET RTC_ALM1_MODE2 Note when the hibernate switch is off RTC alarms must only be used to set the wake up from hibernate See more details in the Programming Guides for the RTC an...

Page 56: ...sensor is prepared to measure the temperature of the board itself and can thereby compensate for oscillations in the quartz crystal it uses as a clock As it is a sensor built in to the RTC for any application that requires a probe temperature sensor this must be integrated from the micro s analog and digital inputs as has been done in the case of the sensor boards designed by Libelium More informa...

Page 57: ...g Guide Figure Accelerometer The LIS331DLH has dynamically user selectable full scales of 2g 4g 8g and it is capable of measuring accelerations with output data rates from 0 5 Hz to 1 kHz Thedevicefeaturesultralow poweroperationalmodesthatallowadvancedpowersavingandsmartsleeptowake upfunctions The accelerometer has 7 power modes the output data rate ODR will depend on the power mode selected The p...

Page 58: ...r this task are the SCL pin and the SDA pin as well as another INT pin to generate the interruptions The accelerometer has 4 types of event which can generate an interrupt free fall inertial wake up 6D movement and 6D position These thresholds and times are set in the WaspACC h file To show the ease of programming an extract of code about how to get the accelerometer values is included below ACC O...

Page 59: ... 59 v6 3 Sensors Vibration Acceleration Free fall ...

Page 60: ...meter can be found in the chapter Interruptions and in the Interruptions Programming Guide Related API libraries WaspACC h WaspACC cpp All information about their programming and operation can be found in the document Accelerometer Programming Guide All the documentation is located in the Development section in the Libelium website ...

Page 61: ...ital converter which allows a resolution of 3mV Waspmote also has one 8 bit resolution PWM output pin for the generation of analog signals Information on the libraries and instructions used for reading and writing on these pins can be found in the API manual Waspmote includes 2 interruption pins a low level TXD1 one and a high level RXD1 one which offer an alternative to reading the sensors by sur...

Page 62: ...n H2 Ammonia NH3 Isobutane C4 H10 Ethanol CH3 CH2 OH Toluene C6 H5 CH3 Hydrogen Sulfide H2 S Nitrogen Dioxide NO2 Ozone O3 Hydrocarbons VOC Temperature Humidity Pressure atmospheric GASES PRO APPLICATIONS SENSORS City pollution CO NO NO2 O3 SO2 Particle Matter Dust Air Quality Index calculation SO2 NO2 Particle Matter Dust CO O3 NH3 Emissions from farms and hatcheries CH4 H2 S NH3 Greenhouse manag...

Page 63: ... levels in the sea Temperature Conductivity Salinity pH Dissolved Oxygen DO and Nitrates pH Oxidation Reduction Potential ORP Dissolved Oxygen DO Conductivity Temperature Turbidity SMART WATER IONS APPLICATIONS SENSORS Drinking water quality control Calcium Ca2 Iodide I Chloride Cl Nitrate NO3 Magnesium Mg2 Sodium Na pH Agriculture water monitoring Calcium Ca2 Nitrate NO3 Magnesium Mg2 Sodium Na P...

Page 64: ...vailable parking information Detection of free parking lots outdoors Parallel and perpendicular parking lots control Sigfox and LoRaWAN connectivity 868 and 900 Extreme battery life Surface mount enclosure fast installation Easy configuration remote management from the cloud Magnetic field Temperature AGRICULTURE APPLICATIONS SENSORS Precision Agriculture Leaf temperature fruit diameter Irrigation...

Page 65: ...vailable Image sensor Luminosity Infrared Presence PIR RADIATION APPLICATIONS SENSORS Monitor the radiation levels wirelessly without compromising the life of the security forces Create prevention and control radiation networks in the surroundings of a nuclear plant Measure the amount of Beta and Gamma radiation in specific areas autonomously Geiger tube β γ Beta and Gamma PROTOTYPING SENSOR APPLI...

Page 66: ...everal power pins specifically GND SENSOR POWER and 5V SENSOR POWER SENSOR POWER 3 3V power voltage 200 mA maximum which is controlled from the Waspmote execution code 5V SENSOR POWER 5V power voltage 200 mA maximum which is controlled from the Waspmote execution code ...

Page 67: ...W 102dBm 7000m XBee 868 RF 868MHz 315mW 112dBm 12km XBee 900 RF 900MHz 50mW 100dBm 10Km Line of sight and Fresnel zone clearance with 5dBi dipole antenna These modules have been chosen for their high receiving sensitivity and transmission power as well as for being 802 15 4 compliant XBee 802 15 4 model and ZigBee Pro v2007 compliant XBee ZB model The XBee and LoRa modules integrated in Waspmote i...

Page 68: ...ndard and is added by the XBee modules With a view to obtain frames totally compatible with the IEEE802 15 4 standard and enabling inter operability with other chipsets the XBee setMacMode m command has been created to select at any time if the modules are to use a totally compatible heading format or conversely enable the use of extra options for node discovery and duplicated packets detection En...

Page 69: ... 12dBm 2 14dBm 3 16dBm 4 18dBm Figure Transmission power values Figure XBee PRO TX Power Related API libraries WaspXBeeCore h WaspXBeeCore cpp WaspXBee802 h WaspXBee802 cpp All information about their programming and operation can be found in the document 802 15 4 Networking Guide All the documentation is located in the Development section in the Libelium website ...

Page 70: ... ZB modules comply with the ZigBee PRO v2007 standard These modules add certain functionalities to those contributed by ZigBee such as Node discovery some headings are added so that other nodes within the same network can be discovered It allows a node discovery message to be sent so that the rest of the network nodes respond indicating their specific information Node Identifier MAC 16 bits RSSI D...

Page 71: ...usted because it is always set to 17 dBm Related API libraries WaspXBeeCore h WaspXBeeCore cpp WaspXBeeZB h WaspXBeeZB cpp All information about their programming and operation can be found in the document ZigBee Networking Guide All the documentation is located in the Development section in the Libelium website ...

Page 72: ... is provided through the AES 128b algorithm Specifically through the type AES CTR In this case the Frame Counter field has a unique ID and encrypts all the information contained in the Payload field which is the place in the link layer frame where the data to be sent is stored The way in which the libraries have been developed for module programming means that encryption activation is as simple as...

Page 73: ...1 13 7dBm 2 20dBm 3 22dBm 4 25dBm Figure Transmission power values Figure XBee TX Power Related API libraries WaspXBeeCore h WaspXBeeCore cpp WaspXBee868 h WaspXBee868 cpp All information about their programming and operation can be found in the document 868MHz Networking Guide All the documentation is located in the Development section in the Libelium website ...

Page 74: ...r Certifications more information can be obtained about the Certifications Figure Channel frequencies in the 900MHz band Encryption is provided through the AES 128b algorithm Specifically through the type AES CTR In this case the Frame Counter field has a unique ID and encrypts all the information contained in the Payload field which is the place in the link layer frame where the data to be sent i...

Page 75: ...tworks instead of the usual point to point topology This firmware has been developed by Digi aimed for allowing modules to sleep synchronize themselves and work on equal terms avoiding the use of node routers or coordinators that have to be permanently powered on Characteristics of the implemented protocol Self Healing any node can join or leave the network at any moment All nodes are equal there ...

Page 76: ...ng those related with the protocol used The XBee DigiMesh modules are based on the standard IEEE 802 15 4 that supports functionalities enabling mesh topology use DigiMesh 900MHz Frequency Tx Power Sensitivity Channels Distance 902 928MHz 50mW 100dBm 12 10km The XBee DigiMesh modules share the hardware module with the XBee 900 So it is possible to change the firmware of this kind of modules from o...

Page 77: ...nd a central network server in the back end Gateways are connected to the network server via standard IP connections while end devices use single hop wireless communication to one or many gateways Communication between end devices and gateways is spread out on different frequency channels and data rates The selection of the data rate is a trade off between communication range and message duration ...

Page 78: ...g Guide available at Development section of Libelium website 10 LoRa Protocol Own developed at Libelium Not compatible with LoRaWAN Model Semtech SX1272 Frequencies available 860 1000 MHz fits both 868 Europe and 915 MHz USA ISM bands Max TX power 14 dBm Sensitivity 137 dBm Range Line of Sight 21 km 13 4 miles LoS and Fresnel zone clearance Non Line of Sight 2 km 1 2 miles nLoS going through build...

Page 79: ... 79 v6 3 LoRa Figure Channel frequencies in the 868MHz band Figure Channel frequencies in the 900MHz band ...

Page 80: ...ogy Related API libraries WaspSX1272 h WaspSX1272 cpp All information about programming the LoRa module can be found in the document SX1272 LoRa Networking Guide All the documentation is located in the Development section in the Libelium website 10 1 RSSI The RSSI parameter Received Signal Strength Indicator indicates the signal quality of the last packet received The XBee modules provide this inf...

Page 81: ...ncy ISM 868 MHz TX Power 14 dBm ETSI limitation 140 messages of 12 bytes per module per day Range Typically each base station covers some km Check the Sigfox Network Chipset consumption TX 49 mA 14 dBm Radio Data Rate 100 bps Receive sensitivity 126 dBm Sigfox certificate Class 0u the highest level The network operates in the globally available ISM bands license free frequency bands and co exists ...

Page 82: ...t connections HTTP web connections FTP file transfers Direct connections with iPhone and Android Connects with any standard WiFi router DHCP for automatic IP assignation DNS resolution enabled Related API libraries WaspWifi h WaspWifi cpp All information about their programming and operation can be found in the document WiFi Networking Guide All the documentation is located in the Development sect...

Page 83: ...l scenario for companies which want to give data accessibility services As pointed before the WiFi module can join any standard WiFi router however the connection may also be performed using Meshlium instead of a standard WiFi router Meshlium is the multiprotocol router designed by Libelium which is specially recommended for outdoor applications as it is designed to resist the hardest conditions i...

Page 84: ... to 3G GPRS gateway giving access to the internet to all the nodes in the network using the mobile phones infrastructure It is also important to mention that the transmission power of the WiFi interface integrated in Meshlium is many times higher than the ones available in home oriented WiFi routers so the distance we can get increases dramatically from a few meters to dozens or even hundreds depe...

Page 85: ...a 2dBi Up to 250 unique devices in each inquiry Received Strength Signal Indicator RSSI for each scanned device Class of Device CoD for each scanned device 7 Power levels 27dBm 3dBm Scan devices with maximum inquiry time Scan devices with maximum number of nodes Scan devices looking for a certain user by MAC address Classification between pedestrians and vehicles Figure Libelium Bluetooth module W...

Page 86: ...s the name that appears when a scan is performed in order to find new devices Class of Device CoD Bluetooth devices are classified according to the device which they are integrated Therefore a ve hicle hands free device will belong to a different class than a pedestrian mobile phone This parameter has 6 hexadecimal digit and it allows distinguish if the detected Bluetooth device is a vehicle a ped...

Page 87: ...unts with an standard SMA connector The default antenna which comes with the module has a gain of 2dBi Figure Example of TX power levels How do I calculate the distance of any of the devices detected In the inquiry process we receive the MAC address of the Bluetooth device its CoD and the Received Signal Strength Indicator RSSI which gives us the quality of the transmission with each device RSSI v...

Page 88: ...s identifiers MAC addresses are not associated with any specific user account or mobile phone number not even to any specific vehicle Additionally the inquiry mode visibility can be turned off so people have always chosen if their device will or wont be detectable Related API libraries WaspBT_Pro h WaspBT_Pro cpp All information on their programming can be found in document Bluetooth for device di...

Page 89: ... at maximum TX power Consumption sleep 0 4uA RX 8mA TX 36mA Send broadcast advertisements iBeacons Connect to other BLE devices as Master Slave Connect with Smartphones and Tablets Set automatic cycles sleep transmission Calculate distance using RSSI values Perfect for indoor location networks RTLS Scan devices with maximum inquiry time Scan devices with maximum number of nodes Scan devices lookin...

Page 90: ... can be identified by their MAC address and public name Also the RSSI is provided to show the quality of each link Related API libraries WaspBLE h WaspBLE cpp All information on their programming can be found in document Bluetooth Low Energy Networking Guide All the documentation is located in the Development section in the Libelium website ...

Page 91: ... Sensitivity 109dBm Antenna connector UFL External Antenna 0dBi Figure GSM GPRS module This module can carry out the following tasks Making Receiving calls Making x second lost calls Sending Receiving SMS Single connection and multiple connections TCP IP and UDP IP clients TCP IP server HTTP Service FTP Service downloading and uploading files The functions implemented in the API allow to send info...

Page 92: ...spGPRS_Pro h WaspGPRS_Pro cpp WaspGPRS_Pro_core h and WaspGPRS_Pro_core cpp All information about their programming and operation can be found in the document GSM GPRS Programming Guide All the documentation is located in the Development section in the Libelium website Note 1 A rechargeable battery must be always connected when using this module USB power supply is not enough ...

Page 93: ...s a GPS receiver Model SIM928 SIMCom GPRS features Quadband 850MHz 900MHz 1800MHz 1900MHz TX Power 2W Class 4 850MHz 900MHz 1W Class 1 1800MHz 1900MHz Sensitivity 109dBm Antenna connector UFL External Antenna 0dBi Consumption in sleep mode 1mA Consumption in power off mode 0mA GPS features Time To First Fix 30s typ Sensitivity Tracking 160 dBm Adquisition 147 dBm Accuracy horizontal position 2 5m ...

Page 94: ...sendSMS message number GPRS_SIM928A makeLostCall number timeCall This model uses the UART_1 at a baudarte of 57600bps speed to communicate with the microcontroller Figure GPRS GPS module in Waspmote Related API libraries WaspGPRS_SIM928A h WaspGPRS_SIM928A cpp WaspGPRS_Pro_core h andWaspGPRS_Pro_core cpp All information about their programming and operation can be found in the document GPRS GPS Pr...

Page 95: ...power UMTS 850 900 1900 2100 0 25 W GSM 850 900 2 W DCS 1800 PCS 1900 1 W Sensitivity 106dBm Antenna connector UFL External antenna 0dBi Figure 3G GPRS module This module can carry out the following tasks Videocall using 3G network available with Video Camera Sensor Board Record video res 320 x 240 and take pictures res 640 x 480 available with Video Camera Sensor Board Support microSD card up to ...

Page 96: ... of 115200 speed to communicate with the microcontroller Figure 3G GPRS module in Waspmote Related API libraries Wasp3G h Wasp3G cpp All information about programming and operation can be found in the document 3G GPRS Networking Guide All the documentation is located in the Development section of Libelium website Note 1 A rechargeable battery must be always connected when using this module USB pow...

Page 97: ... chain Access management Electronic prepaid metering vending machines public transport Smartphone interaction NFCIP 1 protocol Related API libraries WaspRFID13 cpp WaspRFID13 h All information on its programming can be found in the document RFID NFC 13 56MHz Networking Guide All the documentation is located in the Development section in the Libelium website Figure RFID cards Figure RFID keyrings F...

Page 98: ... 98 v6 3 RFID NFC ...

Page 99: ...rm by using specific sensor boards e g CO CO2 temperature humidity acceleration pH IR luminosity vibration etc This way the sensor information can be read from any industrial device connected to the bus Figure Module in wireless sensor network applications 2º Add wireless connectivity to wired buses Waspmote can be configured to read the information coming from the bus and send it wirelessly using...

Page 100: ...ge Levels 7 V to 12 V Mark 1 Positive Voltages B A 200 mV Space 0 Negative voltages B A 200 mV Available Signals Tx Rx Tx Rx Half Duplex Tx Tx Rx Rx Full Duplex Available sockets in Waspmote socket 0 special SPI Waspmote required Applications Industrial Equipment Machine to Machine M2M communications Industrial Control Systems including the most common versions of Modbus and Profibus Programmable ...

Page 101: ... NMEA 0183 at 4 800 bit s Bar code scanners and other point of sale devices LED and LCD text displays Satellite phones low speed satellite modems and other satellite based transceiver devices Flat screen LCD and Plasma monitors to control screen functions by external computer other AV components or remotes Test and measuring equipment such as digital multimeters and weighing systems Updating Firmw...

Page 102: ...ork Topology Multimaster Speed 125 to 1000 Kbps Signaling differential Voltage Levels 0 5V Signals Half Duplex Available sockets in Waspmote socket 0 special SPI Waspmote required Applications Automotive applications Home automation Industrial Networking Factory automation Marine electronics Medical equipment Military uses Figure Can Bus module ...

Page 103: ...rking Building and infrastructure Transportation and energy applications 19 6 Operating with the modules The functions implemented in the API allow to configure the modules and send information in a simple way calling functions such as W485 send Data from analog1 input W485 send analog1 W232 send Data from analog1 input W232 send analog1 Read the last message received CAN getMessage CAN messageRx ...

Page 104: ...l information about their programming and operation can be found in the documents RS 485 Communication Guide RS 232 Communication Guide CAN Bus Communication Guide Modbus Communication Guide All the documentation is located in the Development section in the Libelium website ...

Page 105: ...S GPS and 3G GPRS Besides the following Industrial Protocols modules are available RS 485 Modbus RS 232 Serial Modbus and CAN Bus Figure Expansion Radio Board Some of the possible combinations are LoRaWAN GPRS 802 15 4 Sigfox 868 MHz RS 485 RS 232 WiFi DigiMesh 3G GPRS RS 232 RFID NFC WiFi 3G GPRS CAN bus Bluetooth etc Remark GPRSPro GPRS GPSand3G GPRSmodulesdonotneedtheExpansionBoardtobeconnected...

Page 106: ... air POTA Over the air service provisioning OTASP Over the air provisioning OTAP Over the air parameter administration OTAPA Over the air upgrade OTAU Over the air update OTAUR Over the air Download OAD Over the air flashing OTAF Over the air parameter administration OTAPA Multihop Over the air programming MOTAP 21 2 Benefits Libelium OTA Benefits OTA with 802 15 4 ZigBee Enables the upgrade or ch...

Page 107: ...n the nodes are accessed in just one hop no forwarding of the packets is needed Multihop when the nodes are accessed in two or more hops In this mode some nodes have to forward the packets sent by the Gateway in order to reach the destination Protocols supported 802 15 4 2 4GHz Worldwide ZigBee 2 4GHz Worldwide Important OTA operations only available from the Gateway not from Meshlium DigiMesh 2 4...

Page 108: ...f OTA is initiated by Waspmote and it is supported by an FTP server Steps Waspmote queries the FTP server for a new program version Check if program name path and version are correct Download the new program Reboot and start with the new program Topologies Protocols which support FTP transmissions are directly connected to the Network Access Point Protocols supported WiFi 2 4GHz Worldwide Storage ...

Page 109: ...rade Using the scan_nodes function we can search for a specific node or send a global query looking for any node which is ready to be reprogrammed with the OTA process Figure Sending Broadcast discovery queries The nodes which are ready at this moment will answer with a Ready to OTA frame Figure Waspmotes reply to discovery queries ...

Page 110: ...he unicast multicast or broadcast option depending on how many nodes we want to reprogram at the same time Figure Sending new program via OTA Each node which receives the program sends a message to the gateway to inform of the success of the process Figure Waspmotes reply OTA process was alright ...

Page 111: ... the new program the gateway needs to send the start_new_program command Figure OTA Gateway commands some Waspmotes to start a new program Each node which receives this packet will copy the program from the SD to the Flash memory and will start running the new binary Figure Waspmotes confirm the new program was started ...

Page 112: ...ing can be found in document Over the Air Programming OTA All the documentation is located in the Development section in the Libelium website In order to know more about OTA including how to download and use the OTA Shell application please go to the Development section http www libelium com development waspmote sdk_applications 21 5 OTA with 3G GPRS WiFi modules via FTP It is possible to update t...

Page 113: ...s flash memory in order to run the new program Figure OTA steps via FTP protocol 21 5 2 Setting the FTP server configuration The FTP server that Waspmote connects to needs a specific configuration so as to OTA work properly There are two ways to set up the FTP server Extern user s FTP server The user sets up an FTP server following the specific settings which are described within OTA Guide Meshliu...

Page 114: ...control Secure Web Server Connection The second security technique is carried out in Meshlium the Gateway where HTTPS and SSH connections are used to send the information to the Cloud server located on the Internet A third optional encryption layer allows each node to encrypt the information using the Public key of the Cloud server Thus the information will be kept confidentially all the way from ...

Page 115: ...tion Libraries Figure Waspmote frame on OSI stack for communication Figure Waspmote frame structure for communication Note For more information read the Encryption Programming Guide in the Waspmote Development section ...

Page 116: ...that work correctly with Waspmote are the SD cards we distribute officially To communicate with the SD module we use the SPI bus This bus is a communication standard used to transfer information between electronic devices which accept clock regulated bit flow The SPI includes lines for the clock incoming data and outgoing data and a selection pin The SD card is powered through a digital pin from t...

Page 117: ...eration can be found in the document SD Card Programming Guide All the documentation is located in the Development section in the Libelium website Note Make sure Waspmote is switched off before inserting or removing the SD card Otherwise the SD card could be damaged Note Waspmote must not be switched off or reseted while there are ongoing read or write operations in the SD card Otherwise the SD ca...

Page 118: ...A 0 12mA 0μA 187 58mA 57 08mA XBee ZigBee PRO 45 56mA 0 71mA 0μA 105mA 50 46mA XBee 868 60 82mA 0μA 160mA 73mA XBee 900 64 93mA 0 93mA 0μA 77mA 66mA Bluetooth modules ON OFF Sleep Scanning Sending Receiving Bluetooth Pro 14 mA 0 mA 0 5 mA 40 mA 34 mA 20 mA Bluetooth Low Energy 8 mA 0 mA 0 4 μA 36 mA 36 mA 36 mA GPRS Pro Connecting 100mA Calling 100mA Receiving Calls 100mA Transmitting GPRS 100mA S...

Page 119: ... 1mA OFF 0μA GPS acquisition mode 72mA GPS tracking mode 67mA 3G GPRS Connecting 100mA Transmitting Receiving GPRS 100mA 1 2A 2A during transmission slot every 4 7ms Transmitting Receiving 3G 300mA 500mA SLEEP 1mA OFF 0μA SD ON 0 14mA Reading 0 2mA Writing 0 2mA OFF 0μA Accelerometer Sleep 0 08mA Hibernate 0 65mA OFF 0μA ...

Page 120: ...eable and 13000mAh 26000mAh and 52000mAh non rechargeable Waspmote has a control and safety circuit which makes sure the battery charge current is always adequate Figure Battery connector Battery connection The figure below shows the connector in which the battery is to be connected The position of the battery connector is unique therefore it will always be connected correctly unless the connector...

Page 121: ...discharging and charging curves The following two images show battery discharging and charging curves Battery discharging Figure Typical discharging curve for battery Battery charging using USB Figure Typical charging curve for battery ...

Page 122: ...ld irreparably damage Waspmote DO NOT TRY TO RECHARGE THE NON RECHARGEABLE BATTERY IT MAY EXPLODE AND CAUSE INJURIES AND DESTROY THE EQUIPMENT DEVICES WITH NON RECHARGEABLE BATTERIES MUST BE PROGRAMMED THROUGH THE USB CABLE WITHOUT THE BATTERIES CONNECTED PLEASE DOUBLE CHECK THIS CONDITION BEFORE CONNECTING THE USB DO NOT CONNECT EITHER UNDER ANY CIRCUMSTANCE THE SOLAR PANEL TO A DEVICE WITH A NON...

Page 123: ...the solar panel connector allow only one connection position which must be respected without being forced into the incorrect position In this way connection polarity is respected Solar panels up to 12V are allowed The maximum charging current through the solar panel is 280mA Figure Solar panel connector Figure Solar panel connection ...

Page 124: ...plies The models supplied by Libelium are shown below Rigid Solar Panel 7V 500mA Dimensions 234 x 160 x 17 mm Figure Rigid Solar Panel Flexible Solar Panel 7 2V 100mA Dimensions 284 x 97 x 2 mm Figure Flexible Solar Panel ...

Page 125: ...es are USB to PC connection USB to 220V connection USB to Vehicle connector connection The charging voltage through the USB has to be 5V The maximum charging current through the USB is 100mA The mini USB connector must be standard mini USB model B Figure Possible connections for the USB ...

Page 126: ... 126 v6 3 Power supplies The models supplied by Libelium are shown below Figure 220V AC USB adapter Figure 12V DC USB car lighter adapter ...

Page 127: ...res Waspmote can manage In order to update to future library versions the API must be modified within the hardware cores and hardware libraries folders found inside the previously unzipped folder The next step will be to install the Waspmote IDE Libelium created a dedicated guide for this task It is called Waspmote IDE User Guide and can be found on Libelium website software section http www libel...

Page 128: ...ramming Example 0x00I 0x90 0x00 3 0xa2 0x00 z 0xcb 0x92 0xd8 0xd3 0x02 0x80 0x03 35689722 WASPMOTE 7 A CC 80 10 987 IN_TEMP 22 50 BAT 93 0xb4 Initially there are some hexadecimal characters which belong to the API frame followed by the message In the above example the message is 0x80 0x03 35689722 WASPMOTE 7 ACC 80 10 987 IN_TEMP 22 50 BAT 93 In the next chapter is shown how to compile and upload ...

Page 129: ...n the screen The next step is to configure the folder where the created programs are going to be saved In the Waspmote IDE this folder is called sketchbook and can be configured by accessing the File Preferences tab Clicking on this tab will open a new window where the location of the sketchbook can be indicated Once the sketchbook folder path is indicated the downloaded test program must be saved...

Page 130: ...ins and constants related to the interruptions 4 Wconstants h more constants are defined 5 pins_waspmote h pins_waspmote c the microcontroller s pins and the names to which they are associated are defined 6 WaspUtils h WaspUtils cpp series of functions for generic use such as light up LEDs number conversions strings handling EEPROM memory etc 7 Waspmote h is the file which runs when launching the ...

Page 131: ...broutines that run when interruptions are captured are defined as well as the functions for interruption activation and deactivation Flags corresponding to these functions are marked XBee Core Files WaspXBeeCore h WaspXBee cpp The functions that are common to all the XBee modules are defined such as sending and receiving packets node discovery or configuration functions that most XBee modules avai...

Page 132: ... cpp SensorRadiation WaspSensorRadiation h WaspSensorRadiation cpp The functions needed to manage the different sensor boards available on Waspmote XBee Libraries The functions needed to set up control and use a 802 15 4 ZigBee network XBee802 WaspXBee802 h WaspXBee802 cpp the specific functions of the XBee 802 15 4 and the shared general library functions are inherited XBeeZB WaspXBeeZB h WaspXBe...

Page 133: ... scanning devices Bluetooth Low Energy Files WaspBLE h WaspBLE cpp The functions needed to manage the Bluetooth Low Energy module WiFi Files WaspWIFI h WaspWIFI cpp The functions needed to manage the WiFi module RFID NFC Files WaspRFID13 h WaspRFID13 cpp The functions needed to manage the RFID NFC module Industrial Protocols Files RS 485 Wasp485 h Wasp485 cpp RS 232 Wasp232 h Wasp232 cpp CAN Bus W...

Page 134: ...e new versions are downloaded in a file similar to waspmote pro api vxxx zip xxx being the current version This file contains 2 folders waspmote api and libraries The content of these 2 folders must be overwritten on the IDE folders of the same name Once these folders are replaced the API is updated to the new version It is not possible to have 2 different APIs in the IDE at the same time The solu...

Page 135: ...ng equipment can be a PC with Linux Windows or Mac OS or any device compatible with standard USB connectivity The gateway offers a plug USB A connector so the receiving device has to have a receptacle USB A connector Once the Gateway is correctly installed a new communication serial port connecting directly to the XBee module s UART appears in the receiving equipment which allows the XBee to commu...

Page 136: ...n pressed None of these have pull up resistance so it may be necessary to activate any of the XBee s internal pull up resistances depending on the required use Figure LEDs in Waspmote Gateway 27 1 2 Linux receiver When using Linux it is possible to use various applications to capture the input from the serial port Libelium recommends to use the Cutecom application Once the application is launched ...

Page 137: ...veloped File sniffer c Compilation on Meshlium gcc sniffer c o sniffer Examples of use Seeing received data sniffer USB0 Dumping of received data to a file sniffer USB0 data txt Passing received values to another program sniffer USB0 program Note the speed used for the example is 19200 baud The final speed will depend on the speed the XBee module has been configured with default value 115200 Code ...

Page 138: ...rintf stderr Usage s port nValid ports S0 S1 USB0 USB1 n argv 0 serial Port exit 0 if strcmp argv 1 s0 fprintf stderr ttyS0 chosen n serialPort serialPort0 if strcmp argv 1 s1 fprintf stderr ttyS1 chosen n serialPort serialPort1 if strcmp argv 1 u0 fprintf stderr ttyUSB0 chosen n serialPort USBserialPort0 if strcmp argv 1 u1 fprintf stderr ttyUSB1 chosen n serialPort USBserialPort1 if strcmp seria...

Page 139: ...ones c_lflag ICANON ECHO ECHOE ISIG Ignore parity errors opciones c_iflag INPCK ISTRIP PARMRK opciones c_iflag IGNPAR opciones c_iflag IXON IXOFF IXANY IGNCR IGNBRK opciones c_iflag BRKINT raw output making the applycation ready to transmit opciones c_oflag OPOST aply tcsetattr sd TCSANOW opciones int j 0 while 1 read sd c 1 valor j c j We start filling the string until the end of line char arrive...

Page 140: ...cation but if it is not available it can be downloaded from http hyperterminal private edition htpe en softonic com Once this application is launched the connection must be configured The first step is to give it a name Figure Step 1 of establishing connection The next step is to specify the port on whichWaspmote has been connected in this case the system recognizes it as COM9 this will vary on ea...

Page 141: ... the speed and configuration parameters Figure Step 3 of establishing connection Once these steps have been performed connection with Waspmote has been established and listening to the serial port begins Figure HyperTerminal application capturing Waspmote s output ...

Page 142: ...utput This application can be downloaded from http homepage mac com dalverson zterm This application is configured automatically establishing the USB on which Waspmote has been connected and the speed The following image shows this application capturingWaspmote s output while the example code Waspmote Accelerator Basic Example is run Figure Waspmote s output capture ...

Page 143: ...urations a long with the storage options of the sensor data received Meshlium Xtreme allows you to detect iPhone and Android devices and in general any device which works withWiFi or Bluetooth interfaces The idea is to be able to measure the amount of people and cars which are present in a certain point at a specific time allowing the study of the evolution of the traffic congestion of pedestrians...

Page 144: ...e the sensor data in an External Data Base MySQL 3 Send the information to the Internet using the Ethernet or WiFi connection 4 Send the information to the Internet using the 3G GPRS connection 27 2 2 1 Meshlium Storage Options Local Data Base External Data Base 27 2 2 2 Meshlium Connection Options Figure Meshlium Connection Options XBee LoRa GPRS 3G WiFi Ethernet XBee LoRa GPRS 3G WiFi WiFi XBee ...

Page 145: ...al Database Besides the user can add his own sensors The initial frames sent by Waspmote contain the next sequence API frame characters are removed here 0x80 0x03 35689722 7 ACC 80 10 987 IN_TEMP 22 50 BAT 93 They are formed by the accelerometer values RTC internal temperature value and battery level The MAC address is added and other helpful information Meshlium comes with all the radios ready to...

Page 146: ...w you can open your browser and access to the Meshlium Manager System URL http 10 10 10 1 ManagerSystem user root password libelium Figure Meshlium Manager System Login screen Now we go to the Sensor Networks tab Figure Sensor Networks tab ...

Page 147: ...st Network ID Also known as PAN ID Personal Arena Network ID Channel frequency channel used Network Address 16b address hex field MY Node ID maximum 20 characters by default Meshlium Power level 0 4 by default 4 Encrypted mode true false by default false Encryption Key 16 characters maximum MAC 64b hardware address It is a read only value divided in two parts MAC high 32b hex field MAC low 32b hex...

Page 148: ...address of the XBee module just press the Load MAC button The Check status option allows to see if the radio is working properly and if the configuration stored on it matches the values set in the Manager System Both process Load MAC and Check status require the capturer daemon to be stopped This means no frames will be received while executing this actions Be patient this can take up to 1 minute ...

Page 149: ...ceive frames from XBee and LoRa with the Data Frame format receive frames from 3G GPRS WiFi and Ethernet via HTTP protocol Manager System version 3 1 4 and above parse these frames store the data in local Database synchronize the local Database with an external Database Besides the user can add his own sensors The initial frames sent by Waspmote contain the next sequence API frame characters are r...

Page 150: ...ured Figure Meshlium Storage options Local Data Base External Data Base You can also send the information received to the Internet using the Ethernet WiFi and 3G GPRS interfaces Figure Meshlium Connection options XBee LoRa GPRS 3G WiFi Ethernet XBee LoRa GPRS 3G WiFi WiFi XBee LoRa GPRS 3G WiFi 3G GPRS ...

Page 151: ...7 You can change the password see the Users Manager section Depending on the parameters set in the Interfaces section Figure Local Data Base tab Steps 1 Set the check box Store frames in the local data base and press the Save button From this time Meshlium will automatically perform Scans and will store the results in the Local Data Base This process will also continue after restarting Meshlium At...

Page 152: ...to create the data base along with the table and the right privile ges Figure External Database tab showing SQL Script 2 Insert this code in your MySQL management application 3 Fill the Connection Data fields with the information about where the data base is located IP Port and with the authentication options Database Table User Password This data are stored in mnt lib cfg sensorExternalDB file ...

Page 153: ... 153 v6 3 Interacting with Waspmote 4 Now press the Check Connection button to see if the configuration is correct Figure External Database tab checking connection ...

Page 154: ...l database with external database and press the Save button From this time Meshlium will automatically perform Scans and will store the results in the External Data Base each This process will also continue after restarting Meshlium You can also choose to sync when you want Just press the Synchronize Now button Figure External Database tab Synchornize ...

Page 155: ...v6 3 Interacting with Waspmote At any time you can see the last x records stored Just set how many insertions you want to see and press the Show data button Figure External Database tab last x records stored ...

Page 156: ...me now In the Show me now tab you can see in real time the Scans captured You can specify if you want the information to be updated periodically with the defined interval just checking the Use the Defined Interval button Figure Show me now tab ...

Page 157: ... and External Database sizes Local and External Tables Total Local and External Entries Synchronized Local Frames Unsynchronized Local Frames Figure Advanced Tab From this tab you can delete all the information contained in the Local database or Remove synchronized data Before performing these actions a confirmation message will be displayed Note Before running these options it is recommended to h...

Page 158: ...g with Waspmote Figure Advanved Tab Remove data In addition can display a log of the date of the last synchronization between the local database and external database was successful Figure Advanved Tab Synchronization log ...

Page 159: ...st frames received on Meshlium Figure Sensor log First show the sensor log in this logs shows the frames are stored after being processed ASCII 35690399 N1 253 198 STR XBee frame BAT 93 IN_TEMP 31 50 secondly shown Frame Log in this logs shows the frames stored as the arrive to Meshlium 35690399 N1 198 STR XBee frame BAT 93 IN_TEMP 31 50 ...

Page 160: ...g parser sensors xml The button update sensors update the Libelium official sensor User sensors remaining unchanged Users can add and remove sensors in an easy and simple from ManagerSystem To add a new sensor the user must complete the fields ASCII ID sensor id for ASCII frame Fields This field specifies the number of sensor fields sent in the frame This helps to calculate the frame length Type t...

Page 161: ...15 4 MAC address 64b Using its Network address MY 16b Performing a broadcast transmission Sending to Waspmote using its MAC address 64b ZigBeeSend mac 0013a2004069165d Hello Waspmote Sending to Waspmote using its Net address MY 16b ZigBeeSend net 1234 hello Waspmote Send to all the Waspmote devices at the same time Broadcast mode ZigBeeSend b hello everybody The source code ZigbeeSend c and the re...

Page 162: ...Internet of Things IoT machine to machine M2M or Smart Cities projects with minimum time to market Meshlium is ready to send sensor data to many Cloud software platforms Just select the most suitable for you get an account from the provider and configure your Meshlium To get a list of the available Cloud platforms see the section Cloud Connector of the Meshlium Technical Guide Figure Cloud connect...

Page 163: ...art Water Ions line Dissolved ions sensors were moved from Smart Water to Smart Water Ions References to the new GPRS GPS module version chipset SIM928 From 5 6 to 5 7 References to the new Gases PRO line and Smart Environment PRO line The Dust sensor is discontinued in the Plug Sense ecosystem now the recommended option is the Particle Matter sensor From v5 5 to v5 6 References to the new LoRa mo...

Page 164: ...m 4 7 to 4 8 Changed Weather Meters name to Weather Station WS 3000 From 4 6 to 4 7 Added section for Meshlium Cloud Connector Added references to the External SIM socket Added new Liquid Presence sensor From v4 5 to v4 6 Replaced old GPS by the new one GPS v2 Deleted references to GPS 3G and low battery interruptions New IDE explanations From v4 4 to v4 5 Added Non Rechargeable Battery warning Fr...

Page 165: ... 165 v6 3 Documentation Changelog From v4 1 to v4 2 Added references to 3G module Better IDE explanation on Linux Some errata and better explanations ...

Page 166: ...on device which allows short and long distance data voice and image communication capture of analog and digital sensor data directly connected or through probes wireless access enablement to electronic communication networks as well as local networks allowing cable free connec tion between computers and or terminals or peripheral devices geospatial position information interconnection of wired net...

Page 167: ... the value listed in this entry to 0 0095W FCC ID MCQ XBEEPRO2 OEM integrators and End Users must be provided with transmitter operation conditions for satisfying RF exposure compliance The instruction manual furnished with the intentional radiator shall contain language in the installation instructions informing the operator and the installer of this responsibility This grant is valid only when t...

Page 168: ...lso be carried out by expert personnel 29 5 Limitations of use The ZigBee IEEE 802 15 4 module has a maximum transmission power of 20dBm It is regulated according to EN 301 489 1 v 1 4 1 202 04 and EN 301 489 17 V1 2 1 2002 08 The configuration software must be used to limit to a maximum power of 12 11dBm PL 0 The 868MHz XBee module has a maximum transmission power of 27dBm This module is regulate...

Page 169: ... 300m Over longer distances or for public use an I IBPT licence is required In France the use of channels 10 2457MHz 11 2462MHz 12 2467MHz and 13 2472MHz is restricted A licence is requi red for any use both indoors and outdoors Contact ARCEP http www arcep fr for further information In Germany a licence is required for outdoor use In Italy a licence is required for indoor use Outdoor use is not p...

Page 170: ... Waspmote do not let it fall knock it or move it suddenly Avoid having the devices in high temperature areas as it could damage the electronic components The antennas should be connected carefully Do not force them when fitting them as the connectors could be damaged Do not use any type of paint on the device it could harm the operation of the connections and closing mechanisms ...

Page 171: ...ote reaches the end of its useful life it must be taken to an electronic equipment recycling point The equipment must be disposed of in a selective waste collection system and not that for urban solid residue Please manage its disposal properly Your distributor will inform you about the most appropriate and environmentally friendly disposal process for the used product and its packaging ...

Reviews: