Wio Terminal WiFi errors

I have used the uf2 method to update the rtl8720. I dragged rtl8720_update.uf2 to the Arduino drive that is shown in boot mode.
Trying the WiFi Scan sample I get this output.
What might cause “Cannot initialize ESP-AT Lib!”
Thanks
Ted

22:53:57.388 -> Device reset sequence finished!
22:53:57.422 -> Cannot initialize ESP-AT Lib!
22:54:01.503 -> [E][esp_event_loop.c:99] at_unified_cb(): at_unified evt: 4
22:54:01.503 ->
22:54:01.503 -> [E][WiFiGeneric.cpp:477] mode(): Could not set mode! -1
22:54:04.052 -> [E][esp_event_loop.c:99] at_unified_cb(): at_unified evt: 4
22:54:04.052 ->
22:54:04.156 -> Setup done
22:54:04.156 -> scan start
22:54:06.700 -> [E][esp_event_loop.c:99] at_unified_cb(): at_unified evt: 4
22:54:06.700 ->
22:54:09.249 -> [E][esp_event_loop.c:99] at_unified_cb(): at_unified evt: 4
22:54:09.249 ->
22:54:12.339 -> [E][esp_event_loop.c:99] at_unified_cb(): at_unified evt: 4
22:54:12.339 ->
22:54:12.339 -> [E][WiFiGeneric.cpp:477] mode(): Could not set mode! -1
22:54:23.862 -> scan done
22:54:23.862 -> -2 networks found
22:54:23.862 ->
22:54:28.860 -> scan start
22:54:28.860 -> scan done
22:54:28.860 -> -1 networks found
22:54:28.860 ->
22:54:33.837 -> scan start
22:54:33.837 -> scan done
22:54:33.837 -> -1 networks found
22:54:33.837 ->

Quick update.
I tried the CLI update method and get this output.
Any suggestions would be welcomed.
Ted

E:\Users\Ted\Documents\Arduino\amebad_flash_tool_v0.1.0_windows>amebad_flash_tool erase --port COM26
Erasing…
error: Enter Uart Download Mode
Image tool closed!
done!

Hi @Ted_Finch, you need to enter the bootloader mode by sliding the power switch twice quickly and An external drive named Arduino should appear in your PC. Drag the the downloaded rtl8720_update.uf2 files into the Arduino drive and it will reset the Wio Terminal and loaded loaded the sketch!

Then Try to flash with the CLI tool.

more details : https://wiki.seeedstudio.com/Wio-Terminal-Network-Overview/

Thanks.
Perhaps I was tired as I think that is what I had tried last night!
This morning I loaded the rtl8720_update.uf2 then used the flash tool to erase and load - the tool reported success.
The text “it will reset the Wio Terminal and loaded loaded the sketch!” does not really make sense. Should it be something like “it will reset the Wio Terminal and run the rtl8720_update the sketch! The new sketch will work with the flash tool to update the Realtek RTL8720 Wireless core.”

Unfortunately I still get errors from the WiFi Scan sketch.
(For good measure I repeated the re flash process wuth no errors!)
This is the output:

Device reset sequence finished!
Cannot initialize ESP-AT Lib!
[E][esp_event_loop.c:99] at_unified_cb(): at_unified evt: 4
[E][WiFiGeneric.cpp:477] mode(): Could not set mode! -1
[E][esp_event_loop.c:99] at_unified_cb(): at_unified evt: 4
Setup done
scan start
[E][esp_event_loop.c:99] at_unified_cb(): at_unified evt: 4
[E][esp_event_loop.c:99] at_unified_cb(): at_unified evt: 4
[E][esp_event_loop.c:99] at_unified_cb(): at_unified evt: 4
[E][WiFiGeneric.cpp:477] mode(): Could not set mode! -1
scan done
-2 networks found
scan start
scan done
-1 networks found

Can you suggest what I may have missed?
Thanks
Ted

OK - I am not sure what I did differently however now the WiFi Scan sketch sometimes finds two 5GHz SSIDs but not the two 2.4GHz SSIDs that are also broadcast by my router. Is this as expected?

Can I echo the thoughts of stuarddd in his post:


and suggest the text of the update process be reviewed so that someone with very little knowledge of the Wio Terminal ecosystem can follow it. I am not a beginner by any means but still took 6 attempts on a Windows setup to get the update to take.

there are more topics about the same questions… and answers… did you search this board ?

Hi
Yes I searched the board thoroughly. There seems to be a consensus that the update process is not straightforward and perhaps some clarity in the WiKi may help.
At the moment I am struggling to get the Wio Terminal to actually connect to WiFi. My PC can see 4 SSIDs but Wio Terminal does not seem to find either of them and connect even when placed within a metre of the router.

agree on that , :sunglasses: … but you can run the ‘scan’ sketch and see some/your SSID’s on your arduino’s ide serial monitor ?

like this

Running Scan Test gives this


A previous run did detect 2 of the 5Ghz SSID only but at the moment none are detected…

I put output to the LCD. Although that did not help get a connection!
Ted


Later …
ha found a SSID

I moved closer to the router and eventually got a ‘ping’ however I need to now try a connection

looks like your update failed.
to connect to your WIFI your SSID should be visible in this sketch output first, looks like wifi(update) is not working at all :sweat:

I think all is OK.
By moving nearer to the router I found 4 SSIDs OK and now can see one of these from my work desk.
I have the Covid-19 Dashboard example working now!
So the WiFi connection works OK too.
Hurdle 1 - firmware update - load the rtl8720_update.uf2 after a double click shows up the Arduino Drive
Run the flash erase and flash load process but put the 3 bin files in a separate folder.


Hurdle 2 - You need a reasonably strong WiFi signal for the WIO Terninal to make a(n initial) connection.
Thanks for your attention.
Ted
2 Likes

I made eRPC FW upgrade and trying to run this simple test:
#include “rpcWiFi.h”

void setup()
{
Serial.begin(115200);
while (!Serial); // Wait to open Serial Monitor

Serial.println(“Starting…”);
Serial.printf(“RTL8720 Firmware Version: %s”, rpc_system_version());
Serial.println(“End…”);
}

void loop()
{
}

But all I got is: Starting… and nothing more.
Definitelly Wio hangs on communication with RTL8720.

If I understand correctly, rtl8720_update_v2.uf2 is simple serial bridge to RTL chip, so if I open serial connection while rtl8720_update is running, I get direct connection to RTL chip and it has to answer AT commands. But I only receive endless sequence of 0x15 bytes. If any activity from my side occured, that sequence stop to transmit.
So, I’m afraid RTL chip is bricked.