Serial passthrough code


I’ve got a kickstarter SODAQ One board and successfully programmed LoRaWan tutorial code alright.

But as I don’t have access to a gateway, I’d like to manually talk to its RN2903 module by writing serial passthrough sketch so that I can issue commands from Mac to access radio commands.

I wrote following code but it doesn’t seem to work… I see the message from the last line in setup() alright. But typing commands like “sys get hweui” doesn’t do anything.
Or sometimes I see a message “err” appear on serial console.

I’d appreciate any advice how to move forward.

#define debugSerial SerialUSB
#define loraSerial Serial1

void setup() {
  digitalWrite(ENABLE_PIN_IO, HIGH);
  while (!debugSerial){
  // Wait for the debugSerial
  debugSerial.println("RN2483/2903 serial passthrough");

void loop() {
  if (debugSerial.available()) {
  if (loraSerial.available()) {

That code works fine. You just need to make sure that you have the “Both NL & CR” option selected in the Serial Monitor so that the correct line endings are added.

1 Like

Thank you very much for your advice, Gabriel!

Yes, with “Both NL & CR” selected, I can now issue RN2483/2903 commands and check replies. Super!

I am also trying to make working this sketch, however, I don’t get anything on my Serial screen, even though I write any command, I receive an “invalid_param” response.

I am not even using any Gateway, does it make sense? Since I though this skecth purpose is only developed in order to check LoRa module…

Any suggestion, please?

Many thanks