Compare commits

...

3 Commits

Author SHA1 Message Date
Carlos Valdes ce7444c1a1 feat: add WIZnet W5500-EVB-Pico2 + E22P-868M30S variant (#10552)
CI / setup (all) (push) Waiting to run
CI / setup (check) (push) Waiting to run
CI / version (push) Waiting to run
CI / check (push) Blocked by required conditions
CI / build (push) Blocked by required conditions
CI / build-debian-src (push) Waiting to run
CI / MacOS (15) (push) Waiting to run
CI / MacOS (26) (push) Waiting to run
CI / package-pio-deps-native-tft (push) Waiting to run
CI / test-native (push) Waiting to run
CI / docker (alpine, native, linux/amd64) (push) Waiting to run
CI / docker (alpine, native, linux/arm64) (push) Waiting to run
CI / docker (alpine, native-tft, linux/amd64) (push) Waiting to run
CI / docker (debian, native, linux/amd64) (push) Waiting to run
CI / docker (debian, native, linux/arm/v7) (push) Waiting to run
CI / docker (debian, native, linux/arm64) (push) Waiting to run
CI / docker (debian, native-tft, linux/amd64) (push) Waiting to run
CI / gather-artifacts (esp32) (push) Blocked by required conditions
CI / gather-artifacts (esp32c3) (push) Blocked by required conditions
CI / gather-artifacts (esp32c6) (push) Blocked by required conditions
CI / gather-artifacts (esp32s3) (push) Blocked by required conditions
CI / gather-artifacts (nrf52840) (push) Blocked by required conditions
CI / gather-artifacts (rp2040) (push) Blocked by required conditions
CI / gather-artifacts (rp2350) (push) Blocked by required conditions
CI / gather-artifacts (stm32) (push) Blocked by required conditions
CI / firmware-size-report (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
CI / release-firmware (esp32) (push) Blocked by required conditions
CI / release-firmware (esp32c3) (push) Blocked by required conditions
CI / release-firmware (esp32c6) (push) Blocked by required conditions
CI / release-firmware (esp32s3) (push) Blocked by required conditions
CI / release-firmware (nrf52840) (push) Blocked by required conditions
CI / release-firmware (rp2040) (push) Blocked by required conditions
CI / release-firmware (rp2350) (push) Blocked by required conditions
CI / release-firmware (stm32) (push) Blocked by required conditions
CI / publish-firmware (push) Blocked by required conditions
* feat: add WIZnet W5500-EVB-Pico2 + E22P-868M30S variant

Adds a community variant for the WIZnet W5500-EVB-Pico2 development
board (https://docs.wiznet.io/Product/iEthernet/W5500/w5500-evb-pico2)
paired with an external EBYTE E22P-868M30S LoRa module.

This is the hardware twin of variants/rp2350/diy/pico2_w5500_e22 — same
LoRa pinout, same W5500 pin mapping — and reuses its variant.h verbatim
via `-I variants/rp2350/diy/pico2_w5500_e22`. No duplicated pinout file.

Two differences vs pico2_w5500_e22 justify the separate env:

1. Board target: `wiznet_5500_evb_pico2` (2 MB flash) instead of
   `rpipico2` (4 MB flash). The WIZnet PCB ships with a smaller Q-SPI
   chip than a stock Pi Pico 2. Selecting the correct board makes the
   linker fail fast on overflow instead of producing a UF2 that gets
   silently truncated when flashed to the device.
2. W5500 PHY is integrated on the PCB (hard-wired SPI0 GP16-20) rather
   than supplied as an external module the user wires manually.

The E22P-868M30S uses a single combined RFEN pin (LNA + PA enable)
instead of the older E22-900M30S's split RXEN/TXEN pins. RFEN is held
HIGH at all times via `SX126X_ANT_SW 3`; TX switching still uses the
on-module DIO2 → TXEN bridge through `SX126X_DIO2_AS_RF_SWITCH`.

Build verified: wiznet_5500_evb_pico2_e22p SUCCESS
(RAM 19.2%, Flash 65.6% of 1.5 MB partition / 2 MB chip).

* style(wiznet-evb-pico2-e22p): prettier-format README tables

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2026-06-05 09:08:43 -05:00
Littleaton e3ae0a6ab5 missing module config (#10496)
13302 and 13300 had missing module config for slot 2, also the rf switch and voltage info was missing.

Without that the auto setting in the config.yaml will try to use the default  lora-hat-rak-6421-pi-hat.yaml and things do not work correctly.
2026-06-05 08:34:28 -05:00
pdxlocations 733430ed45 feat: Add Module configuration for RAK13300 and RAK13302 in Slot 2 (#10632) 2026-06-05 06:10:25 -05:00
4 changed files with 200 additions and 3 deletions
+5 -1
View File
@@ -5,7 +5,9 @@ Meta:
- raspberry-pi
Lora:
### RAK13300 in Slot 2 pins
### RAK13300 in Slot 2
Module: sx1262
IRQ: 18 #IO6
Reset: 24 # IO4
Busy: 19 # IO5
@@ -13,5 +15,7 @@ Lora:
Enable_Pins:
- 26
- 23
DIO3_TCXO_VOLTAGE: true
DIO2_AS_RF_SWITCH: true
spidev: spidev0.1
# CS: 7
+6 -2
View File
@@ -5,14 +5,18 @@ Meta:
- raspberry-pi
Lora:
### RAK13302 in Slot 2 pins
### RAK13302 in Slot 2
Module: sx1262
IRQ: 18 #IO6
Reset: 24 # IO4
Busy: 19 # IO5
# Ant_sw: 23 # IO3
# Ant_sw: 23 # IO3
Enable_Pins:
- 26
- 23
DIO3_TCXO_VOLTAGE: true
DIO2_AS_RF_SWITCH: true
spidev: spidev0.1
# CS: 7
TX_GAIN_LORA: [9, 9, 10, 11, 9, 8, 9, 10, 10, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 10, 9, 8]
@@ -0,0 +1,160 @@
# WIZnet W5500-EVB-Pico2 + E22P-868M30S — Meshtastic Variant
Meshtastic support for the **WIZnet W5500-EVB-Pico2**, a Raspberry Pi Pico 2 development board with an **integrated W5500 Ethernet PHY** on SPI0, paired with an external **EBYTE E22P-868M30S** LoRa module on SPI1.
This variant is hardware-twin of [`pico2_w5500_e22`](../diy/pico2_w5500_e22/) (same LoRa pinout, same W5500 pin mapping) but targets the WIZnet PCB rather than a standalone Pico 2 + external W5500 module. The two key differences are:
| | `pico2_w5500_e22` | `wiznet_5500_evb_pico2_e22p` |
| ------------ | -------------------------------------- | ---------------------------------------- |
| Board target | `rpipico2` (4 MB flash) | `wiznet_5500_evb_pico2` (**2 MB flash**) |
| W5500 PHY | External breakout module (you wire it) | Integrated on the PCB (hard-wired) |
> ⚠️ Flashing a W5500-EVB-Pico2 with the `pico2_w5500_e22` env builds for a 4 MB flash target and can silently overflow the 2 MB available on the WIZnet PCB. Use this variant for the WIZnet board.
The LoRa wiring and `variant.h` are shared with `diy/pico2_w5500_e22` via `-I variants/rp2350/diy/pico2_w5500_e22` — there is no duplicated pinout file.
---
## Required Hardware
| Component | Model | Notes |
| --------- | ---------------------- | ------------------------------------------------------------------------------ |
| Board | WIZnet W5500-EVB-Pico2 | RP2350 @ 150 MHz, 512 KB RAM, **2 MB flash**, on-board W5500 |
| LoRa | EBYTE E22P-868M30S | SX1262 + 30 dBm PA, 868 MHz (Europe band); RFEN combines LNA + PA enable lines |
The W5500-EVB-Pico2 carries a smaller Q-SPI flash (2 MB) than a stock Pi Pico 2 (4 MB). The board target `wiznet_5500_evb_pico2` selects the correct flash size so the linker fails fast if the image overflows, instead of producing a UF2 that gets truncated when flashed to the device.
---
## Pinout
### System pins (W5500-EVB-Pico2, fixed by the PCB)
| GPIO | Function |
| ---- | --------------------------------------- |
| GP24 | VBUS sense — HIGH when USB is connected |
| GP25 | User LED (heartbeat) |
| GP29 | ADC3 — VSYS/3, measures supply voltage |
### W5500 Ethernet (SPI0, on-board)
| W5500 signal | RP2350 GPIO |
| ------------ | ----------- |
| MISO | GP16 |
| CS / SCS | GP17 |
| SCK | GP18 |
| MOSI | GP19 |
| RST | GP20 |
| INT | GP21 |
| VCC | 3.3V |
| GND | GND |
> All Ethernet pins are wired by the PCB — nothing to solder. SPI0 is reserved for the W5500.
### E22P-868M30S LoRa (SPI1, external)
| E22P signal | RP2350 GPIO | Notes |
| ----------- | ----------- | ------------------------------------------------- |
| SCK | GP10 | SPI1 clock |
| MOSI | GP11 | SPI1 TX |
| MISO | GP12 | SPI1 RX |
| NSS / CS | GP13 | Chip select |
| RESET | GP15 | Active LOW reset |
| DIO1 | GP14 | IRQ interrupt |
| BUSY | GP2 | Module busy indicator |
| RFEN | GP3 | Combined LNA + PA enable — held HIGH at all times |
| TXEN | ← DIO2 | Bridge on the module (see below) |
| VCC | 3.3V | Add a 100 µF capacitor close to the module |
| GND | GND | — |
---
## E22**P** vs E22 — what changed
The E22**P**-868M30**S** is the newer revision of EBYTE's 30 dBm 868 MHz module. The pinout is interchangeable with the E22-900M30S but the RF switch control differs:
- On the older E22-900M30S, **RXEN** enables the LNA and **TXEN** enables the PA (two separate pins).
- On the E22**P**-868M30**S**, both functions are merged into a single **RFEN** pin acting as a global RF enable. RFEN must be held HIGH whenever the radio is active — both during RX and TX.
The firmware drives this with `SX126X_ANT_SW 3`, which sets GP3 (RFEN) HIGH once at boot and leaves it there. TXEN switching during transmit is still handled by the on-module DIO2 → TXEN bridge (see below).
---
## Special wiring: DIO2 → TXEN bridge on the E22P module
The E22P-868M30S does **not** connect DIO2 to the TXEN pin of its PA internally. They must be bridged with a short wire or solder bridge **on the module itself**:
```text
E22P DIO2 pin ──┐
├── wire / solder bridge on the module
E22P TXEN pin ──┘
```
With this bridge in place, `SX126X_DIO2_AS_RF_SWITCH` causes the SX1262 to drive DIO2 HIGH automatically during TX, enabling the PA without needing an RP2350 GPIO for TXEN.
**Without this bridge the module will not transmit.**
---
## Build
```bash
pio run -e wiznet_5500_evb_pico2_e22p
```
### Flash — BOOTSEL mode
1. Hold the **BOOTSEL** button on the W5500-EVB-Pico2.
2. Connect USB to the PC — it appears as a `RPI-RP2` storage drive.
3. Copy the `.uf2` file:
```text
.pio/build/wiznet_5500_evb_pico2_e22p/firmware-wiznet_5500_evb_pico2_e22p-*.uf2
```
Or directly with picotool:
```bash
pio run -e wiznet_5500_evb_pico2_e22p -t upload
```
---
## Network usage
This board uses Ethernet (no Wi-Fi). From the Meshtastic app:
- **Enable Ethernet** under `Config → Network → Ethernet Enabled`
- **DHCP** by default; static IP can also be configured
Services available once connected:
| Service | Details |
| ------- | --------------------------- |
| NTP | Time synchronization |
| MQTT | Messages to external broker |
| API | TCP socket on port 4403 |
| Syslog | Remote logging (optional) |
---
## Technical notes
### LoRa — RF control
| Define | Effect |
| ------------------------------ | ----------------------------------------------------------- |
| `SX126X_ANT_SW 3` | GP3 (RFEN) driven HIGH at init and never toggled again |
| `SX126X_DIO2_AS_RF_SWITCH` | SX1262 drives DIO2 HIGH during TX → enables TXEN via bridge |
| `SX126X_DIO3_TCXO_VOLTAGE 1.8` | E22P TCXO controlled by DIO3 |
| `-D EBYTE_E22_900M30S` | Sets `TX_GAIN_LORA=7`, max power 22 dBm |
### Ethernet
- Library: `arduino-libraries/Ethernet@^2.0.2` (supports W5100/W5200/W5500 auto-detection).
- SPI0 is explicitly initialized with pins GP16/18/19 before `Ethernet.init()`.
- DHCP timeout is set to 10 s (instead of the default 60 s) to avoid blocking LoRa startup.
### HW_VENDOR
Mapped to `meshtastic_HardwareModel_PRIVATE_HW` — no dedicated model exists in the Meshtastic protobuf for this hardware combination.
@@ -0,0 +1,29 @@
[env:wiznet_5500_evb_pico2_e22p]
extends = rp2350_base
board = wiznet_5500_evb_pico2
board_level = community
upload_protocol = picotool
# Reuses the variant.h from variants/rp2350/diy/pico2_w5500_e22 — same LoRa
# pinout, same W5500 pin mapping. The only differences vs pico2_w5500_e22 are
# the board target (this PCB has 2 MB flash instead of 4 MB) and the W5500
# being soldered on-board instead of an external module.
build_flags =
${rp2350_base.build_flags}
-ULED_BUILTIN # avoid "LED_BUILTIN redefined" warnings from framework common.h
-I variants/rp2350/diy/pico2_w5500_e22
-D HW_SPI1_DEVICE
-D EBYTE_E22_900M30S # selects the EBYTE E22(P)-900M30S(S) module config, including TCXO voltage support and TX gain / max power settings
# Re-enable Ethernet and API source paths excluded in rp2350_base
build_src_filter = ${rp2350_base.build_src_filter} +<mesh/eth/> +<mesh/api/> +<mqtt/>
lib_deps =
${rp2350_base.lib_deps}
${networking_base.lib_deps}
${networking_extra.lib_deps}
# Standard WIZnet Ethernet library — supports W5100/W5200/W5500 auto-detect
arduino-libraries/Ethernet@^2.0.2
debug_build_flags = ${rp2350_base.build_flags}, -g
debug_tool = cmsis-dap