Search found 33 matches

by cgglzpy
Thu Jan 16, 2020 7:22 pm
Forum: General Discussion and Questions
Topic: Partial mac address ?
Replies: 4
Views: 303

Re: Partial mac address ?

Hi, just mention that MicroPython introduced a separator option for binascii.hexlify function which is quite nice for this case: >>> from binascii import hexlify >>> hexlify(b'$b\xab\xd4\xce\xe8', ':') b'24:62:ab:d4:ce:e8' Or >>> hexlify(b'$b\xab\xd4\xce\xe8', ':').decode() '24:62:ab:d4:ce:e8' In ca...
by cgglzpy
Mon Jan 13, 2020 3:34 pm
Forum: Programs, Libraries and Tools
Topic: SSL(Web)REPL + SHELL
Replies: 2
Views: 363

Re: SSL(Web)REPL + SHELL

Hi, thanks I forgot to mention that file transfer (get/put commands) are also done over SSL and SHELL / REPL comes with all sort of autocompletions :) This looks very promising! I'm tired of all the insecure protocols everywhere... Thanks for sharing! I don't know if this is "secure" or not, but I g...
by cgglzpy
Sun Jan 12, 2020 1:43 pm
Forum: Programs, Libraries and Tools
Topic: SSL(Web)REPL + SHELL
Replies: 2
Views: 363

SSL(Web)REPL + SHELL

Hi, I somehow managed to make a REPL / SHELL that works over SSL, which basically looks like this : https://raw.githubusercontent.com/Carglglz/upydev/master/DOCS/SSLWebREPL_demo.gif It still NEEDS WebREPL enabled for the initial logging and after that the SSL REPL is initiated ("os.dupterm" on a ssl...
by cgglzpy
Thu Jan 09, 2020 3:42 pm
Forum: Development of MicroPython
Topic: Tree command for upysh
Replies: 8
Views: 652

Re: Tree command for upysh

On a quick test the Linux implementation of tree ignores hidden files and directories. So I suggest changing this line to: l = [x for x in os.listdir(path) if not x.startswith('.')] That fixes the problem here. I came to the same conclusion yesterday after a quick look so it ignores the hidden file...
by cgglzpy
Wed Jan 08, 2020 5:42 pm
Forum: Development of MicroPython
Topic: Tree command for upysh
Replies: 8
Views: 652

Re: Tree command for upysh

Hi, thanks I've just submitted the PR That is very useful indeed, especially for those who use Python packages. :D On a Pyboard with an SD card there is a problem: it lists the contents of .Trash-1000 which (on my SD card) are huge. It would be good if there were some way to disable this - an option...
by cgglzpy
Tue Jan 07, 2020 8:41 pm
Forum: Development of MicroPython
Topic: Tree command for upysh
Replies: 8
Views: 652

Tree command for upysh

Hi I made TREE class for upysh (using LS as a template) So doing >>> from upysh import * Then you will be able to do this >>> tree ATEXTFILE.txt THETESTCODE.py my_other_dir_sync <dir> └──── another_file.txt new_tree_test_dir <dir> ├──── example_code.py ├──── foo_file.txt ├──── sub_foo_test_dir <dir>...
by cgglzpy
Thu Dec 19, 2019 7:06 pm
Forum: General Discussion and Questions
Topic: WebRepl input blocked by loop with utime.sleep()?
Replies: 7
Views: 376

Re: WebRepl input blocked by loop with utime.sleep()?

Hi! If the "loop is reading an analog value and conditionally posting to MQTT" runs for example every 5 or 10 seconds you can do this "worker loop" with callback and a timer interrupt, something like: from machine import Timer tim = Timer(-1) ### # Your adc, MQTT Client definitions here ### my_value...
by cgglzpy
Thu Dec 19, 2019 3:59 pm
Forum: General Discussion and Questions
Topic: Switching UART back and forth
Replies: 1
Views: 166

Re: Switching UART back and forth

I think you need to store the uos.dupterm(None, 1) like uart_repl = uos.dupterm(None, 1) As the docs says uos.dupterm The function returns the previous stream-like object in the given slot. So maybe this works uart_repl = uos.dupterm(None, 1) uart_RS232 = UART(0 ,19200) uart_RS232.init(baudrate=1920...
by cgglzpy
Sat Dec 07, 2019 7:08 pm
Forum: Programs, Libraries and Tools
Topic: Announcing MPyControl - control MicroPhython with your own code
Replies: 11
Views: 938

Re: Announcing MPyControl - control MicroPhython with your own code

docu !!! good that it is now in place ! haven't seen that before ... probably i skiped it because of the name (i use esp boards... not pyboard...) ok, then i sending my tool for retiring yesterday evening i spent some efforts on webrepl and a small websockets prototype. will kick that too... (will ...
by cgglzpy
Thu Dec 05, 2019 10:36 pm
Forum: General Discussion and Questions
Topic: OTA Firmware Updates ?!?
Replies: 11
Views: 976

Re: OTA Firmware Updates ?!?

To make it really enduser friendly the "OTA updater" should have a GUI I guess... :roll: A simple TK GUI is quickly made. But then we come to the bigger problem: How to offer an end-user GUI program written in Python? Actually, it's just: git clone and pipenv run gui Well, let's see ;) As Jan said ...