Page 1 of 1

Slave board REPL on UART?

Posted: Fri May 07, 2021 11:40 am
by lofer
I want to control second pyboard from another pyboard. Is it possible to access REPL of the second one on REPL of the first one, second connected via one of UARTs I suppose? If yes, how to get it? :D

To make things more clear. When I am on the first board I want to do something like this:

Code: Select all

>>> import pyb
>>>  [here i want to type: import pyb on board 2]

Re: Slave board REPL on UART?

Posted: Fri May 07, 2021 5:09 pm
by dhylands
You could setup the second pyboard to put its REPL on a serial port (using uos.dupterm) and connect that serial port to a serial port on the first pyboard, and then run a little terminal program on the first pyboard.

The terminal program would basically read from stdin and write to the serial port (and probably also stdout so that you have some echo) and read from the serial port and write to stdout.

I think you could do this with uasyncio, but I haven't tried.

Re: Slave board REPL on UART?

Posted: Sat May 08, 2021 2:49 am
by lofer
First part is easy, thanks :)

Has anyone using such a program from the second step by any chance and can share? :?: :roll:

Re: Slave board REPL on UART?

Posted: Fri May 14, 2021 2:36 am
by Jackli
It would be a great help if there could be programs to share.

Re: Slave board REPL on UART?

Posted: Sat May 15, 2021 4:26 pm
by pythoncoder
This is only likely if someone else saw the same need and has written and tested a solution. Otherwise it's time to roll up your sleeves and get coding I'm afraid ;)