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

cpu/esp32: enable BLE and NimBLE host support for ESP32-C3 #18510

Merged
merged 4 commits into from
Aug 26, 2022

Conversation

gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Aug 24, 2022

Contribution description

This PR enables the Bluetooth 5 including advertising extension and NimBLE host support for ESP32-C3.

BLE and NimBLE host support for ESP32-C3 including advertising extension was already tested when BLE and NimBLE host support was tesed for ESP32 in PR #18439.

Testing procedure

The easiest way to test the PR is to use an ESP32 node and an ESP32-C3 node and flash tests/nimble_autoconn_gnrc and test it.

BOARD=esp32-wroom-32 make -j8 -C examples/nimble_autoconn_gnrc flash term
BOARD=esp32c3-devkit make -j8 -C examples/nimble_autoconn_gnrc flash term

Use command ble info to check that a connection between the two nodes is established after some seconds.

Node 1:

> ble info
Own Address: 60:55:F9:6E:6E:69 (public) -> [FE80::6055:F9FF:FE6E:6E69]
Supported PHY modes: 1M
 Free slots: 1/3
Advertising: yes
Connections: 1
[ 0] 7C:DF:A1:E2:94:99 [FE80::7CDF:A1FF:FEE2:9499] (M,75ms,2500ms,0,1M)
     (role, conn itvl, superv. timeout, slave latency, PHY)
Slots:
[ 0] state: 0x0011 - GAP-master L2CAP-client
[ 1] state: 0x0100 - advertising
[ 2] state: 0x8000 - unused

Node 2:

> ble info
Own Address: 7C:DF:A1:E2:94:99 (public) -> [FE80::7CDF:A1FF:FEE2:9499]
Supported PHY modes: 1M
 Free slots: 2/3
Advertising: no
Connections: 1
[ 0] 60:55:F9:6E:6E:69 [FE80::6055:F9FF:FE6E:6E69] (S,75ms,2500ms,0,1M)
     (role, conn itvl, superv. timeout, slave latency, PHY)
Slots:
[ 0] state: 0x0022 - GAP-slave L2CAP-server
[ 1] state: 0x8000 - unused
[ 2] state: 0x8000 - unused

Issues/PRs references

@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Platform: ESP Platform: This PR/issue effects ESP-based platforms labels Aug 24, 2022
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking forward to ESP32-S3 BLE support now 😃

@gschorcht
Copy link
Contributor Author

@benpicco May I squash?

@benpicco
Copy link
Contributor

Of course :)

@gschorcht gschorcht force-pushed the cpu/esp32/add_esp32c3_ble_support branch from 10f007c to 58eaee4 Compare August 25, 2022 15:10
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Aug 25, 2022
@benpicco benpicco enabled auto-merge August 25, 2022 18:50
@benpicco
Copy link
Contributor

KConfig doesn't match 😕

@benpicco benpicco disabled auto-merge August 25, 2022 19:50
@gschorcht
Copy link
Contributor Author

KConfig doesn't match confused

Hm, I tried the feature immediatily before I left for vacation and forgot to enable it in Kconfig.

@gschorcht gschorcht force-pushed the cpu/esp32/add_esp32c3_ble_support branch from 58eaee4 to aba5e35 Compare August 26, 2022 15:11
@gschorcht
Copy link
Contributor Author

KConfig doesn't match confused

Hm, I tried the feature immediatily before I left for vacation and forgot to enable it in Kconfig.

I added select HAS_BLE_PHY_2MBIT to cpu/esp32/Kconfig.esp32c3. I squashed it directly because it was a marginal solution.

@benpicco benpicco enabled auto-merge August 26, 2022 15:13
@gschorcht
Copy link
Contributor Author

Looking forward to ESP32-S3 BLE support now smiley

See PR #18517.

@gschorcht
Copy link
Contributor Author

@benpicco Thanks for reviewing and merging.

@gschorcht gschorcht deleted the cpu/esp32/add_esp32c3_ble_support branch August 31, 2022 07:22
@maribu maribu added this to the Release 2022.10 milestone Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ESP Platform: This PR/issue effects ESP-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants