Multicast to directly connected WIFI device

I have a WIFI device, that I am experimenting with. From my macbook I can make a direct connection to the device over wifi. After I have WIFI connection I should be able to communicate with the device over multicast. However, as soon as I try to send a datagram packet to the camera when I am connected I get some IOException: Can't assign requested address 

I reviewed some networking settings and found out that Multicast is enabled for my laptop, also I added the multicast address that is used ( to the routing table. (Read this somewhere) Still no luck...

Why do I get this exception from my application?

Here is the code I use to connect:

DatagramSocket socket = null;
DatagramPacket packet = null;
try {
    socket = new DatagramSocket();
    InetSocketAddress iAddress = new InetSocketAddress("", 1900);
    packet = new DatagramPacket(sendData, sendData.length,iAddress);

I think it has something to do with my network / setup. When I reconnect to my wireless acces point, my app doesn't give this exception and I can see the package in my console:

MacBook-Pro-van-Roy:~ Roy$ sudo tcpdump -ni en1 host
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on en1, link-type EN10MB (Ethernet), capture size 65535 bytes
19:54:18.688367 IP > UDP, length 129
19:54:18.789447 IP > UDP, length 129
19:54:18.890506 IP > UDP, length 129


InetSocketAddress is not a InetAddress (it's a SocketAddress). You probably want something like this:

InetAddress addr = InetAddress.getByName("");
packet = new DatagramPacket(sendData, sendData.length, addr, 1900);

Need Your Help

How to display correctly Treeview with QML Qt 5.5

qt treeview qml qt5.5

I'm trying to create a correct Treeview with Qml Qt 5.5.

Does restricting the frames/s of a game engine (via vertical sync or common throttling), inflict latencies also on audio and input subsystems?


I was contemplating the fact that inflicting frame per second restrictions is not ideal in regards to latency and performance since a monitor still has a chance to show something sooner (assuming no