I'm trying to set the time via a BLE characteristic, but I don't think i'm doing it right as the time never updates
Here's the code for onDataWritten
void onDataWritten(const GattWriteCallbackParams *params)
{
if (params->handle == setTimeChar.getValueAttribute().getHandle()) {
set_time((time_t )*params->data);
}
}
I'm sending the data via the nordic connect android app as 0xBBBBBB
and then i'm getting the value of the time via:
unsigned long millis = us_ticker_read() / 1000L;
to update another characteristic for sending.
The code compiles fine, but I wonder if i'm passing the right args to set_time()
I'm trying to set the time via a BLE characteristic, but I don't think i'm doing it right as the time never updates
Here's the code for onDataWritten
I'm sending the data via the nordic connect android app as 0xBBBBBB
and then i'm getting the value of the time via:
to update another characteristic for sending.
The code compiles fine, but I wonder if i'm passing the right args to set_time()