2017-11-27, 04:37 PM
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)
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)