Carglglz / upydevice

Python library to interface with MicroPython devices through Wifi (Websockets/WebREPL) , BLE or Serial connection (USB)
MIT License
18 stars 6 forks source link

Windows Support #1

Closed BradenM closed 3 years ago

BradenM commented 4 years ago

Hi @Carglglz,

Awesome library. I'd really like to integrate upydevice into one of my own projects due to some issues I have been having with rshell (see BradenM/micropy-cli#47) and because it's an actual library and not a command line application I forced to be a library, haha.

However, looks like due to your dependency on picocom, windows support is not planned. Am I correct in this assumption? This would be a problem for me due to the number of people who run my app in a windows environment. :(

So, do you have any future plans for enabling windows support? Thanks.

Carglglz commented 4 years ago

Hi @BradenM,

Thanks! :)

In the future I will like to have an alternative to picocom , but right now is not a priority :(.

I use picocom because I don't have to deal with the serial communication protocol. I just have to write to stdin and read from stdout of picocom. Since I follow this 'modular' approach , theoretically any other command line tool/program with access to the MicroPython REPL could be easily implemented.

That been said, I've already been looking for alternatives:

  1. pyboard.py (from micropython repo) here ( I tried this before picocom, but I didn't get it working because it resets the board on every command, and at that time I couldn't figure out why, now I see it's because it sends '\x03' and '\x04' with every command, which is basically CTRL-C and CTRL-D.

  2. mpy-repl-tool here

  3. ampy (this particular module) here

  4. mpycntrl here (this one is new, see this topic at the micropython forum mpycontrl)

So you may want to have a look at these projects and see if they work for you or see if you can figure out a way to make it work. I also would like to know if you manage to do that so then I could implement it in upydevice.

Anyway I definitely will give it a try, just don't know exactly when...

I hope this answers your question :)

Cheers.