-
Notifications
You must be signed in to change notification settings - Fork 4
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
[REQUEST] nRF5340 (nRF53 series) support with pre-compiled ZBOSS NCP Host firmware image for nRF5340 DK? #46
Comments
Hey, I built the NCP sample with max memory config for the nRF5340DK. I don't have the device so I can not test. I uploaded the .hex file in this repo: https://github.com/kardia-as/nrf-zboss-ncp |
Many thanks. It would be useful to know what needs to be changed to build with max memory (I have nRF Connect SDK v2.6.1 installed).
I have flashed the nRF5340 DK with v2.6.0_ncp_zboss_max_mem_nrf5340_usb.hex using nRF Connect for Desktop v5.0.0 and Programmer v4.3.0 using the USB connector on the end of the board. I have also flashed the nRF52840 Dongle with v2.6.0_ncp_zboss_max_mem_nrf52840_dongle.hex using the same software. After swapping to the USB connector on the side of the nRF5340 DK both devices have the same identification:
When used with a Home Assistant VM with the USB device passed through I was unable to find support for the radio when installing ZHA. Is some additional configuration required? Happy to try to test this further. |
I think there may be problems with both v2.6.0_ncp_zboss_max_mem_nrf5340_uart.hex and v2.6.0_ncp_zboss_max_mem_nrf5340_usb.hex. When flashed, neither of them generate an entry in /dev/serial/by-id. Using a nRF52840 Dongle flashed with v2.6.0_ncp_zboss_max_mem_nrf52840_dongle.hex:
I don't have access to a nRF52840 DK. If someone has successfully used one it would be interesting to know how they achieved it. Hopefully, the nRF52840 DK and nRF5340 DK would be broadly similar. I have set up a development environment for Developing with Visual Studio Code + devcontainer and added zigpy-zboss support roughly as described in How to get started with zigpy-zboss and Home Assistant?. The missing piece is how to pass through /dev/ttyACM0 from the host to the devcontainer ... |
If you are using Docker then you to install and use something like Docker Compose to forward your device from the host machine to the Docker instance, see: https://www.home-assistant.io/integrations/zha#cant-connect-to-usb-device-and-using-docker also check that the the USB or serial device is not being claimed other services on the host, see example. PS: I do not have much experince with Docker and other container systems. |
I have installed docker onto Ubuntu 24.04 LTS (Noble Numbat) following Install using the apt repository. This includes installing the
I don't think anything is claiming
Probably more than me! I suspect a
However, I don't know what to do next ... |
Tried another approach:
Unfortunately, that hits problems when trying to add the ZHA integration:
Any suggestions? |
Strange. Tried it again and the ZHA integration was found and I was able to select the ZBOSS radio. However, this failed with:
Looks like /dev/ttyACM0 isn't being passed through ... |
Exited VS Code. Restarted VS Code and was prompted to rebuild the devcontainer. Clicked the "rebuild" button. The ZHA integration spotted that there was a suitable device on /dev/ACM0. Went as far as "Serial Port Settings" but when the "Submit" button was clicked "Unknown error occurred" was reported. This was on the VS Code terminal:
It looks like /dev/ttyACM0 is now being passed through but does not have the correct permissions. On the host system:
|
Swapped the nRF52840 Dongle for a SkyConnect; edited Home Assistant spotted the SkyConnect but objected "unsupported firmware". Checked for Firmware Updates for SkyConnect. It had the latest firmware Zigbee (EZSP) 7.3.2.0 build 212 but re-flashed it just to be sure. No firmware issues detected on the next attempt. Went as far as "Serial Port Settings" but when the "Submit" button was clicked "Failed to connect" was reported. If it isn't working with the SkyConnect, I suspect there is something wrong with my attempt to configure the development environment ... |
If anyone wants to try to reproduce the problems with the nRF52840 Dongle, here are all of my diffs:
|
Probably does not help but FYI, there are some additional tips regarding installation and configuration in these zigpy documents: |
@JohnConnett Can I suggest that you try running in a VM (virtual machine) under a virtualisation hypervisor platform instead? https://en.wikipedia.org/wiki/Hypervisor Then you have the option to run directly under a full operating system as well as bonus features such as snapshots. In my experience it is much easier to configure USB passthrough to devices for VM hardware in a virtual machine manager. I run VMs under VMware Workstation/Fusion/ESXi myself but many alternatives to those can be used free of charge, ex:
And several other less common alternatives -> https://en.wikipedia.org/wiki/Comparison_of_platform_virtualization_software |
@JohnConnett Your user (or the Docker user) likely does not have permission to access serial ports because they aren't part of the You may also find using Home Assistant Core directly a simpler development experience than the dev container: https://developers.home-assistant.io/docs/development_environment/#setup-local-repository. It is just a Python package after all. |
Looks like I missed a few of the changes needed to support ZBOSS. Here's my latest diff:
The good news is that with these changes applied running them on Ubuntu 24.04 LTS (Noble Numbat) with the nRF52840 Dongle attached with Unfortunately, this didn't fix the permissions problem when running in the devcontainer. I also tried using |
My user is in the
Yes, that worked for me. Looks like it is possible to use the nRF52840 Dongle. Need to figure out if the nRF5340 DK can be made to work. It has two micro USB connectors so I'm not sure which of them needs to be connected. My guess is that the one on the end is for SEGGER and the one on the side is for UART. |
@JohnConnett It will depend on which firmware build is flashed on your DK. Check this out: |
Originally posted by @JohnConnett in #43 under discussions section https://github.com/kardia-as/zigpy-zboss/discussions
Is nRF5340 supported? Can you please provide a compiled ZBOSS NCP Host firmware image required to be flash on nRF5340 DK?
https://github.com/kardia-as/nrf-zboss-ncp
https://github.com/kardia-as/zigpy-zboss?tab=readme-ov-file#firmware
https://www.nordicsemi.com/Products/Development-hardware/nRF5340-DK
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/zigbee/ncp/README.html
For reference;
nRF5340 is the latest SoC from Nordic Semiconductor with Zigbee support (combining all features of nRF52840 and nRF52833):
https://www.nordicsemi.com/products/nrf5340
It features 1 MB Flash + 512 kB RAM, and it provides better RX sensitivity (less sensitive to EMF/RMI noise) while using less power.
https://www.nordicsemi.com/-/media/Software-and-other-downloads/Product-Briefs/nRF5340-SoC-PB.pdf
https://blog.nordicsemi.com/getconnected/why-does-the-nrf5340-have-two-cores
"The 0 dBm TX current is 3.4 mA, while the RX current is only 2.7 mA, resulting in a reduction of 29% and 41% when comparing to the nRF52840 SoC. The RX sensitivity is -98 dBm, 3 dB better than nRF52840, meaning that the nRF5340 provides 3 dB better sensitivity, while using 41% less current."
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fkeyfeatures_html5.html
https://www.nordicsemi.com/Products/Wireless/Zigbee
https://www.nordicsemi.com/Products/Development-software/nrf5-sdk-for-thread-and-zigbee
Other than using about half the power, another reason why you might want to add support for it is for its nRF5340-DK development kit:
https://www.nordicsemi.com/Products/Development-hardware/nrf5340-dk
Ebyte/cdEbyte have an E83-2G4M03S SMD radio module as well which can be found on their E83-2G4M03S-TB evaluation board
https://ebyteiot.com/products/nrf5340-wireless-mesh-bluetooth-test-board-usb-interface-cdebyte-e83-2g4m03s-tb-easy-to-develop-bluetooth-test-kit-ipex-antenna
https://www.cdebyte.com/products/E83-2G4M03S
https://www.cdebyte.com/products/E83-2G4M03S-TB
https://www.amazon.co.uk/EBYTE-nRF5340-Wireless-Bluetooth-E83-2G4M03S-TB/dp/B0CKQGX9M2
https://www.aliexpress.com/item/1005006108259017.html
https://www.alibaba.com/product-detail/EBYTE-E83-2G4M03S-TB-Small-size_1600959383696.html
https://www.alibaba.com/product-detail/COJXU-E83-2G4M03S-Small-size-and_1600959538223.html
For commercial and DIY projects there is a nRF5340 based radio modules (BT40F, BT40, BT40E, BT40N) from Fanstel Corp.
https://www.fanstel.com/bt40f-nrf5340
https://www.fanstel.com/bc40m-nrf5340
and u-blox
https://www.fanstel.com/buy/bt840f-v1-nrf52840-bluetooth-5-thread-zigbee-module-hscxm-n7trh
https://www.u-blox.com/en/search?query=nRF5340
The text was updated successfully, but these errors were encountered: