PlatformIO build problem after conversion 4631 to 4631-R

Please include the following information, in order for us to help you as effectively as possible.

  • What product do you wish to discuss? RAK4631-R

  • What firmware are you using? (RUI3 or Arduino BSP or other IDE (e.g. STM32CubeIDE)? RUI3

  • What firmware version? Can it be obtained with AT+VER=?

  • Computer OS? (MacOS, Linux, Windows)

  • What Computer OS version?

  • How often does the problem happen?

  • How can we replicate the problem?

  • Provide source code if custom firmware is used or link to example if RAKwireless example code is used: WisBlock/examples/RAK4630/solutions/Hydraulic_Pressure_Monitoring at master · RAKWireless/WisBlock · GitHub

  • What Computer OS version? Windows 11

  • How often does the problem happen? Always

  • How can we replicate the problem? Yes

Good afternoon,

After I did the RAK4631 to RAK4631-R by WisToolBox, in the same code compiling/build process in the VSCode/PlatformIO, it seems that the serial port is not available in the build process following the error messages below:

Could you help to understand why in Arduino BSP mode is working and with RUI3 is not working?

Regards,

Cláudio

Blockquote
Executing task: C:\Users\Claudio Rosa.platformio\penv\Scripts\platformio.exe run --target upload

Processing wiscore_rak4631 (platform: nordicnrf52; board: wiscore_rak4631; framework: arduino)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/wiscore_rak4631.html
PLATFORM: Nordic nRF52 (10.3.0) > WisCore RAK4631 Board
HARDWARE: NRF52840 64MHz, 243KB RAM, 796KB Flash
DEBUG: Current (jlink) External (jlink, stlink)
PACKAGES:

  • framework-arduinoadafruitnrf52 @ 1.10600.0 (1.6.0)
  • framework-cmsis @ 2.50700.210515 (5.7.0)
  • tool-adafruit-nrfutil @ 1.503.0 (5.3)
  • tool-bossac-nordicnrf52 @ 1.10901.201022 (1.9.1)
  • tool-openocd @ 3.1200.0 (12.0)
  • tool-sreccat @ 1.164.0 (1.64)
  • toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
    LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 15 compatible libraries
    Scanning dependencies…
    Dependency Graph
    |-- SX126x-Arduino @ 2.0.23
    |-- SPI @ 1.0
    Building in release mode
    Checking size .pio\build\wiscore_rak4631\firmware.elf
    Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
    RAM: [= ] 6.0% (used 15016 bytes from 248832 bytes)
    Flash: [== ] 15.8% (used 128584 bytes from 815104 bytes)
    Configuring upload protocol…
    AVAILABLE: jlink, nrfjprog, nrfutil, stlink
    CURRENT: upload_protocol = nrfutil
    Looking for upload port…
    Auto-detected: COM9
    Forcing reset using 1200bps open/close on port COM9
    Waiting for the new upload port…
    Uploading .pio\build\wiscore_rak4631\firmware.zip
    Upgrading target on COM9 with DFU package F:\Users\Claudio Rosa\OneDrive - Nas Ondas Projetos de Inovação\Clientes\MRS\Projetos\Endnodes\Pressão 4-20\Horto.pio\build\wiscore_rak4631\firmware.zip. Flow control is disabled, Single bank, Touch disabled

Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.
Timed out waiting for acknowledgement from device.
Traceback (most recent call last):
File “C:\Users\Claudio Rosa.platformio\packages\tool-adafruit-nrfutil\site-packages\nordicsemi_main_.py”, line 296, in serial
dfu.dfu_send_images()
File “C:\Users\Claudio Rosa.platformio\packages\tool-adafruit-nrfutil\site-packages\nordicsemi\dfu\dfu.py”, line 235, in dfu_send_images
self._dfu_send_image(HexType.APPLICATION, self.manifest.application)
File “C:\Users\Claudio Rosa.platformio\packages\tool-adafruit-nrfutil\site-packages\nordicsemi\dfu\dfu.py”, line 199, in _dfu_send_image
self.dfu_transport.send_start_dfu(program_mode, softdevice_size, bootloader_size,
File “C:\Users\Claudio Rosa.platformio\packages\tool-adafruit-nrfutil\site-packages\nordicsemi\dfu\dfu_transport_serial.py”, line 179, in send_start_dfu
self.send_packet(packet)
File “C:\Users\Claudio Rosa.platformio\packages\tool-adafruit-nrfutil\site-packages\nordicsemi\dfu\dfu_transport_serial.py”, line 243, in send_packet
ack = self.get_ack_nr()
^^^^^^^^^^^^^^^^^
File “C:\Users\Claudio Rosa.platformio\packages\tool-adafruit-nrfutil\site-packages\nordicsemi\dfu\dfu_transport_serial.py”, line 282, in get_ack_nr
raise NordicSemiException(“No data received on serial port. Not able to proceed.”)
nordicsemi.exceptions.NordicSemiException: No data received on serial port. Not able to proceed.

Possible causes:

  • Selected Bootloader version does not match the one on Bluefruit device.
    Please upgrade the Bootloader or select correct version in Tools->Bootloader.
  • Baud rate must be 115200, Flow control must be off.
  • Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.
    ==================================================== [SUCCESS] Took 16.37 seconds ====================================================
  • Terminal will be reused by tasks, press any key to close it.

Blockquote

RUI3 is using its own BSP and we do not have a PlatformIO package for it. You cannot program a RAk4631-R with the RUI3 BSP from PIO.

Please check our tutorial how to install RUI3 BSP on ArduinoIDE and Visual Studio Code.
Personally I prefer VSC + Arduino Extension. It comes close to the comfort of PIO (still not as good).
I wrote about it in my RUI3 Best Practice => Tips & Tricks

Some of my example codes are showing how VSC _ Arduino Extension can make life easier.

1 Like

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