Skip to content

Instantly share code, notes, and snippets.

@bshambaugh
Created September 14, 2025 18:52
Show Gist options
  • Select an option

  • Save bshambaugh/065dd8f82c8f852df7e055051f26d1d7 to your computer and use it in GitHub Desktop.

Select an option

Save bshambaugh/065dd8f82c8f852df7e055051f26d1d7 to your computer and use it in GitHub Desktop.
pro micro nrf52840 nice nano with E22-900T22D
I am trying to use a pro micro nrf52840 nice nano with E22-900T22D, but I have heard that Meshtastic does not support UART due to lack of support in radiolib. Is there a way to modify the Meshtastic firmware to support this setup?
Most relevant references:
Transciever Manual [1] https://github.com/bricomp/EBYTE_E22/blob/main/E22-900T22D_UserManual_EN_v1.3.pdf
Board Definition and Variants for running pro micro nrf52840 nice nano with platformIO [2] https://github.com/ICantMakeThings/Nicenano-NRF52-Supermini-PlatformIO-Support
Meshtastic candidate variant [2a] https://github.com/meshtastic/firmware/tree/106a052950ffbb34a6365f17eb87a7a0ca98239a/variants/nrf52840/diy/nrf52_promicro_diy_xtal
Meshtastic candidate board defintion [2b] https://github.com/meshtastic/firmware/blob/106a052950ffbb34a6365f17eb87a7a0ca98239a/boards/promicro-nrf52840.json
Connections:
E22-900T22D pro micro nrf52840
M0 <--> P1.06, D9
M1 <--> P0.09, D10
RXD <--> P0.06, D1
TXD <--> P0.08, D0
AUX <--> P0.11, D7
VCC <--> VCC
GND <--> GND
checking the pin defintions in meshtastic and another nrf5280 defintion file:
https://github.com/meshtastic/firmware/blob/90ddbf6f2cb381616e1f5d144b3795124976470f/variants/nrf52840/diy/nrf52_promicro_diy_xtal/variant.h#L104-L105 (RX,TX)
https://github.com/ICantMakeThings/Nicenano-NRF52-Supermini-PlatformIO-Support/blob/main/.platformio/packages/framework-arduinoadafruitnrf52/variants/nicenano/variant.h#L22-L23 (RX,TX)
M0,M1, and AUX pins are undefined for meshtastic.
@bshambaugh
Copy link
Author

bshambaugh commented Sep 14, 2025

At this point, I think DeviceTelemetry.cpp and ContentHandler.cpp would need to be rewritten. Also, a SX126xInterface.h copy, titled something like SX126xUARTInterface.h would need to be written.
Anything dependent on SX126xInterface.h would need to be rewritten.
STM32WLE5JCInterface.h is bound to radiolib, but not modifying would not break my use of nrf52840.

Looking at the use of RadioLibInterface.h which uses radiolib, only implemented for SPI. "-->" indicates use of parent.
/home/brent/Downloads/firmware/src/mesh/RadioInterface.h
--> /home/brent/Downloads/firmware/src/mesh/RadioLibInterface.h

/home/brent/Downloads/firmware/src/mesh/RadioLibInterface.h
--> /home/brent/Downloads/firmware/src/ButtonThread.cpp
--> /home/brent/Downloads/firmware/src/mesh/LR11x0Interface.h
--> /home/brent/Downloads/firmware/src/mesh/RadioLibInterface.h
--> /home/brent/Downloads/firmware/src/mesh/RF95Interface.h
--> /home/brent/Downloads/firmware/src/mesh/SX126xInterface.h
--> /home/brent/Downloads/firmware/src/mesh/SX128xInterface.h
--> /home/brent/Downloads/firmware/src/mesh/http/ContentHandler.cpp
--> /home/brent/Downloads/firmware/src/mesh/raspihttp/PiWebServer.cpp
--> /home/brent/Downloads/firmware/src/modules/Telemetry/DeviceTelemetry.cpp
--> /home/brent/Downloads/firmware/variants/t-echo/nicheGraphics.h

/home/brent/Downloads/firmware/src/mesh/SX126xInterface.h
--> /home/brent/Downloads/firmware/src/mesh/STM32WLE5JCInterface.h
--> /home/brent/Downloads/firmware/src/mesh/LLCC68Interface.h
--> /home/brent/Downloads/firmware/src/mesh/SX1268Interface.cpp
--> /home/brent/Downloads/firmware/variants/chatter2/variant.h
--> /home/brent/Downloads/firmware/variants/diy/t-energy-s3_e22/variant.h
--> /home/brent/Downloads/firmware/variants/EBYTE_ESP32-S3/variant.h
--> /home/brent/Downloads/firmware/variants/ELECROW-ThinkNode-M2/variant.h

/home/brent/Downloads/firmware/src/mesh/LR11x0Interface.h
-->/home/brent/Downloads/firmware/src/mesh/InterfacesTemplates.cpp

/home/brent/Downloads/firmware/src/mesh/RF95Interface.h
--> /home/brent/Downloads/firmware/src/main.cpp
--> /home/brent/Downloads/firmware/src/platform/portduino/PortduinoGlue.cpp

/home/brent/Downloads/firmware/src/mesh/SX128xInterface.h
-->/home/brent/Downloads/firmware/src/mesh/InterfacesTemplates.cpp

/home/brent/Downloads/firmware/src/modules/Telemetry/DeviceTelemetry.cpp (explicitly use radiolibinterface : txGood, rxGood, rxBad, txRelay : uint32_t rxBad = 0, rxGood = 0, txGood = 0, txRelay = 0; //debugging counts in radiolibinterface)
/home/brent/Downloads/firmware/src/mesh/http/ContentHandler.cpp (explicitly use radiolibinterface by piping through RadioInterface: float RadioInterface::getFreq() , uint32_t RadioInterface::getChannelNum())
/home/brent/Downloads/firmware/src/ButtonThread.cpp (explicitly use radiolibinterface but only for t-echo)
/home/brent/Downloads/firmware/src/mesh/raspihttp/PiWebServer.cpp (imported but not clear if radiolibinterface is used)

Programming E220 900T22D manually:
LoRa RF configuration before use #E220-900T22 (https://www.youtube.com/watch?v=Neej9BfBMR8)

Programming E220 900T22D with microcontroller:
STM32 E22900T22D LoRa Transceiver Module and Range Test (https://www.youtube.com/watch?v=fPgSf5HOfO8)
"In this tutorial, two STM32 micro-controllers are exchanging data wirelessly over LoRa using E22900T22D module that is interfaced over UART. The MCUs are exchaning dummy data to toggle onboard LED as an indication for ongoing wireless communication."
--> https://github.com/UsefulElectronics/stm32-freertos-e22-lora/blob/main/Core/Src/e22900t22d.h
"E22900T22D Module which uses SX1262, parameters configuration, its interface packets are discussed in details. "

Programming E220 900T22D manually, and adding microcontroller:
LoRa E220 900T22D (https://www.youtube.com/watch?v=HaoGfYG59oI)

Use integration with Ebyte E22-900M30S as a guide for E220 900T22D:
/home/brent/Downloads/firmware/variants/xiao_ble/README.md
/home/brent/Downloads/firmware/variants/xiao_ble/variant.h

compare nice!nano (https://github.com/ICantMakeThings/Nicenano-NRF52-Supermini-PlatformIO-Support/blob/main/.platformio/packages/framework-arduinoadafruitnrf52/variants/nicenano/variant.h) to:
https://github.com/meshtastic/firmware/blob/90ddbf6f2cb381616e1f5d144b3795124976470f/variants/nrf52840/diy/nrf52_promicro_diy_xtal/variant.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment