Search found 16 matches

by shawwwn
Wed Sep 26, 2018 1:21 pm
Forum: General Discussion and Questions
Topic: C data structure to python dictionary
Replies: 21
Views: 1460

Re: C data structure to python dictionary

Yes, the elegant way is in @pythoncoder's mention. I haven't look into uctypes' implementation, but I'm sure it just involve memory mapping instead of copying(as its name suggested ;) ). You can refer to this module about how to use uctypes. To avoid copy when slicing an array, you may also find mem...
by shawwwn
Sun Sep 23, 2018 12:40 am
Forum: General Discussion and Questions
Topic: SFTP for remote sdcard access
Replies: 1
Views: 463

Re: SFTP for remote sdcard access

SFTP is not a continuation of FTP. It relies on SSH protocol which can be fairly complicated. Therefore, it's (probably) not practical to implement such protocol in Python. If you just want basic encryption, I would recommend reaching out for FTPS . The whole thing can be built upon your existing FT...
by shawwwn
Sat Sep 22, 2018 7:57 am
Forum: Programs, Libraries and Tools
Topic: uPing - Ping library for MicroPython
Replies: 17
Views: 3415

Re: uPing - Ping library for MicroPython

Just changed. Thanks!
by shawwwn
Fri Sep 21, 2018 12:49 pm
Forum: Programs, Libraries and Tools
Topic: pythoncoder's uasyncio fork
Replies: 8
Views: 918

Re: uasyncio

Correct me if I am wrong: this version adds a separate queue for high priority IO polling while the stream IO has been completely rewritten to accommodate the newly introduced ioctl()? Also, I noticed in the previous uasyncio implementation, poll.register() was used to poll IO, how does this differ ...
by shawwwn
Fri Sep 21, 2018 10:53 am
Forum: Programs, Libraries and Tools
Topic: uMail - A lightweight SMTP client for MicroPython
Replies: 17
Views: 2457

Re: uMail - A lightweight SMTP client for MicroPython

I see, but adding a 'starttls=True|False' besides 'ssl' would be too confusing for many users. There is however a hack you can do (without changing the code). smtp.SMTP('xxx', xx) # after smtp instance is initialized code, _ = smtp.cmd('STARTTLS') assert code == 220 smtp._sock = ussl.wrap_socket(smt...
by shawwwn
Fri Sep 21, 2018 10:38 am
Forum: Programs, Libraries and Tools
Topic: pythoncoder's uasyncio fork
Replies: 8
Views: 918

Re: uasyncio

Big thanks for your contribution!

I have been using uasyncio for all my tasks(ESP's network interrupt can be horribly slow).

Didn't bother to read the source code, could you enlighten me about what change in fast_io that makes it fast?
by shawwwn
Fri Sep 21, 2018 10:22 am
Forum: Programs, Libraries and Tools
Topic: uMail - A lightweight SMTP client for MicroPython
Replies: 17
Views: 2457

Re: uMail - A lightweight SMTP client for MicroPython

Let me put it this way: The client will switch to TLS encryption once it sees STARTTLS in server's response, regardless of the status of 'ssl'. It all depends on server's reply. If you want to enforce a secure connection, then you should let the server to always reply STARTTLS. Setting 'ssl=True' is...
by shawwwn
Fri Sep 21, 2018 10:08 am
Forum: Programs, Libraries and Tools
Topic: uPing - Ping library for MicroPython
Replies: 17
Views: 3415

uPing - Ping library for MicroPython

MicroPython implementation of ICMP Ping. Works exactly like linux's ping command. https://gist.github.com/shawwwn/91cc8979e33e82af6d99ec34c38195fb Example: >>> import uping >>> uping.ping('google.com') PING google.com (64.233.185.138): 64 data bytes 84 bytes from 64.233.185.138: icmp_seq=1, ttl=40, ...
by shawwwn
Fri Sep 21, 2018 9:35 am
Forum: Programs, Libraries and Tools
Topic: uMail - A lightweight SMTP client for MicroPython
Replies: 17
Views: 2457

Re: uMail - A lightweight SMTP client for MicroPython

Then you should probably add a boolean keyword arg starttls , to enforce use of STARTTLS with servers, which also allow unsecured connections. 'ssl=True|False' already does that -- if set True, then there is no need to STARTTLS; if set false, then client will switch to TLS upon server's request. Al...
by shawwwn
Fri Sep 21, 2018 9:08 am
Forum: Programs, Libraries and Tools
Topic: uMail - A lightweight SMTP client for MicroPython
Replies: 17
Views: 2457

Re: uMail - A lightweight SMTP client for MicroPython

When Iooked at the source code, I noticed your module employs STARTTLS, if the server supports it. I think it would be good to mention that in the readme, for those where the server does not support a direct SSLL connection and who may be wondering if/how they can have a secure connection. SMTP ser...