Hi all,
I’m new to PyBoard and MicroPython and have been experimenting with both for a few weeks - and may I say great work to all involved.
Now, however, I am working on sending and receiving data between a Raspberry Pi and several ESP32 dev boards over RS485. I have successfully used esptool to upload the MicroPython firmware for ESP32 over this network but am having some trouble with rshell. I’m trying to encorporate rshell in a short python script but get an error message. Rshell does work as expected when executed in lxterminal.
http://tomatopatch.ca/Share/code
http://tomatopatch.ca/Share/code_error_message
rshell, Raspberry Pi, ESP32, RS485
Re: rshell, Raspberry Pi, ESP32, RS485
One of the things that rshell does is to save/restore the state of stdin, and I'm guessing that the ioctl calls for doing that are inappropriate with certain devices (perhaps /dev/null).
I don't think that there is a current workaround without changing the code. I'll see if I can reproduce this and add some error handling that allows rshell to continue running even when the state of stdin can't be saved.
I don't think that there is a current workaround without changing the code. I'll see if I can reproduce this and add some error handling that allows rshell to continue running even when the state of stdin can't be saved.
Re: rshell, Raspberry Pi, ESP32, RS485
Thanks for taking an interest. Any help you can give on this will be greatly appreciated.
Re: rshell, Raspberry Pi, ESP32, RS485
Found a dirty workaround.
I installed xterm and created a desktop shortcut containing the line:
my program contains the line:
So xterm opens a window and runs my python program which then opens an lxterminal window running rshell.
Works but yuck. Still open to suggestions.
I installed xterm and created a desktop shortcut containing the line:
Code: Select all
Exec=xterm -e "python /home/pi/uPython/ESP32/RS485-Tools/DAPLC-ESP32-rShell.py"
Code: Select all
subprocess.call("lxterminal -e /home/pi/uPython/ESP32/RS485-Tools/rshell-ESP32.sh", shell=True)
Works but yuck. Still open to suggestions.
Re: rshell, Raspberry Pi, ESP32, RS485
I've upgraded rshell to version 0.0.11 which should no longer get the exception you ran into.
You should be able to upgrade by doing:
You should be able to upgrade by doing:
Code: Select all
sudo pip3 install --upgrade rshell
Re: rshell, Raspberry Pi, ESP32, RS485
I've upgraded to rshell version 0.0.11 and no more exception messages.
Cheers
Cheers