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. Qt Bluetooth on iOS and Android
Forum Updated to NodeBB v4.3 + New Features

Qt Bluetooth on iOS and Android

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 2 Posters 1.3k 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.
  • R Offline
    R Offline
    Raad
    wrote on 25 Mar 2020, 08:41 last edited by
    #1

    I'm developing a cross-platform app which requires Bluetooth connection (sending and receiving data) on both Android and iOS. I'm using Classic Bluetooth API and my app perfectly works on Android while on iOS I'm not able to establish the Bluetooth connection. My Bluetooth module is HC-06 and Im using this API. Does Qt support Bluetooth on iOS or there's something that I'm doing wrong?

    J 1 Reply Last reply 25 Mar 2020, 08:46
    0
    • R Raad
      25 Mar 2020, 08:56

      @J-Hilk Thank you for helping me as always!
      I have partially implemented my code on iOS just to make sure if the problem is with the Bluetooth API or something else and seems like it's directly related to the API. I saw here that Classic Bluetooth is not compatible on iOS. does it mean that I essentially need to change my module and API and use BLE or there is a way to go around that?

      J Offline
      J Offline
      J.Hilk
      Moderators
      wrote on 25 Mar 2020, 08:59 last edited by
      #4

      @Raad oh, I actually didn't see/know that

      That's a major flaw in the API 🤦‍♂️

      Well classical Bt is available on iOS. So you could potentially write something in objective-c and include that in your project.

      That or indeed, if you can, change to BTLE


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      R 1 Reply Last reply 25 Mar 2020, 09:03
      1
      • R Raad
        25 Mar 2020, 08:41

        I'm developing a cross-platform app which requires Bluetooth connection (sending and receiving data) on both Android and iOS. I'm using Classic Bluetooth API and my app perfectly works on Android while on iOS I'm not able to establish the Bluetooth connection. My Bluetooth module is HC-06 and Im using this API. Does Qt support Bluetooth on iOS or there's something that I'm doing wrong?

        J Offline
        J Offline
        J.Hilk
        Moderators
        wrote on 25 Mar 2020, 08:46 last edited by
        #2

        @Raad There's a ton of reasons why this could be the case

        I'm using BTLE on iOS and that works fine. I know its not quite the same.

        what about this examples:

        https://doc.qt.io/qt-5/bluetooth-examples.html

        Those that I tested work on iOS fine.

        maybe you need to adjust the info.plist file, since Apple added a new key requirement <key>NSBluetoothAlwaysUsageDescription</key>
        since I last tested one of those.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        R 1 Reply Last reply 25 Mar 2020, 08:56
        2
        • J J.Hilk
          25 Mar 2020, 08:46

          @Raad There's a ton of reasons why this could be the case

          I'm using BTLE on iOS and that works fine. I know its not quite the same.

          what about this examples:

          https://doc.qt.io/qt-5/bluetooth-examples.html

          Those that I tested work on iOS fine.

          maybe you need to adjust the info.plist file, since Apple added a new key requirement <key>NSBluetoothAlwaysUsageDescription</key>
          since I last tested one of those.

          R Offline
          R Offline
          Raad
          wrote on 25 Mar 2020, 08:56 last edited by
          #3

          @J-Hilk Thank you for helping me as always!
          I have partially implemented my code on iOS just to make sure if the problem is with the Bluetooth API or something else and seems like it's directly related to the API. I saw here that Classic Bluetooth is not compatible on iOS. does it mean that I essentially need to change my module and API and use BLE or there is a way to go around that?

          J 1 Reply Last reply 25 Mar 2020, 08:59
          1
          • R Raad
            25 Mar 2020, 08:56

            @J-Hilk Thank you for helping me as always!
            I have partially implemented my code on iOS just to make sure if the problem is with the Bluetooth API or something else and seems like it's directly related to the API. I saw here that Classic Bluetooth is not compatible on iOS. does it mean that I essentially need to change my module and API and use BLE or there is a way to go around that?

            J Offline
            J Offline
            J.Hilk
            Moderators
            wrote on 25 Mar 2020, 08:59 last edited by
            #4

            @Raad oh, I actually didn't see/know that

            That's a major flaw in the API 🤦‍♂️

            Well classical Bt is available on iOS. So you could potentially write something in objective-c and include that in your project.

            That or indeed, if you can, change to BTLE


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            R 1 Reply Last reply 25 Mar 2020, 09:03
            1
            • J J.Hilk
              25 Mar 2020, 08:59

              @Raad oh, I actually didn't see/know that

              That's a major flaw in the API 🤦‍♂️

              Well classical Bt is available on iOS. So you could potentially write something in objective-c and include that in your project.

              That or indeed, if you can, change to BTLE

              R Offline
              R Offline
              Raad
              wrote on 25 Mar 2020, 09:03 last edited by
              #5

              @J-Hilk Alright in that case I think it's easier for me to change the module and use BLE API rather than using objective-c. Thank you so much for clearing that out for me!

              1 Reply Last reply
              1

              1/5

              25 Mar 2020, 08:41

              • Login

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