Re: rshell - Remote Shell
Posted: Thu Aug 11, 2016 9:12 am
Dave, does rshell support custom telnet port?
Please see the new forum at
https://forum.micropython.org/
Code: Select all
rshell --buffer-size 32 -p /dev/ttyUSB0
Code: Select all
alias rsusb='rshell -p /dev/ttyUSB0 --editor nano --buffer-size=30'
Code: Select all
/home/adminpete> ls /pyboard
flash/
/home/adminpete> ls /pyboard/flash
aremote.py art.py art1.py boot.py
/home/adminpete> ls /flash
aremote.py art.py art1.py boot.py
/home/adminpete>
Code: Select all
/home/adminpete> repl
Entering REPL. Use Control-X to exit.
>
MicroPython v1.8.7-456-ge402c51 on 2017-03-21; ESP module with ESP8266
Type "help()" for more information.
>>>
>>> import os
>>> os.listdir('/flash')
['boot.py', 'art.py', 'aremote.py', 'art1.py']
>>> os.listdir('/pyboard/flash')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV
>>>
Code: Select all
Welcome to rshell. Use Control-D to exit.
/home/robert> boards
pyboard @ /dev/ttyUSB0 connected Dirs: /boot.py /main.py /ftp.py /name_bug.py /sh1106_t.py /ticks_bug.py /disp_f.py /pyboard/boot.py /pyboard/main.py /pyboard/ftp.py /pyboard/name_bug.py /pyboard/sh1106_t.py /pyboard/ticks_bug.py /pyboard/disp_f.py
/home/robert>
Code: Select all
/home/randmor> cp hello.py /
Unable to copy '/home/randmor/hello.py' to '//hello.py'
/home/randmor> cp hello.py /flash
Unable to copy '/home/randmor/hello.py' to '/flash/hello.py'
Code: Select all
/home/randmor> cp hello.py /flash
/home/randmor> ls /flash
hello.py
/home/randmor>
Code: Select all
# ~/.profile: Executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login exists.
# See /usr/share/doc/bash/examples/startup-files for examples.
# The files are located in the bash-doc package.
# The default umask is set in /etc/profile; for setting the umask
# For ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# Set up environment variable "AMPY_PORT" so you don't have to
# specify the serial port "path" every time you use the "ampy" command.
export AMPY_PORT="/dev/ttyUSB0"
# Set up environment variable "RSHELL_PORT" so you don't have to
# specify the serial port "path" every time you use "rshell".
export RSHELL_PORT="/dev/ttyUSB0"
Code: Select all
(trusty)randmor@localhost:~$ rshell
Connecting to /dev/ttyUSB0 ...
Welcome to rshell. Use Control-D to exit.
/home/randmor> cp .profile profile.txt
/home/randmor> cp profile.txt /flash
serial port /dev/ttyUSB0 closed