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

Error status 0x0181 sent back in BLE write call-back. What does it mean? #1827

Open
elfrances opened this issue Aug 5, 2024 · 2 comments
Open

Comments

@elfrances
Copy link

My app is getting back the error status 0x0181 (385 decimal) in the BLE write callback when it tries to write to the FTMS's Fitness Machine Control Point characteristic 0x2AD9. Browsing the NimBLE code, I can't figure out what this status code means. The BLE device rejecting this write request is a ZwiftHub indoor bike trainer. No idea what BLE stack this device uses. Does anyone know?

@sjanc
Copy link
Contributor

sjanc commented Aug 6, 2024

Hi,

In Nimble error codes have ranges so that one can figure out from which layer error originated from.
0x181 is 0x100 + 0x81 which means it is ATT (0x100) error code with value 0x81.

0x81 is from ATT application error code range which means that its meaning is defined in FTMS specification.

More info on errors can be found in documentation: https://mynewt.apache.org/v1_12_0/network/ble_hs/ble_hs_return_codes.html

@elfrances
Copy link
Author

Thanks for your clear explanation @sjanc !

For NimBLE neophytes (such as me) it would be helpful to have a comment with your clear explanation in the definition of the 'struct ble_gatt_error' inside ble_gatt.h.

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

2 participants