Hi,
I’ve got a kickstarter SODAQ One board and successfully programmed LoRaWan tutorial code alright.
http://support.sodaq.com/sodaq-one/loraone-lora-basic-sketch/
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);
delay(3000);
while (!debugSerial){
// Wait for the debugSerial
}
debugSerial.begin(57600);
//loraSerial.begin(LoRaBee.getDefaultBaudRate());
loraSerial.begin(57600);
debugSerial.println("RN2483/2903 serial passthrough");
}
void loop() {
if (debugSerial.available()) {
loraSerial.write(debugSerial.read());
}
if (loraSerial.available()) {
debugSerial.write(loraSerial.read());
}
}