Skip to content
BetaRavener edited this page Jul 18, 2018 · 10 revisions

Can't connect to ESP via WiFi

  • First of all, WebREPL must be running. Since micropython 1.8.6, it's not running by default and needs to be turned on after flashing with import webrepl_setup command. You can use UART and uPyLoader terminal to set it up. For a more complete instructions, see this guide.
  • If connecting via ESP access point, make sure the IP is 192.168.4.1 and port is 8266.
  • If connecting via network ESP is connected to, you will need to determine what IP address was ESP assigned. You can use IP scanner utilities or information from router. The port stays 8266.

Can't initialize transfer scripts/files

  • Reason: Can't locate transfer scripts When running executable, this shouldn't happen but to solve the issue, first download upload.py and download.py from the mcu folder in repository and place them next to the executable. Then go to Options->Settings, check Use custom transfer files and set Path to custom transfer files to location where you placed the scripts. When running from source code, first make sure that your working directory is the same where main.py is located (e.g. you should only use python main.py, not python dir1\uPyLoader\main.py). If the problem persists, use the workaround above for the executable.

Random transfer errors start appearing, nothing was changed

  • File system might be corrupted. Re-flashing micropython usually solves this. Sometimes even erasing flash doesn't help and you have to recreate file system manually with these commands:
import uos
import flashbdev
uos.VfsFat.mkfs(flashbdev.bdev)
  • If the problem is persistent, it may be that you've reached lifespan of the flash memory that is used with the ESP to store files. Due to the way filesystem is currently implemented in micropython (read: simple), when overwriting files same memory blocks get used and over time they get worn out, making random errors appear until you're no longer able to work with the device. To confirm this is the issue, try using another (new) device. Unfortunately, this means you can throw out the chip because repair would be tedious and maybe more expensive than buying new ESP. To mitigate this issue, only transfer files that really changed and use PC port (windows, unix) of micropython to simulate first whenever possible. Another possibility is to use SD card for storing files, which should give many more rewrites and is easier to replace. See a post by crizeo for more instructions.