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. Android UDP issues with WIFI connection
Forum Updated to NodeBB v4.3 + New Features

Android UDP issues with WIFI connection

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 575 Views
  • 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.
  • KroMignonK Offline
    KroMignonK Offline
    KroMignon
    wrote on last edited by KroMignon
    #1

    Hi all Android/Qt experts.

    I have a strange issue with QUdpSocket and Android.
    I have create an application which communicates through UDP socket with a device on WLAN.
    My WLAN is a private network without access to the internet.
    All works fine as long as there is no SIM card in my Android device.
    As soon as Android is connected to Internet through the mobile network, no more UDP datagramme are sent to my device.

    There is no broadcast messages, all messages are sent as unicast!

    I use Qt 5.12 and Android 7/11.
    What can I do to solve this issue?
    Is it a Qt or Android issue?

    Can someone give me an explanation or a workaround?

    Thanks in advance for any help.

    It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

    KroMignonK 1 Reply Last reply
    0
    • KroMignonK KroMignon

      Hi all Android/Qt experts.

      I have a strange issue with QUdpSocket and Android.
      I have create an application which communicates through UDP socket with a device on WLAN.
      My WLAN is a private network without access to the internet.
      All works fine as long as there is no SIM card in my Android device.
      As soon as Android is connected to Internet through the mobile network, no more UDP datagramme are sent to my device.

      There is no broadcast messages, all messages are sent as unicast!

      I use Qt 5.12 and Android 7/11.
      What can I do to solve this issue?
      Is it a Qt or Android issue?

      Can someone give me an explanation or a workaround?

      Thanks in advance for any help.

      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on last edited by
      #2

      @KroMignon I'm answering myself in case anyone else faces a similar issue.

      To solve this issue, I had to use ConnectivityManager.bindProcessToNetwork() to force Android to use the network I want to!

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      1 Reply Last reply
      2

      • Login

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