1. 03 10月, 2013 1 次提交
    • D
      Bluetooth: Add the definition and structure for Set Reserved LT_ADDR · d0bf75a5
      DoHyun Pyun 提交于
      The Set_Reserved_LT_ADDR command allows the host to request that the
      BR/EDR Controller reserve a specific LT_ADDR for Connectionless Slave
      Broadcast.
      
      The Core Spec Addendum 4 adds this command in part B Connectionless
      Slave Broadcast.
      
      Bluetooth Core Specification Addendum 4 - Page 90
      
      "7.3.86 Set Reserved LT_ADDR Command [New Section]
      ...
      If the LT_ADDR indicated in the LT_ADDR parameter is already in use by the
      BR/EDR Controller, it shall return the ACL Connection Already Exists (0x0B)
      error code. If the LT_ADDR indicated in the LT_ADDR parameter is out of
      range, the controller shall return the Invalid HCI Command Parameters (0x12)
      error code. If the command succeeds, then the reserved LT_ADDR shall be
      used when issuing subsequent Set Connectionless Slave Broadcast Data and
      Set Connectionless Slave Broadcast commands.
      To ensure that the reserved LT_ADDR is not already allocated, it is
      recommended that this command be issued at some point after HCI_Reset is
      issued but before page scanning is enabled or paging is initiated."
      Signed-off-by: NDohyun Pyun <dh79.pyun@samsung.com>
      Signed-off-by: NC S Bhargava <cs.bhargava@samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      d0bf75a5
  2. 02 10月, 2013 2 次提交
    • M
      Bluetooth: Add management command for setting static address · d13eafce
      Marcel Holtmann 提交于
      On dual-mode BR/EDR/LE and LE only controllers it is possible
      to configure a random address. There are two types or random
      addresses, one is static and the other private. Since the
      random private addresses require special privacy feature to
      be supported, the configuration of these two are kept separate.
      
      This command allows for setting the static random address. It is
      only supported on controllers with LE support. The static random
      address is suppose to be valid for the lifetime of the controller
      or at least until the next power cycle. To ensure such behavior,
      setting of the address is limited to when the controller is
      powered off.
      
      The special BDADDR_ANY address (00:00:00:00:00:00) can be used to
      disable the static address. This is also the default value.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      d13eafce
    • J
      Bluetooth: Introduce a new HCI_BREDR_ENABLED flag · 56f87901
      Johan Hedberg 提交于
      To allow treating dual-mode (BR/EDR/LE) controllers as single-mode ones
      (LE-only) we want to introduce a new HCI_BREDR_ENABLED flag to track
      whether BR/EDR is enabled or not (previously we simply looked at the
      feature bit with lmp_bredr_enabled).
      
      This patch add the new flag and updates the relevant places to test
      against it instead of using lmp_bredr_enabled. The flag is by default
      enabled when registering an adapter and only cleared if necessary once
      the local features have been read during the HCI init procedure.
      
      We cannot completely block BR/EDR usage in case user space uses raw HCI
      sockets but the patch tries to block this in places where possible, such
      as the various BR/EDR specific ioctls.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      56f87901
  3. 19 9月, 2013 4 次提交
  4. 17 9月, 2013 2 次提交
    • M
      Bluetooth: Introduce new HCI socket channel for user operation · 23500189
      Marcel Holtmann 提交于
      This patch introcuces a new HCI socket channel that allows user
      applications to take control over a specific HCI device. The application
      gains exclusive access to this device and forces the kernel to stay away
      and not manage it. In case of the management interface it will actually
      hide the device.
      
      Such operation is useful for security testing tools that need to operate
      underneath the Bluetooth stack and need full control over a device. The
      advantage here is that the kernel still provides the service of hardware
      abstraction and HCI level access. The use of Bluetooth drivers for
      hardware access also means that sniffing tools like btmon or hcidump
      are still working and the whole set of transaction can be traced with
      existing tools.
      
      With the new channel it is possible to send HCI commands, ACL and SCO
      data packets and receive HCI events, ACL and SCO packets from the
      device. The format follows the well established H:4 protocol.
      
      The new HCI user channel can only be established when a device has been
      through its setup routine and is currently powered down. This is
      enforced to not cause any problems with current operations. In addition
      only one user channel per HCI device is allowed. It is exclusive access
      for one user application. Access to this channel is limited to process
      with CAP_NET_RAW capability.
      
      Using this new facility does not require any external library or special
      ioctl or socket filters. Just create the socket and bind it. After that
      the file descriptor is ready to speak H:4 protocol.
      
              struct sockaddr_hci addr;
              int fd;
      
              fd = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
      
              memset(&addr, 0, sizeof(addr));
              addr.hci_family = AF_BLUETOOTH;
              addr.hci_dev = 0;
              addr.hci_channel = HCI_CHANNEL_USER;
      
              bind(fd, (struct sockaddr *) &addr, sizeof(addr));
      
      The example shows on how to create a user channel for hci0 device. Error
      handling has been left out of the example. However with the limitations
      mentioned above it is advised to handle errors. Binding of the user
      cahnnel socket can fail for various reasons. Specifically if the device
      is currently activated by BlueZ or if the access permissions are not
      present.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      23500189
    • M
      Bluetooth: Introduce user channel flag for HCI devices · 0736cfa8
      Marcel Holtmann 提交于
      This patch introduces a new user channel flag that allows to give full
      control of a HCI device to a user application. The kernel will stay away
      from the device and does not allow any further modifications of the
      device states.
      
      The existing raw flag is not used since it has a bit of unclear meaning
      due to its legacy. Using a new flag makes the code clearer.
      
      A device with the user channel flag set can still be enumerate using the
      legacy API, but it does not longer enumerate using the new management
      interface used by BlueZ 5 and beyond. This is intentional to not confuse
      users of modern systems.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      0736cfa8
  5. 21 8月, 2013 1 次提交
  6. 25 7月, 2013 1 次提交
  7. 23 6月, 2013 1 次提交
  8. 18 4月, 2013 3 次提交
  9. 19 3月, 2013 4 次提交
  10. 23 1月, 2013 3 次提交
  11. 20 11月, 2012 1 次提交
    • S
      Bluetooth: Increase HCI command tx timeout · d1244adc
      Szymon Janc 提交于
      Read Local OOB Data command can take more than 1 second on some chips.
      e.g. on CSR 0a12:0001 first call to Read Local OOB Data after reset
      takes about 1300ms resulting in tx timeout error.
      
      [27698.368655] Bluetooth: hci0 command 0x0c57 tx timeout
      
      2012-10-31 15:53:36.178585 < HCI Command: Read Local OOB Data (0x03|0x0057) plen 0
      2012-10-31 15:53:37.496996 > HCI Event: Command Complete (0x0e) plen 36
          Read Local OOB Data (0x03|0x0057) ncmd 1
          status 0x00
          hash 0x92219d9b447f2aa9dc12dda2ae7bae6a
          randomizer 0xb1948d0febe4ea38ce85c4e66313beba
      Signed-off-by: NSzymon Janc <szymon.janc@tieto.com>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      d1244adc
  12. 19 11月, 2012 3 次提交
  13. 02 11月, 2012 1 次提交
  14. 24 10月, 2012 1 次提交
  15. 15 10月, 2012 1 次提交
  16. 28 9月, 2012 3 次提交
  17. 19 9月, 2012 1 次提交
  18. 22 8月, 2012 1 次提交
  19. 07 8月, 2012 2 次提交
  20. 19 6月, 2012 1 次提交
  21. 12 6月, 2012 1 次提交
  22. 09 6月, 2012 1 次提交
  23. 05 6月, 2012 1 次提交