What are the fields returned by mpremote devs? #16944
-
When I run
I'd like to parse the output and use it in a program, so I'm trying to figure out what the fields mean. From right to left, I can take a guess:
Is this close? Is there any documentation to confirm my guesses and explain what the None indicates? I searched, but came up empty. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
… what you get when it's a serial device that mpremote doesn't recognize. Here's what I get on my Linux box with three different devices plugged in:
The second field is the serial number of the board. It can be used to tell identical boards apart. The 0001 that you're seeing is your system's guess at a device with no serial number |
Beta Was this translation helpful? Give feedback.
-
Yes It works , but the platform specific implementations provide different results depending on the OS , on Mac it can get really interesting. Not to cut your exploration short, but thusfar I have not found a reliable way to identify a board across ports and host OSes just though USB IDs. - but I hope you may find something new that I have not considered. It is possible by running some micropython code on the MCU ( and that calls for identifying , connecting to the repl ( assuming it is there) , interrupting any running app , running your own script and interpreting the output. if you want that, then mpflash.MPRemoteBoard may be of interest to you. As of 1.24.x mpremote has a somewhat basic API - so less need for my initial testing and comments : https://gist.github.com/Josverl/afe2cb1527a72772c86f355cba7de86d#file-api-test-ipynb |
Beta Was this translation helpful? Give feedback.
-
It seems like I was looking in the wrong place for the info. The example code from pyserial is printing This little snippet illustrates it:
Giving output like this:
So it is an O.S. thing and not an mpremote thing as I originally suspected. |
Beta Was this translation helpful? Give feedback.
-
In case anyone is interested... My goal for figuring out what's represented in the fields returned by Previously I'd been using the NodeJS library SerialPort to do the detection. But when trying run the VS Code extension on Raspberry Pi, I found that SerialPort has some architecture dependencies and ARM didn't seem to be supported. Now I have a function that uses |
Beta Was this translation helpful? Give feedback.
… what you get when it's a serial device that mpremote doesn't recognize. Here's what I get on my Linux box with three different devices plugged in:
The second field is the serial number of the board. It can be used to tell identical boards apart. The 0001 that you're seeing is your system's guess at a device with no serial number