Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. How to use bluetooth to pass simple ASCII serial data ?

How to use bluetooth to pass simple ASCII serial data ?

Scheduled Pinned Locked Moved Hardware & Devices
tutorialc++sysadminquestiondiscussion
7 Posts 3 Posters 20 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I am using several code examples to find local Bluetooth adapters to "bind " to local Bluetooth adapter to build "client server" to start rfcomm server to scan for and find remote Bluetooth devices to "bind to serial port" .... to build "socket"... to listen or send a message to connected device / adapter I cannot find a single example how to actually exchange messages in real connection at this point a simplex exchange would work send a message from "local adapter" to "remote device "... ...listen for response from remote device rinse and repeat... I am not sure want to get into "client / server / host " discussion. A simple C/C++ code example would be great. And if I asked this before or I am in wrong pew (again) - keep your comments to yourself - no need to rub it in. Cheers

    L K 3 Replies Last reply
    0
    • L Lost User

      I am using several code examples to find local Bluetooth adapters to "bind " to local Bluetooth adapter to build "client server" to start rfcomm server to scan for and find remote Bluetooth devices to "bind to serial port" .... to build "socket"... to listen or send a message to connected device / adapter I cannot find a single example how to actually exchange messages in real connection at this point a simplex exchange would work send a message from "local adapter" to "remote device "... ...listen for response from remote device rinse and repeat... I am not sure want to get into "client / server / host " discussion. A simple C/C++ code example would be great. And if I asked this before or I am in wrong pew (again) - keep your comments to yourself - no need to rub it in. Cheers

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      c bluetooth sample code - Google Search[^]

      L 2 Replies Last reply
      0
      • L Lost User

        c bluetooth sample code - Google Search[^]

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        been there , done that

        08:31:50: Starting /home/nov25-1/Qt/Nov26/Examples/Qt-5.15.2/bluetooth/build-btchat-Desktop_Qt_5_15_2_GCC_64bit-Debug/btchat...
        Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
        qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.

        but it is conceptually sound and usable if I can get rid of this missing

        CAP_NET_ADMI

        permission it is hard to concentrate on passing / setting for serial ACSII code when the example is so buggy.... Thanks

        I 1 Reply Last reply
        0
        • L Lost User

          I am using several code examples to find local Bluetooth adapters to "bind " to local Bluetooth adapter to build "client server" to start rfcomm server to scan for and find remote Bluetooth devices to "bind to serial port" .... to build "socket"... to listen or send a message to connected device / adapter I cannot find a single example how to actually exchange messages in real connection at this point a simplex exchange would work send a message from "local adapter" to "remote device "... ...listen for response from remote device rinse and repeat... I am not sure want to get into "client / server / host " discussion. A simple C/C++ code example would be great. And if I asked this before or I am in wrong pew (again) - keep your comments to yourself - no need to rub it in. Cheers

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Member 14968771 wrote:

          I am not sure want to get into "client / server / host " discussion.

          Member 14968771 wrote:

          keep your comments to yourself - no need to rub it in

          Granted. You now have 2 wishes left.

          Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

          1 Reply Last reply
          0
          • L Lost User

            c bluetooth sample code - Google Search[^]

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            I got the

            Missing CAP_NET_ADMIN permission

            hacked... Now if the QT btchat app "finds the remote devices" I'll be a happy camper.

            1 Reply Last reply
            0
            • L Lost User

              I am using several code examples to find local Bluetooth adapters to "bind " to local Bluetooth adapter to build "client server" to start rfcomm server to scan for and find remote Bluetooth devices to "bind to serial port" .... to build "socket"... to listen or send a message to connected device / adapter I cannot find a single example how to actually exchange messages in real connection at this point a simplex exchange would work send a message from "local adapter" to "remote device "... ...listen for response from remote device rinse and repeat... I am not sure want to get into "client / server / host " discussion. A simple C/C++ code example would be great. And if I asked this before or I am in wrong pew (again) - keep your comments to yourself - no need to rub it in. Cheers

              K Offline
              K Offline
              kdbueno
              wrote on last edited by
              #6

              cobol does not prelude stat threads, on idle pointers, but on miniscule.

              1 Reply Last reply
              0
              • L Lost User

                been there , done that

                08:31:50: Starting /home/nov25-1/Qt/Nov26/Examples/Qt-5.15.2/bluetooth/build-btchat-Desktop_Qt_5_15_2_GCC_64bit-Debug/btchat...
                Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
                qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.

                but it is conceptually sound and usable if I can get rid of this missing

                CAP_NET_ADMI

                permission it is hard to concentrate on passing / setting for serial ACSII code when the example is so buggy.... Thanks

                I Offline
                I Offline
                iws solutions
                wrote on last edited by
                #7

                Ihsan Web Solutions is a Pakistan-based IT services provider Company. Our Digital Marketing(DM) offers a wide range of IT-related services, including Website Design and Development, Social Media Marketing (SMM), Pay-Per-Click (PPC), Google Ads, Search Engine Optimization (SEO), Graphic Designing, and Social Networking. We are here if you want your ideas to become a reality.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups