rpcUnified hangs when calling rpc_system_version()

Hi,

I received a Wio Terminal D51R and had a good project for it that requires GUI and BLE.
While setting up the project using PlatformIO here and there were some smaller issues
(i.e. the lib Seeed_Arduino_FreeRTOS not clearly specified that its needed) but in the
end the UI was at a good starting point.

Of course - according to all manuals - i updated the RTL firmware before starting the next step, BLE.
I used the tools there: h…s://github.com/Seeed-Studio/ambd_flash_tool
Against the manuals, the tool already erases+flashes the firmware and finishes with a green “Success!” message.

When trying to set up BLE or WiFi, i realized that any access to WiFi or the BLE hardware, resulted in a hang.
Trying the most basic RPC thing, calling rpc_system_version(), also resulted in a hang.
So I double-checked everything. Using the most recent rpcUnified etc libs? yes. using directly master from the repositories:
lib_deps =
h…s://github.com/Seeed-Studio/Seeed_Arduino_rpcWiFi/archive/refs/heads/master.zip
h…s://github.com/Seeed-Studio/Seeed_Arduino_rpcUnified/archive/refs/heads/master.zip
h…s://github.com/Seeed-Studio/Seeed_Arduino_mbedtls/archive/refs/heads/master.zip
h…s://github.com/Seeed-Studio/Seeed_Arduino_FreeRTOS
h…s://github.com/Seeed-Studio/Seeed_Arduino_FS/archive/refs/heads/master.zip
h…s://github.com/Seeed-Studio/Seeed_Arduino_SFUD/archive/refs/heads/master.zip
h…s://github.com/Seeed-Studio/Seeed_Arduino_LvGL/archive/refs/heads/master.zip
h…s://github.com/Seeed-Studio/Seeed_Arduino_rpcBLE/archive/refs/heads/master.zip

Okay, so i re-ran the firmware erase+flash procedure. No success.
Then I replaced the firmware files with older revisions from:
h…s://github.com/Seeed-Studio/seeed-ambd-firmware/releases
No success.

Then I switched from PIO to Arduino to check if theres a difference. No success.
retried other versions of rpcUnified, 2.1.3, 2.1.2, 2.1.1, 2.0.1. No success.

Then I used an old version of the flasher, 7c01f32 at h…s://github.com/Seeed-Studio/ambd_flash_tool
Here I could manually erase and flash specific versions and tried RTL firmware versions 2.1.0, 2.1.1, 2.1.2, 2.1.3. No success.

The RPC call always hangs.

Is there anything else I can do?

Regards,
g3gg0

Here the setup() content:

Serial.begin(115200);
while (!Serial)
{
};

delay(5000);

Serial.printf("start\n");
Serial.print("rpc_system_version= ");
String theVersion = rpc_system_version();
Serial.println(theVersion);

Hello, can you send out the complete code, for example, what libraries are imported?(#include …) Maybe you can also refer to the discussion on our forum to see if it can help you solve the problem:

sure:

#include “seeed_rpcUnified.h”

void setup()
{
Serial.begin(115200);
while (!Serial)
{
};

delay(5000);

Serial.printf("start\n");
Serial.print("rpc_system_version= ");
String theVersion = rpc_system_version();
Serial.println(theVersion);

}

void loop()
{
}

You should be able to download the binary here:


(this is with rpcUnified v2.1.1)

Would be interesting if it can run on another hardware.
So anyone with a terminal in theory should be able to run it and see on serial 115200 some version string.
or not.

ok, I will try to run it again, and I will reply to you tomorrow

maybe someone else can execute it and report if it works on his device?

thanks for your help. much appreciated :slight_smile:

I have no problems running, can we communicate on discord?(https://discord.gg/eWkprNDMU7)
This is likely to be related to your library version.

Solved this on discord. Thanks for your support.
The exact reason for the problem is still unclear to me, likely an user error when updating the RTL8720 firmware.
When calling ambd_flash_tool.exe erase it prints “Flashing…” “Success!”
I am quite sure at least once i skipped the flash command as it also created the km0_km4_image2.bin files in the directory.
I thought, “oh this does not only erase but also flash the firmware”

Later I used the old version of the tool which matched an online guide better.
There I switched between revisions and while trying to nail down, it suddenly worked.

Thanks for the great support Citric (!!)