Bluetooth Low Energy enabled device with "Switch" feature, compatible with BlueST Protocol.
Bluetooth Low Energy enabled device with "Switch" feature, compatible with BlueST Protocol.
Diff: source/main.cpp
- Revision:
- 3:b880b9a9ccdf
- Parent:
- 2:251cc22a254c
- Child:
- 4:67ff1ddd11e2
--- a/source/main.cpp Mon May 07 13:28:07 2018 +0000 +++ b/source/main.cpp Thu May 10 11:59:17 2018 +0000 @@ -177,7 +177,7 @@ ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE); ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_128BIT_SERVICE_IDS, (uint8_t *) CUSTOM_SWITCH_SERVICE_UUID, sizeof(CUSTOM_SWITCH_SERVICE_UUID)); ble.gap().accumulateScanResponse(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA, MANUFACTURER_SPECIFIC_DATA, sizeof(MANUFACTURER_SPECIFIC_DATA)); - ble.gap().accumulateScanResponse(GapAdvertisingData::COMPLETE_LOCAL_NAME, (const uint8_t *) DEVICE_NAME, sizeof(DEVICE_NAME)); + ble.gap().accumulateScanResponse(GapAdvertisingData::COMPLETE_LOCAL_NAME, (const uint8_t *) DEVICE_NAME, sizeof(DEVICE_NAME) - 1); ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED); ble.gap().setAdvertisingInterval(BLE_ADVERTISING_INTERVAL_ms); ble.gap().startAdvertising();