This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TCP 20220 buffering?
#1
Checking the data stream from tinypilot it looks like it is buffering? I get every 3 seconds al the data?
[Image: PP-TCP.jpg]
Reply
#2
Are you sure it's pypilot? Try a telnet to the port first, while this is happening, to rule out opencpn influence. If it occurs, shut down opencpn and see if it persists Then do the telnet from the tiny's console to rule out the wifi connection, if it's not on the same host.

I must restart opencpn periodically, because it sometimes hogs all resources, resulting in bad network performance.
Reply
#3
in telnet same issue
Reply
#4
and when you shut down opencpn?
Reply
#5
it is  shut down and no other connections to other devices
Reply
#6
try using nc:
nc 192.168.14.1 20220

It does not buffer. Most likely it is your wifi. Try a different device or adapter. This lag of wifi is exactly why I do not recommend sending critical data over wifi. So people ask to send the gyro and imu data over wifi and pypilot basically does not support this on purpose. This is why pypilot is always the source for imu data rather than the other way which could be more flexible but would lead to poor performance without the user realizing how bad it is or knowing why.
Reply
#7
I found the problem, it only occurs when a NMEA client is added https://github.com/pypilot/pypilot/pull/104
Even when it is not in use, when the client boxes are clear no problems.
Reply
#8
I will look into it and debug for the next version, it must be doing something blocking that should not be. The nmea client does not have a lot of feedback or use yet.
Reply
#9
I did a lot of testing now.
Different configurations in master and client modes vice versa with Yachtdevices YDWG(to NMEA2000), our BoatController (rpi), PC,  etc.
I tested with heavy dataloads and it all works like a charm!!!
The buffering problem only occurs when you have a Client connection filled in but not active/connected

In alle these configurations it would be a big plus if we could multiplex al NMEA0183 data received over USB to the TCP 20220 port.
Reply
#10
yes, it seems the problem is client connection trying to reconnect in a blocking way. I will look into it.

As for multiplex, it should do this. Already it relays nmea received from usb ports to tcp, however it limits the rate to 4 per second which may/may not be a problem. I am considering if a bunch of ais targets are received at once it would drop some and this could be bad. Perhaps this should be user adjustable, or the rate only limited for messages with $ rather than !?

The exception is RSA, MWV and APB, these are not repeated. RSA and MWV are output if received from serial or the motor controller as they are recalibrated. For example, if rudder angle is fed to pypilot over usb, the rudder angle calibration is applied, and the calibrated rudder angle is output on 20220, same with wind angle which has an offset applied.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)