Page 1 of 2

Pyboard.py raw repl : passing Micropython variable to Python

Posted: Thu Jan 21, 2021 3:36 pm
by zaord
Hi here,

I am still on the way to conquest pyboard.py script within raw repl.

I try to get variable from micropython raw repl into python env.

This is my script :

Code: Select all

import sys
import time
from rshell import main
from rshell import pyboard

pyb = pyboard.Pyboard('COM4')
pyb.enter_raw_repl()

sys.stdout.write(pyb.exec("from MesAnche import *"))
sys.stdout.write(pyb.exec("mes = MesAnches()"))
time.sleep(1)
PressPositive, Flow_mes = sys.stdout.write(pyb.exec("mes.Get_PressPositive()"))
# this function return two values val1,val2 in micropython, but I would like to convert the value into my python env

print(PressPositive)
pyb.exit_raw_repl()
pyb.close()
i get thuis error :
MesTemp,Press =(pyb.exec("print(mes.Mes_Press_Temp())"))

ValueError: too many values to unpack (expected 2)
If you have any idea ...

Thanks !

Re: Pyboard.py raw repl : passing Micropython variable to Python

Posted: Thu Jan 21, 2021 8:03 pm
by dhylands
What rshell does is to print the value to pass back (use repr() if needed) and then the PC side uses eval to convert that back into a python value.

The output is collected (as a string) using pyboard `follow` function.

I've also written a json-ipc library https://github.com/dhylands/json-ipc which doesn't need pyboard and uses the JSON format to pass information in both directions.

Re: Pyboard.py raw repl : passing Micropython variable to Python

Posted: Wed Apr 07, 2021 12:34 pm
by zaord
Hi !
What does the follow function from pyboard.py with rshell ?
I wonder if it's possible to execute a function to my pyboard with rshell or pyboard from python and being able to continue my python script without waiting the end of my pyboard execution.

Like I need to do measurement booth acoustic with python and barometric on i2c with my pybord at the same time. Do I need to multi-thread ?

Is is possible to un-follow only certain commands with specified values like : pyb.exec("my command to pyboard, no-follow) ?

Re: Pyboard.py raw repl : passing Micropython variable to Python

Posted: Wed Apr 07, 2021 6:10 pm
by dhylands
"follow" collects output from the downloaded script.

rshell calls exec_raw_no_follow, and then calls follow. This allows the host side to interact with the remote side when say transferring files.
https://github.com/dhylands/rshell/blob ... 1610-L1618

If you look at exec_raw: https://github.com/micropython/micropyt ... rd.py#L439 you'll wee that it just calls exec_raw_no_follow followed by a call to follow.

You really need to define "at the same time". Even with multi-threading there isn't really anything that runs truly simultaneously (unless there are multiple cores). multi-threading is just a facade to make it look like things are happening simultaneously.

Re: Pyboard.py raw repl : passing Micropython variable to Python

Posted: Thu Apr 08, 2021 2:08 pm
by zaord
So If I don't wants to follow and continue python script without waiting for micropython answears,what should I do ?

Best

Re: Pyboard.py raw repl : passing Micropython variable to Python

Posted: Thu Apr 08, 2021 7:17 pm
by dhylands
I think you can just call exec_raw_no_follow. However, you probably need to keep track of whether you're in raw-repl mode or not. Since you're not calling follow, you don't know if calling exit_raw_repl will actually work or not.

If you call enter_raw_repl again, it will send a Control-C and if the process you started but didn't wait for hasn't finished it will be aborted. So you'll need to figure out a way to deal with that scenario.

Re: Pyboard.py raw repl : passing Micropython variable to Python

Posted: Sun Apr 11, 2021 12:48 pm
by zaord
Or maybe I should use uasyncio with python to execute my recording command in parallel, waiting for micropython follow return function and wait until both measurements end to continue my script.
This seems okay ?

Re: Pyboard.py raw repl : passing Micropython variable to Python

Posted: Sat Dec 25, 2021 10:14 pm
by zaord
Hi,

I wonder if it's possible to pass an array with pyboard.py from micropython to python like :

Code: Select all

Mes_Temp  = float(pyb.exec("mes.Mes_Temp()"))
Where the micropython function Mes_Temp() returning an array of float values from micropython board to my python script from my computer.
This is the good way to do that ?

Re: Pyboard.py raw repl : passing Micropython variable to Python

Posted: Sun Jan 02, 2022 11:51 am
by zaord
dhylands wrote:
Thu Jan 21, 2021 8:03 pm
What rshell does is to print the value to pass back (use repr() if needed) and then the PC side uses eval to convert that back into a python value.

The output is collected (as a string) using pyboard `follow` function.

I've also written a json-ipc library https://github.com/dhylands/json-ipc which doesn't need pyboard and uses the JSON format to pass information in both directions.
Hi @dhylands and all ;) ,
Do you have any idea how could it be possible to wait until the pyboard become ready in my Cpython script to communicate through raw repl after a exec_raw_no_follow() ?

I need to make two measures simulteanously, one over i2c on pyboard and one over usb micropyhone on my computer.
So I need to start the measurement on pyboard, make the measurements on my computer and waiting back that my pyboard get ready to grab the datas and mix everything together to make the data analysis.

There is any function like pyboard_prompt_ready() in Rshell / pyboard.py file ?

Re: Pyboard.py raw repl : passing Micropython variable to Python

Posted: Sun Jan 02, 2022 7:43 pm
by zaord
More information about the weird things :

I have a Cpython program (the same than the beginings) with grab data from micropython serial :

On the micropython side a simple function returning basically a bytearray ( length 2424 when I ask micropython prompt)

Code: Select all

 def Grab_Full_Mes(self) -> None:
        """Mesure de la pression température et remplissage d'un array de valeurs"""
         return bytearray(b'\xb5\xfe\x967\xca\xfc#<\x03\xec\xa3<\xba\xdb\xf5<\xc5\xe6#=\x94\xddL=J\xd2u=]k\x8f=<\xdb\xa3=\x07_\xb8=\x87\xdc\xcc=\xc7I\xe1=\x16\xc3\xf5=\xb8\x1e\x05>Id\x0f>c\x9a\x19>f\xd9#>\x87\x15.>CY8>\xdd\x94B>)\xcfL>c\rW>\xb6Ma>\xb1\x86k>`\xc9u>%\x03\x80>\xd1 \x85>:>\x8a>N_\x8f>=}\x94>\xf6\x9b\x99>\xcf\xba\x9e>f\xd9\xa3>\x12\xf7\xa8>\xbe\x14\xae>\xbd6\xb3>\xdaU\xb8>zr\xbd>>\x92\xc2>\x9e\xb1\xc7>)\xcf\xcc>\xd5\xec\xd1>\x81\n\xd7>\x80,\xdc>ZK\xe1>\xcfi\xe6>\xa9\x88\xeb>\xfc\xa6\xf0>;\xc6\xf5>\x15\xe5\xfa>e\x00\x00?\xc1\x8f\x02?: \x05?y\xae\x07?q=\n?\xa3\xce\x0c?\x9a]\x0f?\x81\xec\x11?F{\x14?=\n\x17?1\x9a\x19?\x8d)\x1c?\x17\xba\x1e?0I!?k\xd8#?Qg&?oJ)?\x83\x85+?\x87\x15.?\xa0\xa40?U33?e\xc45?LS8?C\xe2:?\x9fq=?\xd6\x01@?S\x91B?m E?S\xafG?\x9f>J?\xde\xccL?\x00qO?)\xedQ?\xab{T?\x91\nW?\xd8\x9aY?\xd0)\\?\xa6\xb8^?\x84Ia?\x8c\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\xc2u?\xe3Sx?\xce\xe1z?\xb5p}?\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x0e\xea<\xa1\x0ej=\xa1\x0ej=\xa1\x0e\xea=\xa1\x0ej=\xf9\x8a\xaf=\xa1\x0e\xea<\xa1\x0e\xea=\xa1\x0e\xea<\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x0e\xea<\xa1\x0e\xea\xbc\xa1\x0e\xea<\xf9\x8a\xaf=\xa1\x0e\xea<\xf9\x8a\xaf=\xa1\x0e\xea<\xf9\x8a\xaf=\xa1\x0e\xea<\xa1\x0ej=\xf9\x8a\xaf=\xa1\x0ej=\xa1\x0e\xea<\xa1\x0ej=\xa1\x0ej=\xa1\x0ej=\xa1\x0e\xea<\xa1\x0e\xea\xbc\x00\x00\x00\x00\xa1\x0ej=\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x0ej=\xa1\x0e\xea\xbc\xa1\x0e\xea<\xa1\x0ej=\xa1\x0e\xea=\x00\x00\x00\x00\xa1\x0ej\xbd\x00\x00\x00\x00\xa1\x0e\xea\xbc\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0e\xea<\x00\x00\x00\x00\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0ej=\xf9\x8a\xaf=\xa1\x0e\xea\xbc\x00\x00\x00\x00\xa1\x0ej=\x00\x00\x00\x00\xa1\x0e\xea<\x00\x00\x00\x00\xa1\x0ej=\xa1\x0ej=\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0e\xea<\x00\x00\x00\x00\xf9\x8a\xaf=\xf9\x8a\xaf=\xa1\x0e\xea\xbc\xa1\x0e\xea<\xa1\x0e\xea\xbc\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0ej=%I\x12>\xa1\x0e\xea\xbc\xa1\x0ej=\xa1\x0e\xea\xbc%I\x12>\xf9\x8a\xaf=\xa1\x0e\xea<\xa1\x0e\xea<\x00\x00\x00\x00\xa1\x0e\xea\xbc\xf9\x8a\xaf=\xf9\x8a\xaf=\xf9\x8a\xaf=\xf9\x8a\xaf=\xa1\x0ej=\xa1\x0ej=\xa1\x0ej=\xa1\x0ej=\xa1\x0e\xea<\xa1\x0ej=\xa1\x0e\xea\xbc\xa1\x0e\xea\xbc\xa1\x0ej=\xa1\x0e\xea<\x00\x00\x00\x00')


In Cpython side a function to grab the byte array :

Code: Select all

pyb = pyboard.Pyboard('COM4')
pyb.enter_raw_repl()

print(pyb.eval("len(mes.Grab_Full_Mes())")) # to looks on the array length before transfer : results b'2424'
Mes_bytes = pyb.eval("print(Grab_Full_Mes())") # grab the data though rshell pyboard.py file
Mes_bytestes_2 = pyb.exec("Grab_Full_Mes()")  # test if that wors better with eval ....  but not ! 
print("length bytes:" ,len(Mes_bytes)) # check the leng of the reicived datas .... and here a big problem : length bytes: 6544
Mes_Press =np.frombuffer(Mes_bytes, dtype=np.float32) # works if I copy the original bytearray and not working after transfer ....
Mes_Press.reshape(6,int(Mes_Press.size/6))
print(Mes_Press)


So I don't get the same bytearray length after transfer, and the length seems fluctating ...

I hope you could help me, I spend all the day on this ...


The original bytearray : (with the right length : 2424 )

Code: Select all

bytearray(b'\xb5\xfe\x967\xca\xfc#<\x03\xec\xa3<\xba\xdb\xf5<\xc5\xe6#=\x94\xddL=J\xd2u=]k\x8f=<\xdb\xa3=\x07_\xb8=\x87\xdc\xcc=\xc7I\xe1=\x16\xc3\xf5=\xb8\x1e\x05>Id\x0f>c\x9a\x19>f\xd9#>\x87\x15.>CY8>\xdd\x94B>)\xcfL>c\rW>\xb6Ma>\xb1\x86k>`\xc9u>%\x03\x80>\xd1 \x85>:>\x8a>N_\x8f>=}\x94>\xf6\x9b\x99>\xcf\xba\x9e>f\xd9\xa3>\x12\xf7\xa8>\xbe\x14\xae>\xbd6\xb3>\xdaU\xb8>zr\xbd>>\x92\xc2>\x9e\xb1\xc7>)\xcf\xcc>\x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eb>\xfc\xa6\xf0>;\xc6\xf5>\x15\xe5\xfa>e\x00\x00?\xc1\x8f\x02?: \x05?y\xae\x07?q=\n?\xa3\xce\x0c?\x9a]\x0f?\x81\xec\x11?F{\x14?=\n\x17?1\x9a\x19?\x8d)\x1c?\x17\xba\x1e?0I!?k\xd8#?Qg&?oJ)?\x83\x85+?\x87\x15.?\xa0\xa40?U33?e\xc45?LS8?C\xe2:?\x9fq=?\xd6\x01@?S\x91B?m E?S\xafG?\x9f>J?\xde\xccL?\x00qO?)\xedQ?\xab{T?\x91\nW?\xd8\x9aY?\xd0)\\?\xa6\xb8^?\x84Ia?\x8c\xd8c?\xcbff?\xd3\xf5h?\x7f\x86k?f\x15n?\xf9\xa3p?\xf84s?\xd2\xc2u?\xe3Sx?\xce\xe1z?\xb5p}?\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x0e\xea<\xa1\x0ej=\xa1\x0ej=\xa1\x0e\xea=\xa1\x0ej=\xf9\x8a\xaf=\xa1\x0e\xea<\xa1\x0e\xea=\xa1\x0e\xea<\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x0e\xea<\xa1\x0e\xea\xbc\xa1\x0e\xea<\xf9\x8a\xaf=\xa1\x0e\xea<\xf9\x8a\xaf=\xa1\x0e\xea<\xf9\x8a\xaf=\xa1\x0e\xea<\xa1\x0ej=\xf9\x8a\xaf=\xa1\x0ej=\xa1\x0e\xea<\xa1\x0ej=\xa1\x0ej=\xa1\x0ej=\xa1\x0e\xea<\xa1\x0e\xea\xbc\x00\x00\x00\x00\xa1\x0ej=\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x0ej=\xa1\x0e\xea\xbc\xa1\x0e\xea<\xa1\x0ej=\xa1\x0e\xea=\x00\x00\x00\x00\xa1\x0ej\xbd\x00\x00\x00\x00\xa1\x0e\xea\xbc\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0e\xea<\x00\x00\x00\x00\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0ej=\xf9\x8a\xaf=\xa1\x0e\xea\xbc\x00\x00\x00\x00\xa1\x0ej=\x00\x00\x00\x00\xa1\x0e\xea<\x00\x00\x00\x00\xa1\x0ej=\xa1\x0ej=\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0e\xea<\x00\x00\x00\x00\xf9\x8a\xaf=\xf9\x8a\xaf=\xa1\x0e\xea\xbc\xa1\x0e\xea<\xa1\x0e\xea\xbc\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0e\xea<\xa1\x0ej=%I\x12>\xa1\x0e\xea\xbc\xa1\x0ej=\xa1\x0e\xea\xbc%I\x12>\xf9\x8a\xaf=\xa1\x0e\xea<\xa1\x0e\xea<\x00\x00\x00\x00\xa1\x0e\xea\xbc\xf9\x8a\xaf=\xf9\x8a\xaf=\xf9\x8a\xaf=\xf9\x8a\xaf=\xa1\x0ej=\xa1\x0ej=\xa1\x0ej=\xa1\x0ej=\xa1\x0e\xea<\xa1\x0ej=\xa1\x0e\xea\xbc\xa1\x0e\xea\xbc\xa1\x0ej=\xa1\x0e\xea<\x00\x00\x00\x00')

The Bytearray I get after transfer if I use the eval function (to compare with the one up ) : (length : 6479)

Code: Select all

b'bytearray(b"0b\\x9f7\\x98\\xf8#<\\n\\xd7\\xa3<=\\xd1\\xf5<\\n\\xd7#=\\xa0\\xdeL=\\xa1\\xd9u=\\xe1`\\x8f=\\x00\\xe1\\xa3=\\xd5Z\\xb8=\\x9e\\xd3\\xcc=MJ\\xe1=\\x92\\xcd\\xf5=\\xb3#\\x05>,\\x0c\\x11>\\x1b\\x9f\\x19>#\\xd9#>\\xa0\\x17.>rR8>d\\x95B>\\xbb\\xd0L>\\xbf\\x0fW>wHa>\\xac\\x8bk>\\xce\\xc7u>\\xc1\\x02\\x80>\\xf3 \\x85>\\x92=\\x8a>\\xd1\\\\\\x8f>\\xee{\\x94>\\x17\\x9c\\x99>\\x1f\\xbc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\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xf9\\x8a\\xaf=\\xa1\\x0e\\xea<\\xa1\\x0e\\xea<\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea<\\xa1\\x0e\\xea<\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea=\\xa1\\x0ej=\\x00\\x00\\x00\\x00\\xa1\\x0ej=\\xa1\\x0e\\xea<\\xa1\\x0ej=\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea<\\x00\\x00\\x00\\x00\\xf9\\x8a\\xaf=\\xa1\\x0ej=\\xa1\\x0ej=\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xa1\\x0ej=\\x00\\x00\\x00\\x00\\xa1\\x0ej=\\xf9\\x8a\\xaf=\\xa1\\x0ej=\\xa1\\x0e\\xea<\\xf9\\x8a\\xaf=\\xa1\\x0e\\xea=\\xa1\\x0e\\xea<\\xa1\\x0ej=\\xa1\\x0e\\xea\\xbc\\xa1\\x0ej=\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea=\\x00\\x00\\x00\\x00\\xa1\\x0ej=\\xf9\\x8a\\xaf=\\xa1\\x0e\\xea<\\xa1\\x0ej=\\xa1\\x0e\\xea\\xbc\\xa1\\x0e\\xea<\\xf9\\x8a\\xaf=\\xa1\\x0ej\\xbd\\xa1\\x0e\\xea<\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea=\\xa1\\x0ej=\\xa1\\x0e\\xea\\xbc\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea\\xbc\\xa1\\x0e\\xea<\\x00\\x00\\x00\\x00\\xa1\\x0ej=\\xa1\\x0ej=\\x00\\x00\\x00\\x00\\xf9\\x8a\\xaf=\\x00\\x00\\x00\\x00\\xa1\\x0ej\\xbd\\xa1\\x0e\\xea<\\xa1\\x0e\\xea<\\xf9\\x8a\\xaf=\\xa1\\x0ej=\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea\\xbc\\xa1\\x0ej=\\xa1\\x0e\\xea<\\xa1\\x0ej=\\xf9\\x8a\\xaf=\\xa1\\x0e\\xea<")\r\n'


The bytearray I have if I use exec function with print : (length : 6586)

Code: Select all

b'bytearray(b\'\\xb5\\xfe\\x967\\x91\\r$<\\xaa\\x0f\\xa4<\\xe4\\xf4\\xf5<\\xb8\\xe5#=\\x0b\\xd2L=\\x9c\\xc3u=\\x80c\\x8f=\\x17\\xd8\\xa3=\\x04T\\xb8=\\xd9\\xcd\\xcc=\\xcaT\\xe1=y\\xcb\\xf5=!"\\x05>\\x90\\xf9\\x10>E\\x9d\\x19>Z\\xd8#>\\x15\\x1c.>yX8>W\\x94B>\\xa3\\xceL>\\xd8\\x11W>4Ha>\\r\\x89k>\\xc1\\xc6u>e\\x00\\x80>\\x85"\\x85>\\x96@\\x8a>\\xf2\\\\\\x8f>\\x8d~\\x94>\\xa6\\x9a\\x99>\\x13\\xbb\\x9e>{\\xd8\\xa3>\\x8c\\xf6\\xa8>\\x7f\\x17\\xae>\\xf45\\xb3>\\xe3S\\xb8>\\x9br\\xbd>G\\x90\\xc2>\\xa7\\xaf\\xc7>S\\xcd\\xcc>\\x89\\xee\\xd1>\\xfe\\x0c\\xd7>\\xed*\\xdc>AI\\xe1>3j\\xe6>\\x83\\x85\\xeb>\\x1a\\xa4\\xf0>\\xf8\\xc5\\xf5>\\xe7\\xe3\\xfa>\\xc9\\x00\\x00?\\x8e\\x8f\\x02?m \\x05?!\\xaf\\x07?}>\\n?\\xb8\\xcd\\x0c?\\xd1\\\\\\x0f?-\\xec\\x11?\\xcc{\\x14?9\\x0b\\x17?\\x0b\\x9b\\x19?Z)\\x1c?\\xe9\\xb8\\x1e?sI!?\\xbe\\xd8#?\\x84g&?\\x9d\\xf6(?b\\x85+?Q\\x16.?\\x90\\xa40?\\t53?\\xce\\xc35?\\x93R8?z\\xe1:?\\xc5p=?\\x00\\x00@?\\x10\\x91B?\\xda\\x1eE?\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\x0e\\xea\\xbc\\xa1\\x0ej=\\xa1\\x0e\\xea<\\xa1\\x0e\\xea=\\xa1\\x0e\\xea\\xbc\\xa1\\x0e\\xea<\\xa1\\x0ej\\xbd\\xa1\\x0ej=\\xa1\\x0ej=\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea<\\xf9\\x8a\\xaf=\\xa1\\x0e\\xea\\xbc\\xa1\\x0ej=\\xa1\\x0ej=\\xa1\\x0e\\xea\\xbc\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea<\\xa1\\x0ej=\\xa1\\x0e\\xea<\\xa1\\x0ej=\\x00\\x00\\x00\\x00\\xf9\\x8a\\xaf=\\xa1\\x0ej=\\xa1\\x0ej=\\xa1\\x0ej=\\xa1\\x0e\\xea<\\xa1\\x0e\\xea\\xbc\\x00\\x00\\x00\\x00\\xf9\\x8a/>\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea<\\xa1\\x0ej\\xbd\\xa1\\x0ej\\xbd\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xa1\\x0e\\xea<\\xf9\\x8a\\xaf=\\xa1\\x0e\\xea<\\xa1\\x0e\\xea<\\x00\\x00\\x00\\x00\')\r\n'
The problem migh come from the \\ instread of \

The eval function modify everything, where the exec + print seems also to change the content ...