Skip to content

Commit

Permalink
Update readme to better reflect current state
Browse files Browse the repository at this point in the history
  • Loading branch information
ffenix113 committed Feb 10, 2024
1 parent 981fc63 commit 861daea
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,45 @@ It cannot be used to determine quality of resulting project.

Currently work is being carried to develop CLI application and adding sensors.

Priorities can be ordered as:
* Board(bootloader) support
* Adding known sensors
* Adding Zigbee clusters & templates for unavailable clusters in ZBOSS

### Source Generation
CLI can generate source, which can then be built and flashed.

"Source" includes C source code, app config(`proj.conf`) and overlay (`app.overlay`).

### Building
CLI can't build the application yet, as building it requires environment to be properly set up (nrf- and zephyr-specific).
Assuming configuration file is located at `./zigbee_test.yml` and directory for generated & built firmware should be `./firmware` the command to generate & build the firmware will be:
```sh
go run ./cli/cmd/zigbee --config ./zigbee_test.yml firmware --workdir ./firmware build
```

Only source code can be generated by adding `--only-generate` flag after `build`:
```sh
go run ./cli/cmd/zigbee --config ./zigbee_test.yml firmware --workdir ./firmware build --only-generate
```

Note: `build` command will not clear the work directory, so if it already contains some additional files they may be used while building the firmware.

This also applies when removing features from configuration and re-building the firmware: some files might be left after feature that requires it was removed.
It could lead to a build that is failing.

### Flashing
CLI can flash already built application with a couple of methods:
- nrfutil
- mcuboot
- west
- adafruit (if available in current PATH)

Device already has to be in a mode that will allow flashing(DFU, for example).

Example:
```sh
go run ./cli/cmd/zigbee --config ./zigbee_test.yml firmware --workdir ./firmware flash
```

### Supported devices

Expand All @@ -32,6 +58,14 @@ Initial goal of the project is to support nRF52840 based devices, with expansion

* nRF52840 Dongle
* Arduino Nano 33 BLE (Sense) - experimental. Probably also other Bossac bootloader devices on nrf52840 as well.
* Early experimental support for boards with Adafruit bootloader. Please read note below.

Experimental support is provided for Adafruit bootloader.
This means that any device running Adafruit bootloader could try to build the firmware with this tool,
but it cannot be guaranteed that generated firmware will work properly on the device.

User can change configuration that allows bootloader support in `cli/types/board/known_boards.go`.


## Using in Home Assistant
[ZHA](https://www.home-assistant.io/integrations/zha/) integration can figure out device capabilities without pre-defined configuration.
Expand All @@ -50,16 +84,19 @@ For this to work user would need to already have nRF Connect SDK set up, with `w

Defined flash tools are:
* `nrfutil` - already working
* `adadfruit`
* `mcuboot`
* `west`
* `west` - already working

Default configuration file called `zigbee.yml` will be loaded
and used to configure.
See bare example in `cli/zigbee.yml`, or original configuration definition
in `cli/config/device.go:Device`.

To flash the board with built firmware run
`go run ./cli/cmd/zigbee firmware --workdir <path_to_project> flash`
```sh
go run ./cli/cmd/zigbee firmware --workdir <path_to_project> flash
```

Users can flash built applications with [nRF Connect for Desktop](https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-Desktop)
as well, if CLI tool is not suited for some cases.
Expand Down

0 comments on commit 861daea

Please sign in to comment.