Uasyncio Support
-
Hi,
I have been working on a project using a WIPY 3.0.
I was wondering if anyone has been able to use the uasyncio module or has this module been made available as on micropython?There was a thread in December 2017 that Indicated that there were plans to soon support it.
This is becoming increasingly important now that I am working with tcp sockets.
I appreciate your help.
-
@martijnthe I have to check that again. As far I recalled, I tested the wrap-around situations.
-
@donikuy @robert-hh another thing to watch out for:
ticks_diff() does not handle wrap-arounds, so after 12.42 days of uptime the scheduler will malfunction in very weird ways!
https://github.com/pycom/pycom-micropython-sigfox/issues/231
-
@soulsurfer That's the lib which is existing, from the genuine micropython in the micropython.org branch. You may use it, it requires uasyncio, uasyncio.core, uasyncio.queues and uasyncio.synchro.
In uasyncio.core you have to make a small change in line 73: in the call to ticks_diff() you have to swap the parameters.
I did just make a few basic trials, like running a coroutine.
-
You are very kind @jmarcelino!
Another possibly dumb question, bearing in mind that I've just parachuted in here from the "C++ embedded Linux" world.
In an endeavour to discover the current state of play with uasyncio I selected the "development" option in the latest version of Pycom Firmware Update. That seemed to deliver the "stable" version though.
Then I headed over to GitHub, cloned pycom-micropython-sigfox and built my own firmware. uasyncio still didn't seem to be anywhere to be seen. A bit more poking around on GitHub revealed that it could be found in micropython-lib instead. Rather than open that can of worms at this juncture I thought I'd seek advice first.
Is it likely to be worth my while experimenting with incorporating that version of asyncio into pycom-micropython-sigfox, or would I be better off waiting for you guys to do the job properly? If the latter, how long do you think it will take before that process is complete?
-
@jmarcelino I am really looking forward to this. uasyncio would seem a much better tool for addressing a range of desired of behaviour on these devices without lot's of threads/timers/mutex's etc...
T
-
@jmarcelino Sometimes it seems that well known software companies do the public large scale beta test by calling it a release.
-
@soulsurfer
Not a dumb question at all. Historically there haven't been a public beta tests before but I'm not sure what are the plans for this one. Currently it's in internal testing only.
-
@jmarcelino I'm new here, so this may count as a dumb question, but when do you expect your testing to be complete and 1.9.3 to become available?
Do you perform some sort of "public beta test" before an official release?
-
@jmarcelino Thank you. I look forward to that.
-
@robert-hh Thank you.
-
@jmarcelino There is basic supprot for uasyncio in 1.17.3.b1 and some earlier versions. However that does not match the state of uasyncio in the micropython.org branch.
Interesting, that 1.9.3 is about to be integrated. Micropython.org will advance to 1.9.4 in the next days, I heard.
-
Hi @donikuy
Pycom is working on an update to bring the fork of MicroPython up to version 1.9.3, this is already in testing now.
I believe it should be much easier to support uasyncio when this is released.