|Do you know where your variables are?|
Answer to a UDP Broadcast is ignoredby Anonymous Monk
|on Apr 29, 2013 at 09:31 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
i'm pretty new to Perl (in fact i started to learn last Friday...), so please forgive me.
There is a server in my local net (in fact it's a SD Card with a WiFi and webserver where you can download the pics the Camera just stored on the Card).
First of all my programm has to find the card on the network. That should be done by sending a UDP Broadcast from a specific to a specific port. The card Answers with a unicast to my PC telling it's IP Addr.
I'm using the following to send the Broadcast:
And use this to get the answer:
Running Wireshark i see the Broadcast beeing send, and also the unicastanswer from the server. But my programm happily ignores this answer.
If i change the PeerAddr to the actual IP Address of the server and send the UDP datagram via unicast i get the same answer from the server, but my Programm is able the cope with it.
All i can think of is that in broadcast the PeerAddress i'm sending to and the address answering is different, so it is ignored.
I've tried searching the web for the whole weekend, but all i found where people having similar problems. But none could tell them what to do. So does anybody have a idea what i could search for?