With the new software app upgrade, I don't see an option to view the details of the service/connection. Is that a bug?!
Previously it would be at the top
With the new software app upgrade, I don't see an option to view the details of the service/connection. Is that a bug?!
Previously it would be at the top
Hello, this was a bug in version 2.7, but should be fixed in 2.7.1. Version 2.7.2 is available on the app store now.
Fair.
Since the upgrade, I haven't been seeing Value attribute in the BLE service modifying despite being set via
sd_ble_gatts_hvx
Can't upload photos (nrf website being buggy)
There are no known issues with receiving notifications in the app. Have you checked whether sd_ble_gatts_hvx() returns NRF_SUCCESS?
Yes, it does after the notification has been enabled in the app
Yes, it does after the notification has been enabled in the app
Thanks for confirming. Could you please post the log from the nRF Connect app after you have enabled the notification?
How to view the log?
Here:
OK weird. sd_ble_gatts_hvx now returns 8.
uint32_t NotifierService::UpdateValue(uint16_t value)
{
if (!mStatusInfo->notificationEnabled)
{
return 0;
}
uint32_t err_code = NRF_SUCCESS;
ble_gatts_value_t gatts_value;
// Initialize value struct
memset(&gatts_value, 0, sizeof(gatts_value));
gatts_value.len = sizeof(uint16_t);
gatts_value.offset = 0;
gatts_value.p_value = reinterpret_cast<uint8_t*>(&value);
// Update database
err_code = sd_ble_gatts_value_set(mStatusInfo->connectionHandle,
mStatusInfo->customValueHandle.value_handle,
&gatts_value);
if (err_code != NRF_SUCCESS)
{
return err_code;
}
// Send value if connected and notifying
if ((mStatusInfo->connectionHandle != BLE_CONN_HANDLE_INVALID))
{
ble_gatts_hvx_params_t hvx_params;
memset(&hvx_params, 0, sizeof(hvx_params));
hvx_params.handle = mStatusInfo->customValueHandle.value_handle;
hvx_params.type = BLE_GATT_HVX_NOTIFICATION;
hvx_params.offset = gatts_value.offset;
hvx_params.p_len = &gatts_value.len;
hvx_params.p_data = gatts_value.p_value;
err_code = sd_ble_gatts_hvx(mStatusInfo->connectionHandle, &hvx_params);
}
else
{
err_code = NRF_ERROR_INVALID_STATE;
}
return err_code;
}
Please go to iOS settings -> Bluetooth, and toggle Bluetooth off and then back on. After that, try to connect with the nrf connect app and enable notifications again. Toggling Bluetooth enable will clear the attribute cache and this might be necessary if you have been using the same board with different firmware.