uasyncio, PPP, and uMQTT - Blocking?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
kinno
Posts: 30
Joined: Mon Oct 21, 2019 2:06 pm

uasyncio, PPP, and uMQTT - Blocking?

Post by kinno » Wed Jan 08, 2020 9:18 pm

Good afternoon everyone!

I would like to explore the topic of PPP, uMQTT and, uAsynio in relation to eachother.

I finally got my ESP32 and Simcom 7000g board to use the PPP interface and I am able to periodically send information over MQTT (umqtt.simple).

Now I wish to apply this PPP interface into another application where I use uasyncio to run a couple tasks. One is a fast polling operation that runs every 3 seconds (Checking statuses of things) another is a slow operation that runs every 10 minutes (Temperature and sending the data). It seems that PPP is blocking my uasyncio. To my current understanding this actually makes sense if there are UART operations in the PPP library that are blocking operations.

Is this the case?

I know there is a new version of usayncio coming out soon as well. Also Peter Hinch has done lots of work I am reading through right now on using asyncio with normally blocking operations.

If anyone has comments please let me see them. I would love to sort this out.

Thank you everyone!!! :)

User avatar
pythoncoder
Posts: 4345
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: uasyncio, PPP, and uMQTT - Blocking?

Post by pythoncoder » Thu Jan 09, 2020 10:18 am

Nonblocking MQTT may be found here.
Peter Hinch

kinno
Posts: 30
Joined: Mon Oct 21, 2019 2:06 pm

Re: uasyncio, PPP, and uMQTT - Blocking?

Post by kinno » Thu Jan 09, 2020 12:32 pm

pythoncoder wrote:
Thu Jan 09, 2020 10:18 am
Nonblocking MQTT may be found here.
Thank you for the reply and the non-blocking mqtt.

Does network.PPP also block asyncio?

Post Reply