Hi,

I'm trying to broadcast a datagram using QUdpSocket. Now I used example BroadcastSender from QT docs and it doesn't seem to work.

Socket returns "Unable to send a message" problem and datagram is not emited(checked with wireshark). It only occours when I try to broadcast to whole network (using QHostAddress:Broadcast or QHostAddress("255.255.255.255"). When I change first octet (for example on "192.255.255.255") it also works fine.

The deal is, that I want to broadcast message for all addresses assigned to the device, so I wanna use full broadcast.

I tested it only on windows simulator (S60 3rd and 5rd edition).

Here's my code:
Qt Code:
  1. QByteArray datagram = "Broadcast message " + QByteArray::number(messageNo);
  2. udpSocket->writeDatagram(datagram.data(), datagram.size(),
  3. QHostAddress::Broadcast, 1111);
  4. statusLabel->setText(udpSocket->errorString());
  5. ++messageNo;
To copy to clipboard, switch view to plain text mode 

Any ideas, how to solve my problem?