RAK3172 (RUI_4.0.6) UART Issue: Only receiving 'A'(0x41) response after host reboot

I am experiencing a strange UART communication issue with my RAK3172 module running RUI_4.0.6 firmware in LoRa P2P mode.

RAKwireless RAK3172                                                                        
------------------------------------------------------                                     
Version: RUI_4.0.6_RAK3172-E                                                               
Current Work Mode: LoRa P2P.

My application sets the following configuration:

AT+NWM=0
AT+P2P=921100000:7:125:0:8:14

Setup:

  • Module: RAK3172-E
  • Firmware: RUI_4.0.6_RAK3172-E
  • Host: Raspberry Pi
  • Interface: UART (/dev/ttyAMA2)

The Problem: When the Raspberry Pi reboots, and my application program sends an AT command immediately afterwards, the module only responds with the single character ‘A’ instead of the expected OK or command response.

If I terminate my application program and then access the same serial port (/dev/ttyAMA2) using the Minicom terminal, all AT commands and responses work perfectly fine.

Where should I start debugging?

Hi @jhjeong ,

With the module responding well with minicom means the cause is likely on the application you created. My suggestion would be update first the FW to the latest one. Erase the flash using STM32CubeProgrammer then upload the latest FW. Then just run a basic AT on your application and see what will be the response. It can be possible that your application is sending other characters or the UART lines is not stable that causes that issue. Or the application is returning something that is not coming directly from the module.

Thank you for your suggestions. I appreciate the guidance on updating the FW and running a basic AT test. I will proceed with those steps.

My current application is written in C on the Raspberry Pi, utilizing the termios library for serial communication. Since Minicom works perfectly, I suspect the issue lies in a critical initialization setting that my termios configuration is missing compared to Minicom.

Could you please confirm the required termios settings or control signals necessary for reliable communication with the RAK3172 module, especially right after a host reboot?

Hi @jhjeong ,

I haven’t tried to use termios on Rasbperry Pi so I cannot provide recommendation on that. I’ve tried to use pyserial before on Raspberry Pi and it is reliable but that uses Python.

One thing you can do as well is monitor the UART lines using logic analyzer or scope. This way, you can really see what’s happening on the UART line when termios start to run.

Solved!

I was previously only using Rx and Tx for serial reception. After adding Reset pin control to reset the sensor before serial communication, the reception is now working correctly.

Thank you for your help!