LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP receiver does not receive messages

Solved!
Go to solution

Hello. I have issue with UDP reciever.

I can receive messages from the same port am writing.

Data flow: open vi-->write UDP vi-->read UDP vi.  Transmitter and reciever usinf th esame port.

 

When I am trying to use just read UDP vi to listen for the port, I do not get any data.

Program flow. I use vi to send command over serial port to MCU. MCU responce back by sending data to network port using UDP.

I start vi to listen UDP port (see attached), then I sent command to MCU. I can see the udp receiver.pngresponce on Wireshark but UDP vi does not get anything.

I checked IP address. All lokks the same. IP address of PC and decice is the same as the one when I write and read at the same time. Just different port.

Any help please. 

0 Kudos
Message 1 of 16
(8,725 Views)
Solution
Accepted by topic author Rus_K
Is the port you are trying to use open? For security many IT departments will lock out ports that they don't think are needed, or don't want used.

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 16
(8,701 Views)

Also note that firewalls do differentiate between TCP and UDP. So if the firewall has the port open for TCP, it does not mean that it is automatically open for UDP as well.....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 16
(8,695 Views)
I am using USB network card that directly connected to PC. So I am off company network. And why wireshark sees traffic on this port?
0 Kudos
Message 4 of 16
(8,689 Views)

What exactly are you seeing in Wireshark? Does it protocol an actual transmittion or only the access to the UDP stack?

 

Do you have any error (e.g. timeout) on the error cluster after UDP Read?

 

My assumption:

UDP Read returns as soon as a datagram is received (transferred from receive buffer to LV application). You DO get a datagram, but the content is a short string consisting of binary data. Using that data with ASCII table for string display results in some apparent empty string indicator. However, there are non-displayable symbols in there. So please double check if the string indicator is indeed empty or simply has no ASCII symbols to display the data....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 16
(8,683 Views)

HI Norbert,

Here is wireshark printout:

wireshark print.png

 

I also attached vi.

 

For an error. There is not much  there:

"Error 56 occurred at UDP Read in Simple UDP - Receiver.vi

Possible reason(s):

LabVIEW: The network operation exceeded the user-specified or system time limit."

 

I also tried to listen the port that I can read when I write and read to it, and other ports that MCU uses periodecly to transmit on, but I get nothing.

 

 

 

 

0 Kudos
Message 6 of 16
(8,678 Views)

If i read the log excerpt correctly, the UDP datagram targets port 30003. Your listener is on port 30004.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 16
(8,672 Views)

Soory. I was set to 30003. MCU also transmits every 1s on 30004, so I was tryingto see if I can get anythig from this port.

Iwas not able to get anything.

 

Do I need to set antythig in the net address when I open the UDP port?

I can get data when I ran write and read on local machine (using example)

MCU sends data to the correct IP address. How open UDP vi knows on what ip address (or network  adapter) to open port? 

0 Kudos
Message 8 of 16
(8,667 Views)

Read the help of UDP Open please, specifically the input terminal "net address".

 

Norbert

 

 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 16
(8,661 Views)

the net address should not be needed. Without it, it will simply listen on all interfaces.

Did you try with the firewall disabled? Is that interfeace defined as a public or private network?

 

(...and please spell out acronyms. MCU has many meanings ;))

0 Kudos
Message 10 of 16
(8,651 Views)