setup-radio-config.sh reads a board profile out of radio-settings.json and writes the
hardware keys into config.yaml. It handles 22 keys, including txen_pin, rxen_pin, txled_pin, rxled_pin, cs_pin and is_waveshare, but it never reads or writes en_pin.
Two shipped presets require en_pin:
preset
en_pin
cs_pin
PiMesh-1W (V2)
26
-1
Zindello Industries UltraPeater E22P
21
16
On those boards en_pin gates the E22P RF front end. Because the script leaves the existing
value in place, a user who selects the PiMesh-1W V2 profile on a config that currently has en_pin: -1 gets every other pin written correctly and the front end left disabled, with no
warning. The web onboarding wizard does handle en_pin, so the two paths disagree.
Evidence
Keys the script writes back (from the sed calls in apply_hardware_config):
en_pin is absent. The only matches for the string in the file are the txen_pin and rxen_pin substrings; there is no standalone en_pin occurrence.
Reproduce
Start from a config.yaml containing en_pin: -1.
Run setup-radio-config.sh and select PiMesh-1W (V2).
Inspect config.yaml: cs_pin, busy_pin, irq_pin, reset_pin, use_dio2_rf, use_dio3_tcxo and tx_power are all updated to the preset values, and en_pin is
still -1.
Suggested fix
Extract en_pin alongside the other pins and write it, adding the key when it is missing
rather than only substituting an existing line, since older configs predate it:
It would also help to have the script warn when a selected preset contains a key it does not
know how to write, so this class of gap fails loudly instead of silently.
## Summary
`setup-radio-config.sh` reads a board profile out of `radio-settings.json` and writes the
hardware keys into `config.yaml`. It handles 22 keys, including `txen_pin`, `rxen_pin`,
`txled_pin`, `rxled_pin`, `cs_pin` and `is_waveshare`, but it never reads or writes `en_pin`.
Two shipped presets require `en_pin`:
| preset | `en_pin` | `cs_pin` |
|---|---|---|
| PiMesh-1W (V2) | 26 | -1 |
| Zindello Industries UltraPeater E22P | 21 | 16 |
On those boards `en_pin` gates the E22P RF front end. Because the script leaves the existing
value in place, a user who selects the PiMesh-1W V2 profile on a config that currently has
`en_pin: -1` gets every other pin written correctly and the front end left disabled, with no
warning. The web onboarding wizard does handle `en_pin`, so the two paths disagree.
## Evidence
Keys the script writes back (from the `sed` calls in `apply_hardware_config`):
```
bandwidth, baud_rate, bus_id, busy_pin, coding_rate, cs_id, cs_pin, frequency,
irq_pin, is_waveshare, node_name, pid, port, preamble_length, reset_pin, rxen_pin,
rxled_pin, spreading_factor, txen_pin, txled_pin, tx_power, vid
```
`en_pin` is absent. The only matches for the string in the file are the `txen_pin` and
`rxen_pin` substrings; there is no standalone `en_pin` occurrence.
## Reproduce
1. Start from a `config.yaml` containing `en_pin: -1`.
2. Run `setup-radio-config.sh` and select **PiMesh-1W (V2)**.
3. Inspect `config.yaml`: `cs_pin`, `busy_pin`, `irq_pin`, `reset_pin`, `use_dio2_rf`,
`use_dio3_tcxo` and `tx_power` are all updated to the preset values, and `en_pin` is
still `-1`.
## Suggested fix
Extract `en_pin` alongside the other pins and write it, adding the key when it is missing
rather than only substituting an existing line, since older configs predate it:
```bash
en_pin=$(echo "$hw_config" | jq -r '.en_pin // empty')
...
[ -n "$en_pin" ] && sed "${SED_OPTS[@]}" "s/^ en_pin:.*/ en_pin: $en_pin/" "$CONFIG_FILE"
```
It would also help to have the script warn when a selected preset contains a key it does not
know how to write, so this class of gap fails loudly instead of silently.
<!-- github-sync-id:5404819806 -->
I had a similar issue except my config.yaml had this at the end:
en_pins: - 0 en_pin: 26 was set but ignored. Commented the last two lines out and restarted.
PiMesh-1W V2 on a raspi 4B. This happened after an update. Made change in config.yaml and working great on openHop Repeater v1.1.5.dev0
I had a similar issue except my config.yaml had this at the end:
`en_pins:`
`- 0`
`en_pin: 26` was set but ignored. Commented the last two lines out and restarted.
PiMesh-1W V2 on a raspi 4B. This happened after an update. Made change in config.yaml and working great on openHop Repeater v1.1.5.dev0
<!-- github-comment-id:5658379078 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
setup-radio-config.shreads a board profile out ofradio-settings.jsonand writes thehardware keys into
config.yaml. It handles 22 keys, includingtxen_pin,rxen_pin,txled_pin,rxled_pin,cs_pinandis_waveshare, but it never reads or writesen_pin.Two shipped presets require
en_pin:en_pincs_pinOn those boards
en_pingates the E22P RF front end. Because the script leaves the existingvalue in place, a user who selects the PiMesh-1W V2 profile on a config that currently has
en_pin: -1gets every other pin written correctly and the front end left disabled, with nowarning. The web onboarding wizard does handle
en_pin, so the two paths disagree.Evidence
Keys the script writes back (from the
sedcalls inapply_hardware_config):en_pinis absent. The only matches for the string in the file are thetxen_pinandrxen_pinsubstrings; there is no standaloneen_pinoccurrence.Reproduce
config.yamlcontainingen_pin: -1.setup-radio-config.shand select PiMesh-1W (V2).config.yaml:cs_pin,busy_pin,irq_pin,reset_pin,use_dio2_rf,use_dio3_tcxoandtx_powerare all updated to the preset values, anden_pinisstill
-1.Suggested fix
Extract
en_pinalongside the other pins and write it, adding the key when it is missingrather than only substituting an existing line, since older configs predate it:
It would also help to have the script warn when a selected preset contains a key it does not
know how to write, so this class of gap fails loudly instead of silently.
I had a similar issue except my config.yaml had this at the end:
en_pins:- 0en_pin: 26was set but ignored. Commented the last two lines out and restarted.PiMesh-1W V2 on a raspi 4B. This happened after an update. Made change in config.yaml and working great on openHop Repeater v1.1.5.dev0