webrepl autostart

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
atux_null
Posts: 20
Joined: Tue Jul 10, 2018 2:16 pm

webrepl autostart

Post by atux_null » Wed Aug 01, 2018 3:24 pm

hi. new to the area and i start to learn micropython with a couple of ESP8266 nodemcu. I did manage to connect through usb, flash the latest bin file of micropython and get connect from my laptop to the access point created automatically from ESP8266. Then i managed to connect to the AP from the webrepl client. Also i changed the network settings and it connects to my home wifi and after issuing

Code: Select all

import webrepl
webrepl.start()
the webrepl is accessible from my LAN. So far so good. The problem is when i power it off and the on again, the webrepl is not accessible. In order to be accessible, i have to issue again in the USB the commands :

Code: Select all

import webrepl
webrepl.start()
is there any way to make it permanent please?
Also if i need to edit the boot.py and main.py what is the way? now i am reflashing it, since i am not familiar with it.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: webrepl autostart

Post by Roberthh » Thu Aug 02, 2018 12:56 pm

As you assume, you have to put these two statements into boot.py. Actual it is already in boot.py, but commented out. Webrepl also supports copying in and out files. So once you have webrepl running, you can use that to get boot.py, modify it and put it back onto your device.
An yes, you can also us all the other nice tools like rshell and ampy for file transfer.

atux_null
Posts: 20
Joined: Tue Jul 10, 2018 2:16 pm

Re: webrepl autostart

Post by atux_null » Thu Aug 02, 2018 1:46 pm

thanks a lot for the reply. The lines where uncommented in boot.py. Anyhow i solved the issue by adding the lines at the bottom of main.py allowing some time to pass after the connection to the wifi router.

Post Reply