07-20-2016 11:07 PM
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 responce 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.
Solved! Go to Solution.
07-21-2016 05:42 AM
07-21-2016 06:46 AM
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
07-21-2016 07:12 AM
07-21-2016 07:31 AM
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
07-21-2016 08:16 AM
HI Norbert,
Here is wireshark printout:
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.
07-21-2016 08:36 AM
If i read the log excerpt correctly, the UDP datagram targets port 30003. Your listener is on port 30004.
Norbert
07-21-2016 09:31 AM
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?
07-21-2016 09:36 AM
Read the help of UDP Open please, specifically the input terminal "net address".
Norbert
07-21-2016 09:58 AM - edited 07-21-2016 10:02 AM
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 ;))