Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Resolved]Broadcast problem in embedded system
Forum Updated to NodeBB v4.3 + New Features

[Resolved]Broadcast problem in embedded system

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 740 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Ivan1120
    wrote on last edited by
    #1

    Hi guys:
    I wrote a program that will send boradcast packet through QUdpsocket. I transfer this program to my board(Beagleboneblack) and run it. I found if I used this code like following:
    @cQUdpSocket->writeDatagram(info,info.length,QHostAddress::Broadcast,30000)@

    i would get the error message "Unable to send a message"
    If i use this code like following, everything is OK.
    @cQUdpSocket->writeDatagram(info,info.length,QHostAddress(169.254.255.255),30000)@

    Does anyone know why???

    P.S. If i run the same program on the linux PC, above two cases are all could work.

    1 Reply Last reply
    0
    • I Offline
      I Offline
      Ivan1120
      wrote on last edited by
      #2

      Hi guys:
      I add a code and everything is ok. Hope this can help other people. But i still don't know why this can work.
      @system("ip route add 255.255.255.255 dev eth0");@

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved