Development v12

Warning - Product Update

All the resources present on this section belong to Waspmote v12, Waspmote Plug & Sense! v12 and Meshlium v3.8.

If you have a Waspmote v15, Waspmote Plug & Sense! v15 or Meshlium v4.0 please go to the new Development Section.

Check what is your version and what are the differences between the old and the new one in this document.

Examples:

Communication / Bluetooth Low Energy

» BLE 01 Normal scan

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how to make a normal scan with Bluetooth low energy, printing number of discovered devices and scan results stored in EEPROM.

» BLE 02 Name scan

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how to make a name scan with Bluetooth low energy, printing number of discovered devices and scan results stored in EEPROM.

» BLE 03 Limited scan

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how to make a limited scan with Bluetooth low energy, till find two devices, printing them by USB

» BLE 04 Scan device

Last edition: May 09th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how to make a scan with Bluetooth low energy and look for a specific BLE module, printing number of discovered devices and scan results.

» BLE 05 Configuring a scan

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how to configure scan parameters and makin a scan with them, printing number of discovered devices and scan results stored in EEPROM.

» BLE 06 Configuring a connection

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example configures the parameters involved when connecting to a slave. It performs a device scan and if detected, it connects to the BLE module with the selected paramenters.

» BLE 07 Connecting to a BLE device as Master

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This examples shows how to connect to other BLE device, using default connecting parameters. Waspmote will be the master and the remote device will be the slave. A remote attribute is read / written on the slave.

» BLE 08 Connecting to a BLE device as Slave

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

this code set discoverable/connectable mode on Waspmote to allow connections from other BLE devices. Then wait during 30 seconds for incoming connections. If a connection is established, then Waspmote keeps connected till the master ends the connection.

» BLE 09 Encrypted connection

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This code set discoverable/connectable mode on Waspmote to allow connections from other BLE devices. Then wait during 30 seconds for incoming connections. If a connection is established, the connection is encrypted and then Waspmote keeps connected till the master ends the connection.

» BLE 10 Characteristic notification as master

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how notifying processes works. The program first look for a certain BLE device and connects to it. Then, it subscribes to notifications of a certain characteristic and wait for notifications from the slave. Once 5 notifications are received (or timeout is reached) the Master terminates the connection and starts again. This example is though to be used together with example BLE_11.

» BLE 11 Characteristic notification slave

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how notifying processes works. The program first make itself discoverable and connectable, waiting for incoming connections. Once connected, waits for notification subscribing events and, when they are found, the subscribed attribute is written five times to allow the master receive notification events. Then, it keeps waiting events till the connection is over.

» BLE 12 Characteristic indication Master

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how indicate processes works. The program first look for a certain BLE device and connects to it. Then, it subscribes to indications of a certain characteristic and wait for indications from the slave. Once 5 indications are received (or timeout is reached) the Master terminates the connection and starts again. This example is though to be used together with example BLE_11.

» BLE 13 characteristic indication slave

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how indicate processes works. The program first make itself discoverable and connectable, waiting for incoming connections. Once connected, waits for indication subscribing events and, when they are found, the subscribed attribute is written five times to allow the master receive indication events. Then, it waits till the indication acknowledge event from the written value. Finally, it keeps waiting events till the connection is over.

» BLE 17 Configuring advertisements

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example changes the advertisement parameters to show the ability of sending data in the advertisement payload. Remember that maximum advertisement data length is 31 bytes.

» BLE 18 Sleep mode

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example show how to manage BLE sleep mode. * Do not confuse BLE sleep mode with Waspmote sleep modes.

» BLE 19 Get own mac

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how to know the BLE module MAC address

» BLE 21 Software reset

Last edition: Jan 10th, 2017 | Categories: Communication, Bluetooth Low Energy

This example shows how to make a software reset of the BLE module.