From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP open error 54 issue

hi wonder if someone can help me??

 

i am using 2 laptops to send UDP messages once a second from one laptop to the other.

 

the one that sends is on 10.10.12.2 and the one that receives is on 10.10.12.1.

 

i open a UDP on 10.10.12.2 and start sending to 10.10.12.1. this is working fine.

 

what i am doing on the other is opening a UDP on 10.10.12.1 and then doing a UDP read. this has been working fine for weeks.

 

today however i get error 54 on the receiving laptop 10.10.12.1 when i try and open the connection.
 
ethrnet cable is good. connection present on both laptops. and i can ping both ways.
 
im a bit confused.
 
any ideas???
 
many thanks
0 Kudos
Message 1 of 30
(7,100 Views)

Error 54 means the net address is ill-formed.

 

How are you entering the net address? Could it be it is a string control and you have added an extra linefeed at the end by accident? (set the control to "limit to single line" to avoid this!). Typically you don't even need to enter a local net address at all, unless you have multiple interfaces.

0 Kudos
Message 2 of 30
(7,097 Views)

im using a string to ip to generate it.

its unchanged.

 

if i remove it i then get error 60........

0 Kudos
Message 3 of 30
(7,089 Views)

Can you attach your code?

0 Kudos
Message 4 of 30
(7,066 Views)

sure

 

will do it in the morning

 

 

manhy thanks

0 Kudos
Message 5 of 30
(7,049 Views)

its simply this

udp open.png

 

udp open.jpg

 

0 Kudos
Message 6 of 30
(7,013 Views)

First off, UDP is connectionless, so if you only have device A sending and device B receiving messages you need to

 

1) Register a port on device B to receive messages (this is what UDP Open does). If you only have one network adapter you only need to specify the port, otherwise you'll need the network address aswell. Afterwards use the socket to UDP Read incoming packets on the port specified in UDP Open.

2) Send a message from device A using UDP Write to the port specified in (1) and the IP Address of device B. The UDP connection required by UDP Write is the port that is used to send the messages from on device A and can differ from the port used on device B.

 

It seems the port you are using in (1) is already used by something else (Error 60), you can try to find out what is using it, or just use a different one.

0 Kudos
Message 7 of 30
(7,002 Views)

using 5004 at voth ends.

 

makes sense.

i have only one adapter so i will change the port and no ip it.

 

 

will try that tomorrow. many thanks for help so far.

0 Kudos
Message 8 of 30
(6,979 Views)

tried different port numbers still the same.

 

hmm

 

how can i see what ports are in use?

0 Kudos
Message 9 of 30
(6,972 Views)

According to wikipedia 5004 is used for RTP and at least on my windows machine registered to a windows media player process.

On windows the command "netstat -bano" can be used to get a list of the currently registered ports.

0 Kudos
Message 10 of 30
(6,970 Views)