rbaron
67b3dd8482
Leave manufacturer ID unset for now
2024-05-12 14:55:45 +02:00
rbaron
18f4914f37
FOTA configs for safer firmware matching
2024-05-12 14:50:51 +02:00
rbaron
b2376a4050
Re-create separate prj_fota.conf
2024-05-11 10:38:27 +02:00
rbaron
b72b97091c
Define and set sw_build_id in the basic attr cluster
2024-05-11 09:27:07 +02:00
Ole Odendahl
7dcd4bfe53
Moving toggled settings to Kconfig for ota updates.
2024-05-01 17:28:41 +02:00
Ole Odendahl
4bb9a97daa
Added ota config parameters to main prj.conf. Toggle default is set to n for now.
...
Removed obsolete prj_ota.conf file.
2024-05-01 16:57:24 +02:00
Ole Odendahl
76a76de52c
Added basic information to zigbee readme file for ota updates.
2024-05-01 16:53:23 +02:00
Ole Odendahl
bb2f3cc3c2
Removed obsolete leftover comment from ota sample.
2024-05-01 10:53:07 +02:00
Ole Odendahl
61533da1b6
Added separate ota config file based on the prj file.
...
Parameters are based on the zigbee light switch example from nrf-connect toolkit.
clang-format with vs code.
2024-04-28 22:45:20 +02:00
Ole Odendahl
a15bd37a1a
Added zigbee ota configuration to main.
...
All relevant sections are behind a build toggle which can be activated in Kconfig.
2024-04-28 14:43:38 +02:00
jrhbcn
dc02480da9
Update encoding.c to fix formatting errors
2024-04-20 13:41:03 +02:00
jrhbcn
4796bfab5f
Update encoding.c
...
Changes in BTHOME_V2 protocol:
- Reduce resolution of humidity and moisture to 1 byte
- Add battery percentage
2024-04-20 13:10:36 +02:00
rbaron
e62521d2ae
Merge pull request #177 from ScottG489/patch-1
...
Small typo fix in BLE sample README
2024-03-07 19:15:37 +01:00
Jan-Henrik Bruhn
905978e8c9
Only read positive voltages in adc.c
...
The ADC sometimes responds with negative voltages read on the ADC input due to noise. This can lead to very high illuminance readings at night (4095 << 4 to be exact due to two's complement :) ).
This commit caps ADC readings at 0.
2024-02-14 11:59:14 +01:00
Scott Giminiani
4c0fe9b4c6
Small typo fix in BLE sample README
2024-01-07 09:20:30 -08:00
rbaron
37ea3a1062
Merge pull request #165 from rbaron/nrf2.5
...
Update to nRF Connect SDK 2.5
2023-11-08 08:33:01 +01:00
rbaron
28c2809b04
Fix nRF52833 flash partitions
...
The nRF52833 has only 512 kB of flash. The .dts file was incorrect, as a
product of having it forked from the nRF52840 .dts files, which has 1 MB
of flash.
The new, correct partitions are closely related to the
[nrf52833dk](ec52722861/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts (L215) ).
2023-11-07 21:32:09 +01:00
rbaron
ad3cd4194f
Remove PM configs from soil_read_loop
2023-11-07 21:18:20 +01:00
rbaron
171a1eb4a0
Uses newwer FIXED_PARTITION_ID for fs_mount_t
...
... This is what new samples use, but there should be no functional
difference.
2023-11-07 20:57:54 +01:00
rbaron
5199ceaa50
Update to nRF Connect SDK 2.5
2023-11-07 18:31:32 +01:00
rbaron
e68c113513
[ble sample] Sets BTHome V2 as the default encoding
...
This change has been planned for a while, and BTHome v2 + Home Assistant
is currently the most convenient, hassle-free and maintained way to
interface with the BLE sample currently.
2023-07-23 18:39:01 +02:00
rbaron
9ea5c7b4d0
Make init & loop fns static
2023-07-23 18:30:23 +02:00
rbaron
1a5acd02a5
[ble] __ASSERT initialization & sensor reading
...
After we tracked down a rare, annoying bug for the zigbee sample in #150 ,
this PR does something similar for the ble sample. If there's an error
either initializing the board of reading the sensors, __ASSERT will
reboot the system, instead of letting it hang forever.
2023-07-23 18:10:28 +02:00
rbaron
9fdd15626a
Better error handling for SHTC3 reading
2023-07-15 11:07:35 +02:00
rbaron
c70eb600a3
[zigbee sample] Introduce watchdog for sensor task
2023-07-15 09:45:34 +02:00
rbaron
bc3d834b20
Make it mandatory to select a factory reset method
...
... in order to avoid unhappy surprises
2023-07-01 08:26:21 +02:00
rbaron
37aff683ad
LOG_INF -> LOG_DBG
2023-07-01 08:04:17 +02:00
rbaron
c86f04e406
Nuclear reset option if recurring sensor task cannot be rescheduled
...
Famous last words: "this should never happen"
2023-07-01 08:04:17 +02:00
rbaron
7f42dd0c00
Add missing prst_led_off after stopping LED flashing timer
2023-07-01 08:04:17 +02:00
rbaron
46feb542cc
More fixes to the ZigBee sample
...
- 🚨 Missing `break` statements in `zboss_signal_handler`
- Makes `zboss_signal_handler` return fast. According to the
[docs](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.thread_zigbee.v2.0.0%2Fgroup__zb__comm__signals.html ):
"Signal processing should not do long operations synchronously". I
removed calls to `prst_flash_led` (essentially a huge sync delay) and `debug_counters_increment`,
which were blocking. I'll try migrating the debug_counters to
non-blocking separately
- Main sensor reading task is started for the first time upon
the `ZB_ZDO_SIGNAL_SKIP_STARTUP` signal. This is what the
[weather_station sample](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/zigbee_weather_station/README.html ) does. It should have no functional difference, but there's [some special handling for alarms started from the ZigBee task](0469247dc4/subsys/zigbee/osif/zb_nrf_platform.c (L426) )
2023-07-01 08:04:17 +02:00
rbaron
62a99cc716
Reintroduced accidentally deleted comment
2023-07-01 08:04:17 +02:00
rbaron
90f99bd5b0
Fixes (minor?) issues with the ZigBee sample
...
1. zigbee_configure_sleepy_behavior must be called before zigbee_enable - [source
docs](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/zigbee/zigbee_app_utils.html#c.zigbee_configure_sleepy_behavior )
2. zb_zdo_pim_set_long_poll_interval must be called after the network is joined - [source docs](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/3.5.2.0/group__zdo__poll__control.html#ga3aae8929b30e71c872f937771b89c768 ).
On top of that, the argument for the call was incorrect - it expects ms directly.
3. Removed the unecessary CONFIG_PM, seems like there's no impact in power consumption. Could it cause some weirdness?
4. Implemented CONFIG_PRST_ZB_FACTORY_RESET_DISABLED=y to fully disable factory resetting. May aid debugging.
5. Implemented multi/single channel support. Helps with battery life when scanning networks
2023-07-01 08:04:15 +02:00
rbaron
5882312a77
[zb] Debugging changes:
...
- Disables double reset
- Fully reset with zb_reset() on reset watchdog instead of
user_input_indicate()
- Debug counters before/after sensors read
2023-07-01 08:03:42 +02:00
rbaron
f9f122b818
Formatting
2023-06-27 21:34:49 +02:00
rbaron
d5891f4a6f
[ZigBee sample] Implements factory reset via SW1 button (hardware v2.0.0+)
2023-06-27 21:28:56 +02:00
rbaron
56c5fa7ba0
Merge pull request #133 from rbaron/zb_debug_counters
...
[ZigBee Sample] Introduce debug counters
2023-06-27 19:08:53 +02:00
rbaron
afa53f0e94
Introduce CONFIG_BOARD_REVISION_CODE
...
Beside having a `CONFIG_BOARD_REVISION` Kconfig string that represents
our semantic versioning for board revisions, the ZigBee sample requires
an integer representation of it. Instead of conditioning the integer
version on the string version only for that sample and having to touch
the ZigBee sample whenever we add a revision, I decided to have a
board-wide config, so that both string and int versions live close to
each other.
Fixes #138 .
2023-06-15 07:45:55 +02:00
rbaron
930239e385
Cleanup + double_reset counter
2023-06-07 08:26:05 +02:00
rbaron
015ce94bbd
Cleanup
2023-06-07 08:10:23 +02:00
rbaron
987c4f52c0
Removes async debug counters API - not needed
2023-06-07 08:08:34 +02:00
rbaron
509350457f
[ZigBee sample] Introduce debug counters
...
In the effort to increse reliability of the Zigbee sample, #126 and #130
introduced handling for possibly rare, hard-to-debug events that may be
occurring. While these changes seem to help in practive, we don't know
exactly how often, if ever, they are triggered.
This PR introduces debug_counters in hope to add some visilibty in these
hard-to-debug, rare conditions.
Calling `prst_debug_counters_increment("some_counter")` will increment a
value stored in flash. These values are then dumped via logging when the
device boots. Moving forward we can also consider exposing these values
via a ZigBee cluster.
2023-06-07 08:08:34 +02:00
Ole Odendahl
3aa33cdd89
Fixed api of restart watchdog.
2023-06-02 11:39:52 +02:00
Ole Odendahl
ce748c4759
Added restart watchdog timeout to Kconfig.
2023-06-02 11:31:58 +02:00
Ole Odendahl
5cede82dc5
Changing api of restart handler to only expose needed functions.
...
This encapsulates the low level timer logic from the caller.
2023-06-02 11:16:49 +02:00
Ole Odendahl
9285a6bc41
Added comment to describe nordic funny function name.
2023-06-02 11:15:46 +02:00
Ole Odendahl
6f10dc9e19
Fixed clang format.
2023-06-02 11:07:47 +02:00
Ole Odendahl
c52d5f7a48
Added steering restart handler to signal handler steering branch.
...
Made the device flash less frequently to save power on unexpected connection drops.
2023-06-02 11:07:47 +02:00
Ole Odendahl
727138415e
Added restart handler module.
2023-06-02 11:07:46 +02:00
Ole Odendahl
69c0ed3694
Separated two signals for better debugging and possibly different handling.
2023-06-02 11:07:46 +02:00
Ole Odendahl
ba786eb298
Moving steering successful flashing to success if branch.
2023-06-02 11:00:17 +02:00