Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

write_value to NRF52 on Ubuntu 18.04 takes at least 75 ms. #158

Open
wiesener opened this issue Jan 22, 2019 · 2 comments
Open

write_value to NRF52 on Ubuntu 18.04 takes at least 75 ms. #158

wiesener opened this issue Jan 22, 2019 · 2 comments

Comments

@wiesener
Copy link

I've measured the duration of sending one packet of 8 bytes to the peripheral with the code below:

auto tick = boost::posix_time::microsec_clock::local_time();
this->nus_char_tx->write_value(buffer);
auto now = boost::posix_time::microsec_clock::local_time();
boost::posix_time::time_duration diff = now - tick;
auto mili = diff.total_milliseconds();
std::cout << "Time elpased: " << mili << std::endl;

It gives me around 70-90 ms. My peripheral set the connection interval between 7.5-75 ms. So how could it be that long for sending just some data.

Best regards,

@wiesener
Copy link
Author

I've just checked:
write_value calls: gatt_characteristic1_call_write_value_sync
Which seems to be generated code?
Is there a way to call it asynchronously? And is there a way to reduce the connection interval from dbus?

1 similar comment
@wiesener
Copy link
Author

I've just checked:
write_value calls: gatt_characteristic1_call_write_value_sync
Which seems to be generated code?
Is there a way to call it asynchronously? And is there a way to reduce the connection interval from dbus?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant