forked from markqvist/RNode_Firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathrnoded.example.conf
More file actions
181 lines (168 loc) · 8.03 KB
/
Copy pathrnoded.example.conf
File metadata and controls
181 lines (168 loc) · 8.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# microReticulum native build — example runtime config.
#
# Copy this file to `rnoded.conf` and edit for your hardware.
# Whichever directory you launch the binary from is searched first;
# alternatively set the MR_CONFIG environment variable to a full path.
#
# Pin numbers semantics:
# - On Linux native ([env:native], board = linux_hardware): each
# pin_* value is interpreted as a BCM line number on the chip
# identified by `gpio_chip` below. Use `gpioinfo gpiochip0` to
# see what's available on your board. -1 disables a pin.
# - On macOS native ([env:native-macos], board = cross_platform):
# pin values are arbitrary sim-pin IDs in the range 0-63. They
# don't reference real hardware; they just need to be unique
# and within range. The values below are fine as-is for macOS.
#
# pin_sclk / pin_mosi / pin_miso / pin_cs are all owned by the spidev
# kernel driver via the device tree and are never claimed by our libgpiod
# bind step. spidev's SPI controller asserts hardware CS automatically
# around each SPI_IOC_MESSAGE ioctl, and the SX127x driver now batches
# address+data into a single ioctl so the chip sees one coherent command.
# `pin_cs` is still listed here for documentation, but it's effectively
# a Portduino sim pin — the modem driver's digitalWrite(_ss, ...) calls
# are no-ops at the OS level, and that's the intended behavior.
# ----- Storage / device paths -----
data_dir = ./state
spi_dev = /dev/spidev0.0
gpio_chip = /dev/gpiochip0
spi_speed_hz = 2000000
# ----- Pin map -----
# Uncomment one of the board sections below and adjust as needed.
# Keep the unused sections commented out (or delete them).
# ----- RAK6421 HAT for Raspberry Pi with RAK13302 SX126x LoRa with PA on IO slot 1 -----
# modem = SX1262
# pin_cs = 8
# pin_reset = 16
# pin_busy = 24
# pin_dio = 22
# pin_rxen = -1
# pin_txen = -1
# pin_tcxo_enable = -1
# pin_led_rx = -1
# pin_led_tx = -1
# radio_enable_pins = 12,13
# dio3_tcxo_voltage = 1.8
# dio2_as_rf_switch = true
# ----- Waveshare SX126x LoRa HAT for Raspberry Pi -----
# modem = SX1262
# pin_cs = 8 # BCM 8 (CE0) — Pi spidev owns this; libgpiod bind falls back, spidev auto-toggles CS
# pin_reset = 22 # BCM 22
# pin_busy = 23 # BCM 23
# pin_dio = 24 # BCM 24 — DIO1
# pin_rxen = -1
# pin_txen = -1
# pin_tcxo_enable = -1
# pin_led_rx = -1
# pin_led_tx = -1
# radio_enable_pins = -1
# dio3_tcxo_voltage = false
# dio2_as_rf_switch = false
# ----- LuckFox Pico (Mini / Plus) + RFM95x LoRa module (SX1276) -----
# Override the gpio_chip line at the top of this file to:
# gpio_chip = /dev/gpiochip1
# The pin values below are gpiochip1 line offsets — for the RV1103 /
# RV1106 SoCs that's the kernel GPIO number minus 32 (e.g. GPIO1_D1 =
# kernel 57 = line 25). The values are the same on both Pico Mini and
# Pico Plus because they share the same SoC family; only the physical
# header pin numbers differ between the two boards.
# modem = SX1276
# pin_cs = 16 # GPIO1_C0 — informational only; spidev owns CS, our digitalWrite is a sim no-op
# pin_reset = 25 # GPIO1_D1
# pin_busy = 22 # GPIO1_C6 — SX127x has no BUSY; harmless, the driver just pinMode(_, INPUT)
# pin_dio = 23 # GPIO1_C7 — DIO0 (RFM95x G0; meshtasticd calls it IRQ)
# pin_rxen = -1 # not used: RFM95x EN should be tied directly to 3V3
# pin_txen = -1
# pin_tcxo_enable = -1
# pin_led_rx = -1
# pin_led_tx = -1
# Wiring note: tie the RFM95x EN pin to the LuckFox 3V3-OUT rail so the
# module is always powered. Adafruit RFM95W breakouts have an onboard
# regulator + level shifters; VIN can be 3.3 V or 5 V, but tying it to
# 3V3-OUT keeps logic levels consistent with the SoC.
# spi_dev / spi_speed_hz: keep /dev/spidev0.0 at 2_000_000 Hz (top of file).
# ----- macOS sim defaults (the in-code defaults) -----
# pin_cs = 0
# pin_reset = 1
# pin_busy = 2
# pin_dio = 3
# pin_rxen = 4
# pin_txen = 5
# pin_tcxo_enable = -1
# pin_sclk = 6
# pin_mosi = 7
# pin_miso = 8
# pin_led_rx = 9
# pin_led_tx = 10
# ----- SX126x-only runtime knobs (mirror meshtasticd's Lora.* keys) -----
# Both keys are no-ops on SX127x / SX128x.
#
# dio3_tcxo_voltage:
# Opt-in for HATs that use a TCXO powered by the SX1262's DIO3 pin
# (RAK13302, most Heltec/Waveshare LoRa HATs). Float volts — snaps to
# the nearest of 1.6, 1.7, 1.8, 2.2, 2.4/2.7/3.0, 3.3. Also accepts
# `true` as an alias for 1.8 V (matches meshtasticd's YAML convention).
# Leave unset (or `false` / 0) for XTAL-only boards: the firmware will
# leave the chip on its default oscillator config and TX still works.
# On embedded builds this field overrides the per-board compile-time
# default; the per-board default is used when unset.
# dio2_as_rf_switch:
# When true, the SX1262 drives the antenna RF switch from its own DIO2
# line based on TX/RX state — host pin_rxen / pin_txen are not needed.
# Many SX1262 HATs (Waveshare, Heltec) wire DIO2 to the switch directly.
# dio3_tcxo_voltage = 1.8
# dio2_as_rf_switch = true
# ----- Recovery on TX failure -----
# When true, a LoRa->endPacket() timeout (modem failed to report TX_DONE
# within the driver's 20-second window) triggers a full daemon re-exec
# via hard_reset() — same recovery behavior as the embedded RNode firmware.
# Default false on native because re-execing tears down libgpiod handles
# and the KISS-TCP listener for a single dropped packet, which is rarely
# worth it. With this off, the firmware logs the failure to KISS, returns
# the modem to RX, and continues.
# reboot_on_tx_failure = false
# ----- Auxiliary pins enabled while the radio is in use -----
# Comma-separated list of GPIO pins driven to an active level for the
# duration the radio is in use (asserted just before LoRa->begin() in
# startRadio(); de-asserted after LoRa->end() in stopRadio()). Default
# active level is HIGH; append ":low" to invert a single entry.
#
# Use for external LDO enables, antenna-switch power, PA bias, LNA
# enable, etc. The legacy `pin_tcxo_enable` above is independent: it
# stays asserted for the daemon's whole lifetime. Choose `pin_tcxo_enable`
# for always-on rails, `radio_enable_pins` for rails that should track
# radio_online.
#
# Linux native: each pin is a libgpiod line offset on the gpio_chip
# selected above (BCM number on Raspberry Pi). macOS sim: any unused
# sim-pin in 0-63.
# radio_enable_pins = 22,25:low,33
# ----- LoRa radio settings -----
# These get written into the EEPROM image on first boot. After that,
# the values stored in ./eeprom are what's used (modify via the host
# protocol or delete ./eeprom to re-seed from this file).
lora_freq_hz = 915000000
lora_bw_hz = 125000
lora_sf = 8
lora_cr = 5
lora_txp = 17
# ----- KISS host transport (TCP) -----
# On native, the embedded firmware's USB-serial KISS channel is replaced
# by a localhost TCP server. Tools that would normally open /dev/ttyACM0
# (rnodeconf, RNS KISSInterface, etc.) connect to 127.0.0.1:<kiss_tcp_port>
# instead. Single-client only; a second connection is rejected. Stale
# clients are reaped after ~15 s of silence (plus TCP keepalive). Default
# 7633 matches the ESP32 WiFi-remote port used in embedded builds.
kiss_tcp_port = 7633
# Expose the KISS server on all interfaces (0.0.0.0) instead of just
# loopback. There is NO authentication or encryption on this socket —
# only enable on networks you fully trust. Accepted boolean values
# (case-insensitive): 1, true, yes, on / 0, false, no, off. Default: off.
kiss_tcp_public = false
# ----- KISS host transport (WebSocket) -----
# Parallel to kiss_tcp_public, but for the KISS-over-WebSocket console
# (currently fixed on port 8080). The embedded web console connects via
# `new WebSocket("ws://<host>:8080")` and exchanges KISS frames as binary
# messages. Same caveats apply — no auth, no encryption — so only opt in
# on networks you fully trust.
kiss_ws_public = false