You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adding support for devices with NEC either via lirc or via evdev
* fix: properly detect receiver before service start
* fix: address NEC/evdev review nits and rename IR udev rule
* chore: 🔖 increase version
Copy file name to clipboardExpand all lines: README.md
+52-14Lines changed: 52 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,18 +20,18 @@ flowchart LR
20
20
21
21
subgraph Linux Server
22
22
B[infrafid daemon]
23
-
B1["IR RX (/dev/lirc0)"]
23
+
B1["IR RX (LIRC or evdev)"]
24
24
B2[WiFi Connect]
25
25
B3["IR TX (ACK)"]
26
26
B1 --> B --> B2
27
27
B -.-> B3
28
28
end
29
29
30
-
A -- "IR (RC-6, 36kHz)" --> B1
30
+
A -- "IR (RC-6 or NEC)" --> B1
31
31
B3 -. "ACK (OK/FAIL)" .-> A
32
32
```
33
33
34
-
The Flipper encodes WiFi credentials as a sequence of **RC-6 IR messages** and blasts them at the server's CIR (Consumer IR) receiver. The `infrafid` daemon decodes the transmission and connects to the network automatically. No pairing, no Bluetooth, no network required — just line-of-sight IR.
34
+
The Flipper encodes WiFi credentials as a sequence of **IR messages**(RC-6 or NEC) and blasts them at the server's IR receiver. The `infrafid` daemon decodes the transmission and connects to the network automatically. No pairing, no Bluetooth, no network required — just line-of-sight IR.
35
35
36
36
With **ACK enabled**, the daemon transmits a response back via IR — the Flipper displays whether the connection succeeded (with IP address) or failed.
37
37
@@ -41,7 +41,8 @@ With **ACK enabled**, the daemon transmits a response back via IR — the Flippe
41
41
-**Manual entry** — On-screen keyboard for SSID and password, security type selector (Open/WPA/WEP/SAE)
42
42
-**NFC WiFi tags** — Scan an NTAG213/215/216 tag with WiFi credentials (standard NDEF WiFi Simple Configuration format) and transmit instantly
43
43
-**Saved networks** — Credentials auto-save to SD card after successful transmit. Browse, resend, or delete saved networks
44
-
-**Fast transmission** — Full credentials sent in under a second via RC-6 protocol
44
+
-**IR protocol selection** — Choose between RC-6 (36kHz, for CIR receivers like ITE8708) or NEC (38kHz, for devices like the Squeezebox Touch) in Settings
45
+
-**Fast transmission** — Full credentials sent in under a second via RC-6, or a few seconds via NEC
45
46
-**Hidden network support** — Toggle hidden SSID flag
46
47
-**ACK feedback** — Optional. When enabled in Settings, the Flipper waits for a response from the server after sending credentials. Shows "Connected! IP: x.x.x.x" or "Failed" on screen
47
48
@@ -52,7 +53,9 @@ With **ACK enabled**, the daemon transmits a response back via IR — the Flippe
52
53
-**SSID verification** — After WPA handshake completes, verifies the connected SSID matches the target to avoid false positives
53
54
-**IR ACK response** — Sends connection result back to the Flipper via IR (requires TX hardware or external IR blaster)
54
55
-**Runs as a service** — systemd unit with auto-restart, logs to journald/syslog
55
-
-**ITE8708 optimized** — Uses `LIRC_MODE_SCANCODE` for kernel-decoded RC-6, avoiding hardware FIFO overflow issues with the CIR receivers found in Intel NUCs
56
+
-**Dual protocol** — LIRC input accepts both RC-6 and NEC scancodes automatically (just enable the protocol in `/sys/class/rc/rc*/protocols`)
57
+
-**ITE8708 optimized** — Uses `LIRC_MODE_SCANCODE` for kernel-decoded scancodes, avoiding hardware FIFO overflow issues with the CIR receivers found in Intel NUCs
58
+
-**evdev fallback** — For devices without LIRC (e.g., Squeezebox Touch), read NEC scancodes from `/dev/input/eventN` via `--evdev` (expects FAB4-style bit ordering)
56
59
57
60
## Getting Started
58
61
@@ -63,8 +66,9 @@ With **ACK enabled**, the daemon transmits a response back via IR — the Flippe
- Configures the IR receiver for RC-6 protocol only
104
+
- Configures the IR receiver for RC-6 and NEC protocols
101
105
- Creates a udev rule so the config persists across reboots
102
106
- Installs and starts the systemd service
103
107
@@ -148,6 +152,13 @@ ir-keytable -t -s rc0
148
152
2. Open **InfraFi** → **Saved** to browse them
149
153
3. Select a network to resend
150
154
155
+
### IR Protocol
156
+
1. Open **InfraFi** → **Settings** → set **IR Protocol** to **RC-6** (default) or **NEC**
157
+
2. Use **RC-6** for CIR hardware designed for media center remotes (Intel NUCs)
158
+
3. Use **NEC** for devices with NEC-based IR receivers (Squeezebox Touch, many consumer devices)
159
+
160
+
> **Note:** On the daemon side, LIRC accepts both RC-6 and NEC automatically — no flag changes needed, just ensure the protocol is enabled in `/sys/class/rc/rc*/protocols`. The `--evdev` flag is only needed for devices that don't have LIRC (like the Squeezebox Touch).
161
+
151
162
### ACK (Bidirectional Feedback)
152
163
1. Open **InfraFi** → **Settings** → set **Wait for ACK** to **On**
153
164
2. Send credentials as usual
@@ -165,21 +176,47 @@ ir-keytable -t -s rc0
165
176
# Run in foreground with verbose logging (useful for testing)
166
177
sudo infrafid -f -v
167
178
179
+
# Use an evdev device for NEC reception (e.g., Squeezebox Touch)
180
+
sudo infrafid -e /dev/input/event1 -f -v
181
+
168
182
# Use a separate IR device for ACK transmission
169
183
sudo infrafid -a /dev/lirc1
170
184
185
+
# LIRC RX on lirc0, ACK TX on lirc1
186
+
sudo infrafid -d /dev/lirc0 -a /dev/lirc1
187
+
171
188
# Check service status
172
189
sudo systemctl status infrafid
173
190
174
191
# Watch logs
175
192
sudo journalctl -u infrafid -f
176
193
```
177
194
195
+
| Flag | Description |
196
+
|------|-------------|
197
+
|`-d`, `--device PATH`| LIRC device for RX (default: `/dev/lirc0`) |
198
+
|`-e`, `--evdev PATH`| evdev input device for RX (NEC via `MSC_RAW`, FAB4-style bit ordering) |
199
+
|`-a`, `--ack-device PATH`| LIRC device for ACK TX (default: same as `-d`) |
200
+
|`-f`, `--foreground`| Run in foreground (don't daemonize) |
201
+
|`-v`, `--verbose`| Verbose logging |
202
+
178
203
## Protocol
179
204
180
-
InfraFi uses **RC-6 Mode 0** IR protocol at 36kHz — the same protocol used by standard media center remotes. This is intentional: CIR receivers like the ITE8708 (found in Intel NUCs) have hardware decoders optimized for RC-6. Using the kernel's built-in RC-6 decoder (`LIRC_MODE_SCANCODE`) avoids the tiny hardware FIFO that overflows with custom raw protocols.
205
+
InfraFi supports two IR transport protocols. The framing and payload format are identical — only the physical IR encoding differs:
206
+
207
+
|| RC-6 Mode 0 | NEC |
208
+
|---|---|---|
209
+
|**Carrier**| 36kHz | 38kHz |
210
+
|**Frame time**|~25ms |~67ms |
211
+
|**Daemon input**| LIRC | LIRC or evdev |
212
+
|**Typical hardware**| ITE8708 CIR (Intel NUCs) | Squeezebox Touch (FAB4 IR), any NEC receiver |
213
+
|**Flipper setting**| RC-6 (default) | NEC |
214
+
215
+
RC-6 is the default and recommended for CIR receivers — it's faster and uses the kernel's built-in decoder (`LIRC_MODE_SCANCODE`), avoiding the tiny hardware FIFO that overflows with custom raw protocols. NEC works through LIRC as well (enable `nec` in `/sys/class/rc/rc*/protocols`), or through the Linux input subsystem (`--evdev`) for devices without LIRC.
216
+
217
+
> **evdev note:** The current evdev decoder assumes FAB4-style NEC byte bit-ordering and bit-reverses each byte before validation.
0 commit comments