dhylands / rshell

Remote Shell for MicroPython
MIT License
913 stars 130 forks source link

[Python3.11/ rshell 0.0.31/ Windows] : rshell fails with PyboardError('could not exec command') #210

Open rahulraj80 opened 1 year ago

rahulraj80 commented 1 year ago

After installation, I ran in to the py3k_compat error, which was resolved by changing collections.Callable to collections.abc.Callable, however, this error does not go away:

$ rshell -p COM5

Fails after connecting to REPL:

Using buffer-size of 32
Connecting to COM5 (buffer-size 32)...
Trying to connect to REPL  connected
Retrieving sysname ... Traceback (most recent call last):

.....

....\Python\Python311\Lib\site-packages\rshell\pyboard.py", line 250, in exec_raw_no_follow
    raise PyboardError('could not exec command')
rshell.pyboard.PyboardError: could not exec command

In the code at:

        # check if we could exec command
        data = self.serial.read(2)
        if data != b'OK':
            raise PyboardError('could not exec command')

It is should get b'OK' but instead is getting b'>>'.

Any ideas on how to resolve this?

gamefunc commented 7 months ago

I'm fine here;

PS C:\Users\feve> rshell -p com3 Using buffer-size of 32 Connecting to com3 (buffer-size 32)... Trying to connect to REPL connected Retrieving sysname ... esp32 Testing if ubinascii.unhexlify exists ... Y Retrieving root directories ... /boot.py/ Setting time ... Dec 01, 2023 13:25:06 Evaluating board_name ... pyboard Retrieving time epoch ... Jan 01, 2000 Welcome to rshell. Use the exit command to exit rshell. C:\Users\feve> repl Entering REPL. Use Control-X to exit.

MicroPython v1.19.1 on 2022-06-17; ESP32 module with ESP32 Type "help()" for more information.
import machine p = machine.Pin(4, machine.Pin.OUT) p.value(1)

You can try using: https://github.com/dhylands/rshell/pull/223 https://github.com/gamefunc/rshell/releases

ps: need remove old rshell, but not need to modify collections