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

softdevice: fix writing to a characteristic #209

Merged
merged 1 commit into from
Dec 25, 2023
Merged

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented Dec 24, 2023

This seems to have been broken since #192. I suspect it's a problem with the struct calling convention (which most certainly is a TinyGo CGo bug, but at least this works around the problem).

This fixes my Write() call on the PineTime that previously returned an error.

This seems to have been broken since
#192, I suspect it's a
problem with the struct calling convention (which most certainly is a
TinyGo CGo bug, but at least this works around the problem).
@HattoriHanzo031
Copy link
Contributor

This seems to have been broken since #192. I suspect it's a problem with the struct calling convention (which most certainly is a TinyGo CGo bug, but at least this works around the problem).

This fixes my Write() call on the PineTime that previously returned an error.

Interesting, I presume sd_ble_gatts_hvx_noescape does not have this problem because it creates the struct inside the function like your workaround? sd_ble_gap_adv_start_noescape is also implemented similar to sd_ble_gatts_value_set_noescape. I didn't see any issue with it, but it is only for NRF51 which might be the reason it in not affected. How exactly does the issue manifest, maybe I can try to test if it also affects sd_ble_gatts_value_set_noescape.

@deadprogram
Copy link
Member

Thanks for the fix @aykevl now merging.

@deadprogram deadprogram merged commit b5d4e3f into dev Dec 25, 2023
5 checks passed
@deadprogram deadprogram deleted the gatts-fix-noescape branch December 25, 2023 11:41
@aykevl
Copy link
Member Author

aykevl commented Dec 25, 2023

How exactly does the issue manifest, maybe I can try to test if it also affects sd_ble_gatts_value_set_noescape.

It was returning an error and not actually doing what it is supposed to do.

This is a chance this worked by accident on nrf51 just not on the nrf52.

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

Successfully merging this pull request may close these issues.

3 participants