cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

New Contributor

1. modify the hello_client.c as below to  add  LEGATTDB_CHAR_PROP_NOTIFY | LEGATTDB_CHAR_PROP_INDICATE permission;

CHARACTERISTIC_UUID16 (0x0062, 0x0063, UUID_CHARACTERISTIC_BATTERY_LEVEL,

                           LEGATTDB_CHAR_PROP_READ | LEGATTDB_CHAR_PROP_NOTIFY | LEGATTDB_CHAR_PROP_INDICATE,

                           LEGATTDB_PERM_READABLE /*| LEGATTDB_PERM_WRITE_CMD |LEGATTDB_PERM_WRITE_REQ*/, 1),

        0x60,

2.  using the following code to modify characteristic value and send out the notification:

    BLEPROFILE_DB_PDU db_pdu;

    bleprofile_ReadHandle(0x63, &db_pdu);

    db_pdu.pdu[0]=0x50;

    bleprofile_WriteHandle(0x63, &db_pdu);

    blecm_SetPtrConMux(hello_client.handle_to_master);

    bleprofile_sendNotification(0x63, db_pdu.pdu, (INT32) db_pdu.len);

3. the connected android device can't receive the notification, but the value has been modified;

4. bleprofile_sendNotification(HANDLE_HELLO_CLIENT_DATA_VALUE, db_pdu.pdu, (INT32) db_pdu.len); ----for this characteristic,

    the connected device can receive the notification.

0 Likes
Reply
1 Solution
Anonymous
Not applicable

jenny.xiao

Hello, I tried your code and it works.

I tried putting your code in number 2 into hello_client's timeout function and I was able to receive the notifications every second.

But instead of putting 0x50 all the time, I used a counter to see the changes.

If you put 0x50 all the time, you won't see any changes in the Android side unless you also show time stamps.

If you are seeing the value being modified to 0x50, but you don't see any changes, then perhaps this is your problem.

But I did verify that your code works.

Hope this helps.

James

View solution in original post

0 Likes
Reply
2 Replies
Anonymous
Not applicable

jenny.xiao

Hello, I tried your code and it works.

I tried putting your code in number 2 into hello_client's timeout function and I was able to receive the notifications every second.

But instead of putting 0x50 all the time, I used a counter to see the changes.

If you put 0x50 all the time, you won't see any changes in the Android side unless you also show time stamps.

If you are seeing the value being modified to 0x50, but you don't see any changes, then perhaps this is your problem.

But I did verify that your code works.

Hope this helps.

James

View solution in original post

0 Likes
Reply