Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Bluetooth characteristic runtime
Qt 6.11 is out! See what's new in the release blog

Bluetooth characteristic runtime

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 1.5k Views 2 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.
  • A Offline
    A Offline
    Andy Bell
    wrote on last edited by
    #1

    I am trying to create a bluetooth GATT characteristic at runtime using Qt 5.9, is this possible? If so, any clues on how I can do this? I want to be able to dynamically add a characteristic to a peripheal based on a runtime condition and this to be advertised.

    Thanks, Andy

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      I think its possible
      http://doc.qt.io/qt-5/qtbluetooth-le-overview.html#gatt-profile
      "While it is advisable to use pre-defined UUIDs where available it is entirely possible to use new and not yet used UUIDs for characteristic and service types."

      A 1 Reply Last reply
      1
      • mrjjM mrjj

        Hi
        I think its possible
        http://doc.qt.io/qt-5/qtbluetooth-le-overview.html#gatt-profile
        "While it is advisable to use pre-defined UUIDs where available it is entirely possible to use new and not yet used UUIDs for characteristic and service types."

        A Offline
        A Offline
        Andy Bell
        wrote on last edited by
        #3

        @mrjj thanks for the response. I have been able to create a custom service and characteristic with no trouble already. What I want to do is add another characteristic in runtime after a certain event and that the new characteristic is browsable as the original characteristics.

        mrjjM 1 Reply Last reply
        0
        • A Andy Bell

          @mrjj thanks for the response. I have been able to create a custom service and characteristic with no trouble already. What I want to do is add another characteristic in runtime after a certain event and that the new characteristic is browsable as the original characteristics.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Andy-Bell
          Hi
          Im not sure what is preventing you from doing it the same way as the first
          characteristic ?
          Is there something that cannot be created dynamically ?

          A 1 Reply Last reply
          0
          • mrjjM mrjj

            @Andy-Bell
            Hi
            Im not sure what is preventing you from doing it the same way as the first
            characteristic ?
            Is there something that cannot be created dynamically ?

            A Offline
            A Offline
            Andy Bell
            wrote on last edited by
            #5

            @mrjj if I add another characteristic to the service after it has been running for a period of time and if i browse this service using a central role again I do not see the new characteristic but just the first characteristic. Is this an issue in advertising? In other words if I add a characteristic after starting to advertise do I need to restart the advertising?

            mrjjM 1 Reply Last reply
            0
            • A Andy Bell

              @mrjj if I add another characteristic to the service after it has been running for a period of time and if i browse this service using a central role again I do not see the new characteristic but just the first characteristic. Is this an issue in advertising? In other words if I add a characteristic after starting to advertise do I need to restart the advertising?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Andy-Bell
              Hi
              Yes, i think you need to start over but i never tested it.
              Do you connect anything ?
              "Note: Advertising will stop automatically once a client connects to the local device."

              Try with a flipflop stopAdvertising()/start

              A 1 Reply Last reply
              0
              • mrjjM mrjj

                @Andy-Bell
                Hi
                Yes, i think you need to start over but i never tested it.
                Do you connect anything ?
                "Note: Advertising will stop automatically once a client connects to the local device."

                Try with a flipflop stopAdvertising()/start

                A Offline
                A Offline
                Andy Bell
                wrote on last edited by
                #7

                @mrjj ok, thanks for the confirmation. I will check it out.

                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