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

bt-hci dependency pulled when enabling defmt feature #3038

Closed
DBLouis opened this issue Jan 27, 2025 · 6 comments
Closed

bt-hci dependency pulled when enabling defmt feature #3038

DBLouis opened this issue Jan 27, 2025 · 6 comments
Labels
bug Something isn't working status:needs-attention This should be prioritized

Comments

@DBLouis
Copy link
Contributor

DBLouis commented Jan 27, 2025

Bug description

When defmt feature of esp-wifi crate is enabled, bt-hci is added to Cargo.lock even though ble feature is not enabled.

To Reproduce

Add esp-wifi with ble feature disabled and defmt enabled.

Expected behavior

bt-hci dependency should not be added if ble feature is disabled.

Environment

  • Target device: ESP32
  • Crate name and version: esp-wifi 0.12.0
@DBLouis DBLouis added bug Something isn't working status:needs-attention This should be prioritized labels Jan 27, 2025
@DBLouis DBLouis changed the title bt-hci dependency pulled when enabled defmt feature bt-hci dependency pulled when enabling defmt feature Jan 27, 2025
@bugadani
Copy link
Contributor

This is a cargo quirk - Cargo.lock may contain optional dependencies even if they are not activated.

@bugadani bugadani closed this as not planned Won't fix, can't repro, duplicate, stale Jan 27, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Jan 27, 2025
@DBLouis
Copy link
Contributor Author

DBLouis commented Jan 27, 2025

Ok, but this is not without consequences, I can see different behavior when bt-hci is present in Cargo.lock, even if I am not using bluetooth and ble feature is not enabled.

@bugadani
Copy link
Contributor

What difference in behavior can you see?

@DBLouis
Copy link
Contributor Author

DBLouis commented Jan 27, 2025

First of all, the executable is different, and second, the ESP output this line at start:
[WARN] - esp_wifi_internal_tx 12290
Which seems to make the WiFi unstable.

@bugadani
Copy link
Contributor

You are enabling logging, why would you expect the executable to remain unchanged?

[WARN] - esp_wifi_internal_tx 12290

The error code is 0x3002, which is ESP_ERR_WIFI_NOT_STARTED. Not sure why this would be related to bt-hci, but you're seeing the log line because you're enabling defmt.

@DBLouis
Copy link
Contributor Author

DBLouis commented Jan 27, 2025

Makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status:needs-attention This should be prioritized
Projects
Archived in project
Development

No branches or pull requests

2 participants