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. Unable to advertise Bluetooth BLE in peripheral mode in OS Ubuntu 18
Forum Updated to NodeBB v4.3 + New Features

Unable to advertise Bluetooth BLE in peripheral mode in OS Ubuntu 18

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 531 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.
  • A Offline
    A Offline
    ankursaxena
    wrote on last edited by
    #1

    Hi All,

    My aim is to create Bluetooth BLE Peripheral who would be able to advertise the device and services. For achieving this, I have tried to run the heartrateserver example provided by QT Creator.

    I simply run this program and i got following error in the output:

    host mode: QBluetoothLocalDevice::HostConnectable
    qt.bluetooth: Using BlueZ kernel ATT interface
    Role: QLowEnergyController::PeripheralRole
    Controller state QLowEnergyController::UnconnectedState
    qt.bluetooth.bluez: Starting to advertise
    qt.bluetooth.bluez: advertising parameters: "000800080000000000000000000700"
    qt.bluetooth.bluez: advertising data: "1402010510094865617274526174655365727665720000000000000000000000"
    qt.bluetooth.bluez: scan response data: "1110094865617274526174655365727665720000000000000000000000000000"
    qt.bluetooth.bluez: sending command; ogf: 8 ocf: 10
    qt.bluetooth.bluez: command sent successfully
    QDBusConnection: name 'org.bluez' had owner '' but we thought it was ':1.332'
    qt.bluetooth.bluez: HCI event triggered, type: e
    qt.bluetooth.bluez: HCI event triggered, type: e
    qt.bluetooth.bluez: HCI event triggered, type: e
    qt.bluetooth.bluez: command 10 failed with status 12
    qt.bluetooth.bluez: Advertising disable failed, ignoring
    qt.bluetooth.bluez: sending command; ogf: 8 ocf: 6
    qt.bluetooth.bluez: command sent successfully
    qt.bluetooth.bluez: HCI event triggered, type: e
    qt.bluetooth.bluez: HCI event triggered, type: e
    qt.bluetooth.bluez: command 6 failed with status 12
    qt.bluetooth.bluez: received advertising error

    Please help me this. Thanks in advance.

    1 Reply Last reply
    1
    • D Offline
      D Offline
      David N
      wrote on last edited by
      #2

      It may be your app does not have the right capabilities. Try:

      sudo setcap 'cap_net_raw+ep' <path to your app>
      

      If that does not work:

      sudo setcap 'cap_net_admin+ep cap_sys_rawio+ep  cap_net_raw+ep'  <path to your app>
      
      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