background image

Waspmote 868LP 

Networking Guide

Содержание Waspmote 868LP

Страница 1: ...Waspmote 868LP Networking Guide ...

Страница 2: ...ialization 12 4 1 Setting ON 12 4 2 Setting OFF 12 5 Node Parameters 13 5 1 MAC Address 13 5 2 PAN ID 13 5 3 Node Identifier 14 5 4 Available frequencies 14 5 5 Channel Mask 16 5 6 Preamble ID 16 6 Power Gain and Sensibility 17 6 1 Received Signal Strength Indicator 17 6 2 Power Level 17 7 Networking methods 18 7 1 Topology 18 7 2 Addressing 18 7 3 Maximum payloads 19 7 4 Sending data 19 7 4 1 Usi...

Страница 3: ...overy to a specific node 23 8 4 Node Discovery Time 24 9 Sleep Mode 25 10 Security and Data Encryption 26 10 1 Security and Data encryption Overview 26 10 2 Security in API libraries 26 10 2 1 Encryption Enable 26 10 2 2 Encryption Key 26 10 3 Security in a network 27 11 Certifications 28 12 Code examples and extended information 29 13 API changelog 30 14 Documentation changelog 31 ...

Страница 4: ...ine of sight with 2 1dBi antenna up to 13 km up to 8 4 km Regulatory approvals Europe Europe XBee 868LP 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 XBee PRO 868 codes Depends Minor changes The XBee PRO 868 library is capable of sending receiving packets with the new XBee 868LP However configurin...

Страница 5: ...the allowed frequency band and channels in their country and use them Ignoring this could lead to considerable penalties Remark Libelium replaced the XBee 868 module with its natural evolution the XBee 868LP in October 2016 The XBee 868LP module is not compatible with other XBee products Among other differences they use different baudrates so they cannot interoperate The new XBee 868LP features a ...

Страница 6: ... 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 running the initialization function and giving it a key to use in the encryption xbee868LP setEncryptionMode 1 xbee868LP setLinkKey key The classic topology for this type of network is Star topology as the nodes can est...

Страница 7: ...nnect the module This module can be connected to both SOCKET0 and SOCKET1 on the Waspmote board Figure Module connected to Waspmote in SOCKET0 In order to connect the module to the SOCKET1 the user must use the Expansion Radio Board ...

Страница 8: ...l Protocols modules are available RS 485 Modbus RS 232 Serial Modbus and CAN Bus Some of the possible combinations are LoRaWAN GPRS 802 15 4 Sigfox 868 MHz RS 485 RS 232 WiFi DigiMesh 4G RS 232 RFID NFC WiFi 3G CAN Bus Bluetooth etc Remark GPRS GPRS GPS 3G and 4G modules do not need the Expansion Board to be connected to Waspmote They can be plugged directly in the socket1 In the next photo you ca...

Страница 9: ...ws xbee868LP ON SOCKET0 xbee868LP_2 ON SOCKET1 The rest of functions are used the same way as they are used with older API versions In order to understand them we recommend to read this guide Warnings Avoid to use DIGITAL7 pin when working with Expansion Board This pin is used for setting the XBee into sleep Avoid to use DIGITAL6 pin when working with Expansion Board This pin is used as power supp...

Страница 10: ...rough the guide there are many examples of using parameters In these examples API functions are called to execute the commands storing in their related variables the parameter value in each case Example of use xbee868LP getOwnMacLow Get 32 lower bits of MAC Address xbee868LP getOwnMacHigh Get 32 upper bits of MAC Address Related Variables sourceMacHigh 0 3 stores the 32 upper bits of MAC address s...

Страница 11: ...tes Sending AT commands example http www libelium com development waspmote examples 868lp 11 send atcommand 3 4 Waspmote reboot When Waspmote is rebooted the application code will start again creating all the variables and objects from the beginning 3 5 Constants pre defined There are some constants pre defined in a file called WaspXBeeCore h These constants define some parameters like the maximum...

Страница 12: ... UART and switches the XBee ON The baudrate used to open the UART is defined in the library 115200bps by default protocol specifies the protocol used XBEE_868 in this case discoveryOptions specifies the options in Node Discovery scanTime specifies the time to scan each channel encryptMode specifies if encryption mode is enabled timeRSSI specifies the time RSSI LEDs are on Example of use xbee868LP ...

Страница 13: ... bits of MAC Address Related Variables sourceMacHigh 0 3 stores the 32 upper bits of MAC address sourceMacLow 0 3 stores the 32 lower bits of MAC address Besides XBee modules provide a stick on the bottom side where the MAC address is indicated Figure MAC address 5 2 PAN ID The Personal Area Network Identifier PAN ID is the Network ID The user network identifier Nodes must have the same network id...

Страница 14: ...g of 20 characters at most which identifies the node in a network It is used to identify a node in the application level It is also used to search a node using its NI Example of use xbee868LP setNodeIdentifier node01 xbee868LP getNodeIdentifier Related Variables nodeID 0 19 stores the 20 byte max string Node Identifier 5 4 Available frequencies XBee 868LP defines 30 channels that are spaced 200 kH...

Страница 15: ...864 350 Bit 7 864 550 Bit 8 864 750 Bit 9 864 950 Bit 10 865 150 Bit 11 865 350 Bit 12 865 550 Bit 13 865 750 Bit 14 865 950 Bit 15 866 150 Bit 16 866 350 Bit 17 866 550 Bit 18 866 750 Bit 19 866 950 Bit 20 867 150 Bit 21 867 350 Bit 22 867 550 Bit 23 867 750 Bit 24 867 950 Bit 25 868 150 Bit 26 868 350 Bit 27 868 550 Bit 28 868 750 Bit 29 868 950 Figure Available frequencies on XBee 868LP Paramet...

Страница 16: ...uld use different Preamble Patterns HP and or Network ID s ID to avoid receiving data from the other network Parameter range From 0 to 0x3FFFFFFF Default 0x3FFFFFFF Example of use uint8_t channelMask 4 0xFF 0xFF 0xFF 0xFF xbee868LP setChannelMask channelMask xbee868LP getChannelMask Related Variables _channelMask 0 3 stores the operating channel XBee configuration example http www libelium com dev...

Страница 17: ...he last received packet The ideal working mode is getting maximum coverage with the minimum power level Thereby a compromise between power level and coverage appears Each application scenario will need some tests to find the best combination of both parameters Get RSSI example http www libelium com development waspmote examples 868lp 05 get rssi 6 2 Power Level It is possible to set get the power ...

Страница 18: ... address is assigned at the factory and can be read with the functions explained in the chapter related to MAC address XBee 868LP support Unicast and Broadcast transmissions Unicast The unicast mode is the only mode that supports acknowledgements ACKs When a packet is sent using unicast mode the receiving module sends an affirmative response to the sending module If the sending module does not rec...

Страница 19: ... 4 2 Sending function The function send sends a packet via XBee module Firstly the destination address must be defined depending on the addressing mode Define unicast mode must specify the destination MAC address For example char rx_address 0013A2004030F6BC Define broadcast mode char rx_address 000000000000FFFF Finally there are different sending function prototypes depending on the data sent It i...

Страница 20: ...or the rest of network nodes Probably after 3 or 4 failed retries it does not make sense to keep on trying Parameter range From 0 to 15 Default 10 Example of use xbee868LP setSendingRetries 10 Related variables _send_retries stores the maximum number of application level retries 7 4 3 Examples Send packets in unicast mode http www libelium com development waspmote examples 868lp 02 send packets Se...

Страница 21: ...or Checksum byte is not available 4 Error Checksum is not correct 5 Error Error escaping character in checksum byte 6 Error Error escaping character within payload bytes 7 Error Buffer full not enough memory space Example of use uint8_t error error xbee868LP receivePacketTimeout 10000 Related variables _payload Buffer where the received packet is stored _length Length of the buffer _srcMAC 0 7 Sou...

Страница 22: ... if the node is a Coordinator 0 Router 1 or End Device 2 ST Status Reserved PID Profile ID Profile ID used to application layer addressing MID Manufacturer ID ID set by the manufacturer to identify the module RSSI RSSI of last hop disabled in XBee 868LP by default To store the found brothers an array called scannedBrothers has been created It is an array of structures Node To specify the maximum n...

Страница 23: ...where the MAC address is stored Example of use uint8_t mac 8 xbee868LP nodeSearch node01 mac Related variables mac 0 7 Stores the 64 bit address of the searched node Node search example http www libelium com development waspmote examples 868lp 10a node search tx http www libelium com development waspmote examples 868lp 10b node search rx 8 3 Node discovery to a specific node When executing a Node ...

Страница 24: ... responses from other nodes when performing a ND Parameter range From 0x0020 to 0x2EE0 x100 ms Default value 0x0082 Example of use uint8_t time 2 0x00 0x82 xbee868LP setScanningTime time xbee868LP getScanningTime Available Information scanTime 0 1 stores the time a node will wait for responses ...

Страница 25: ...xbee868LP setSleepMode 1 Enable Sleep Mode xbee868LP getSleepMode Get the Sleep Mode used Related Variables sleepMode stores the sleep mode in a module If the Sleep Mode is set to 1 the pin sleep allows the module to sleep and wake When the pin sleep is asserted put to high the module will finish any transmit or receive operations and enter a low power state The module will wake from the low power...

Страница 26: ... mode xbee868LP setEncryptionMode 1 Enable encryption mode xbee868LP getEncryptionMode Get encryption mode Related Variables encryptMode stores if security is enabled or not XBee configuration example http www libelium com development waspmote examples 868lp 01 configure xbee parameters 10 2 2 Encryption Key 128 bit AES encryption key used to encrypt decrypt data The entire payload of the packet i...

Страница 27: ...a network using security is highly recommended to prevent the network from attacks or intruder nodes It is necessary to enable security and set the same encryption key in all nodes in order to set security in a network If not it won t be possible to communicate between different XBee modules ...

Страница 28: ...tifications See below the specific list of regulations passed More info at www libelium com products plug sense Besides Meshlium our multiprotocol router for the IoT is also certified with the certifications below Get more info at www libelium com products meshlium List of certifications for Plug Sense and Meshlium CE Europe FCC US IC Canada ANATEL Brazil RCM Australia PTCRB cellular certification...

Страница 29: ...nt8_t error void setup init USB port USB ON USB println F Sending packets example store Waspmote identifier in EEPROM memory frame setID WASPMOTE_ID init XBee xbee868LP ON void loop 1 Create ASCII frame create new frame frame createFrame ASCII add frame fields frame addSensor SENSOR_STR new_sensor_frame frame addSensor SENSOR_BAT PWR getBatteryLevel show frame to send frame showFrame 2 Send packet...

Страница 30: ... 30 v7 1 API changelog 13 API changelog Keep track of the software changes on this link www libelium com development waspmote documentation changelog 868lp ...

Страница 31: ... 31 v7 1 Documentation changelog 14 Documentation changelog From v7 0 to v7 1 Added a new section to show the user how to connect the module to Waspmote ...

Отзывы: