Can't connect to D1 Mini Board
Can't connect to D1 Mini Board
I'm using D1 Mini with micropython
It happens a lot that I upload some code that has a main loop in it, and afterwards I lose connection to the board
I can see the console output, but can't see the files, can't burn a new firmware, can't stop the code from running, anything...
Tried looking for an answer online, but couldn't find anything relevant
What can I do?
It happens a lot that I upload some code that has a main loop in it, and afterwards I lose connection to the board
I can see the console output, but can't see the files, can't burn a new firmware, can't stop the code from running, anything...
Tried looking for an answer online, but couldn't find anything relevant
What can I do?
Last edited by GuyLevin on Tue Dec 07, 2021 2:00 pm, edited 1 time in total.
Re: Can't connect to D1 Mini Board
Micropython is not a common OS. While main.py is executing, there is no REPL.
You should always be able to stop a running main.py with Ctrl-C, unless main.py re-configures the UART or detaches UART from stdin. But in any case firmware upload is possible. But a new firmware will not clean out a main.py running wild. For that, you have to make a full erase of the flash, using the erase_flash option of esptool.py.
You should always be able to stop a running main.py with Ctrl-C, unless main.py re-configures the UART or detaches UART from stdin. But in any case firmware upload is possible. But a new firmware will not clean out a main.py running wild. For that, you have to make a full erase of the flash, using the erase_flash option of esptool.py.
Re: Can't connect to D1 Mini Board
Thanks for your reply
I was not able to erase using esptool and ctrl+c seems to stop the program for a second, and then it returns
I was not able to erase using esptool and ctrl+c seems to stop the program for a second, and then it returns
Re: Can't connect to D1 Mini Board
Erase_flash is the sledge hammer approach. There is hardly a reason why is should fail. What is the error message when you try it?
esptool.py -p <port_name> -b 460800 --chip esp8266 erase_flash
esptool.py -p <port_name> -b 460800 --chip esp8266 erase_flash
Re: Can't connect to D1 Mini Board
See screenshot
- Attachments
-
- Screenshot 2021-12-07 165507.png (32.43 KiB) Viewed 4871 times
Re: Can't connect to D1 Mini Board
OK. So there is a problem switching to bootloader mode. What happens it you try to switch to bootloader manually?
For that, connect GPIO0 (D3) to GND and push reset.
P.S.: You did not specify a baud rate.
For that, connect GPIO0 (D3) to GND and push reset.
P.S.: You did not specify a baud rate.
Re: Can't connect to D1 Mini Board
Looks the same
Shorted the pins and added baud rate
Shorted the pins and added baud rate
- Attachments
-
- Screenshot 2021-12-07 165507.png (32.43 KiB) Viewed 4861 times
Re: Can't connect to D1 Mini Board
You have to connect GPIO0 to GND and then push the reset button. So you are using a genuine Wemos D1 Mini?
Re: Can't connect to D1 Mini Board
I did connect them and pressed the reset button
Yes, I'm using a genuine one
Yes, I'm using a genuine one
Re: Can't connect to D1 Mini Board
Moved from pi to windows, I was able to delete and write the firmware again
The only thing is that now I have to press the reset button while connecting the USB so the computer will recognize the controller
The only thing is that now I have to press the reset button while connecting the USB so the computer will recognize the controller