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
OP2, OpenCPN, Pypilot plugin loses connection to Tiny Pilot
#1
Hi there

I have been running OP2, with OpenCPN and the OpenCPN Pypilot plugin to connect to Tiny Pilot. Everything has been working fantastic... but the more I use it the more I am noticing that the Pypilot plugin screen is getting disconnected from Tiny Pilot... for a roughly a minute maybe 2 at a time, every so often... I have not timed the interval time between occurrence nor have I actually timed the disconnection time, but it happens enough that about half a dozen times yesterday I needed to adjust course and I had to wait for it to get reconnected. This happened over about 2 hours. 

1. is anyone else noticing this?
2. is this a known issue and is there a fix?
3. is there any logs or a spot where I might look to maybe try and diagnose the problem?

From what I can tell OP2 does not lose connection to the TP wifi access point...
Reply
#2
1) Not yet, but I will look for it
2) it's a known issue now...
4) You should do some tests. For example, leave a terminal pinging the tinypilot and see if the pings stop as well. Then if they do not, look at nmea log in opencpn, perhaps using the vdr plugin to record it, and see if this data stops. Lets hear what you find because there are many possible causes for disconnecting that are completely different reasons.
Reply
#3
(2020-05-03, 04:46 AM)seandepagnier Wrote: 1)  Not yet, but I will look for it
2)  it's a known issue now...
4)  You should do some tests.   For example, leave a terminal pinging the tinypilot and see if the pings stop as well.   Then if they do not, look at nmea log in opencpn, perhaps using the vdr plugin to record it, and see if this data stops.   Lets hear what you find because there are many possible causes for disconnecting that are completely different reasons.

So I did what you suggested and here are the results.  When pypilot plugin loses  connection ping also shows errors.  Please see attached.


Attached Files Image(s)
   
Reply
#4
In this case it is a network problem not a pypilot problem. Maybe the wifi is trying to connect to a different network or?
Reply
#5
(2020-05-05, 06:17 PM)seandepagnier Wrote: In this case it is a network problem not a pypilot problem.  Maybe the wifi is trying to connect to a different network or?

Thanks Sean

I don't believe so? Openplotter does not lose connection or there is no change in the connection status icon. 
What else may cause this? It is getting so bad now I have had to connect my phone to TP so that I have a way to quickly take control of AP!
Reply
#6
(2020-05-05, 08:25 PM)rastam4n Wrote:
(2020-05-05, 06:17 PM)seandepagnier Wrote: In this case it is a network problem not a pypilot problem.  Maybe the wifi is trying to connect to a different network or?

Thanks Sean

I don't believe so? Openplotter does not lose connection or there is no change in the connection status icon. 
What else may cause this? It is getting so bad now I have had to connect my phone to TP so that I have a way to quickly take control of AP!

FYI
I have a data server kiosk (operating in RPIzero environ) that maintains a tcp connection with openplotter (i think version 1.2 ???) from which it requests various signalK data every second for display.

Over time (days typically), the connection eventually corrupts and disconnects and the data server cant reach OP.
Only able to be reconnected after reboot of OP.

The kiosk also has a management tcp port that stays accessible to the best of my recollection; but i would have to recheck this when the disturbance occurs.  This is why I blame the disconnect on OP.  


Was really hoping this was going to go away when I installed new version of OP!

Any anomolies in OP error logs?
Reply
#7
(2020-05-06, 12:53 AM)wdee Wrote: Any anomolies in OP error logs?

Hi wdee

If you can tell me where to look I will try and find the log and check if there are any errors.

(2020-05-05, 06:17 PM)seandepagnier Wrote: In this case it is a network problem not a pypilot problem.  Maybe the wifi is trying to connect to a different network or?

Hi Sean
Thanks for you help
I was thinking, if this is a network error and Tiny Pilot is the AP... wouldn't that mean it is likely TinyPilot causing the problem? ... especially since the wifi connection is not being lost? 
Any tips on how I can determine where the problem is? Maybe I should be running OP as the AP and TP as the client? I feel this might make it worse as then I would not be able to use my phone to connect to TP if it disconnected from the AP.

Is there any way to hard wire the Tiny Pilot Rpi to the OP RPi? 
This disconnection issue has caused some close calls and I would really like to be able to rely on it rather then the remote.. which only works about 50% of the time, I often have to hit the same button a few times, and the heading change is delayed by a few seconds so there is no immediate way to know if the command was received. 



I need a more reliable way to change heading or turn off AP
Reply
#8
If you can connect to tinypilot AP on the phone I don't think it is tinypilot. Not much has changed in tinypilot and the wifi was always stable.

Are you running OP with both client and ap mode at the same time? This may be the issue. In fact, I have openplotter running as only AP mode and it reset my connection from a laptop a few feet away after a few hours. I do not trust the "network manager" scripts for absolute reliability.

Maybe as you say, tinypilot should be the client but then you won't be able to connect to it without OP running.

It's possible to use a usb->ethernet to get a wired connection, but may not solve OP wifi resetting.

I suggest wiring an actual wired button to the gpio of the pi if you find the remote unreliable. I'm making more remote options in the future with various tradeoffs. There are keypad pins on the tinypilot hat. This is the most reliable, and you can at least just wire the AP button to engage/disengage.

You should also be able to reliably disengage autopilot no matter what software does. So this could be a switch in series with the clutch or the ability to remove the drive unit from the tiller. This is essential to avoid bad situations if you use the autopilot in tight areas.
Reply
#9
Thanks Sean
I am running OP in AP/client mode, I will switch to client mode only and see if that solves the disconnections.

I am interested in the keypad option you have suggested, can you identify the pins for me? and what sort of keypad would I need?
If I was going to go through the trouble I may as well make it functional, I would want to engage/disengage then 4 buttons for forward/reverse for small and large heading change. Is it just a matter of closing a circuit from each pin to ground?

I have a bunch of these would they work?
https://www.amazon.com/dp/B071KX71SV?tag...th=1&psc=1

Or maybe something like this
https://www.alibaba.com/product-detail/C...n4kiFo&s=p

Or is a matrix keypad needed?
https://www.adafruit.com/product/419

I like this one... would it work?
https://www.mouser.ca/ProductDetail/Gray...prjA%3D%3D
Reply
#10
yes, each pin just needs to be grounded. For a matrix keypad you need more logic.

https://pypilot.org/wiki/lib/exe/detail....pinout.png

There are a few more pins GP5 and 6 for +- 10 and GP26 for tack.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)