Broadcast address
karageur
Posts: 97
Hi everyone!
I'm confused with ip_client_open command.
I need to send a broadcast command to 255.255.255.255 ip address.
If I use ip_client_open(dvIP_UDP_Client.Port, 255.255.255.255, 1186, IP_UDP_2WAY)
I get UNKNOWN HOST: 255.255.255.255
But I need exactly this broadcast address
What's the point please?
I'm confused with ip_client_open command.
I need to send a broadcast command to 255.255.255.255 ip address.
If I use ip_client_open(dvIP_UDP_Client.Port, 255.255.255.255, 1186, IP_UDP_2WAY)
I get UNKNOWN HOST: 255.255.255.255
But I need exactly this broadcast address
What's the point please?
0
Comments
ip_client_open(dvIP_UDP_Client.Port, '255.255.255.255', 1186, IP_UDP_2WAY)
I do not think that "255.255.255.255" is a valid address....
What is your IP address of your controller and subnet mask?
I need to scan the net for devices which only replies on this broadcast udp (255.255.255.255) request.
I have few diag soft on PC that sends this request on exact this address and the equipment answers instantly.
And yes - it's valid address. http://en.m.wikipedia.org/wiki/Broadcast_address
Using 192.168.1.120 / 255.255.255.0 as the address for the master, sending a packet to 192.168.1.255 will broadcast it to the entire 192.168.1.0/24 subnet.
If the subnet is bigger than a /24 choose the correct "last" address for the subnet, our internal AV network here is 10.1.96.0/22 (mask is 255.255.252.0) making 10.1.99.255 the broadcast address for the /22 network regardless of whether the host is on 19.1.96.x, 10.1.97.x, 10.1.98.x or 10.1.99.x
As per the quote above, a packet on a broadcast address cannot be routed, so remember that if the destination device does not reside inside the same subnet it won't see the broadcast regardless of using the global 255.255.255.255 address or the local broadcast of x.x.x.255
192.168.2.255 works ok, thanks!
But there is strage thing:
I used two masters in this task:
1) NI-900 v.3.60.453 - I got error with 255.255.255.255 address
2) NI-3100 v.4.1.430 - I got OK with 255.255.255.255 address
Could it be the firmware limitations ? Any way to upgrade NI-900 to v.4.x with 32 mb ram?