Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 7 months ago. This question has been closed. Reason: Unclear question
Nordic Pucks - update seems limited to allowing only one server/characteristic..
based on:
Quote:
The Puck library is updated, and should be working with the newest version of the mbed library posted by Stian Jensen 27 Feb 2015
i took an attempt to start using the nRF51-DK and the Puck example - if i have a single service with a single characteristic; everything works as expected. was not a problem to subscribe to it, use the buttons of the device to set the characteristic and see what was going on.. the problems started when i was attempting to add a secondary characteristic..
very basic example:
const UUID nRF51_GATT_SERVICE = stringToUUID("nRF51-DK service"); const UUID nRF51_BUTTON_GATT_CHARACTERISTIC = stringToUUID("nRF51-DK button characteristic"); const int nRF51_BUTTON_GATT_DATA_LENGTH = 1; const UUID nRF51_LED_GATT_CHARACTERISTIC = stringToUUID("nRF51-DK led characteristic"); const int nRF51_LED_GATT_DATA_LENGTH = 1;
and then during the initialization.. adding:
puck -> addCharacteristic( nRF51_GATT_SERVICE, nRF51_BUTTON_GATT_CHARACTERISTIC, nRF51_BUTTON_GATT_DATA_LENGTH, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY); puck -> addCharacteristic( nRF51_GATT_SERVICE, nRF51_LED_GATT_CHARACTERISTIC, nRF51_LED_GATT_DATA_LENGTH, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE_WITHOUT_RESPONSE | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY);
the first one gets added.. second one doesn't.. if i swap them around, which ever one i declare first is added. the other one seems to be lost in the abyss. of course; would be nice to have multiple characteristics under a single service.. or even having multiple services.. something seems to be broken :(
for the sake of sanity - i put some debugging code in the Puck.h file where addCharacteristic() is being called:
and while running; i do see that it has references to both of the characteristics:
so it seems the problem may be a little deeper than the Nordic Puck handling.. i am using LightBlue on MacOSX to view/traverse the puck services and characteristics.
posted by Aaron Ardiri 05 Apr 2015i did a little bit more digging on this - seems to not be the device, but more the software i was using to scan for services/characteristics.. a more verbose debugging of the setup is shown below:
when i used an iOS or Android application to scan for the services/characteristics; they appear as they should. seems this was/is a bug within the Mac OSX based BLE tool called LightBlue from PunchthroughDesign
posted by Aaron Ardiri 07 Apr 2015