[Bug]: RAK 19003 Rev E Incorrect UART0 Pin Designation
Category
Serial
Hardware
Rak4631
Is this bug report about any UI component firmware like InkHUD or Meshtatic UI (MUI)?
- [ ] Meshtastic UI aka MUI colorTFT
- [ ] InkHUD ePaper
- [ ] OLED slide UI on any display
Firmware Version
2.7.21
Description
Summary: I was trying to get an external microcontroller talking with my RAK4631s using the on board serial headers. It was easy with the 19007 baseboard but the 19003 baseboard just would not work. Changing the following in variants\nrf52840\rak4631\variant.h made the on board serial headers work.
// Connected to Jlink CDC #define PIN_SERIAL2_RX (19) #define PIN_SERIAL2_TX (20)
The current pin definition for Serial2 in the RAK 4631 variant.h seems incorrect. It shows RX 8 TX 6 but that does not match the RAK official variant.h. RAK shows RX 19 TX 20 which is the change that allowed it to work for me with the 19003 Rev E.
Newer versions of the 19003 such as the currently shipping Rev E use RX0 and TX0 vs older versions that used RX1 and TX1 same as on the 19007 baseboard. UART0 is labeled as Serial2 in variant.h.
RAK variant.h: https://github.com/RAKWireless/RAK-nRF52-Arduino/blob/ca1dd0b2b17a9bd12a6d9a4d0f39b528e2104efc/variants/WisCore_RAK4631_Board/variant.h#L122-L123
Meshtastic variant.h: https://github.com/meshtastic/firmware/blob/c728cfdaf4423dfa57880ea16b7e11a7afbabba6/variants/nrf52840/rak4631/variant.h#L104
Looping back the RX to TX pins on the same 19003 board confirms that communication is now working as per attached log.
Relevant log output
INFO | ??:??:?? 270 Serial HELLO from node=0x6b8e34f6
DEBUG | ??:??:?? 275 Serial HELLO sent node=0x6b8e34f6
INFO | ??:??:?? 275 Serial HELLO from node=0x6b8e34f6
DEBUG | ??:??:?? 280 Serial HELLO sent node=0x6b8e34f6
INFO | ??:??:?? 280 Serial HELLO from node=0x6b8e34f6
DEBUG | ??:??:?? 285 Serial HELLO sent node=0x6b8e34f6
So... do we need different variants for different versions of the 19003 then? 🫤
This issue has not had any comment or update in the last month. If it is still relevant, please post update comments. If no comments are made, this issue will be closed automagically in 7 days.
So... do we need different variants for different versions of the 19003 then? 🫤
Seems Like it... But that makes things needlessly complicated for the average user.
Mainly I just wanted to document this somewhere to save the next person some googling.
This issue has not had any comment or update in the last month. If it is still relevant, please post update comments. If no comments are made, this issue will be closed automagically in 7 days.
This issue has not had any comment since the last notice. It has been closed automatically. If this is incorrect, or the issue becomes relevant again, please request that it is reopened.