Newbie problem - WebREPL unaccessable

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
wecametoconquer
Posts: 3
Joined: Fri Oct 11, 2019 5:30 pm

Newbie problem - WebREPL unaccessable

Post by wecametoconquer » Fri Oct 11, 2019 6:39 pm

Hello!;
I have purchased ESP32 module (board says its ESP32 DEVKIT V1), its simple ESP32 module with soldered out pins, micro usb and couple of buttons;
First thing I did was erasing its flash with esptool.py, than accoding to this website guide I've downloaded and flashed latest stable firmware available.
Things went smooth, module turned on and I've connected to it with Tera Term.
Next step was is setting up WebREPL. I've followed guide aswell (its for 8266 as far as I understood, but process should be same),
Did import webrepl_setupd, executed it, pressed E, entered simple password and restarted. However, no network appeared, so I did
import network
ap_if = network.WLAN(network.AP_IF)
ap_if.active(True)

access point started with following log:

Code: Select all

W (100946) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
I (101096) phy: phy_version: 3960, 5211945, Jul 18 2018, 10:40:07, 0, 2
I (101106) wifi: mode : softAP (24:0a:c4:31:f1:21)
And I've instantly found open AP with some sort of ESP32XXXX name, connected to it.
after that I did webrepl.start() which reported me

Code: Select all

WebREPL daemon started on ws://192.168.4.1:8266
Started webrepl in normal mode
However, when trying to access 192.168.4.1:8266 browser hangs for some seconds and then sends ERR_CONNECTION_REFUSED
While terminal shows

Code: Select all

WebREPL connection from: ('192.168.4.2', 51179)
Traceback (most recent call last):
  File "webrepl.py", line 42, in accept_conn
  File "websocket_helper.py", line 34, in server_handshake
OSError: Not a websocket request

WebREPL connection from: ('192.168.4.2', 51180)
I (130726) wifi: station: 38:d4:0b:a0:30:2b leave, AID = 1
I (130726) wifi: n:1 0, o:1 0, ap:1 1, sta:255 255, prof:1
Im sorry if I miss something common, bit new to micropython over esp's

Thanks in advance!

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

Re: Newbie problem - WebREPL unaccessable

Post by Roberthh » Fri Oct 11, 2019 6:50 pm

Did you use on your PC the webrepl script from this place: https://github.com/micropython/webrepl
Or did you simply try top connect in the browser?
Please take notice of the README.md documentation.

wecametoconquer
Posts: 3
Joined: Fri Oct 11, 2019 5:30 pm

Re: Newbie problem - WebREPL unaccessable

Post by wecametoconquer » Fri Oct 11, 2019 7:10 pm

Hello Roberthh !
Thanks for the tip, yeah, looks like I've missed this at some point.. Will dig through it now.
I was trying to connect with android phone because my PC has no Wi-Fi.
But I will look for PCI Wifi card, had it somewhere.
Thanks! :)

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

Re: Newbie problem - WebREPL unaccessable

Post by Roberthh » Fri Oct 11, 2019 7:31 pm

I just tried with my android phone, and it does not work. I get a connection, but keypad data is not sent to the device.
An android tablet failed too,

jomas
Posts: 59
Joined: Mon Dec 25, 2017 1:48 pm
Location: Netherlands

Re: Newbie problem - WebREPL unaccessable

Post by jomas » Fri Oct 11, 2019 7:59 pm

For android there is an apk to use WebRepl

https://microcontrollerelectronics.com/ ... n-android/

I tried it and it works.
Last edited by jomas on Sat Oct 12, 2019 10:33 am, edited 1 time in total.

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

Re: Newbie problem - WebREPL unaccessable

Post by Roberthh » Fri Oct 11, 2019 9:12 pm

Thanks. I'm sure, many people will enjoy it.

wecametoconquer
Posts: 3
Joined: Fri Oct 11, 2019 5:30 pm

Re: Newbie problem - WebREPL unaccessable

Post by wecametoconquer » Fri Oct 11, 2019 9:16 pm

Oh, thanks, Ill give app a try tomorrow hopefully.

Yeah, tried to run on phone, didnt work for me aswell

Post Reply