Commit graph

383 commits

Author SHA1 Message Date
rbaron
8fb45f7165
Merge pull request #150 from rbaron/zb-wdt
[zigbee sample] Fix rare infinite loop bug & introduce watchdog
2023-07-23 17:51:21 +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
95ec660cb6
Merge pull request #146 from rbaron/zb-debug++
Fix (minor?) issues with the ZigBee sample
2023-07-15 09:25:18 +02:00
rbaron
d84a6422fe
Merge pull request #148 from Judman/main
Slightly Modified High Airflow Case
2023-07-03 08:05:06 +02:00
Judman
8c21fe73d5
Replace Current High Airflow Cases 2023-07-02 11:33:26 -05:00
Judman
0a73159ce9
Delete b_parasite_case_high_airflow_v2.stl 2023-07-02 11:29:08 -05:00
Judman
105016e24c
Slightly Modified High Airflow Case
Removed the circular supports the extended all the way to the build plate and left small bumps at the top of the case. Replaced with slightly wider and flatter supports that fit within the case constraints. Also slightly enlarged the PCB groove. I found it way too tight and ended up ripping off a batter holder and pads during removal.
2023-07-01 22:41:25 -05: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
a4a02257f9
Merge pull request #147 from rbaron/zb-sw1-factory-reset
[ZigBee sample] Implements factory reset via SW1 button (hardware v2.0.0+)
2023-07-01 07:55:45 +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
f6b4600044
Merge pull request #140 from rbaron/config_board_revision_code
Introduce CONFIG_BOARD_REVISION_CODE
2023-06-15 18:36:22 +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
426195184d
Merge pull request #136 from rbaron/code-of-conduct
Create CODE_OF_CONDUCT.md
2023-06-09 18:58:59 +02:00
rbaron
c9df52fd5f
Create CODE_OF_CONDUCT.md
As endearing as it is to get unactionable hate messages, I would rather we focus our efforts on having fun and fostering a small, great, positive, welcoming community, as it's has been so far.

This code of conduct is from https://www.contributor-covenant.org/, based on Mozilla's. I hope we never have to enforce it, and it sucks that we even have to think about these things. But at least this makes it a little more explicit about what's unacceptable behavior.
2023-06-09 09:27:46 +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
rbaron
bcc5a853d0
Merge pull request #130 from oleo65/zigbee-schedule-steering-restart
Zigbee schedule steering restart
2023-06-07 08:07:44 +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
rbaron
6580cf40a2
Merge pull request #126 from MJDSys/fix_KRKNWK-12017
Implement workaround for errata KRKNWK-12017
2023-05-31 21:21:08 +02:00
Matthew Dawson
54b1c48638
Implement workaround for errata KRKNWK-12017
Nordic has published an errata for the nRF Connect SDK for versions
>1.8.0 where a Zigbee End Device can end up getting stuck if the
parent device does not acknowledge the "Device Announcement packet".

They have a suggested workaround to implement in the SDK, which has
been adapted for the custom signal handler used here.

This is an effort to solve issues where my parasites would occasionally
drop off my network and require a reboot.  After 24Hrs, I've not yet
had a device disappear but it has taken >weeks before a device would
fail.  Unforunately it's hard to debug the board as the chips are in a
low power state when this occurs.
2023-05-10 10:45:30 -04:00
rbaron
e56a7748b0
Update kitspace.yaml
#125
2023-05-08 08:58:08 +02:00
rbaron
117b257336
Update README.md
Fix wiki link
2023-05-03 19:56:07 +02:00
rbaron
70d716520d
Update cases options in README.md 2023-04-19 21:41:53 +02:00
rbaron
414427df5b
Merge pull request #121 from mneuhaus/patch-1
Add Link to another Case to the Readme
2023-04-19 21:32:18 +02:00
Marc Neuhaus
fbf8e09f0d
Add Link to another Case to the Readme 2023-04-19 09:23:28 +02:00
rbaron
0ca44f737b
Merge pull request #120 from rbaron/ble-nonconn
[ble] Make advertising non-connectable
2023-04-16 14:26:41 +02:00
rbaron
7ac6d98b3b [ble] Make advertising non-connectable
I've been debugging a Shelly [bluetooth
proxy](https://www.home-assistant.io/integrations/shelly/#bluetooth-support)
feature, which didn't like b-parasite's advertising. It swallowed it before proxying it to HA.

I compared to both ATC and the legacy b-parasite advertising
(pre-nrf-connect) and found it to be related to the
non-connectable/non-scannable settings. Until this PR, we were
mistankenly settings the advertising to scannable, although with no
scannable data. The Zephyr code that sets this parameter based on the
scannable data is [here](c0fcd35531/subsys/bluetooth/host/adv.c (L860)).

My bet is that some scanners like ESPHome are okay with this, but Shelly
is not. Either way, I believe this PR makes the advertisements more
compliant.
2023-04-16 12:28:23 +02:00
rbaron
9ff5180cd7
Merge pull request #117 from rbaron/hardware-v2
Version 2.0.0
2023-03-30 19:30:06 +02:00
rbaron
fdf4609131 Update README.md with photo of v2.0.0 board 2023-03-30 19:20:33 +02:00
rbaron
00d11f50a7 Remove hardware-v2 from workflow triggers 2023-03-30 07:57:37 +02:00