Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latency #70

Open
robinhilliard opened this issue Nov 8, 2019 · 3 comments
Open

Latency #70

robinhilliard opened this issue Nov 8, 2019 · 3 comments

Comments

@robinhilliard
Copy link
Contributor

robinhilliard commented Nov 8, 2019

Setup

  • Version: latest (with PR fork)
  • OS: OSX
  • Platform: MacBook Pro

Expected Behavior

No significant latency

Actual Behavior

Latency up to a second with modems set to 20ms window to minimise buffering

Steps to Reproduce the Problem

I have a pair of radio modems at close to point blank range set to 57600 baud sending a short < 100 byte message. The modems have a firmware maximum window size config of 20ms which is the setting normally used to minimise latency. I minimised the number of other messages (they support sending hundreds of messages of similar size with no throughput issues), and the same software setup running over WiFi/UDP has no noticable delay. However when I use the modems with one of them via circuits UART I get a latency delay of about a second. I have set the uart connection to active.

I know there are lots of variables in play here, but I was wondering if there are any configuration settings you would use to minimise latency of short messages when using this library?

Thanks,
Robin

@fhunleth
Copy link
Contributor

fhunleth commented Nov 8, 2019

My use of Circuits UART isn't performance critical and I know that Circuits.UART performance could be improved. However, I wasn't expecting issues on an MBP at 57600.

Just so I understand right, the firmware at the other end times out since it doesn't receive a message in 20 ms. At 57600 baud, a 100 byte message takes about 17 ms to send. If it's delayed by 3 ms, then it times out?

@robinhilliard
Copy link
Contributor Author

Hi Frank,

Sorry the window size just means that it sends what it has in it’s buffers every 20ms. I can see the timeout arguments in the C code and mention of polling but don’t understand what it’s doing, and wondered if perhaps there was a polling interval or other setting in there that could be tweaked.

Cheers
Robin

@fhunleth
Copy link
Contributor

fhunleth commented Nov 8, 2019

Does the firmware work with any other software on your Mac? For example, does it work with Picocom? It's sounding like it's not a Circuits.UART issue, but a general issue that writing bytes to the serial port doesn't work well.

Is the C code that you're referring to posted anywhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants