How can we send notification to connected devices

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ns_4270701
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

Development environment:

Windows 8.1 pro

Platform: CYBT-423028-02

IDE: Wiced Studio 6.2.1

Just as an example :

Created service A

    It has 2 characteristics  B and C

B characteristic has Read and Write property n permission

characteristic has Read and Notify property n permission

We have developed a demo code and created a characteristic(C) of one of the services(A) with "Notify" property.

Once the peer device writes into the client configuration of (C), I  get the 0x1000 for notification.

But when we use the same characteristic to send the notification value, A peer device is not getting any notification. Please tell me which attr handle should be used to send the notification to peer device, please share the example.

wiced_bt_gatt_status_t wiced_bt_gatt_send_notification (uint16_t conn_id, uint16_t attr_handle, uint16_t val_len, uint8_t *p_val );

conn_id                 = connected device's id

attr_handle         = (Characteristic C )CLIENT_CONFIGURATION , handle

val_len                  = length of the actual data to be shared with a connected device

p_val                     = Notification value

Please note we have followed the steps from the "demo.sensor" project, but it doesn't work in our code.

So please provide me the proper example of it.

0 Likes
1 Solution

Found the issue.. the connection ID was updated wrong..  Thanks anyways.

View solution in original post

0 Likes
4 Replies