Arduino Nano Connect RP2040: Webrepl fails.
Port, board and/or hardware
RP2, Board Arduino Nano Connect 2040 with NINA W102 module.
MicroPython version
MicroPython v1.24.0-preview.118.g5f3ecc29f on 2024-07-20; Arduino Nano RP2040 Connect with RP2040
Reproduction
Configure Webrepl, enable Wifi and start Webrepl at the board. Then connect with webrepl from a PC and enter the password. Content of main.py:
import station
import webrepl
webrepl.start()
station.py just starts wifi. webrepl_cfg.py and an empty boot.py exist.
Expected behaviour
Working webrepl
Observed behaviour
Webrepl works with firmware v1.23.0.
With v1.24.0-preview.118 (and earlier) the board locks up after entering the Webrepl password. Needs a hardware reset or power cycle to recover. Log:
network config: ('10.0.0.179', '255.255.255.0', '10.0.0.240', '10.0.0.240')
WebREPL server started on http://10.0.0.179:8266/
Started webrepl in normal mode
MicroPython v1.24.0-preview.118.g5f3ecc29f on 2024-07-20; Arduino Nano RP2040 Connect with RP2040
Type "help()" for more information.
>>>
WebREPL connection from: ('10.0.0.150', 53812)
FATAL: uncaught exception
UDP and TCP connections work, tested with iperf3.py.
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree
Failing to add WebREPL for the ARDUINO_NANO_RP2040_CONNECT board
Hi,
I am trying to add WebREPL for the ARDUINO_NANO_RP2040_CONNECT board, but fail.
In ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/mpconfigboard.h, I add
// Enable websockets.
#define MICROPY_PY_UWEBSOCKET (1)
#define MICROPY_PY_OS_DUPTERM (1)
#define MICROPY_PY_WEBREPL (1)
// #define MICROPY_PY_LWIP (1)
// #define MICROPY_PY_USSL (1)
// #define MICROPY_SSL_MBEDTLS (1)
// use vfs's functions for import stat and builtin open
#define mp_import_stat mp_vfs_import_stat
#define mp_builtin_open mp_vfs_open
#define mp_builtin_open_obj mp_vfs_open_obj
and in ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/manifest.py, I add
include("$(MPY_DIR)/extmod/webrepl/manifest.py")
The error message is,
[ 56%] Building C object CMakeFiles/firmware.dir/moduos.c.obj
In file included from ***/micropython/py/objstr.h:29,
from ***/micropython/ports/rp2/moduos.c:27:
***/micropython/ports/rp2/moduos.c:94:49: error: 'mp_uos_dupterm_obj' undeclared here (not in a function)
94 | { MP_ROM_QSTR(MP_QSTR_dupterm), MP_ROM_PTR(&mp_uos_dupterm_obj) },
| ^~~~~~~~~~~~~~~~~~
***/micropython/py/obj.h:309:24: note: in definition of macro 'MP_ROM_PTR'
309 | #define MP_ROM_PTR(p) (p)
| ^
make[3]: *** [CMakeFiles/firmware.dir/build.make:3021: CMakeFiles/firmware.dir/moduos.c.obj] Error 1
make[2]: *** [CMakeFiles/Makefile2:1561: CMakeFiles/firmware.dir/all] Error 2
make[1]: *** [Makefile:84: all] Error 2
make: *** [Makefile:19: all] Error 2
I am just a beginner for MicroPython. Could anyone help me out? Thank you!
By the way, I am using ubuntu 20.04 on windows wsl.