Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Oct 20, 2017 9:21 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: UDP broadcast DataAvailable does not fire
PostPosted: Mon Dec 31, 2012 5:53 am 
Offline

Joined: Mon Dec 31, 2012 5:40 am
Posts: 2
Using the trial of RealSoftware I am trying to create an application that sends broadcast UDP message to check for available devices on a network.
This works fine as long as devices are in the same range. But somehow the DataAvailable event does not fire for data from other IP ranges.

netIf = System.GetNetworkInterface(cboInterfaces.ListIndex)
UDPSocket1.NetworkInterface = netIf
UDPSocket1.Port = 30718
UDPSocket1.Connect

UDPSocket1.Write(UDPSocket1.BroadcastAddress, DecodeHex("00") + DecodeHex("00") + DecodeHex("00") + DecodeHex("F6"))


DataAvailable event:
data = UDPSocket1.Read()
txtLog.AppendText(data.Address + Chr(13))


Connection directly from my PC to the device:
Sending from 169.254.4.255 to 255.255.255.255
I only receive the echo from 169.254.4.255 in RealSoftware
Wireshark however does show the response from the device: 192.168.5.253 to 169.254.4.255

Tested this with other applications, they do receive the device message in this configuration.


If i put my PC in the network and the device in the same network it works as expected, however I need this application to find unkown devices to be able to give them an IP address.


Please help.. If this works I'll certainly buy the pro version.


Top
 Profile  
Reply with quote  
 Post subject: Re: UDP broadcast DataAvailable does not fire
PostPosted: Mon Dec 31, 2012 6:07 am 
Offline

Joined: Mon Dec 31, 2012 5:40 am
Posts: 2
Think I found the issue. When sending data for the first time the Windows Firewall pops up and I grant access. Only it seems that it also needs access to Public networks (although Windows does not show a message for that).

How can I force a request to the Windows firewall to make sure also messages from other IPs will be received?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group