How to access RAK4631 Hardware UART1 in Arduino

Hello, can anyone help me with examples to communicate with the hardware UART1 on RAK4631 in the Arduino IDE?
I see example of SoftwareSerial but it uses A0 and A1 for a software serial port. I am already using A0/A1 for other purpose. So, I want to use the built-in hardware UART1 (pins RX1/TX1 available on RAK5005-O) to communicate with external serial device but I can’t find any examples of implementation.

Is it as simple as using the Serial() commands? i.e. Serial.begin(baud_rate); Serial.printLine("___"); etc?

Also is UART1 tied to the USB Serial, so that Serial being sent to the USB Serial Monitor in Arduino also get sent over the UART1 pins?

Ultimate goal is to communicate with SIM7000G LTE module which uses 2-pin serial communication.

Thank you for any pointers!

Hi @thegpx
The second UART of the RAK4631 is simply used with Serial1 instead using Serial (USB).

Hi @beegee, thanks so much for your reply. To clarify, when you refer to the “Second” UART, is that the one which has RX1 and TX1 pins exposed on the RAK5005-O board?

Or is that one tied directly to the USB serial, similar to the Arduino pins 0 and 1, so that data being sent/received on the USB bus is also sent through these pins? I’m simply needing to send commands to an external modem from the RAK4631, but if these pins are tied to the USB port, I would not be able to interact with the 4631 via USB Serial while also trying to communicate with the modem.


Disregard, I got it to work! I am able to communicate with the SIM7000G via RX1/TX1 pins using Serial1 object. Thank you for this assistance.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.