Difference between revisions of "WaspmoteBLECentral"

From AMTech WikiDocs
Jump to: navigation, search
Line 8: Line 8:
 
##Fort byte first 4 bits a message number from 1-255 last 4 bits the amount of sensors values send in the package
 
##Fort byte first 4 bits a message number from 1-255 last 4 bits the amount of sensors values send in the package
 
##Next bytes must be set with read sensor value a byte with the id of the sensor from Libelium WaspFrame.h and the value(s) read b the sensor
 
##Next bytes must be set with read sensor value a byte with the id of the sensor from Libelium WaspFrame.h and the value(s) read b the sensor
#WaspmoteBLECentral logic uses sensor values type and size from  
+
#WaspmoteBLECentral logic uses sensor values type and size from [http://www.libelium.com/downloads/documentation/data_frame_guide.pdf Sensor ID Table]
 +
 
 +
 
 +
 
  
  

Revision as of 12:19, 19 July 2017

WaspmoteBLECentral is a thing type that implements a BLE Central to communicate with Libelium waspmote model using the BLE protocol. The Arduino sketch running on the Libelium waspmote model should construct the BLE advertisement package following the next guideline:

  1. Write the local attribute containing the device name value "WBLE" BLE.writeLocalAttribute(3, deviceName);
  2. Build a custom BLE advertisement packet
    1. First byte package size
    2. Second byte MANUFACTURER_SPECIFIC_DATA Identifier 0xff
    3. Third byte waspmote model identifier example GAS_PRO = 19 (see waspmote model documentation)
    4. Fort byte first 4 bits a message number from 1-255 last 4 bits the amount of sensors values send in the package
    5. Next bytes must be set with read sensor value a byte with the id of the sensor from Libelium WaspFrame.h and the value(s) read b the sensor
  3. WaspmoteBLECentral logic uses sensor values type and size from Sensor ID Table



/*

* AD_TYPE_MANUFACTURER_SPECIFIC_DATA (1) LIBELIUM_BLEID (1) Gases_PRO (1) TOTAL_SENSORS (1) SENSORS_MSG (1) 
* SENSOR_ACC (1 + 6)  SENSOR_BAT (1 + 1), SENSOR_IN_TEMP (1 + 4) , SENSOR_GP_TC (1 + 4 ) SENSOR_GP_HUM ( 1+ 4) [29]
*/


/*

* LIBELIUM_BLEID (1) Gases_PRO (1) TOTAL_SENSORS (1) SENSORS_MSG (1) SENSOR_GP_PRES ( 1+ 4) SENSOR_GP_CH4 ( 1+ 4) SENSOR_GP_NO2 ( 1+ 4) SENSOR_GP_O2 ( 1+ 4) SENSOR_GP_CO ( 1+ 4) [30]
*/