LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP Read from External Device

Solved!
Go to solution

I'm trying to read UDP Packets that are sent by an ADS-B Receiver over the network.

The IP of the ADS-B Receiver is 192.168.64.118 and the UDP Packets are sent on Port 30003.

When I read it in Putty the Data comes in fine.

 

My solution was this:

2018-03-21 08_44_39-Clipboard.png

 

 

 

 

 

 

 

There must be some mixup with the IP-Adresses because it does not seem to work as I intended.

0 Kudos
Message 1 of 10
(8,240 Views)

You only need to specify the port. Ethernet address input is intended to be an IP in your computer: it's only useful when your computer has more than one network cards, to specify which one of them will receive the packet. Don't specify a service name either, it's useless in this context.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 10
(8,227 Views)

Hi Slaxx,

 

did you read about UDP-Open in the LabVIEW help?

They explain the input "network address" quite well: here you specify the network port of your local computer!

 

Leave this input free to listen on all ports and you will receive all UDP messages sent to port 30003…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 10
(8,223 Views)

Yes I did that as well and leaving away the IP Adress does not work either. It does not show any data at all.

Does it maybe have something to do that I have to select Telnet in Putty in order to see something?

0 Kudos
Message 4 of 10
(8,219 Views)

Hi Slaxx,

 

It does not show any data at all.

Do you get any error?

 

I have to select Telnet in Putty in order to see something?

What does the manual of your "external device" say about this topic?

How do they describe the communication protocol?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(8,214 Views)

With the highlight function I see that it just stays at the read block and does not go further until eventually when the timeout happens.

 

Well the manual is kind of not so good:

Port 30003 Service (TCP, UDP, and USB-serial)

Port 30003 style output (e.g., for use with SBS Plotter) can be provided without the need of an additional application on your PC.

The Radarcape provides this data stream on TCP port 30003, UDP port 30003, and the serial USB interface.

 

The same goes for other ports where I can't see anything in Labview either but always something in Putty.

0 Kudos
Message 6 of 10
(8,204 Views)

I am not sure about the actual issue/root cause , but in one of my earlier project to get data from UDP we need a handshaking mechanism which means we want to send dummy data to port to receive actual data.

 

Someone can comment on this regard

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 10
(8,200 Views)
Solution
Accepted by topic author Slaxx

So you set Connection type as Telnet and change Port to 30003 in PUTTY?

A Telnet session is TCP based. So I guess you should use TCP instead od UDP. In this case, the remote device address should be specified.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 8 of 10
(8,199 Views)

That was it. I had to use TCP and then it worked.

Seems like the guy who wrote the Manual didn't know either ;).

 

Thanks for your help guys.

0 Kudos
Message 9 of 10
(8,169 Views)

There may be a way to enable UDP communication. But given the very poor documentation, it's hard to say how.

The manual talks about a "data stream"; this seems indicating that we don't need to send special commands to get the data.

When UDP is involved, packets can be either broadcasted or sent to a specific IP address. In the first case, you would easily have received them.

In the second case, we need a way to set the target IP address somehow.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 10 of 10
(8,163 Views)