Thanks. Seems to me the requirement is to update 'utelnet' with RFC2217 support, or create a replacement, so perhaps not considered in MicroPython's domain, but fingers crossed.I've asked in the Discussions
I did move things forward using : https://raw.githubusercontent.com/pyserial/pyserial/master/examples/rfc2217_server.py
Code:
pi@Pi4B:~/pico/micropython/ports/picopython $ ./rfc2217_server.py -v /dev/ttyACM0INFO:root:RFC 2217 TCP/IP to Serial redirector - type Ctrl-C / BREAK to quitINFO:root:Serving serial port: /dev/ttyACM0INFO:root:TCP/IP port: 2217INFO:root:Connected by 192.168.0.140:46132INFO:rfc2217.server:client accepts RFC 2217INFO:rfc2217.server:NOTIFY_MODEMSTATE: 17INFO:rfc2217.server:client accepts RFC 2217INFO:rfc2217.server:NOTIFY_MODEMSTATE: 16INFO:rfc2217.server:set baud rate: 115200INFO:rfc2217.server:set data size: 8INFO:rfc2217.server:set parity: NINFO:rfc2217.server:set stop bits: 1INFO:rfc2217.server:changed flow control to NoneINFO:rfc2217.server:changed DTR to activeINFO:rfc2217.server:changed RTS to activeINFO:rfc2217.server:purge inINFO:rfc2217.server:purge outINFO:root:Disconnected
Code:
pi@Pi4B:~ $ mpremote connect rfc2217://192.168.0.140:2217Connected to MicroPython at rfc2217://192.168.0.140:2217Use Ctrl-] or Ctrl-x to exit this shellTraceback (most recent call last): ... File "/usr/local/lib/python3.11/dist-packages/mpremote/console.py", line 41, in waitchar select.select([self.infd, pyb_serial.fd], [], []) ^^^^^^^^^^^^^AttributeError: 'Serial' object has no attribute 'fd'. Did you mean: 'cd'?
Then 'mpremote' connecting to the 'rfc2217_server.py' from another terminal session. That got us through to thinking a REPL shell was created, so the handshaking was presumably done, but then 'mpremote' crashed on this 'AttributeError'.
This is Pi 4B 1GB, Bookworm with Desktop 32-bit, Python 3.11.2, PySerial 3.5, 'mpremote' 1.21
That PySerial appears to be the latest version so looks to be a bug in 'mpremote'.
This seems to suggest it's what 'pyb_serial' is set to, but the error does report 'Serial object', so not sure what's going on there -
Code:
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import serial>>> s = serial.Serial("/dev/ttyACM0")>>> s.fd3
So you might be able to bump your post up to 'bug report', though not sure if it will help.
Statistics: Posted by hippy — Mon Apr 15, 2024 5:08 pm