Hi all,
I have a small question. If a GATT server needs to send data to a GATT client(about 65 bytes), does it have to create a service first and then adds characteristic, or it can use directly sd_gap_gatts_hvx function()?
Regards,
mohBOSS.
Hi there,
You will need to add a service and a characteristic to send arbitrary data. Once you have the handle to the characteristic you can use sd_ble_gatts_hvx() to send data. Alternatively, if it's easier for you, you can add the service and characteristic on the peer device and use sd_ble_gattc_write() to send data, acting as a GATT client.
Carles
Hi there,
Not sure about ble_lbs_t, it's not something that's part of the SoftDevice. What I would recommend for simple data transmission as a service is to take a look at:
Service: components/ble/ble_services/ble_nus
Example using the service: examples/ble_peripheral/ble_app_uart
The function call to: ble_nus_string_send()
is what you need. It sends a notification with arbitrary data.
Carles
Hi there,
Not sure about ble_lbs_t, it's not something that's part of the SoftDevice. What I would recommend for simple data transmission as a service is to take a look at:
Service: components/ble/ble_services/ble_nus
Example using the service: examples/ble_peripheral/ble_app_uart
The function call to: ble_nus_string_send()
is what you need. It sends a notification with arbitrary data.
Carles