How to check if there are any packets in the transmission queue
-
Hi! I am currently writing a program to measure the maximum data transfer rate between two LoRa nodes using LoRa RAW. One of the problems I've encountered is an error message: "OSError: [Errno 11] EAGAIN", when trying to send several packages in short amount of time.
I know this is related to duty cycle limiting, which means that I need to implement a functionality where the program checks if there are any packets in the transmission queue before it starts transmitting. I do not want to use a hardcoded timer between each transmission, as this would impact the results.
My question is if anybody out there has any idea on how to solve this problem, so the program itself can determine when to send the next package?
-
-
Thanks for the answer. I already tried using callbacks, but couldn't quite figure it out. Luckily, i managed to find some piece of code on the web which seems to check if there are any data in the socket.
# Check if the socket is busy r, w, x = select.select([tx], [tx], [], 0) if r or w: tx.send(package)Where tx is the name of the socket.
-
This post is deleted!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login