Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NMEA server doesn't receive sentences #53

Closed
psj6 opened this issue Mar 27, 2023 · 6 comments
Closed

NMEA server doesn't receive sentences #53

psj6 opened this issue Mar 27, 2023 · 6 comments

Comments

@psj6
Copy link

psj6 commented Mar 27, 2023

Hello, I'm trying to send over UDP on localhost sentences of NMEA, but in the debug point doesn't receive anything.

It stays here giving -1
image

I tried everything, from changing ports, firewall, starting server first or sending later, resending other sentences and nothing.

Also I tried the NMEA simulator 1.5.0 and doesn't work too, so I think it's something that the program has that I don't know.

Maybe it's some problem with the asio?

@psj6
Copy link
Author

psj6 commented Mar 27, 2023

Wireshark receives the packet so I'm sending correctly to 127.0.0.1 in the correct port 10111

image

@psj6
Copy link
Author

psj6 commented Mar 27, 2023

On branch master... maybe it's any issue here?

@antoine0183
Copy link
Contributor

A bit of a shot in the dark here since I can't reproduce the problem on my end, but can you see if #55 fixes your issue?

@psj6
Copy link
Author

psj6 commented Mar 31, 2023

Hello @antoine0183 , thanks for the PR, it doesn't work for me. Have you got any code on Python, Java or another language that I can use to test it out? I tried to use pyenet (https://github.com/piqueserver/pyenet) but I can't make it work.

I can receive data from UDP in my App but I can't send, the debug point nread > 0 doesn't work. Maybe I need to switch on the sender and after start the bridge simulator? I don't know.

@psj6
Copy link
Author

psj6 commented Mar 31, 2023

Maybe it's the bridge simulator getting the port and locking it on localhost? I didn't try over network... Maybe it's an issue of my computer. I dont't know...

@psj6
Copy link
Author

psj6 commented Apr 14, 2023

Hello @antoine0183 , I tried weeks later and it works. It's perfect and it receives the sentences perfectly.

I was trying with pyenet and maybe created some issue with the ports in my PC and didn't try again.

The code that works for me (in debug mode, maybe the sentence it's not correct) is:

import socket, time

ip = '127.0.0.1'
port = 10111

message = "$--RPM,a,odd,50,50.0,A*ff"

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

while True:
    sock.sendto(message.encode('utf-8'), (ip, port))
    print("sent message:", message.encode('utf-8'))
    time.sleep(1)

sock.close()

What's new with your code? Windows can be the issue

@psj6 psj6 closed this as completed Apr 14, 2023
@psj6 psj6 reopened this Apr 14, 2023
@psj6 psj6 closed this as completed Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants