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
No NMEA UDP input in openplotter/kplex
#1
I want to make a anchorchain counter, so that I can see how much chain is out.

I have 2 x RPI . One is running openplotter . The other one has a python script. For testing he receives data from my GPS through the usb port and is sending out the same data through a udp socket WiFi.


In openplotter I do not receive any data. Not when I have access point working 10.10.10.1 or when I send to 192.168.178.60. 
When I start Opencpn on the same rpi I get in both cases the data in.

When I connect the gps as a serial input to openplotter, I receive the data and can send it out to another external computer with opencpn.

I tried different setups, but I can not get it working. Who can help.
Reply
#2
(2017-11-21, 04:13 PM)reinM Wrote: I want to make a anchorchain counter, so that I can see how much chain is out.

I have 2 x RPI . One is running openplotter . The other one has a python script. For testing he receives data from my GPS through the usb port and is sending out the same data through a udp socket WiFi.


In openplotter I do not receive any data. Not when I have access point working 10.10.10.1 or when I send to 192.168.178.60. 
When I start Opencpn on the same rpi I get in both cases the data in.

When I connect the gps as a serial input to openplotter, I receive the data and can send it out to another external computer with opencpn.

I tried different setups, but I can not get it working. Who can help.
I suspect your networking is not correct. Please supply more information on the network configurations you've tried (including IP addresses in use...
Reply
#3
I have 3 computers :
Desktop PC 192.168.178.57 Linux Mint installed.
Raspberry 192.168.178.54 Rpi3 met Noobs 2.4.4
Raspberry 192.168.178.52 OpenPlotter sometimes it starts as .60

Sending programma is on 192.168.178.54
Sending to OpenCPN on .57 is ok UDP target IP is … 57 – 10110
OpenPlotter started, Sending to receive programma on .52 is ok, and also to openCPN UDP target IP is … 52 or 60 – 10110 OpenPlotter AP not active. Also OK

In openplotter I have tried :
[udp]
name = anker
direction = in
optional = yes
address = 10.10.10.1 – 0.0.0.0 – 162.168.178. 52 and 60 240 – 255

and more..

Als with ap active no results.

This is the program I use.
As you see I tried with different scripts.

import socket
import time

#UDP_IP = "127.0.0.1"
#UDP_IP = "192.168.178.57"
UDP_IP = "192.168.178.60"
#UDP_IP = "192.168.178.255"
#UDP_IP = "255.255.255.255"
#UDP_IP = "0.0.0.0"
#UDP_IP = "192.168.178.52"
#UDP_IP = "192.168.178.54"
#UDP_IP = "10.10.10.1"
#UDP_PORT = 10120
UDP_PORT = 10110
#UDP_PORT = 53005

MESSAGE = "$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47"
MESSAGE = MESSAGE +'<0x0D>'+'<0x0A>'
print ("UDP target IP:", UDP_IP)
print ("UDP target port:", UDP_PORT)
print ("message:", MESSAGE)

sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
#sock.bind(('',0))
#sock.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
#sock.setsockopt(socket.SOL_SOCKET,socket.SO_BROADCAST, 1)

while 1:
sock.sendto(MESSAGE.encode("ascii"), (UDP_IP, UDP_PORT))
print (MESSAGE.encode("ascii"))
print (MESSAGE)
time.sleep(2)
Reply
#4
(2017-11-27, 04:37 PM)reinM Wrote: In openplotter I have tried :
[udp]
name = anker
direction = in
optional = yes
address = 10.10.10.1  – 0.0.0.0  – 162.168.178. 52 and 60 240 – 255
Perhaps you need to specify a port (in case you are already using the nmea-0183 default of 10110.
so try

Code:
[udp]
name = anker
direction = in
optional = yes
port = 10120

There's no need to specify an address at this point.  You should also ensure that your networking is correct by opening a terminal shell and typing

Code:
ping 192.168.178.60

or whatever the openplotter IP is and checking that you see valid responses with no dropped packets.
I would also consider using static IP addresses rather than DHCP for any receivers ...
Reply
#5
I have it all working now, I think it was a NMEA checksum problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)