Fix undefined reference to ble_svc_gap_device_name_set when GATT server is disabled#349
Merged
Conversation
Owner
|
Thanks, but this will also prevent the ability to change the name if that macro is not defined, such as when using an older NimBLE/IDF version. We should check if it is defined at all first then check the value. |
Contributor
Author
|
But I get your point for IDF 5.0 and below. Imho most obvious solution would be to change the macro to: So this should only affect IDF 5.5 and up. |
Owner
|
Thanks! |
h2zero
pushed a commit
that referenced
this pull request
Sep 2, 2025
…er is disabled (#349) * Fix undefined reference to ble_svc_gap_device_name_set when GATT server is disabled * Do not affect ESP-IDF <5.5.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since commit espressif/esp-idf@a58ce39 (included in v5.5-RC1) the function
ble_svc_gap_device_name_setwill not be defined in esp-idf whenCONFIG_BT_NIMBLE_GATT_SERVER=nand compilation of esp-nimble-cpp will fail as a result.This PR makes calling
ble_svc_gap_device_name_setconditional onCONFIG_BT_NIMBLE_GAP_SERVICEin line with the examples in esp-idf master (see the above commit)