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 In from iPad
#1
Hi,

Absolutely loving Openplotter - thanks for all the hard work people have put in.

I have one challenge, I can't get data from iPad (running iSailor) back to Openplotter (mainly autohelm controls so XTE sentances).

I can establish a TCP connection from OP to iPad - works great. If I try to make this bi-directional, it loses connection.

If I try to create a separate TCP connection for iPad to OP (with a unique port), the connection won't establish.

I tried using bidirectional UDP, using the IP address of the iPad and one port (set as both in and out). The OP to iPad connection works and iSailor gets data, but XTE signals aren't sent back (the iSailor trace doesn't even show it).

I can create a separate UDP for OP to iPad UDP  which works, along with a separate iPad to OP connection. On iSailor, this show a trace of XTE being sent (for a period anyway), but on OP Diagnostic it isn't received. This seems to be closest I can get.

Here is my config:


[tcp]
name=wifiout
direction=out
optional=yes
mode=server
address=10.10.10.1
port=10110

[serial]
name=autohelm
direction=in
optional=yes
filename=/dev/ttyOP_autohelm
baud=4800

[serial]
name=gpsais
direction=in
optional=yes
filename=/dev/ttyOP_gpsais
baud=38400

[serial]
name=compass
direction=in
optional=yes
filename=/dev/ttyOP_compass
baud=4800

[udp]
name=out
direction=out
optional=yes
address=10.10.10.154
port=10101

[udp]
name=in
direction=in
optional=yes
address=10.10.10.154
port=10102


Any help - would be greatly appreciated.

THanks





John
Reply
#2
I'm still struggling with this particular issue. Just can't any inbound connection to Openplotter from iSailor or iPad.
I'm wondering if I'm asking too much of OP here? I'm not using a separate multipler. Instead I have 3 or 4 RS232 to USB adaptor set up on a powered hub, feeding the RS232 in/out and using the RPi as a wifi hotspot - with a view to feeding NMEA in/out via the wifi.
Should I think about using a cheap wifi enabled multiplexer instead?
Any help appreciated.
John
Reply
#3
John,

If it is just autopilot data from iPad, you can do what I have had to do, that is bypass openplotter and input to opencpn. This works, I have tested this link. It does mean you have to output this fromopencpn as well, which means a separate link to your autopilot. For me this is the only NMEA data going back to my legacy system and I have a usb/NMEA link to my autopilot, as yet not wired up and tested.

Chris
Reply
#4
This doesn't seem like it because you don't believe info is going out at all from iSailor, but something to try:
Add "strict=no" to the definition of the feed from the ipad in your kplex.conf

There is another forum for kplex as well:
https://groups.google.com/forum/#!forum/kplex
Reply
#5
Thanks guys.

Chris - I saw your other post about trying to achieve. I'm afraid I might be being a bit stupid though - as I thought I needed to get the NMEA input from the iPad in to Openplotter (well kplex to be more precise) in order to get it to OpenCPN? Is that not the case? At the moment I thought kplex was doing the multiplexing for OpenCPN as well?

At the moment - I'm getting nothing showing up in kplex diagnostics at all on the inbound side.

Saqqara - I think that is what you are saying as well. Thanks for the suggestion. I'll give that a try and also look at that site.

I do know that TCP/UDP from the iPad/iSailor does work. I used to have difference multiplexer set up that allowed this bi-directional TCP and got the XTE signals to the Autohelm. So I'm pretty sure the kplex/OP is the issue.



John
Reply
#6
Thanks chaps.

Thanks to your pointers, it got me looking in the right directions and I've solved the issue. I now have the XTE sentances coming back over Wifi/UDP from iSailor to kplex.

For anyone else who stumbles on the thread, the issue was IP Addresses. I was trying to put an IP address in the kplex settings, when this needed to be left blank.

I did the following:

* Set up a UDP Out network on kplex, specifying the IP address of the iPad iSailor is on and unique port (I used 10101);
* Set up a second UDP In network kplex, leaving the IP blank and using a different port (I used 10102);
* On iSailor, set up one new UDP connection, specifying the opposing ports from above. So whatever was OUT on kplex, should be you IN on iSailor, and vice versa;
* Make sure autopilot is configured as a datatype within that connection on iSailor.

With these settings, I get all the NMEA data from me OP sent over wifi to the iPad and then when a track or dodge is set for AP on iSailor, XTE commands are returned.

Thanks again for your help. Hope this helps out someone else if they come across it.



John
Reply
#7
Hi John,

glad you got it sorted. To answer your question in the first email, kplex is the best solution but you can also do multiplexing in opencp. However, the data will then not show up if you use signal k.

Concerning your solution, will the same two channel solution work with TCP? Also why do you need an IP address for kplex out if you are using UDP?

I will try this next time I am down at my boat to avoid using opencpn.

I am not sure how you feel about it but I really like iSailor. The interface is very intuitive and, as I do not cruise long distances, for me the map pricing is ideal. I just have the Irish sea, one off cost and it gets updated.

Chris
Reply
#8
Hi Chris,

Haven’t even ventured in to using OpenCPN to multiplex and didn’t know you could. I don’t know that I’m making any use of Signal K at the moment. However, I’m tempted to give the WilhelmSK app a try soon, which relies on it. This has an AppleWatch companion app which I’m hoping might give me AutoHelm dodge controls on the watch - which is my perfect scenario.

Whilst iSailor offers autohelm controls on its AppleWatch app, it assumes you are using iSailor on your iPhone for waypoints and course following, which I’m generally not. The AppleWatch iSailor app is my only complaint about the package actually. I don’t find it very useful because of this limitation (which my be more Apple’s problem in fairness - with the dependence on the phone).

I agree with you - I think iSailor is exceptional. By far the best iPad navigation app I have used. The interface is excellent and the costs of the packages more than reasonable. I’ve added in tides subscription which i find to be a little off at times, but good enough for a quick look at streams.

I have it running on an iPad Air in a LifeProof case, with a matt screen protector to reduce reflection. I added in an holder design specifically for the lifeproof case which connects to a ram mount behind the helm and it makes a cracking chart plotter. The best thing is I can take it below in the evenings and home and plan routes and have it ready to go when I set off.

I do like OpenCPN and have got some charts for my local area. But I do find it a little slow, at least on my RPi 3. It is useable, but iSailor is snapping in comparison. I like have the redundancy of both.

Regarding your question - I had absolutely no luck with bi-directional TCP. I don’t know why, but I could get a perfectly good OP to iSailor feed working, but as soon as introduced at iSailor to OP connection, it failed to work and took out the other connection as well. I think I tried all scenarios - but no luck.

Can’t say I fully understand why I needed an IP address for the OP - iSailor UDP connection. I did try removing it, but this seemed to cause the connection to fail. Logically it seems like it shouldn’t be needed, but it seemed to be. The IP address was the one for the iPad btw. Leaving the incoming (on OP) IP blank made all the difference for me though to get that to work.

Let me know how you get on!



John
Reply
#9
Hi John,

I have a coaster 33, which has a semi enclosed wheelhouse... fully enclosed with the canvas up. Hence have my ipad 10.5 pro on a mount alongside the old CP, which I need to run as a source of the NMEA data. The plan was to use the Pi as an AP for all my onboard data, including internet when I can get it and like you to have opencpn as a backup.

Unfortunately I am not on the boat for a while so will update you when I next get down there.

Chris
Reply
#10
Hi john,

Did some playing around today following your setup. When setting up the UDP in from iSailor, I noticed the system UDP input in kplex on port 10110, which is standard for onboard NMEA data, I think. So I just set an output in iSailor on this port for autopilot. It works just fine... can’t test the TCP output on the same port to get NMEA into ipad but don’t see why it should not work, it did before.

Chris
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)