dhylands wrote: ↑Mon Oct 29, 2018 6:17 pm
You seem to be missing the options to specify the serial port to connect to. rshell only connects automatically to USB Serial ports which have a vendor name of "MicroPython", otherwise you need to specify the serial port using the --port command line option.
You mean like this?
Code: Select all
root@debian:/home/david/micropython/ports/nrf# rshell -d --port /dev/ttyACM0
Debug = True
Port = /dev/ttyACM0
Baud = 115200
User = micro
Password = python
Wait = 0
nocolor = 0
binary = 0
Timing = 0
Quiet = 0
Buffer_size = 512
Cmd = []
Connecting to /dev/ttyACM0 ...
----- About to send 286 bytes of code to the pyboard -----
def test_buffer():
"""Checks the micropython firmware to see if sys.stdin.buffer exists."""
import sys
try:
_ = sys.stdin.buffer
return True
except:
return False
output = test_buffer()
if output is None:
print("None")
else:
print(output)
-----
-----Response-----
b''
-----
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1197, in connect
ip_address = socket.gethostbyname(port)
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/rshell", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/rshell/command_line.py", line 4, in main
rshell.main.main()
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 2730, in main
real_main()
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 2692, in real_main
connect(args.port, baud=args.baud, wait=args.wait, user=args.user, password=args.password)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1203, in connect
connect_serial(port, baud=baud, wait=wait)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1227, in connect_serial
dev = DeviceSerial(port, baud, wait)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1473, in __init__
Device.__init__(self, pyb)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1276, in __init__
self.has_buffer = self.remote_eval(test_buffer)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1390, in remote_eval
return eval(self.remote(func, *args, **kwargs))
File "<string>", line 0
^
SyntaxError: unexpected EOF while parsing
root@debian:/home/david/micropython/ports/nrf#