sipeed / MaixPy-v1

MicroPython for K210 RISC-V, let's play with edge AI easier
https://wiki.sipeed.com/maixpy
Other
1.68k stars 439 forks source link

Please help to Restore ESP32 Wifi Firmware with ESPTool.py #473

Open marcusobrien opened 2 years ago

marcusobrien commented 2 years ago

Describe the bug I run example code for using ESP Wifi, and the module can not be initialised. I dont think the ESP 32 FW is on the device, when I ask for the version I get nothing back.

I would like to know the exact command line for using esptool.py to download the firmware maixduino_esp32_original.bin as mentioned on this other closed Issue

https://github.com/sipeed/MaixPy/issues/148

Nothing I try for esptool.py works with the file and downloading at address 0x00

To Reproduce Steps to reproduce the behavior:

Using a C++ Maiduino Board project with Arduino framework - this code fails on 2 Maixduino boards.

` Serial.begin(115200); // initialize serial for debugging WiFi.init(); // initialize ESP32 WiFi module

// check for the presence of the shield Serial.print("WiFi.status()="); Serial.println(WiFi.status());

if (WiFi.status() == WL_NO_SHIELD) { Serial.println("No WiFi HW - Halting FW"); while (true); }

Serial.print("Connecting SSID: "); Serial.println(SSID);

// attempt to connect to WiFi network while (status != WL_CONNECTED) { // Connect to WPA/WPA2 network status = WiFi.begin(SSID, pass); Serial.print("Stopped connecting Status:"); if (status==0) { Serial.println("0"); Serial.println("Retry Connect"); } else { Serial.println(status); printWifiStatus(); } //WiFi.reset(); }`

The output from the above (from the Serial Monitor) is

`[WiFiEsp] Hard SPI selected WiFi.status()=254 Connecting SSID: Thames24G Stopped connecting Status:4 SSID: IP Address: 0.0.0.0

To see this page in action, open a browser to http://0.0.0.0

Stopped connecting Status:4 SSID: IP Address: 0.0.0.0 `

Expected behavior The wifi should be able to connect - exactly same code works for ESP32 AI Thinker module, and this code actually came from a Maixduino C++ example.

Even with a Python example running with Maixpy using the maixpy firmware, same thing wifi doesnt work on 2 maixduinos.

This github Issue - talks about which FW to download and install using the esptool.py to flash the firmware, lower down it mentions to download, rename and use the original firmware file (maixduino_esp32_original.bin) - but how do I do this ? Do I need a pass through firmware as mentioned on the NINA git pages ?

https://github.com/sipeed/MaixPy/issues/148

Actual behaviour I can not upload the ESP32 FW that supports the Wifi to the Maixduino

Screenshots

Please complete the following information