Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 16-06-2018, 17:20   #1
Registered User
 
pendragon's Avatar

Join Date: Aug 2008
Boat: Van de Stadt 38'
Posts: 223
OpenCpn in Linux not receiving WIFI data

I set up an AIS transponder to transmit the received AIS data via an NMEA to WIFI bridge to a laptop in the cockpit.
This system works great for Windows 7 & 10 64 bit. It shows all the data in opencpn on screen eg : AIS targets, GPS position etc.. It is set up via Network UDP 192.186.x.x port 10110 (No filters)
The NMEA debug window shows the incoming data also , So this works great.
Now the problem:
Recently I set up as dual boot WIn 10 pro with linux Debian 9.
I set up Opencpn in Debian --> All working fine showing CM93 charts etc.
The setup again is via Network 192.168.x.x :10110 UDP No filters (identical as what I have in windows)
I confirmed that Debian is receiving the WIFI data via Firefox 192.168.x.x, all data are incoming (same as Windows)
The OpenCpn NMEA debug window is not showing any data, no AIS targets showing and no GPS position, iow Opencpn is not receiving any WIFi data.
Can anyone please help?
pendragon is offline   Reply With Quote
Old 16-06-2018, 22:57   #2
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: OpenCpn in Linux not receiving WIFI data

pendragon..
In OCPN connections: Try to omit the IP address so that O use the default 0.0.0.0
Hakan is offline   Reply With Quote
Old 17-06-2018, 00:27   #3
Registered User
 
pendragon's Avatar

Join Date: Aug 2008
Boat: Van de Stadt 38'
Posts: 223
Re: OpenCpn in Linux not receiving WIFI data

I tried UDP 0.0.0.0 port 10110 --> does not work
UDP 0.0.0.0 on deleting ports, it defaults to port 2947--> does not work either.
pendragon is offline   Reply With Quote
Old 17-06-2018, 00:51   #4
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,105
Re: OpenCpn in Linux not receiving WIFI data

Quote:
Originally Posted by pendragon View Post
I set up an AIS transponder to transmit the received AIS data via an NMEA to WIFI bridge to a laptop in the cockpit.
This system works great for Windows 7 & 10 64 bit. It shows all the data in opencpn on screen eg : AIS targets, GPS position etc.. It is set up via Network UDP 192.186.x.x port 10110 (No filters)
The NMEA debug window shows the incoming data also , So this works great.
Now the problem:
Recently I set up as dual boot WIn 10 pro with linux Debian 9.
I set up Opencpn in Debian --> All working fine showing CM93 charts etc.
The setup again is via Network 192.168.x.x :10110 UDP No filters (identical as what I have in windows)
I confirmed that Debian is receiving the WIFI data via Firefox 192.168.x.x, all data are incoming (same as Windows)
The OpenCpn NMEA debug window is not showing any data, no AIS targets showing and no GPS position, iow Opencpn is not receiving any WIFi data.
Can anyone please help?

are you allowed the receive the data ?


try:


sudo usermod -a -G dialout (user)
verkerkbr is offline   Reply With Quote
Old 17-06-2018, 01:04   #5
Registered User
 
pendragon's Avatar

Join Date: Aug 2008
Boat: Van de Stadt 38'
Posts: 223
Re: OpenCpn in Linux not receiving WIFI data

there is no restriction on receiving AIS data, It's the same as receiving radio- TV broadcast. On the other hand Broadcasting AIS data is NOT allowed without a registered transponder.
To your suggestion:
1) I cannot enter this in the same Terminal window as "sudo opencpn "
2)In a second Terminal window I get a lot of Options.
So, I don't know what you mean or how to proceed
pendragon is offline   Reply With Quote
Old 17-06-2018, 02:19   #6
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,740
Re: OpenCpn in Linux not receiving WIFI data

Verkerkbr is not talking about the radio signal.

You need to establish that the OpenCPN application (or the user who runs it) has the required permissions to receive from the network.

That's what the command he suggest shall reveal. You have to replace (user) by your real correct user who is running the application. user without brackets.

sudo adduser (theUser) dialout
would be an alternative ..
bcn is offline   Reply With Quote
Old 17-06-2018, 02:41   #7
Registered User
 
pendragon's Avatar

Join Date: Aug 2008
Boat: Van de Stadt 38'
Posts: 223
Re: OpenCpn in Linux not receiving WIFI data

Misunderstood --> been using windows for too long I guess. am new to Debian.
Ok, the result is:
Adding user adrian to group dialout
Done.
Than I started OpenCpn , but still no AIS data showing
pendragon is offline   Reply With Quote
Old 17-06-2018, 04:39   #8
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 719
Re: OpenCpn in Linux not receiving WIFI data

Is your pc on the same network as the router ?


Try
Code:
ip addr show

What is the output ?
What is the ipaddress of your router ??


Quote:
Originally Posted by pendragon View Post
Misunderstood --> been using windows for too long I guess. am new to Debian.
Ok, the result is:
Adding user adrian to group dialout
Done.
Than I started OpenCpn , but still no AIS data showing
petter5 is offline   Reply With Quote
Old 17-06-2018, 05:01   #9
Registered User
 
pendragon's Avatar

Join Date: Aug 2008
Boat: Van de Stadt 38'
Posts: 223
Re: OpenCpn in Linux not receiving WIFI data

I presume you could call it a router.
It is a NMEA to WIFI bridge, anyway both openCpn and the wifi bridge are set on the the same IP address 192.168.4.1 UDP port 10110
I also have a actual router for internet over wifi and wired connection, but it is currently being used via USB hard wired


The output of ip addr show is :


adrian@debian:~$ sudo ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether e8:e0:b7:7c:bf:5d brd ff:ff:ff:ff:ff:ff
inet 192.168.2.200/24 brd 192.168.2.255 scope global dynamic enp0s25
valid_lft 85597sec preferred_lft 85597sec
inet6 fe80::eae0:b7ff:fe7c:bf5d/64 scope link
valid_lft forever preferred_lft forever
3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:db:df:0a:ea:88 brd ff:ff:ff:ff:ff:ff
inet 192.168.4.2/24 brd 192.168.4.255 scope global dynamic wlp4s0
valid_lft 6323sec preferred_lft 6323sec
inet6 fe80::af03:70c0:1a9c:9822/64 scope link
valid_lft forever preferred_lft forever
4: wwp0s26u1u6i6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 02:80:37:ec:02:00 brd ff:ff:ff:ff:ff:ff
pendragon is offline   Reply With Quote
Old 17-06-2018, 05:03   #10
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 719
Re: OpenCpn in Linux not receiving WIFI data

Try
Code:
ping 192.168.4.1
Any reply ??


In opencpn try to set to 0.0.0.0 10110


Quote:
Originally Posted by pendragon View Post
I presume you could call it a router.
It is a NMEA to WIFI bridge, anyway both openCpn and the wifi bridge are set on the the same IP address 192.168.4.1 UDP port 10110
I also have a actual router for internet over wifi and wired connection, but it is currently being used via USB hard wired


The output of ip addr show is :


adrian@debian:~$ sudo ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether e8:e0:b7:7c:bf:5d brd ff:ff:ff:ff:ff:ff
inet 192.168.2.200/24 brd 192.168.2.255 scope global dynamic enp0s25
valid_lft 85597sec preferred_lft 85597sec
inet6 fe80::eae0:b7ff:fe7c:bf5d/64 scope link
valid_lft forever preferred_lft forever
3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:db:df:0a:ea:88 brd ff:ff:ff:ff:ff:ff
inet 192.168.4.2/24 brd 192.168.4.255 scope global dynamic wlp4s0
valid_lft 6323sec preferred_lft 6323sec
inet6 fe80::af03:70c0:1a9c:9822/64 scope link
valid_lft forever preferred_lft forever
4: wwp0s26u1u6i6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 02:80:37:ec:02:00 brd ff:ff:ff:ff:ff:ff
petter5 is offline   Reply With Quote
Old 17-06-2018, 05:11   #11
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: OpenCpn in Linux not receiving WIFI data

The best way to distribute NMEA data via IP is to transmit to the broadcast IP (192.168.X.255). Then all devices on the same subnet can receive it. If you put an address like 192.168.X.10 as the UDP destination in the sender then it will only send to one device. Use 255 as the last number and data goes to all devices.

On the OpenCPN side set the UDP receive address to 0.0.0.0. Make sure the sending and receiving port numbers are the same. I use 10100 for both sender and receiver because it can’t be confused for a “preassigned” port.
transmitterdan is offline   Reply With Quote
Old 17-06-2018, 05:30   #12
Registered User
 
pendragon's Avatar

Join Date: Aug 2008
Boat: Van de Stadt 38'
Posts: 223
Re: OpenCpn in Linux not receiving WIFI data

adrian@debian:~$ ping 192.168.4.1
PING 192.168.4.1 (192.168.4.1) 56(84) bytes of data.
64 bytes from 192.168.4.1: icmp_seq=1 ttl=128 time=1.18 ms
64 bytes from 192.168.4.1: icmp_seq=2 ttl=128 time=4.14 ms
64 bytes from 192.168.4.1: icmp_seq=3 ttl=128 time=2.83 ms
64 bytes from 192.168.4.1: icmp_seq=4 ttl=128 time=1.75 ms
64 bytes from 192.168.4.1: icmp_seq=5 ttl=128 time=2.23 ms
pendragon is offline   Reply With Quote
Old 17-06-2018, 17:49   #13
Registered User
 
pendragon's Avatar

Join Date: Aug 2008
Boat: Van de Stadt 38'
Posts: 223
Re: OpenCpn in Linux not receiving WIFI data

Quote:
Originally Posted by transmitterdan View Post
The best way to distribute NMEA data via IP is to transmit to the broadcast IP (192.168.X.255). Then all devices on the same subnet can receive it. If you put an address like 192.168.X.10 as the UDP destination in the sender then it will only send to one device. Use 255 as the last number and data goes to all devices.

On the OpenCPN side set the UDP receive address to 0.0.0.0. Make sure the sending and receiving port numbers are the same. I use 10100 for both sender and receiver because it can’t be confused for a “preassigned” port.
I tried:
0.0.0.0 --- 0.0.0.0 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5125ms
rtt min/avg/max/mdev = 0.056/0.081/0.090/0.015 ms

and
--- 192.168.4.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 1.962/11.806/27.746/11.897 ms


Both Ip addresses seem OK, but no data on screen

Attached part screenshot (slightly edited for security reasons) of receiving AIS data, yet nothing shows in Cpn
pendragon is offline   Reply With Quote
Old 17-06-2018, 18:09   #14
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: OpenCpn in Linux not receiving WIFI data

Quote:
Originally Posted by pendragon View Post
I tried:
0.0.0.0 --- 0.0.0.0 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5125ms
rtt min/avg/max/mdev = 0.056/0.081/0.090/0.015 ms

and
--- 192.168.4.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 1.962/11.806/27.746/11.897 ms


Both Ip addresses seem OK, but no data on screen

Attached part screenshot (slightly edited for security reasons) of receiving AIS data, yet nothing shows in Cpn
Pinging stuff like broadcast addresses (the ones ending in .255) or listen all addresses (0.0.0.0), makes absolutely no sense.

UDP, which is what you seem to be trying to use is a stateless broadcast protocol, try to understand that it works the other way around than what you probably think - on the node that produces the data, you define the target audience to which it sends the data and on the clients you define that they are part of that audience, so there is not a "server" you might test by pinging it.

Pavel
nohal is offline   Reply With Quote
Old 17-06-2018, 18:34   #15
Registered User
 
pendragon's Avatar

Join Date: Aug 2008
Boat: Van de Stadt 38'
Posts: 223
Re: OpenCpn in Linux not receiving WIFI data

Quote:
Originally Posted by nohal View Post
Pinging stuff like broadcast addresses (the ones ending in .255) or listen all addresses (0.0.0.0), makes absolutely no sense.

UDP, which is what you seem to be trying to use is a stateless broadcast protocol, try to understand that it works the other way around than what you probably think - on the node that produces the data, you define the target audience to which it sends the data and on the clients you define that they are part of that audience, so there is not a "server" you might test by pinging it.

Pavel
Ok thanks--> this was suggested before.
The UDP protocol is the only choice in this NMEA to wifi bridge,
My initial question is: How do I get DEBIAN openCpn to receive the data? In windows it work perfectly, using the same identical settings ( see my previous messages)
pendragon is offline   Reply With Quote
Reply

Tags
enc, linux, opencpn, wifi


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opencpn crashes when receiving WIMDA nmea sentence, conachair OpenCPN 25 03-10-2017 03:18
OpenCPN, Linux, Web site opencpn.org, user manual and manual wiki ... Gilletarom OpenCPN 26 30-11-2015 15:17
Receiving weather data at sea Swiss sailor Navigation 10 22-03-2014 07:08
Inmarsat - Receiving Data and Plan Costs dennisail Marine Electronics 44 02-06-2012 03:52

Advertise Here


All times are GMT -7. The time now is 15:28.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.