Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. bluetooth
    Log in to post

    • UNSOLVED Will Bluetooth SPP deprecate? And how to implement your own "SPP" in Bluetooth Low Energy?
      General and Desktop • bluetooth ble rfcomm spp • • pga4711  

      1
      1
      Votes
      1
      Posts
      63
      Views

      No one has replied

    • SOLVED Qt Bluetooth is missing in Qt 6.2
      General and Desktop • bluetooth • • akshaybabloo  

      6
      1
      Votes
      6
      Posts
      240
      Views

      @hskoglund it's not lurking, it's the Qt module were its code is located. Like the widgets, network, gui and others can be found in qtbase.
    • UNSOLVED Qt Bluetooth keeps on "Connecting state"
      General and Desktop • bluetooth ubuntu arduino • • Manu_NaFu  

      6
      0
      Votes
      6
      Posts
      123
      Views

      @mrjj Hi Again, I just noticed that despite not being able to pair, I can connect to the bluetooth module using connect (in bluetoothctl). Could it be that Qt internally always tries to pair before connect, and that's why it cannot connect?
    • UNSOLVED Handling the configuration change on Android
      Mobile and Embedded • qml android bluetooth configuration connections • • SevenM  

      1
      0
      Votes
      1
      Posts
      94
      Views

      No one has replied

    • UNSOLVED Activity restarts when switching between virtual and physical keyboard
      QML and Qt Quick • android bluetooth keyboard configchange activityrestart • • Kuldip Somwanshi  

      1
      0
      Votes
      1
      Posts
      70
      Views

      No one has replied

    • UNSOLVED Getting application black screen for bluetooth dongle disconnection(onConfigurationChange).
      QML and Qt Quick • android bluetooth keyboard configuration intents • • Kuldip Somwanshi  

      1
      0
      Votes
      1
      Posts
      77
      Views

      No one has replied

    • UNSOLVED L2Cap payload size 23 is smaller that the specified size 30 - Qtconnectivity bluetooth error (qt.bluetooth,bluez)
      Mobile and Embedded • bluetooth bluetooth low e bluez qtconnectivity • • Menon  

      1
      0
      Votes
      1
      Posts
      124
      Views

      No one has replied

    • SOLVED Requirement for users to use a BLE application
      General and Desktop • linux windows bluetooth ble bluez • • TUStudi  

      3
      0
      Votes
      3
      Posts
      215
      Views

      @sierdzio Thank you very much!
    • SOLVED Unknown Exception is not beeing caught in trycatch-Block (Bluetooth Low Energy, ServiceDetailsDiscovery)
      General and Desktop • bluetooth bluetooth low e exceptions • • SpaceToon  

      25
      0
      Votes
      25
      Posts
      924
      Views

      @SpaceToon said in Unknown Exception is not beeing caught in trycatch-Block (Bluetooth Low Energy, ServiceDetailsDiscovery): @KH-219Design : Thank you very much for your suggestion, for using the lowenergy example from Qt. I did this and the same error occurs there! For this reason, I copied the following code from there and paste it in my .cpp file @SpaceToon I'm truly happy to hear you are able to make forward progress on this! This year marks the first year that I have ventured into BLE using Qt, and I have hit some minor hiccups myself. That is why your post caught my attention in the first place. However, I am working on Android and you are on Windows, which have very different backend/underlying BLE system stacks. So based on the difference in operating systems, I was doubtful if anything I learned would really translate directly here. Your watershed moment about QLowEnergyController::Error prompted me to go look at my code again to see what I am doing in case of QLowEnergyController::Error. I noticed that in my slot I have this comment: // The Qt API for QLowEnergyController has some confusing // overlap/ambiguity. When we get "ConnectionError" I would EXPECT that // the signal QLowEnergyController::disconnected would also be // forthcoming. But it seems (by observation) that this is not how it // works. So we have to treat BOTH the disconnected signal and the // error signal as signs of a disconnection. ... so maybe you and I did actually run into a very similar pitfall after all! It would be great to know if there is some null-reference bug in Qt BLE itself, but neither you nor I may have time to investigate that further. Since we both seem to have worked around our respective pain points, may we carry on and each deliver a successful project! You also asked: Did you compile Qt for debug, and can the debugger see/know the location of the corresponding Qt source files? Which is a very useful tactic, which I have done many times on Linux Qt. I just read some of this: https://stackoverflow.com/questions/5571098/how-can-i-make-msvc-debugger-step-into-qt-library-source-code-again/5576414 Which refers to compiling the QtCored5.dll DLL(s) for oneself. (This is essentially analogous to how I do it on Linux, but building Qt from source is usually several hours of effort on the first time... and I'm not talking about the additional potential hours of just letting the compiler run!) Maybe someone else in this thread has had personal experience with debugging into Qt source files on Microsoft Windows. Or maybe that could be a new thread!
    • UNSOLVED Bluetooth Low Energy - disconnecting when discovering service details
      General and Desktop • bluetooth bluetooth low e bluez5 lowenergyscanne • • Marc_K  

      2
      0
      Votes
      2
      Posts
      204
      Views

      I have exactly the same problem see my topic. Actually I did not find any solution
    • UNSOLVED Errors in DebugMode, but application is running (Bluetooth Low Energy)
      General and Desktop • bluetooth qfile • • TUStudi  

      5
      0
      Votes
      5
      Posts
      404
      Views

      @TUStudi Ehh. :) well you would on purpose made it so. With the compiler and Qt version you choose to compile app with. THe Qt used would be called UWP ![alt text]( image url) So I would guess on its Not a "Metro" app. But this can also just be something about windows version/patching and not related to you app as all. https://docs.microsoft.com/en-us/answers/questions/3166/what-is-the-meaning-of-this-output-element-not-fou.html
    • UNSOLVED registerNatives failed when linking Qt Librarys to Android Project
      Mobile and Embedded • android bluetooth library dynamic loading • • morsch  

      1
      0
      Votes
      1
      Posts
      259
      Views

      No one has replied

    • UNSOLVED Unable to update Bluetooth connection paramaters. QT BLE
      General and Desktop • c++ bluetooth ble • • ZainMehdi  

      1
      0
      Votes
      1
      Posts
      126
      Views

      No one has replied

    • SOLVED Bluetooth Low Energy: Reading Sensor data in real time after retrieving characteristics
      General and Desktop • bluetooth bluetooth low e • • TUStudi  

      3
      0
      Votes
      3
      Posts
      362
      Views

      Thank you for your reply. I found this in the documentation: In some cases the peripheral generates value updates which the central is interested in receiving. In order for a characteristic to support such notifications it must have the QLowEnergyCharacteristic::Notify or QLowEnergyCharacteristic::Indicate property and a descriptor of type QBluetoothUuid::ClientCharacteristicConfiguration. Provided those conditions are fulfilled notifications can be enabled as shown in the following code segment: QLowEnergyCharacteristic batteryLevel = service->characteristic( QBluetoothUuid::BatteryLevel); if (!batteryLevel.isValid()) return; QLowEnergyDescriptor notification = batteryLevel.descriptor( QBluetoothUuid::ClientCharacteristicConfiguration); if (!notification.isValid()) return; // establish hook into notifications connect(service, SIGNAL(characteristicChanged(QLowEnergyCharacteristic,QByteArray)), this, SLOT(characteristicChanged(QLowEnergyCharacteristic,QByteArray))); // enable notification service->writeDescriptor(notification, QByteArray::fromHex("0100")); So you were right. But what I do not understand: The writeDescriptor function "Writes newValue as value for descriptor." But what "value" is the QByteArray::fromHex("0100") ? Because when i write the same code for my application and when I call value() on the ClientCharacteristicConfiguration Descriptor from my RX characteristic the output is \x00\x00
    • UNSOLVED Qt Bluetooth in Windows: QBluetoothDeviceDiscoveryAgent::PoweredOffError not emitted
      General and Desktop • bluetooth bluetooth low e ble bluetoothapis qtbluetooth • • harip  

      4
      0
      Votes
      4
      Posts
      190
      Views

      Ah ok sorry! Indeed last time I worked with BT it was with older Qt version.
    • SOLVED Creating BLE & Bluetooth Classic in a single app with live plot?
      General and Desktop • bluetooth bluetooth low e • • TUStudi  

      4
      0
      Votes
      4
      Posts
      215
      Views

      @TUStudi AFAIK writing an MS Excel file is not possible with Qt directly. You need some additional stuff. But writing to a file in general (raw textfile, JSON, XML... etc) is quite easy.
    • SOLVED QTcpServer with wifi dongle
      General and Desktop • bluetooth socket tcpsocket tcpserver wifi • • LordMat  

      5
      0
      Votes
      5
      Posts
      172
      Views

      @jsulm Thanks a lot
    • UNSOLVED Bluetooth Socket For Android
      Mobile and Embedded • c++ android bluetooth socket qt 5.13.2 • • Ryan R  

      1
      0
      Votes
      1
      Posts
      226
      Views

      No one has replied

    • UNSOLVED Bluetooth Low Energy: State 'ServiceDiscovered' is never reached
      General and Desktop • signal & slot bluetooth bluetooth low e ble • • SpaceToon  

      19
      0
      Votes
      19
      Posts
      1127
      Views

      The QTBluetooth Central API is not supported on any platform. see the first table in Qt Bluetooth
    • SOLVED SLOT is not executed after successfully contected to BLE-Device
      General and Desktop • signal & slot bluetooth ble signals slots • • SpaceToon  

      7
      0
      Votes
      7
      Posts
      391
      Views

      @J-Hilk Thank you, JonB and you were right. For me it actually makes more sense that e.g. at first you connect to the device and then you say "okay, if the signal "connected" is emitted then call the function x.y.". So after changing it, it works now. However, after getting all services and calling "service->discoverDetails" and then "service->characteristics" the characteristics List is empty. After connection is successfull: void Scanner::startServiceDiscovery(){ connect(controller, &QLowEnergyController::discoveryFinished, this, &Scanner::discoveryFinished); controller->discoverServices(); } void Scanner::discoveryFinished(){ qDebug() << "\nService Discovery finished. Following Services found:\n"; QList<QBluetoothUuid> serviceList = controller->services(); for(QBluetoothUuid &sl : serviceList){ qDebug() << controller->createServiceObject(sl)->serviceName() << "Uuid: " << sl; } uartService = controller->createServiceObject(adafruitServiceUuid); qDebug() <<"\nChose the following service: " << (*uartService).serviceName(); connect(uartService, &QLowEnergyService::stateChanged, this, &Scanner::printChars); qDebug() << uartService->state(); //here the state is QLowEnergyService::DiscoveryRequired uartService->discoverDetails(); } void Scanner::printChars(){ qDebug() << uartService->state(); // here the state is now QLowEnergyService::DiscoveringServices const QList<QLowEnergyCharacteristic> chars = uartService->characteristics(); qDebug()<< chars.size(); //however the list size is 0 for (const QLowEnergyCharacteristic &ch : chars) { qDebug() << &ch; } } btw: I know that there is an example for BLE Scanner. But for a project, I want to create an own desktop application which connnects to a peripheral and live plots the data which are received from the sensor with qcustomplot. So I need a QWidget Application because QCustomPlot is a widget...
    • SOLVED Lowenergyscanner Exampler: "Error occured when trying to connect to remote device."
      General and Desktop • bluetooth bluetooth low e lowenergyscanne • • SpaceToon  

      7
      0
      Votes
      7
      Posts
      654
      Views

      @martial123 These dongles are needed, if you use the node.js Bluetooth Low Energy library called "noble" (this video is actually about how to use noble), I only linked it because he also explains how to use Zadig. I don't know if your Dongle, that you have know, will work with Qt BluetoothLE library, just try it, if not, you could then try one of these listed in the video .
    • SOLVED Dummy backend running. Qt Bluetooth module is non-functional (Bluetooth Low Energy)
      General and Desktop • bluetooth bluetooth low e • • SpaceToon  

      8
      0
      Votes
      8
      Posts
      722
      Views

      @SpaceToon said in Dummy backend running. Qt Bluetooth module is non-functional (Bluetooth Low Energy): So is it possible with the MSVC Compiler? No. You will need to build your code for Linux. It is better to do this on a Linux machine as cross compiling from Windows to Linux will be a lot of work. You can have a virtual machine with Linux to build for Linux.
    • SOLVED Bond a Low Energy device on Android
      Mobile and Embedded • android bluetooth pairing passkey pin • • Darude 0  

      7
      0
      Votes
      7
      Posts
      671
      Views

      @ivk16 Yes, take a look here: https://bugreports.qt.io/browse/QTBUG-76565
    • UNSOLVED Provide PIN to Qt Bluetooth
      General and Desktop • bluetooth pairing pin passkey • • podkiva  

      3
      0
      Votes
      3
      Posts
      1080
      Views

      @raven-worx Yes, your are right that it is a little unclear in the term that I had used, I think the term that actually used for BLE pairing is PASSKEY rather than PIN-CODE, but essentially the question stays the same. I have updated original question accordingly. Sorry for not answering on that for too long, but at the end of the day I have finished with using Bluez-Qt library. I had to update it with Low Energy functionality by myself, but it was rather easier for me since I am familiar with Bluez DBus Api. So, AFAIK, the Qt Bluetooth module does not provide any functionality similar to what Bluez's agent provides, i.e. it is not possible to perform general pairing/bonding procedure with different IO (Input-Output) capabilities. Please correct me, if I am wrong.
    • UNSOLVED Sending and Receiving Files Using Bluetooth
      General and Desktop • bluetooth file windows10 send receive • • LAM12  

      3
      0
      Votes
      3
      Posts
      654
      Views

      @J.Hilk Thanks for your answer. But I want to ask how can I know I have to choose one over the another? After running the application "Bluetooth File Transfer" I faced the following error: Thanks in advance!
    • UNSOLVED Change advertisingdata QLowEnergyController
      General and Desktop • bluetooth bluetooth low e • • Crindu  

      1
      0
      Votes
      1
      Posts
      245
      Views

      No one has replied

    • SOLVED QtBluetooth on Windows not working
      General and Desktop • windows 10 bluetooth • • elsa  

      15
      0
      Votes
      15
      Posts
      3480
      Views

      @elsa Check the kits and see if any red marks.
    • UNSOLVED Qt 5.10.1 Bluetooth examples on classic windows fail to start
      General and Desktop • bluetooth windows 7 qt 5.10.1 • • HansVL  

      2
      0
      Votes
      2
      Posts
      606
      Views

      @HansVL nope, thats conform with my 10.1 experience
    • UNSOLVED BluetoothDiscoveryModel.FullServiceDiscovery issue?
      QML and Qt Quick • qml bluetooth ble • • JesperWe  

      1
      0
      Votes
      1
      Posts
      457
      Views

      No one has replied

    • UNSOLVED Bluetooth Low Energy example doesn't work
      General and Desktop • windows 10 bluetooth ble qt 5.10.0 low energy • • Ashi  

      19
      0
      Votes
      19
      Posts
      6174
      Views

      @Ashi Sorry, I'm too late to answer this post. I think you should try with msvc compiler, not mingw
    • SOLVED How to configure qt with bluetooth and location modules?
      General and Desktop • linux bluetooth configure location build qt • • Aras  

      16
      0
      Votes
      16
      Posts
      7211
      Views

      You're welcome ! I'm pretty sure not all these packages are necessary but at least you have it working now :)
    • UNSOLVED Error when scanning bluetooth device
      General and Desktop • windows 10 bluetooth qbluetoothdevic • • helenebro  

      4
      0
      Votes
      4
      Posts
      1367
      Views

      Thank you for your answer. I didn't think this functionnality isn't supported by windows. @SGaist I find indeed your previous answer. I will look this
    • SOLVED Bluetooth with Windows ? (Bluetooth Low Energy)
      3rd Party Software • windows bluetooth bluetooth low e windows 10 iot • • NicoFrom13  

      10
      2
      Votes
      10
      Posts
      8292
      Views

      @NicoFrom13 Hi, Were you able to use this work in progress qtconnectivity? Is it properly working ?
    • UNSOLVED Qt Bluetooth on iOS
      Mobile and Embedded • ios bluetooth • • alok_pathak  

      1
      0
      Votes
      1
      Posts
      729
      Views

      No one has replied

    • UNSOLVED GATT server definition
      General and Desktop • bluetooth bluetooth low e ble • • Mark81  

      1
      0
      Votes
      1
      Posts
      544
      Views

      No one has replied

    • UNSOLVED A2DP and QMediaPlayer issue
      General and Desktop • bluetooth qmediaplayer a2dp • • Mark81  

      1
      0
      Votes
      1
      Posts
      645
      Views

      No one has replied

    • SOLVED Bluetooth: wait for pairing requests
      General and Desktop • bluetooth pairing qbluetoothlocal • • Mark81  

      6
      0
      Votes
      6
      Posts
      2099
      Views

      @raven-worx no, sorry, as said in the last post it doens't listen for incoming pairing request. Is the application which has to issue a pairing request! It's quite different. Of course the final result is pretty the same, but I didn't understand how it works from the documentation.
    • UNSOLVED QtBluetoothLocalDevice is not valid - Raspberry 3
      General and Desktop • bluetooth • • alexP  

      1
      0
      Votes
      1
      Posts
      430
      Views

      No one has replied