Join Scott as he starts working on ESP BLE pairing and bonding (aka initiating encrypted connections), demonstrates building CircuitPython with asyncio python scripts and answers questions.
https://github.com/tannewt/circuitpython/tree/embedded-build
https://github.com/tannewt/embedded
Thanks to dcd for timecodes:
0:00 Getting Started
1:56 Hello - welcome to Deep Dive w/Scott
3:00 Adafruit Feather nRF25840 bluefruit feather example
3:09 We will talk about Bluetooth Low Energy today
4:47 Join #live-broadcast-chat on Discord at http://adafrui.it/discord
5:15 BLE vs Bluetooth "Classic" (older devices)
6:06 ESP32-S2-DevKitC-1 V1.o S2 SOLO N4R2 (bad example, no BLE support :-) )
6:16 ESPS3 BLE + WiFi
7:43 LED Glasses nRF52840
8:42 Creating Servers and Dynamic Services - from two weeks ago
10:00 Pull Request to add ability to create services (e.g. HID services )
10:45 Pairing & Bonding / services / characteristics (create a keyboard)
12:20 esp-matter protocol - hamslabs
13:35 PR: Add ESP BLE GATT server support #9222
13:46 also issue Add ESP BLE GATT server support #5926
14:41 Code review process inner workings
15:29 ESP32-H4 and ESP32-P4 annonuncement on espressif.com (not available yet) - but see ESP-IDF SDK
16:14 also added C2 support to circuitpython ( but it ran out of memory ) maybe only one of WiFi or BLE at a time
17:08 and C6 - no RMT neopixel support, but it does have BLE
19:45 using TinyUSB on devices with SPI but no USB
21:03 BLE_EXT_ADV ( extended advertising feature of BLE 5)
24:39 yesterdays ESP32 issue - better debugging by enabling better debug logging
25:40 pondering interrupt handlers and weak functions
26:27 Review files changed in PR9222
26:35 Trade-off OTA for BLE on new 4MB boards
28:00 adding -u to LDFLAGS to deal with weak symbols
29:18 Pairing and Bonding not supported yet
29:50 then maybe look at building CP with new build systems
31:29 Pairing and Bonding ...
33:35 ESP IDF stores bonding information in NVS partion
34:03 look on github circuitpython/tests/circuitpyton-manual for example code (but no BLE code)
34:14 adafruit/Adafruit_CircuitPython_BLE/examples/ble_hid_central.py ( all commented out)
36:13 adafruit/Adafruit_CircuitPython_BLE/examples/ble_current_time_service.py
36:37 iPhone pairing can deliver time
37:08 github espressif/esp-idf/examples/bluetooth/nimble blecent and bleprph
38:38 bleprph/tutorial bleprph_walkthrough.md
41:35 watch running CP and BLE and updating time
43:38 view example for bleprph/main/main.c code
44:14 CP repo ports/espressif/common-hal/_bleio/PacketBuffer.c
44:26 and ports/espressif/common-hal/_bleio/Connection. ( TODO:Implement this )
46:58 using copilot to make printf debugging faster!
50:54 also Adapter.c
53:39 refer to online CP docs for _bleio
56:20 git switch ble_bonding
58:03 clangd feature for genertated tags in editor ( mentioned a few weeks ago )o
59:54 S3 WROOM-2 N32R8V
1:01:02 set up window for serial output capture and CP serial REPL
1:06:21 update code.py - start test / paired - decode connections
1:09:20 CP doesn't have audio over BLE
1:17:36 use chatgpt to convert C #defines to switch statement function
1:25:54 save the work in process and switch to embedded-build git repo
1:27;20 fetch and pip install the build tool
1:31:28 review the build code in build_circuitpython.py
1:34:44 build tool uses python asyncio to get parallelism
1:35:38 return to the perfetto.dev chart of the threads to see basic trace information
1:43:02 when you call an async function, it doen't even begin to execute it - it just wraps it so you can run it later1:44:20 discussion of zig build system
1:45:30 rerun the build - this time with some more parallel tasks
2:01:43 TODO: add memoization to the build system in the future
2:04:01 push the code tannewt embedded build and wrap up
2:11:10 have a great weekend
Visit the Adafruit shop online - http://www.adafruit.com
-----------------------------------------
LIVE CHAT IS HERE! http://adafru.it/discord
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on the Adafruit Learning System: http://learn.adafruit.com/
-----------------------------------------