BLE test
Fork of X_NUCLEO_IDB0XA1 by
Diff: source/BlueNRGGattClient.cpp
- Revision:
- 145:024a552e4715
- Parent:
- 144:bdf5e8432131
- Child:
- 152:4afc5c2fc4f3
--- a/source/BlueNRGGattClient.cpp Wed Oct 21 11:56:41 2015 +0200 +++ b/source/BlueNRGGattClient.cpp Tue Oct 27 10:18:55 2015 +0100 @@ -105,10 +105,12 @@ uuid.setupLong(attribute_data_list+offset+4); PRINTF("S UUID-"); +#ifdef DEBUG const uint8_t *longUUIDBytes = uuid.getBaseUUID(); for (unsigned j = 0; j < UUID::LENGTH_OF_LONG_UUID; j++) { PRINTF("%02x", longUUIDBytes[j]); } +#endif PRINTF(" attrs[%u %u]\r\n", startHandle, endHandle); } @@ -184,11 +186,13 @@ PRINTF("Char UUID_TYPE_128\n\r"); uuid.setupLong(handle_value_pair+offset+5); PRINTF("C UUID-"); +#ifdef DEBUG const uint8_t *longUUIDBytes = uuid.getBaseUUID(); for (unsigned i = 0; i < UUID::LENGTH_OF_LONG_UUID; i++) { PRINTF("%02X", longUUIDBytes[i]); } PRINTF("\r\n"); +#endif } // Properties @@ -254,11 +258,13 @@ PRINTF("Char UUID_TYPE_128\n\r"); uuid.setupLong(attr_value+3); PRINTF("C UUID-"); +#ifdef DEBUG const uint8_t *longUUIDBytes = uuid.getBaseUUID(); for (unsigned i = 0; i < UUID::LENGTH_OF_LONG_UUID; i++) { PRINTF("%02X", longUUIDBytes[i]); } PRINTF("\r\n"); +#endif } // Properties @@ -538,6 +544,10 @@ // Save the attribute_handle not provided by evt_att_read_resp gattc->readCBParams.handle = attributeHandle; + // We need to wait for a while before starting a read due to + // BlueNRG process queue handling + Clock_Wait(100); //(?) + ret = aci_gatt_read_charac_val(connHandle, attributeHandle); if(ret == BLE_STATUS_SUCCESS) {