Unable to upload RAK3271S via Arduino IDE (macOS)

Hello everyone,
I’m trying to upload a script to a RAK3271S module using Arduino IDE on macOS, but I keep encountering errors, and the device does not seem to be in boot mode. I have tried several solutions found in forums but with no success. Here’s what I’ve done so far:

  • Changed the USB/TTL module to rule out hardware issues.
  • Checked and verified the integrity of the cables.
  • Loaded the latest firmware in .hex format using STM32Cube.
  • Connected the 3V3 pin to BOOT0, then plugged the module into my Mac via USB.
  • Tried using AT mode via Arduino IDE, but the module doesn’t respond.
  • WisTool does not recognize the device.
  • Occasionally, when entering “at+ver=?” in Arduino IDE, I receive strange, unreadable symbols, like: 19:39:30.918 -> �f�f�f�؀��ffff��ff����

I also tried different baud rates on Arduino IDE, but I keep getting similar unreadable symbols in response to commands like “AT+BOOT” or “AT+VER=?”:

19:51:15.616 -> ������

In every attempt, I get the following error message from Arduino IDE:

Device is not in boot mode  
Detecting baudrate..................  
Detect baudrate fail, can not get the baudrate

Additionally, on STM32Cube, if I try to connect without linking the 3V3 pin to BOOT0, I receive this error:

19:47:44 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...

Has anyone experienced a similar issue or has suggestions on how to resolve this? Any help would be greatly appreciated!

Thanks in advance!

Baudrate is always 115200 unless you change something in your code.

When flashing from ArduinoIDE DO NOT CONNECT BOOT0 TO VDD. This forces the module into STM32 bootloader mode. When flashing from ArduinoIDE you need the “secondary” RUI3 bootloader which is started with AT+BOOT or from the uploader script that flashes the firmware.

BOOT0 to VDD is only needed when using the STM32CubeProgrammer.

Thank you for your response!

I understand that the baud rate should be 115200 and that BOOT0 to VDD is only necessary for STM32CubeProgrammer, not for Arduino IDE.

Unfortunately, even when not connecting BOOT0 to 3V3, I still get the same error in Arduino IDE:

Device is not in boot mode
Detecting baudrate..................
Detect baudrate fail, can not get the baudrate

I’ve also tried sending the “AT+BOOT” command in the serial console at 115200 baud, but I don’t get any response from the RAK3272 module. The module remains silent, and no changes occur.

Would you have any suggestions for what could be preventing the AT+BOOT command from working or other steps I might be missing?

Thanks again for your assistance!

Do you trail the AT+BOOT command with a CR and LF?

If the module is complete unresponsive, try to flash the default firmware for RAK3172 with STM32CubeProgrammer.

Make sure you cross RX and TX lines in the connection to the USB/TTL module.

Make sure you are using UART2 of the stamp module for the connection:

Thank you for your reply!

I have connected RXD of the USB/TTL to TX of UART2 and TXD of the USB/TTL to RX of UART2, so the wiring should be correct.

Regarding the CR and LF, I tried all the combinations available in the Arduino IDE: CR, LF, and CR & LF, but the response remains the same. The only thing I notice is that right after the first command following a firmware upload, I get a blank response (as shown in the attached photo in the IDE).

As for the firmware, I have flashed the following versions:

  • RAK3272S_v1.0.2_Boot+App_20210526.hex
  • and also tried the .bin version.

However, I always get the same result even with other USB/TTL:

Device is not in boot mode  
Detecting baudrate..................  
Detect baudrate fail, can not get the baudrate

Any additional suggestions or ideas on what might be causing this?

Thank you again for your help!

After several attempts, I was able to enter boot mode. First, I successfully uploaded the firmware you suggested via UART2:

Then, I connected the RST pin to GND while powering on the device. After that, I sent the AT+VER=? command, and the serial output returned:

22:21:39.946 -> AT+VER=RUI_4.2.0_RAK3172-E
22:21:46.530 -> OK

Thank you very much for your support!

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