From 44c35350f8131e9998274ce4b3194d116250d379 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 2 Jul 2015 19:59:55 +0200 Subject: o Adding a temperature characteristic. Reading values from the nrf8001. --- services_lock.h | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) (limited to 'services_lock.h') diff --git a/services_lock.h b/services_lock.h index 57af1da..d3a271b 100644 --- a/services_lock.h +++ b/services_lock.h @@ -15,7 +15,7 @@ #define SETUP_ID 0 #define SETUP_FORMAT 3 /** nRF8001 D */ -#define ACI_DYNAMIC_DATA_SIZE 162 +#define ACI_DYNAMIC_DATA_SIZE 180 /* Service: Gap - Characteristic: Device name - Pipe: SET */ #define PIPE_GAP_DEVICE_NAME_SET 1 @@ -45,8 +45,16 @@ #define PIPE_SOIL_MOISTURE_SOIL_MOISTURE_CONTROL_RX_ACK_AUTO 7 #define PIPE_SOIL_MOISTURE_SOIL_MOISTURE_CONTROL_RX_ACK_AUTO_MAX_SIZE 20 +/* Service: Soil Moisture - Characteristic: Intermediate Temperature - Pipe: TX */ +#define PIPE_SOIL_MOISTURE_INTERMEDIATE_TEMPERATURE_TX 8 +#define PIPE_SOIL_MOISTURE_INTERMEDIATE_TEMPERATURE_TX_MAX_SIZE 10 -#define NUMBER_OF_PIPES 7 +/* Service: Soil Moisture - Characteristic: Intermediate Temperature - Pipe: SET */ +#define PIPE_SOIL_MOISTURE_INTERMEDIATE_TEMPERATURE_SET 9 +#define PIPE_SOIL_MOISTURE_INTERMEDIATE_TEMPERATURE_SET_MAX_SIZE 10 + + +#define NUMBER_OF_PIPES 9 #define SERVICES_PIPE_TYPE_MAPPING_CONTENT {\ {ACI_STORE_LOCAL, ACI_SET}, \ @@ -56,6 +64,8 @@ {ACI_STORE_LOCAL, ACI_TX}, \ {ACI_STORE_LOCAL, ACI_SET}, \ {ACI_STORE_LOCAL, ACI_RX_ACK_AUTO}, \ + {ACI_STORE_LOCAL, ACI_TX}, \ + {ACI_STORE_LOCAL, ACI_SET}, \ } #define GAP_PPCP_MAX_CONN_INT 0xffff /**< Maximum connection interval as a multiple of 1.25 msec , 0xFFFF means no specific value requested */ @@ -63,7 +73,7 @@ #define GAP_PPCP_SLAVE_LATENCY 0 #define GAP_PPCP_CONN_TIMEOUT 0xffff /** Connection Supervision timeout multiplier as a multiple of 10msec, 0xFFFF means no specific value requested */ -#define NB_SETUP_MESSAGES 21 +#define NB_SETUP_MESSAGES 23 #define SETUP_MESSAGES_CONTENT {\ {0x00,\ {\ @@ -72,7 +82,7 @@ },\ {0x00,\ {\ - 0x1f,0x06,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x07,0x01,0x01,0x00,0x00,0x06,0x00,0x01,\ + 0x1f,0x06,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x09,0x01,0x01,0x00,0x00,0x06,0x00,0x01,\ 0xd1,0x0f,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ },\ },\ @@ -155,7 +165,14 @@ },\ {0x00,\ {\ - 0x0c,0x06,0x21,0x18,0x02,0x00,0x13,0x29,0x02,0x01,0x00,0x00,0x00,\ + 0x1f,0x06,0x21,0x18,0x02,0x00,0x13,0x29,0x02,0x01,0x00,0x00,0x04,0x04,0x05,0x05,0x00,0x14,0x28,0x03,\ + 0x01,0x12,0x15,0x00,0x1e,0x2a,0x16,0x04,0x0b,0x0a,0x00,0x15,\ + },\ + },\ + {0x00,\ + {\ + 0x1c,0x06,0x21,0x34,0x2a,0x1e,0x01,0xaa,0xbb,0xcc,0xdd,0xee,0xff,0x99,0x88,0x77,0x66,0x46,0x14,0x03,\ + 0x02,0x00,0x16,0x29,0x02,0x01,0x00,0x00,0x00,\ },\ },\ {0x00,\ @@ -166,8 +183,13 @@ },\ {0x00,\ {\ - 0x19,0x06,0x40,0x1c,0x00,0x00,0x2a,0x1b,0x01,0x00,0x80,0x04,0x00,0x0f,0x00,0x00,0x00,0x11,0x02,0x04,\ - 0x82,0x04,0x00,0x12,0x00,0x13,\ + 0x1f,0x06,0x40,0x1c,0x00,0x00,0x2a,0x1b,0x01,0x00,0x80,0x04,0x00,0x0f,0x00,0x00,0x00,0x11,0x02,0x04,\ + 0x82,0x04,0x00,0x12,0x00,0x13,0x2a,0x1e,0x01,0x00,0x82,0x04,\ + },\ + },\ + {0x00,\ + {\ + 0x07,0x06,0x40,0x38,0x00,0x15,0x00,0x16,\ },\ },\ {0x00,\ @@ -177,12 +199,13 @@ },\ {0x00,\ {\ - 0x12,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ + 0x15,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\ + 0x00,0x00,\ },\ },\ {0x00,\ {\ - 0x06,0x06,0xf0,0x00,0x83,0x0d,0x8f,\ + 0x06,0x06,0xf0,0x00,0x83,0x26,0xe0,\ },\ },\ } -- cgit v1.2.3