KarstenDallmeyer Posted December 5, 2008 Report Share Posted December 5, 2008 I just discovered an intresting bug. When I use the "String To IP" function in LabVIEW 8.5.1 on a Windows PC the functions works fine for all tested IPs. On a LabVIEW RT desctop target the function works almost fine unless you try the IP 255.255.255.255 for UDP broadcast messages. Windows: 255.255.255.255 >> String To IP >> 0xFFFFFFFF this result is correct! LabVIEW RT 8.5: 255.255.255.255 >> String To IP >> 0x00000000 THAT IS ABSOLUTELY WRONG!!! LabVIEW RT 8.5.1: 255.255.255.255 >> String To IP >> 0x00000000 THAT IS ABSOLUTELY WRONG!!! So you have to work with a workaround when you whant to send an UDP broadcast message via LabVIEW RT 8.5.x Greetz ... Karsten Quote Link to comment
Yair Posted December 5, 2008 Report Share Posted December 5, 2008 I haven't really used UDP and I'm not in front of LabVIEW at the moment. Why would you need to translate 255.255.255.255 to a network address? Doesn't the broadcast primitive accept a string as the target? In any case, if you think this is a bug, you should report it to NI. Quote Link to comment
NathanK Posted December 5, 2008 Report Share Posted December 5, 2008 This issue is now being tracked by NI as bug #135766. Thanks, Nathan Quote Link to comment
KarstenDallmeyer Posted December 6, 2008 Author Report Share Posted December 6, 2008 You can use a broadcast UDP Message to search network devices when you don't know their IPs. When you send an UDP message to IP 255.255.255.255 via a defined port all devices in your subnet receive that message. If the clients listen on the sepecified UDP port they receive your call and can react on it. Now you can start a communication whith the devices via IP. An UDP call on 255.255.255.255 is similar to a "Is anybody their?" message. For example. The UDP Write VI in LabVIEW 8.5 expects the IP as an U32 not as a sting. For this conversion you use the String To IP function in LabVIEW. And this function works different on Windows and RT. Quote Link to comment
Yair Posted December 7, 2008 Report Share Posted December 7, 2008 QUOTE (KarstenDallmeyer @ Dec 5 2008, 12:34 PM) The UDP Write VI in LabVIEW 8.5 expects the IP as an U32. Which was what I wasn't sure about. As I said, it's been a while since I used the UDP VIs and I was sure that at least some of them do accept the IP address, just like the TCP primitives. Quote Link to comment
Mark Yedinak Posted February 26, 2009 Report Share Posted February 26, 2009 Just for clarity sake 255.255.255.255 is the IP broadcast address. It is not unique or special to UDP only. It is the broadcast address for all IP protocols which UDP is one of many. Quote Link to comment
Rolf Kalbermatter Posted March 24, 2009 Report Share Posted March 24, 2009 QUOTE (KarstenDallmeyer @ Dec 5 2008, 06:34 AM) You can use a broadcast UDP Message to search network devices when you don't know their IPs.When you send an UDP message to IP 255.255.255.255 via a defined port all devices in your subnet receive that message. If the clients listen on the sepecified UDP port they receive your call and can react on it. Now you can start a communication whith the devices via IP. An UDP call on 255.255.255.255 is similar to a "Is anybody their?" message. For example. The UDP Write VI in LabVIEW 8.5 expects the IP as an U32 not as a sting. For this conversion you use the String To IP function in LabVIEW. And this function works different on Windows and RT. If you know you want to use the broadcast address you can also just simply plop a U32 constant and type in as large a value as you like with at least 11 digits. LabVIEW will truncate it to the max for an U32 which is 2^32 - 1 = 4294967295 = 0xFFFFFFFF which incidentally is the U32 value of the IP adress 255.255.255.255. So while the String to IP seems to have indeed technically a bug I never would have noticed since I do not go through the turnabout way of using String To IP to pass the broadcast UDP address to the UDP Write node. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.