Hi,
wow I'm here again!
Simple code that I've had working on ESP32 & DA14585...
Basically this is the code:
uint32_t commands_val;
commands_val = 0x11223344;
wiced_bt_gatt_send_notification(conn_id, HANDLE_COMMANDS_VAL, 4, (uint8_t*)commands_val);
This is received incorrectly on my test environment (MacOS). The other platforms - ESP32 and DA14585 respond correctly. A temporary work around is to read the handle again if the value is what is expected, this then reads the correct value 0x11223344.
Any suggestions?
Thanks.
Solved! Go to Solution.
Hi,
uint32_t commands_val;
commands_val = 0x11223344;
wiced_bt_gatt_send_notification(conn_id, HANDLE_COMMANDS_VAL, 4, &commands_val);
Above implementation will work otherwise whatever you implemented in your response should also work.
You can check the API implementation in hello_sensor.c.
Ok, if I define "commands_val" as:
uint8_t commands_val[4];
and then:
commands_val[0] = 0x44;
commands_val[1] = 0x33;
commands_val[2] = 0x22;
commands_val[3] = 0x11;
wiced_bt_gatt_send_notification(conn_id, HANDLE_COMMANDS_VAL, 4, commands_val);
This works?
Hi,
uint32_t commands_val;
commands_val = 0x11223344;
wiced_bt_gatt_send_notification(conn_id, HANDLE_COMMANDS_VAL, 4, &commands_val);
Above implementation will work otherwise whatever you implemented in your response should also work.
You can check the API implementation in hello_sensor.c.