Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gattlib_write_char_by_handle stalls #31

Open
mweal-ed opened this issue Jul 6, 2017 · 2 comments
Open

gattlib_write_char_by_handle stalls #31

mweal-ed opened this issue Jul 6, 2017 · 2 comments

Comments

@mweal-ed
Copy link
Contributor

mweal-ed commented Jul 6, 2017

I'm not sure if this is a problem in gattlib or the underlying bluez/kernel drivers, but it seems like about 1 in 5000 writes stall - stuck in the while ( write_completed == FALSE ) loop. Looking at the HCI traces in wireshark the write never made it down to the the hci device. I have tried this both on Ubuntu 16.04.2 LTS and Raspberry Pi 3, both with the same results.

I have tried changing gattlib_write_char_by_handle to use gatt_write_cmd instead of gatt_write_char, and the write still gets dropped.

Do you have any suggestions on what might be causing this problem (or where I should start looking)?

@mweal-ed
Copy link
Contributor Author

mweal-ed commented Jul 7, 2017

I have been looking into this further and I believe the problem may have something to do with a conflict/race condition between "g_main_loop_run" in the "connection_thread" and the various "g_main_context_iteration" calls.

Note sure, but still looking, any help would be appreciated.

@mweal-ed mweal-ed closed this as completed Jul 7, 2017
@mweal-ed mweal-ed reopened this Jul 7, 2017
@mweal-ed
Copy link
Contributor Author

fix in pull request #33

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

No branches or pull requests

1 participant