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

Bluetooth Central: Discovery of 128bit primary service fails with later versions of gcc. #22051

Closed
lanvis opened this issue Jan 20, 2020 · 4 comments
Assignees
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@lanvis
Copy link

lanvis commented Jan 20, 2020

Describe the bug
Discovery of 128bit primary service fails with later versions of gcc.
In gatt_find_type(), looks like macro BT_UUID_16 returns wrong value with later gcc versions.

Using gcc ARM version 7.3.1 (BT_UUID_16(uuid)->val) returns 0x2800 (which is correct)

Using gcc ARM version 9.2.1 (BT_UUID_16(uuid)->val) returns 0x2000 (which is incorrect) and leads to a failed discovery.

To Reproduce
Attempt a discovery of a 128bit primary service when configured as a central.

A Ellisys trace is attached showing the Find by value request going out as RFCOMM???
DiscoveryFailGCCNew012020.zip

Environment (please complete the following information):

  • OS: Linux 18.04LTS
  • Toolchain (Zephyr 2.0.0, ARM gcc 9.2.1)

DiscoveryFailGCCNew012020.zip

@lanvis lanvis added the bug The issue is a bug, or the PR is fixing a bug label Jan 20, 2020
@lanvis lanvis changed the title Discovery of 128bit primary service fails with later versions of gcc. Bluetooth Central: Discovery of 128bit primary service fails with later versions of gcc. Jan 20, 2020
@lanvis
Copy link
Author

lanvis commented Jan 21, 2020

In gatt_find_type(), BT_UUID_16(uuid)->val) returns wrong value in later gcc versions.

@aescolar
Copy link
Member

CC @jhedberg @Vudentz

@jhedberg jhedberg added the priority: medium Medium impact/importance bug label Jan 21, 2020
@joerchan
Copy link
Contributor

Since it is Zephyr 2.0.0. This might be already fixed by:
#21186

@lanvis Please check

@lanvis
Copy link
Author

lanvis commented Jan 22, 2020

Yep ... that is the same bug. Sorry about that. I tested by merging your updates into 2.0 gatt.c file as changes to the file are many.

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants