Announcement

Collapse
No announcement yet.

Issue on firmware installation step in reWASD for ESP32 Generic Board

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue on firmware installation step in reWASD for ESP32 Generic Board

    I am having trouble flashing the ESP32-WROOM-32 Board I recently purchased with reWASD.
    I have already followed the steps in the troubleshooting page (see below).

    The issue is that the reWASD firmware flashing stage fails (reWASD states: The firmware update failed). Depending on the COM port used it will fail between less than a second to approximately 5 seconds.
    Worried that I may had a faulty chip I tried flashing the chip with a simple Hello World program via Arduino IDE however it flashed successfully and the program runs as expected.
    Also I have a GIMX board attached that was set up without any issues. I have removed this when trying to set up the ESP32 board but it has made no difference.

    Already tried:
    - Changing ports
    - Changing cables
    - Using a USB hub
    - Using the PC USB slot directly
    - Using USB2.0 slot
    - Using USB3.1 slot
    - Using USB3.2 slot
    When clicking [Try Again]
    - Holding Boot on ESP32 board
    - Holding EN on ESP32 board
    - Holding EN and Boot on ESP32 board
    - Holding EN then Boot then releasing EN on ESP32 board
    - Holding EN then Boot then releasing Boot on ESP32 board
    - Holding Boot then EN then releasing EN on ESP32 board
    - Holding Boot then EN then releasing Boot on ESP32 board
    Confirmed
    - Board is able to be written to
    - Board is visible by Windows and is recognised as connected to a COM port



    I currently have the following setup:
    - Generic ESP32-WROOM-32 Board (CH340G)
    - Windows 11 x64 OS
    - reWASD 6.5.1.7455
    - esptool.exe installed successfully through the reWASD
    - CP340 Windows Driver Installed (https://www.wch.cn/downloads/CH341SER_ZIP.html)
    - CP210x Universal Windows Driver Installed
    - ESP32 Chip appears in Device Manager



    Is there a manual way to flash the reWASD firmware or a way to have reWASD report what the issue is?​​

  • #2
    Yes, you can try to flash it manually. Extract "C:\Program Files\reWASD\firmware\REWASD_ESP32_1_02.zip" to some folder of your choice.
    It contains current firmware reWASD uses to flash ESP32 board.
    Then execute command like this:
    esptool.exe --port COM5 --baud 500000 --chip esp32 --before default_reset --after hard_reset write_flash 0x1000 bootloader.bin 0x8000 partition-table.bin 0x10000 ReWASDDongle.bin 0xF000 generic_dongle.bin
    ​Replace COM5 with your actual COM port number. You can also tweak baud rate and set it to minimal value to be safe. eg. --baud 115200
    Please report your results.
    Your can also try to erase flash first, like this:
    esptool.exe --port COM5 --chip esp32 erase_flash

    Comment


    • #3
      I went looking for logs to attach to this post but I then stumbled upon the firmware flashing code and noticed the baud was way too high for my board / chip.
      From what I could find the useable baud varies greatly between boards / chips.

      reWASD logs state it was using a 500000 however my board flashes at 115200.
      After running the esptool.exe call at 50000 I noticed that it was not detecting my board at all.
      However when I changed the baud to 115200 it was flashed as expected.

      Unfortunately, reWASD still demands the board be reflashed (and this obviously fails due to the too high baud rate).



      Is there any way to have the baud rate togglable in reWASD or at least have a firmware flash outside of the reWASD wizard to be recognised and not forced to be rerun?​

      Comment


      • #4
        Hello DevX,

        My apologies it looks like I stumbled upon what you mentioned myself and wrote my reply before seeing your post.
        Even with flashing via esptools directly, reWASD refuses to acknowledge that it has been flashed and prompts to reflash when trying to add it as an adaptor.
        The run log shows it flashes as expected and confirming the serial ports in ArduinoIDE shows there are no header errors either.

        I am a little wary of erasing the flash first and would prefer that as a last resort.

        Is there anything else I can do?

        Comment


        • #5
          Can you post full log of flashing? I am interested how esptool detects your board and what chip revision it shows.
          500000 is minimum speed required by reWASD for normal operation of virtual bluetooth device - if your board does not support this speed, then nothing can be done, unfortunately.

          Comment


          • #6
            Hello DevX,

            Thank you for letting me know about the 500K baud minimum restriction as that seemed to be the missing piece of the puzzle.
            My board is apparently listed as going up to 2M baud so it seemed like it should have been able to do 500K by default however I didnt realise I could/had to change the baud rate on the board.

            It was a simple as flashing;
            Code:
            Serial.begin(115200);
            delay(200);
            Serial.end();
            
            Serial.begin(500000);​
            From there I was able to get to the flasher in reWASD when I had to manually kick the bootloader (due to my specific board needing button presses to start the bootloader Holding [EN] then holding [BOOT] then letting go of [EN]) which then successfully completed.

            I was then able to add the ESP32 as the controller adaptor however it was very slow to action inputs (delay or around a half second to a second) and the amiibo functions would fail.
            I moved the board right next to the Switch, and it made responses basically native speed and amiibo functions could work.



            Is it possible to have a mention in the FAQ about flashing your ESP32 board baud to 500000 if the default is lower than that. And also mentioning that the board needs to support at least 500000 baud? (since there is no mention of that as a requirement in the FAQ and it seems to be one of, if not the most, important prerequisite).



            If you still need the logs, could you tell me with log file you are after (reWASDHardwarelog.txt)?

            Comment


            • #7
              To sum up the whole issue and how it was resolved:

              My setup was:
              - Generic ESP32-WROOM-32 Board (CH340G Chip)
              - Windows 11 x64 OS
              - reWASD 6.5.1.7455
              - esptool.exe installed successfully through the reWASD wizard
              - CP340 Windows Driver Installed (https://www.wch.cn/downloads/CH341SER_ZIP.html)
              - CP210x Universal Windows Driver Installed
              - ESP32 Chip appears in Device Manager

              ESP32 boards appear to default to a baud of 115200.
              reWASD requires a baud rate of 500000 (as confirmed above by DevX and by the call to esptool in the reWASDHardwarelog.txt log file after a failed firmware flash).

              I used ArduinoIDE (following the setup here: https://esp32io.com/tutorials/esp32-...installization) to flash the following code which changed the onboard baud rate to 500000.
              Code:
              void setup() {
                Serial.begin(115200);
                delay(200);
                Serial.end();
              
                Serial.begin(500000);
              }
              
              void loop() {
              }
              From there I was able to follow the [Add New Adapter Wizard] to flash the reWASD firmware successfully and it was successfully added as an adaptor.
              It is recommended to keep the ESP32 chip as close to the device that is being emulated as possible as other nearby devices may affect the​ responsiveness of the controls and functionality of the amiibo function.

              Comment


              • #8
                Great! No logs needed then.
                We think the problem was because your board was already running some firmware (Arduino sketch) which used serial port on different speed. That is why i gave you advice to erase flash first.
                Anyway, good you have sorted it out, congratulations! We'll also add note about 500000 in our manual, thank you for suggestion.
                >It is recommended to keep the ESP32 chip as close to the device that is being emulated as possible
                I guess you may have some noisy environment - in our tests it worked even with several meters apart.
                We'll also think about allowing to adjust ESP32 transmit power in new firmware version, which may help in such cases.

                Comment

                Working...
                X