webrepl is not working?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
zmaier
Posts: 13
Joined: Thu May 16, 2019 12:44 pm

webrepl is not working?

Post by zmaier » Sat Sep 07, 2019 5:49 pm

Hello,

i am using a wemos D1 Mini Pro with a HX711 and a DS18B20. Everey ten minutes data is send to a thingspeak and InfluxDB Server. So far, everything is working fine.
But, i want to connect to the system via webrepl. The daemon is started :
“WebREPL daemon started on ws://192.168.43.186:8266
Started webrepl in normal mode”

But i can not connect, i always get the answer "Disconnected” at the webrepl page.
Why is it not working? Any idea, what could i try?

JFYI: Both, Wemos and Laptop are connected to a wlan hotspot made with my mobile phone? Does this have any influence?

regards
Martin

Online
kevinkk525
Posts: 469
Joined: Sat Feb 03, 2018 7:02 pm

Re: webrepl is not working?

Post by kevinkk525 » Sat Sep 07, 2019 6:10 pm

Strange, I have the same problem.. No error/debug output on the esp either.

But if you clone/download the webrepl repository to your desktop and open it from there then it works.

zmaier
Posts: 13
Joined: Thu May 16, 2019 12:44 pm

Re: webrepl is not working?

Post by zmaier » Sat Sep 07, 2019 9:09 pm

I downloaded the repository, but my setup is not working :(
https://github.com/micropython/webrepl

zmaier
Posts: 13
Joined: Thu May 16, 2019 12:44 pm

Re: webrepl is not working?

Post by zmaier » Sun Sep 08, 2019 8:51 am

One sleepless night later, i found the problem.

boot.py -> main.py -> import run.mpy

So my program is precompiled and is started with import run.mpy and here is the problem.
Within run,mpy you have to call

Code: Select all

import webrepl
webrepl.start()
I had that code in boot.py :)

Now everthing is working.
But still the documentation is a bit strange, because there is not written, that you have to start werepl-daemon in your code.. During the setup-dialog it says, the daemon is starting automatically at boot

Online
kevinkk525
Posts: 469
Joined: Sat Feb 03, 2018 7:02 pm

Re: webrepl is not working?

Post by kevinkk525 » Sun Sep 08, 2019 9:00 am

It is started automatically because those lines will get added to the boot.py
If that is not the case for you then you might have changed your boot.py or something similar.

Post Reply