Commit graph

30 commits

Author SHA1 Message Date
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
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
ebc26fcccd Cleanups 2023-03-29 21:42:41 +02:00
rbaron
e82c1b6bc1 Implements button handling
- DTS bindings
- Debouncing logic
- New `input` for testing and interrupt power profiling
2023-03-29 21:28:24 +02:00
rbaron
02b3970ffc Shorten job names 2023-03-19 16:45:55 +01:00
rbaron
1983f31af9 Store calibration polynomial in devicetree
This will enable us to transparently use different calibration for
different board revisions. The 2.0.0 revision changes the sensing
circuitry and will need its own coeffs.

In this commit, both models are run in parallel for debugging.
2023-03-19 15:06:39 +01:00
rbaron
5e315ba9cd [ble] Update connection interval docs & power profile
Closes #98
2023-02-12 16:13:55 +01:00
rbaron
7be5fe1669 [ble] Bumps default advertising interval to [30, 40] ms
This makes the BLE sample use the same parameters as the legacy
firmware, and immproves the range.
2023-02-12 16:02:51 +01:00
rbaron
28db7224a6 Make advertisement intervals configurable
We were previously relying on the default values (100ms, 150ms). This
PR makes it easier to test and configure parameters for different
tradeoffs between range / power consumption (#98).
2023-01-28 11:44:17 +01:00
Marvin Rohrbach
ee38d4561a Fix: Counter was missing 2023-01-12 08:12:18 +00:00
rbaron
fe63fda2f1 Setup Kconfig for prstlib 2022-12-19 18:34:03 +01:00
rbaron
cb6ed73691 Add battery percentage computation 2022-12-09 19:02:55 +01:00
rbaron
002500dcd6 Adds samples/ble/README.md 2022-12-07 18:57:27 +01:00
rbaron
f7806d4c7e Really fixing BTHome v2 illuminance encoding this time 2022-12-04 10:32:20 +01:00
rbaron
cab55d9b8c <zephyr/zephyr.h> -> <zephyr/kernel.h> everywhere 2022-12-04 10:16:00 +01:00
rbaron
381bbb7ceb Fix illuminance encoding in ble, BTHome v2 2022-12-04 10:13:01 +01:00
rbaron
8bfd75de78 Fix BTHome v2 encoding - sort entries by Object IDs 2022-12-03 13:49:17 +01:00
rbaron
bc08c8284a Updates Zephyr imports to use the <zephyr/...> prefix
See https://docs.zephyrproject.org/latest/releases/release-notes-3.2.html#api-changes
2022-12-03 11:26:03 +01:00
rbaron
dc88916823 Add board 1.0.0, 1.1.0, 1.2.0 board revisions for nRF52840 variant 2022-12-03 10:46:48 +01:00
rbaron
a93171b9bf Adds support for user-supplied BT address
Also cleans up BLE configs
2022-12-01 19:48:36 +01:00
rbaron
fe09c0b2f1 Update github actions to generate more samples 2022-11-30 18:33:06 +01:00
rbaron
9c62b12446 Update default Kconfig in samples/ble 2022-11-29 22:52:08 +01:00
rbaron
dbaf44ecc1 Cleanup comments 2022-11-29 20:25:15 +01:00
rbaron
3b104cdf24 Implements BTHome v1 and v2 encodings for ble sample 2022-11-29 20:05:41 +01:00
rbaron
fc3a0652aa Add blinky sample 2022-11-28 19:38:32 +01:00
rbaron
00a7114dd1 Extracts boards/ and dts/ to prstlib 2022-11-27 18:56:47 +01:00
rbaron
5ceccfafcc Extracts prstlib
Moves ble sample to code/nrf-connect/samples
2022-11-27 18:37:42 +01:00