Sketch breaks with serial port open

Hi, I use Chirpstack Server + RAK7246 + RAK11310, “LoRaWAN_OTAA_ABP” example from repo, changed only region and OTAA keys. Works fine, Hello! upstream to server, until I open the port monitor. When port is open - sketch breaks. Arduino IDE port monitor or a third party monitor, tried on Ubuntu and Win10 - the result is the same - sketch breaks - “Sending frame now…” is the only one message I see. Tried different examples from repo - environmental monitor and lorawan_otaa - same result. Tried different RAK11310 - same result.
RAK Serial Port Tool gives a different result when opening the port, the sketch works, messages from node continue to go to the server, but the Tool freezes completely.
Tried example sketch without LoraWan communication RAK13007_Relay_G5LE-14-DC3.ino added message to the port after each switch and it works as expected, messages come to the port monitor.
Any advice on which way to look?

Strange, I can run the example without problems:

What version of the BSP are you using?

the same as yours - 0.0.7
Arduino IDE 1.8.19

What is the version of the SX126x-Arduino library?

the same as yours - 2.0.14
I also tried Arduino IDE 2.0.3 with this BSP and Lib - same result.

Not sure what’s happening, I cannot see your hanging Serial problem.

In the SX126x-Arduino library, I guess you didn’t enable the log output?

Another example that you could try is the RAK11310-AT-Command-Firmware.

It is different to our example firmware in the way it handles things.

Probably not, if I don’t know what it is :slight_smile:

I tried, I upload an example from Arduino IDE, all commands are executed well, I set keys, band, power … until “AT + JOIN” commands. AT+JOIN doesn’t work, tried AT+JOIN=1,0,1,1 (1,1,10,5 etc.) return OK but nothing changes. AT+JOIN=1,1,10,5 should set “Auto join enabled”, but this does not happen. I tried AT + NJS, get “+ CME ERROR: 2” in response.
Tried upload sketch from the github repo, not from the Arduino IDE examples - same result, but “AT+JOIN=1,0,1,1” return +CME ERROR:5.

CME ERROR: 2 ==> Your command is in the wrong format
CME ERROR:5 ==> Command is not allowed

Looks like the device is in LoRa P2P mode.

Try AT+NWM=1, then reboot the device with ATZ

No, i checked it
"AT+NWM=?

+NWM:1
OK
"

AT+JOIN syntax is AT+JOIN=1:1:10:5 with :, not with a comma ==> RAK11300-AT-Command-Firmware/AT-Command.md at main · RAKWireless/RAK11300-AT-Command-Firmware · GitHub

YES it works. I took mistake with comma here GitHub - RAKWireless/RAK11300-AT-Command-Firmware: AT Command Firmware for the WisDuo RAK11300 and WisBlock Core RAK11310 “Short example for OTAA connection test” section, you probably need to correct it.
Now everything works as expected, messages are sent to the server and to the terminal.
How would this help solve the issue described in the first post?

Typo fixed.
Thanks for reporting it.

For the original problem. Can you send me the sketch you are using. There are some older versions of the example that had problems.

Did you get the example from our WisBlock Github repo? That is the example I used when I tried to reproduce your problem.

Problem solved, examples in Arduino IDE are not working, now i upload the example from repo your link and everything worked as expected, thanks very much

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