summaryrefslogtreecommitdiffstats
path: root/_log/fpm-door-lock-rf.md
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2026-01-14 22:31:29 +0800
committerSadeep Madurange <sadeep@asciimx.com>2026-01-15 21:34:06 +0800
commit429a7e85c29e2776f3a4293517513a5d523f6388 (patch)
tree9dd3de1c40e67a5b56415e5ee9a607701998f814 /_log/fpm-door-lock-rf.md
parent8be504601aeb9005b4e227fb2529d12672ea697e (diff)
downloadwww-429a7e85c29e2776f3a4293517513a5d523f6388.tar.gz
RF lock and site search posts.
Diffstat (limited to '_log/fpm-door-lock-rf.md')
-rw-r--r--_log/fpm-door-lock-rf.md20
1 files changed, 4 insertions, 16 deletions
diff --git a/_log/fpm-door-lock-rf.md b/_log/fpm-door-lock-rf.md
index 7c2b9ef..e29f733 100644
--- a/_log/fpm-door-lock-rf.md
+++ b/_log/fpm-door-lock-rf.md
@@ -6,7 +6,7 @@ project: true
thumbnail: thumb_sm.jpeg
---
-Wanted to unlock door with fingerprint, wirelessly to avoid drilling.
+Wanted to unlock the door with fingerprint, wirelessly to avoid drilling.
2024-11: Started with basic 433MHz RF modules and two Arduinos. Connected data
lines of the transceivers to UART RXD/TXDs of the MCUs. Unreliable--constant
@@ -20,22 +20,10 @@ ATmega328P runs at 5V; RFM69 3.3V. Suspect logic-level converter (LLC) issues.
High resistance; Not enough swing.
2025-04: Ditched RFM69s. Switched to NRF24L01+ modules--data pins 5V tolerant,
-no LLC required. Spent six weekends writing a clean-room driver from scratch.
-Works like a charm.
+no LLC required. Spent six weekends writing a clean-room driver. Works like a
+charm.
-Basic security via xor cipher--good enough for a door behind a guard post and
-a gate:
-
-```
-void xor(const char *k, const char *s, char *d, uint8_t n)
-{
- int i;
- for (i = 0; i < n; i++)
- d[i] = s[i] ^ k[i];
-}
-```
-
-Resists replay attacks by cycling the key:
+XOR cipher encrypts RF channel. Key cycled to resist replay attacks:
```
static inline void keygen(char *buf, uint8_t n)