-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
basic support for nrf52840 #6075
base: dev
Are you sure you want to change the base?
Conversation
Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration ( |
Hey there @tomaszduda23, CODEOWNERS = ["@tomaszduda23"] And run (message by NeedsCodeownersLabel) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #6075 +/- ##
==========================================
+ Coverage 53.70% 53.79% +0.08%
==========================================
Files 50 51 +1
Lines 9408 9824 +416
Branches 1654 1737 +83
==========================================
+ Hits 5053 5285 +232
- Misses 4056 4213 +157
- Partials 299 326 +27 ☔ View full report in Codecov by Sentry. |
Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration ( |
I am very interested in testing this platform in ESPHome because I own several nrf52840 modules. |
Hey there @OttoWinter, mind taking a look at this pull request as it has been labeled with an integration ( |
Hey there @OttoWinter, mind taking a look at this pull request as it has been labeled with an integration ( |
Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration ( |
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration ( |
Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration ( |
@tomaszduda23 FYI, just stumbled on a forum thread by @natelust about his ESPHome to Zephyr RTOS porting project and was wondering if you were aware of his previous work on getting ESPHome running on a nRF5 platform for nRF52 and nRF53? Looks like he has not updated his forked esphome repository with his code patch to add Zephyr platform support patches in the last year as it seems like his "zephyr-dev" branch there in his esphome fork contains his latest updates: https://github.com/natelust/esphome/tree/zephyr-dev There do not seem to be any new posts from him on this since he posted this zephyr ESPHome Guide in little over 1-year ago: https://github.com/natelust/zephyrESPHomeGuide PS: Noted that he also looks to have made more progress on OpenThread/Thread support in ESPHome than anyone else I have seen posting in public repository so far? |
I've seen that fork some time ago. |
Hi all, sorry your message before caught me in the middle of a lot of stuff going on, and I am sitting down now trying to work through all I need to catch up on. What can I help out with? I had personally chosen to go with core zephyr over the nrf sdk, but things might have changed since then. I had everything up and running stable for some time and did not have much more time to put into it (also getting in upstreamed was stalled a bit). However, recently I had to redo my whole setup, and was going to revive the work, especially now that home assistant has been modified with ipv6 native to work with matter. The way I had things set up (I have not looked at this work yet) it was nice because it was relatively easy to support all the boards that zephyr supported. |
@natelust it supported both nrf-sdk and generic zephyr. I dropped generic zephyr to avoid extra testing. It could be added back though. |
I am assuming it would be much less complex to only try to get one of those platforms merged at first, however, probably worth considering adding both platforms sooner or later as more similar platforms can gain long-term benefits as it would kind of be following "chaos engineering" principle as experimenting with similar platform could help identify potential issues or problems? ;) |
Nrf sdk is based on zephyr. It contains extra stuff for nrf chips. The build system and most of drivers are the same. A lot of things will just work for both. |
I was looking at some of the changes to home assistant last night now that matter/thread support is "built in". I think this greatly lowers the barrier to what I have implemented being used. The ESPHome boards should be able to run right over the same thread network and border router, and mostly be transparent to end users. I'm trying to figure out what would be the most helpful thing for me right now. How does me getting my fork updated against the main, and then coming back and having a discussion on how this work dovetails with what I have done sound? I had not put any effort into the bluetooth stack before, so it might be nice if the solutions can come together. |
I have not seen or heard of else started work on OpenThread support for ESPHome, so you might want to consider that if you want to work on something that no one else is working on. If so please also make Thread protocol support compatible with ESP32-H2 and ESP32-C6 SoCs too. |
PoC of zigbee tomaszduda23#2 |
What does this implement/fix?
It is possible to buy cheap nrf52840 module. It would be very convenience to program it using yaml files.
It is proof of concept for support NRF52 on esphome.
How to upload
There are few options:
python -m esphome upload tests/test12.2.yaml --device PYOCD
to upload
python -m esphome upload tests/test12.3.yaml
python -m esphome upload tests/test12.2.yaml
to specify mac address of BLE devicepython -m esphome upload tests/test12.2.yaml --device AA:BB:CC:11:22:33
TODO
Arduino
moved to #6228
Zephyr
CDC OTA - mcuboot recover(`FLASH' overflowed by 11320 bytes)Fix review comments #6075 (comment)
OTABackend
from OTA component #6459How to communicate with HA? Options:
The SoC has only 1MB of memory. All above consume:
update adafruit bootloader
git clone https://github.com/adafruit/Adafruit_nRF52_Bootloader cd Adafruit_nRF52_Bootloader make BOARD=nice_nano all make BOARD=nice_nano SERIAL=/dev/ttyACM0 flash-dfu
Types of changes
Related issue or feature (if applicable): fixes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#
Test Environment
Example entry for
config.yaml
:Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: