webrepl on the pico w ?

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
JumpZero
Posts: 54
Joined: Mon Oct 30, 2017 5:54 am
Location: Arcachon - France

webrepl on the pico w ?

Post by JumpZero » Sun Jul 10, 2022 11:15 am

Hi!

Recently on raspberry pi forum with the help of @hippy (thanks again) I have tried to have webrepl running on a picoW.

Adding moduwebsocket.c and modwebrepl.c to a custom micropython build
Plus the 3 python files related to webrepl located in micropython/extmod/webrepl/ in picow /
It was almost successfull: I have been able to create a password in webrepl_cfg.py and modify boot.py to launch webrepl.
Unfortunatley as noted here it ended with dupterm missing in uos!
There is a file extmod/uos_dupterm.c but how to include it a custom build?
Is this even feasible or better to wait?

Thks

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: webrepl on the pico w ?

Post by jimmo » Mon Jul 11, 2022 12:46 am

JumpZero wrote:
Sun Jul 10, 2022 11:15 am
Unfortunatley as noted here it ended with dupterm missing in uos!
There is a file extmod/uos_dupterm.c but how to include it a custom build?
Is this even feasible or better to wait?
That seems like an oversight... it's enabled on other rp2 boards with networking support.

Sent PR to standardise this across all rp2 boards: https://github.com/micropython/micropython/pull/8893

JumpZero
Posts: 54
Joined: Mon Oct 30, 2017 5:54 am
Location: Arcachon - France

Re: webrepl on the pico w ?

Post by JumpZero » Mon Jul 11, 2022 10:16 am

That's a good news.
Thank you very much @jimmo

JumpZero
Posts: 54
Joined: Mon Oct 30, 2017 5:54 am
Location: Arcachon - France

Re: webrepl on the pico w ?

Post by JumpZero » Mon Jul 11, 2022 12:32 pm

Yes it works 👍
I have recompiled with the files modified as per your pull request and successfully ran webrepl.
And accessed repl remotely via wifi.
😀
Great
Webrepl is really a micropython super feature

JumpZero
Posts: 54
Joined: Mon Oct 30, 2017 5:54 am
Location: Arcachon - France

Re: webrepl on the pico w ?

Post by JumpZero » Mon Jul 18, 2022 5:31 pm

Hi!
I noticed that today's nightly build for the picoW v1.19.1.169 can run webrepl by adding these 3 python files:

Code: Select all

webrepl.py
webrepl_setup.py
websocket_helper.py
They are located in micropython/extmod/webrepl and must be copied in the picow root directory or in /lib.
So even if they are not yet frozen modules it seems it's ready or almost ready (I noticed Ctrl-C isn't working in webrepl but maybe it's my setup)
So is there any announcement when it is officially ready or can we track it somewhere?

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: webrepl on the pico w ?

Post by jimmo » Tue Jul 19, 2022 1:56 am

JumpZero wrote:
Mon Jul 18, 2022 5:31 pm
So is there any announcement when it is officially ready or can we track it somewhere?
https://github.com/micropython/micropython/issues/8928

JumpZero
Posts: 54
Joined: Mon Oct 30, 2017 5:54 am
Location: Arcachon - France

Re: webrepl on the pico w ?

Post by JumpZero » Tue Jul 19, 2022 8:10 am

Thank you @jimmo

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: webrepl on the pico w ?

Post by jimmo » Wed Jul 20, 2022 2:48 am


JumpZero
Posts: 54
Joined: Mon Oct 30, 2017 5:54 am
Location: Arcachon - France

Re: webrepl on the pico w ?

Post by JumpZero » Tue Jul 26, 2022 2:08 pm

Several days ago I saw that pull request #8931 had been merged. But there was still no webrepl on nightly builds for picoW. I thought we had to wait some more.
But in fact today I saw that it works well on ESP8266 and as expected by this pull request (by entering http://board_ip_address:8266/ in the address bar of the browser). But not on picoW.
I found the following line is missing:

Code: Select all

include("$(MPY_DIR)/extmod/webrepl/manifest.py")
in the file: micropython/ports/rp2/boards/manifest.py
I tested it by building a new firmware.
I created an issue on github
I hope that helps.

JumpZero
Posts: 54
Joined: Mon Oct 30, 2017 5:54 am
Location: Arcachon - France

Re: webrepl on the pico w ?

Post by JumpZero » Wed Jul 27, 2022 11:01 am

Oh! Sorry I misunderstood. Because the last modification (PR #8931) is included in the ESP8266 port, I thought that the choice about the following point ( #8928) had been done, in favor of the first option.
We need to decide:
  • Should we freeze the webrepl Python files on all boards that include the webrepl C support (which is now controlled by MICROPY_PY_NETWORK)
  • or. Make webrepl something that can be installed optionally (upip, etc) and document that, and leave it to specific boards that want to freeze it.

Post Reply