Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 30-05-2013, 20:11   #1
Registered User

Join Date: Dec 2007
Posts: 151
OpenCPN 3.2.2 Mac Wont Repeat on TCP

Hi all,

Trying to use OpenCPN to put my NMEA stream(s) onto TCP to use with iOnboard app and other instruments. I've hit a roadblock. Here is my config.

I have 3 network connections as follows:
(1) Incoming NMEA at 4800 for all NMEA data coming from my SeaTalk/NMEA junction
(2) Incoming NMEA at 38400 for AIS from the ICOM receive only box directly.
(3) Outgoing TCP stream on the IP address of the machine.

I get this in my NMEA stream window:



On UDP it seems to be blue for transmitting...but I cannot use that. What steps can I use to diagnose what is going on here?

Thanks!
__________________

__________________
night0wl is offline   Reply With Quote
Old 30-05-2013, 20:47   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

nightOwl...
Once you connect to that port with a client, it should turn blue. UDP protocol in contrary does not care about the client and just broadcasts. You should be able to test it even on Mac using telnet as on the attached screenshot.

Pavel
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2013-05-30 21:43:51.png
Views:	163
Size:	291.7 KB
ID:	61590  
__________________

__________________
nohal is offline   Reply With Quote
Old 30-05-2013, 21:44   #3
Registered User

Join Date: Dec 2007
Posts: 151
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

Quote:
Originally Posted by nohal View Post
nightOwl...
Once you connect to that port with a client, it should turn blue. UDP protocol in contrary does not care about the client and just broadcasts. You should be able to test it even on Mac using telnet as on the attached screenshot.

Pavel

So..a couple of things.

1) Is telnet the only client that can access. Snow Leopard seems to disable remote telnet access and its near impossible to reenable it seems.

2) Would blocking of telnet prevent other remote apps to connect to this stream? I cannot get OpenCPN installed on a different Mac to pick up the TCP stream either.
__________________
night0wl is offline   Reply With Quote
Old 30-05-2013, 22:02   #4
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

Ok, let's make a couple things about this networking stuff clear first...
ad 1) What SL probably disabled is a telnet server it maybe contains, which if it was running at all, would be listening on TCP port 23 - good thing, but completely unrelated to what we do here.
ad 2) No, it has nothing to do with our use of port 10110. BUT maybe Mac blocks access to all ports by default - I have no idea as I never used one.

What I did is I used a telnet client (as it was the first program able to open a TCP port and show what it gets from it that came to my mind and there's high chance it's available on OS X) to connect to opencpn running as a server on port 10110 on the same machine.
But to simulate your case I used it's real network interface address so in fact it was the same as if I did it from a different machine (in case the access would not be blocked by a firewall of course).

Pavel
__________________
nohal is offline   Reply With Quote
Old 30-05-2013, 22:38   #5
Registered User

Join Date: Dec 2007
Posts: 151
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

Quote:
Originally Posted by nohal View Post
Ok, let's make a couple things about this networking stuff clear first...
ad 1) What SL probably disabled is a telnet server it maybe contains, which if it was running at all, would be listening on TCP port 23 - good thing, but completely unrelated to what we do here.
ad 2) No, it has nothing to do with our use of port 10110. BUT maybe Mac blocks access to all ports by default - I have no idea as I never used one.

What I did is I used a telnet client (as it was the first program able to open a TCP port and show what it gets from it that came to my mind and there's high chance it's available on OS X) to connect to opencpn running as a server on port 10110 on the same machine.
But to simulate your case I used it's real network interface address so in fact it was the same as if I did it from a different machine (in case the access would not be blocked by a firewall of course).

Pavel
Pavel -

Ok, I did understand you properly, but I'm taking a very elementary approach here just to make sure I get it right. Please see the following screen shots. Despite enabling telnet in launchctl, I still get connections refused. Thank you for your assistance.

First, this is my configuration:


This is my attempts to launch terminal locally from the macbook acting as the repeater:



Last, this is my attempts to terminal in from a remote macbook:


Again, thank you for your help. I'm flumoxed. I've checked my router to make sure no filtering is happening. I've enabled telnet in launchctl so you'll noticed that remote connections are being made WHEN I dont include the port for OpenCPN TCP.

My next step is to flip this around and see if this all works on my Mountain Lion Macbook vs my Snow Leopard Macbook. But thats going to have to wait till the weekend as its already past midnight here and itll look weird making trips back/forth/back/forth to the boat even if its in my back yard.
__________________
night0wl is offline   Reply With Quote
Old 31-05-2013, 09:02   #6
Registered User

Join Date: Dec 2007
Posts: 151
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

Quote:
Originally Posted by night0wl View Post

My next step is to flip this around and see if this all works on my Mountain Lion Macbook vs my Snow Leopard Macbook. But thats going to have to wait till the weekend as its already past midnight here and itll look weird making trips back/forth/back/forth to the boat even if its in my back yard.
Ok, tried it the reverse setup...doesn't work either. What gives?!?!
__________________
night0wl is offline   Reply With Quote
Old 31-05-2013, 10:49   #7
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

nightOwl...
Waht comes to mind:
Are you really sure that the OS X firewall is not simply blocking the incoming connections?
When you test with telnet to localhost, you also have to set up OpenCPN to use localhost, not 192.168.0.11 (are you really sure about this address, BTW) and when configuring it, don't forget the Apply button
__________________
nohal is offline   Reply With Quote
Old 31-05-2013, 12:26   #8
Registered User

Join Date: Dec 2007
Posts: 151
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

Pavel -

Thanks again for helping me out here. I'm pretty sure OS X firewall is turned *off*. See this shot:



I'm fairly sure about the address. It was the result of an "ifconfig | grep 192." command (my DSL Modem router gives 192 addresses...it is a Netgear N300).

As for testing localhost connection with Telnet, that was to validate that the telnet daemon was turned *ON* be placing entry into launchctl. Weird stuff. After placing the entry for telnet in launchctl, i'm able to telnet to the standard port (22)...but never to 10110.
__________________
night0wl is offline   Reply With Quote
Old 01-06-2013, 16:55   #9
Registered User

Join Date: Oct 2012
Location: Brighton, UK
Boat: Westerly Oceanlord
Posts: 374
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

Use 0.0.0.0 as the address if you want to create a server. I don't have the source with me to check but IIRC opencpn doesn't do anything clever like checking if a given address is local and if it is binding to that address rather than connecting to it
__________________
muttnik is offline   Reply With Quote
Old 01-06-2013, 18:17   #10
Registered User

Join Date: Oct 2012
Location: Brighton, UK
Boat: Westerly Oceanlord
Posts: 374
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

Quote:
Originally Posted by muttnik View Post
IIRC opencpn doesn't do anything clever like checking if a given address is local and if it is binding to that address rather than connecting to it
I'm talking nonsense. The output button toggles server vs. Client. Might be worth trying 0.0.0.0 anyway. And try using netstat to see if anything is listening on 10110
__________________
muttnik is offline   Reply With Quote
Old 01-06-2013, 23:17   #11
Registered User

Join Date: Dec 2007
Posts: 151
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

Ok, I ran some network tests using OS X Network Utility. It appears as though OpenCPN is *NOT* opening the port, despite it saying that it is. Please see the following screenshots:

Simple scan of the whole computer...notice Telnet port is turned off (I *UNLOADED* it from launchctl from my earlier test)




Now notice how I scanned a much more defined range where the port for 10110 should have triggered an open port report.



At this point, I feel there is a bug in OpenCPN for Mac in 3.2.2 Can anyone else repro?
__________________
night0wl is offline   Reply With Quote
Old 01-06-2013, 23:58   #12
Registered User

Join Date: Dec 2007
Posts: 151
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

My next step is to install OpenCPN in my Parallels Windows 7 VM and see if it runs there. If it does, then there is something screwy at router/network layer. Stand by...
__________________
night0wl is offline   Reply With Quote
Old 02-06-2013, 00:19   #13
Registered User

Join Date: Dec 2007
Posts: 151
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

I think there is *DEFINITELY* a bug.

So on the same laptop, I started up Parallels (the way I used to run OpenCPN). I configured OpenCPN the same as my macbook but in the Win7 VM. My home router assigned the VM 192.168.0.12 as the IP. See the following....I have OpenCPN running natively on my mac picking up NMEA data (multiplexed...nice!!) from the VM which is running Windows version of OpenCPN 3.2.2

This shows the VM running OpenCPN 3.2.2 successfully as a TCP server


Notice my native install of OpenCPN is able to connect to VM for NMEA data. It even multiplexes the AIS
__________________
night0wl is offline   Reply With Quote
Old 02-06-2013, 02:05   #14
Registered User

Join Date: Dec 2007
Posts: 151
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

I was even able to run 3 TCP servers on the VM (on ports 10110, 10111, 10113) in order to have opencpn on mac, iAIS on ipad, and iOnboard on android phone all display instrumentation. Gosh, this is KILLER.

I just need it to work native on the mac to save on the battery juice. Parallels running on this macbook *HOGS* up amps.

Can someone please look into this bug soon!!
__________________
night0wl is offline   Reply With Quote
Old 04-06-2013, 15:07   #15
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: OpenCPN 3.2.2 Mac Wont Repeat on TCP

night0wl...

Something a bit odd on Mac, alright.

I find that TCP output works if you set the connection address to
0.0.0.0 (which is the same as "AnyAddress" in netspeak).

For some reason the Mac network stack will not bind (i.e. open) a server if the port is set to the physical port of the server itself. But linux seems to be able to do this.

This makes a little bit of sense; in OCPN, if the TCP connection is set as output, then O acts as a server. So he should be listening for connecitons from "anything on the specified port, e.g.10110", so to speak.

Any networking gurus are welcome to chime in with insight here. My understanding of TCP/IP is vague, especially when it doesn't work...

Anyway, please try this (0.0.0.0) and report back. If it works, I will make some adjustments to the OCPN TCP network code.

Thanks
Dave
__________________

__________________
bdbcat is offline   Reply With Quote
Reply

Tags
opencpn

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 03:46.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.