PDA

View Full Version : find connected network devices



Remco
3rd September 2010, 16:00
Is there a way to get a list of all devices that are connected to the network. I've a ip camera connected and i need to find it without knowing the ip adress. The camera does support upnp. Is that a way to reconize the camera?

squidge
3rd September 2010, 18:07
You could use a RARP request to broadcast the MAC address of the camera, and then you will get the IP address.

If the MAC address could change (ie, multiple cameras), then you need to find a broadcast packet that the cameras will respond to (eg. you broadcast to 192.168.255.255 and the camera responds to you with an "I'm here!" packet which of course includes it's IP address).

The later is typically how it's normally done.

Remco
6th September 2010, 14:20
Thanks for your reply.
It's not possible to change the mac address of the camera. How can i broadcast a message and ask all devices to return their ip address if the mac address is equal to 00:14:5C:84:xx:xx? What Qt modules do i need to use?

squidge
6th September 2010, 18:47
You'll need to use RARP (Reverse ARP) and zero Qt modules support it as it's considered low level networking. You'll have to write OS-specific code for each OS you wish to support.

Or ask the manufacturer of the camera if there is a broadcast message that the camera will respond to. If the camera comes with example software, it'll typically use this kind of method to identify the camera on your network. This you can do with Qt. If you have the example software which works in this way, you can snoop the communications and see how it works.

Remco
9th September 2010, 09:03
It worked. The manufactor of the camera told me to send a broadcast message on port 13364. The camera will send a response.
Thanks