Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-64233

UDP broadcast packets not received on Android 8.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.7.1, 5.9.2, 5.10.0
    • Network
    • None
    • Android 8.0 Oreo, Google pixel 2

    Description

      On an Android 8.0 (Oreo) device (Google Pixel 2), QUdpSocket failes to receive any broadcast packets.

      Binding to port is successfull however and no errors show up in logcat.

      Code is working as it should on all other tested Android devices.

      Tested different UDP sources (our own, and Dropbox lan discovery). Tested on ports 17500 and 35353.

      When testing on the same device but different version of an app (Not build with Qt but same UDP port), UDP discovery does work.

       

      UDPBroadcastScanner::UDPBroadcastScanner(QObject *parent) :
          QObject(parent)
      {
      
      }
      
      void UDPBroadcastScanner::startScanning() {
          qDebug() << "UDPBroadcastScanner::startScanning()";
          qUDPSocket = new QUdpSocket(this);
          bool bindSuccessfull = qUDPSocket->bind(QHostAddress::Any, 35353);
          if (bindSuccessfull) {
              qDebug() << "Successfully bound to port";
              connect(qUDPSocket, SIGNAL(readyRead()), this, SLOT(readyReadDatagram()));
          } else {
              qDebug() << "ERROR: Failed to bind to port";
          }
      
      }
      
      void UDPBroadcastScanner::readyReadDatagram() {
          qDebug() << "readyReadDatagram" ;
      }
      
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              tpochep Timur Pocheptsov
              wouter Wouter de Lange
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes