# bluetooth scanning returns no devices

## Adel Ahmed

I am configuring my bluetooth device on my laptop using this wiki entry:

http://wiki.gentoo.org/wiki/Bluetooth

I am using the btusb module, the bluetooth device is detected:

adel@localhost ~/Desktop $ hciconfig -a

hci0:	Type: BR/EDR  Bus: USB

	BD Address: 40:F0:2F:3A:FE:4A  ACL MTU: 820:8  SCO MTU: 255:16

	UP RUNNING PSCAN 

	RX bytes:2616 acl:0 sco:0 events:182 errors:0

	TX bytes:1871 acl:0 sco:0 commands:171 errors:0

	Features: 0xff 0xff 0xff 0xfe 0xdb 0xff 0x7b 0x87

	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 

	Link policy: RSWITCH HOLD SNIFF PARK 

	Link mode: SLAVE ACCEPT 

	Name: 'BlueZ 5.21'

	Class: 0x00010c

	Service Classes: Unspecified

	Device Class: Computer, Laptop

	HCI Version: 4.0 (0x6)  Revision: 0xb

	LMP Version: 4.0 (0x6)  Subversion: 0x8723

	Manufacturer: Realtek Semiconductor Corporation (93)

[bluetooth]# list

Controller 40:F0:2F:3A:FE:4A BlueZ 5.21 [default]

[bluetooth]# show 40:F0:2F:3A:FE:4A

Controller 40:F0:2F:3A:FE:4A

	Name: BlueZ 5.21

	Alias: BlueZ 5.21

	Class: 0x00010c

	Powered: yes

	Discoverable: no

	Pairable: yes

	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)

	UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)

	UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)

	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)

	Modalias: usb:v1D6Bp0246d0515

	Discovering: no

[bluetooth]# select 40:F0:2F:3A:FE:4A

[bluetooth]# power on

Changing power on succeeded

[bluetooth]# agent on 

Agent registered

[bluetooth]# default-agent

Default agent request successful

[bluetooth]# discoverable on 

Changing discoverable on succeeded

[CHG] Controller 40:F0:2F:3A:FE:4A Discoverable: yes

[bluetooth]# pairable on

Changing pairable on succeeded

[bluetooth]# scan on

Discovery started

[CHG] Controller 40:F0:2F:3A:FE:4A Discovering: yes

[bluetooth]# devices

[bluetooth]# 

scanning using blueman fails as well

it's neither discovering my phone nor the other way around, it cannot scan any of the bluetooth devices that my phone has discovered

I see no messages in journalctl or dmesg at the time

thanks

----------

## Adel Ahmed

help anyone?

----------

## Adel Ahmed

bump

----------

## BT

The Bluetooth controller might require firmware to function, especially if it's a USB device. You can check the output of dmesg for any attempts to load firmware.

----------

## Fitzcarraldo

I wonder if the version of BlueZ that you are using is the cause of the problem? For several months Bluetooth stopped working for me but started working again recently after a world update (~amd64). In case it is of any help, here are the Bluetooth-related packages installed currently on my main laptop (I'm using KDE):

```
# eix -I blue

[I] dev-python/pybluez

     Available versions:  0.18 0.18-r1 {examples PYTHON_TARGETS="pypy python2_7"}

     Installed versions:  0.18-r1(18:29:57 10/12/14)(-examples PYTHON_TARGETS="python2_7 -pypy")

     Homepage:            http://code.google.com/p/pybluez/

     Description:         Python bindings for Bluez Bluetooth Stack

[I] net-libs/libbluedevil

     Available versions:  

     (4)    1.9.4 [m](~)2.0_pre1[1] 2.0_rc1 (~)2.0 (~)2.1 [m]**4.9999[2]

     (5)    [m]**9999[2]

       {aqua debug}

     Installed versions:  2.1(4)(20:33:33 24/12/14)(-aqua -debug)

     Homepage:            http://projects.kde.org/projects/playground/libs/libbluedevil

     Description:         Qt wrapper for bluez used in the KDE bluetooth stack

[I] net-wireless/bluedevil

     Available versions:  

     (4)    1.3.2 [m](~)2.0_pre1[1] [m](~)2.0_pre2[1] 2.0_rc1 (~)2.0 (~)2.1 [m]**4.9999[2]

     (5)    [m]**9999[2]

       {aqua debug LINGUAS="ar bg bs ca ca@valencia cs da de el en_GB eo es et eu fa fi fr ga gl hu it ja kk km ko lt mai mr ms nb nds nl pa pl pt pt_BR ro ru sk sl sr sr@Latn sr@ijekavian sr@ijekavianlatin sr@latin sv th tr ug uk zh_CN zh_TW"}

     Installed versions:  2.1(4)(21:25:46 24/12/14)(-aqua -debug LINGUAS="en_GB pt_BR -ar -bg -bs -ca -ca@valencia -cs -da -de -el -eo -es -et -eu -fa -fi -fr -ga -gl -hu -it -ja -kk -km -ko -lt -mai -mr -ms -nb -nds -nl -pa -pl -pt -ro -ru -sk -sl -sr -sr@Latn -sr@ijekavian -sr@ijekavianlatin -sv -th -tr -ug -uk -zh_CN -zh_TW")

     Homepage:            http://projects.kde.org/projects/extragear/base/bluedevil

     Description:         Bluetooth stack for KDE

[I] net-wireless/bluez

     Available versions:  4.101-r9 5.21-r1(0/3) 5.25(0/3) {alsa cups debug gstreamer hid2hci +obex pcmcia (+)readline selinux systemd test test-programs +udev usb ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" PYTHON_TARGETS="python2_7"}

     Installed versions:  5.25(18:29:04 10/12/14)(cups obex readline udev -debug -selinux -systemd -test ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")

     Homepage:            http://www.bluez.org

     Description:         Bluetooth Tools and System Daemons for Linux

[I] net-wireless/bluez-hcidump

     Available versions:  2.4 2.5

     Installed versions:  2.5(18:30:16 10/12/14)

     Homepage:            http://www.bluez.org/

     Description:         Bluetooth HCI packet analyzer

[I] sys-firmware/bluez-firmware

     Available versions:  1.2^md

     Installed versions:  1.2^md(18:27:34 10/12/14)

     Homepage:            http://bluez.sourceforge.net/

     Description:         Firmware for Broadcom BCM203x and STLC2300 Bluetooth chips

[1] "sabayon" /var/lib/layman/sabayon

[2] "kde" /var/lib/layman/kde

Found 6 matches.
```

And here is some information on my laptop's internal Bluetooth device and driver:

```
# lsusb | grep -i blue

Bus 001 Device 004: ID 0a5c:2151 Broadcom Corp. Bluetooth

# dmesg | grep -i blue

[    8.210000] usb 1-1.3: Product: BCM2046 Bluetooth Device

[   17.645691] Bluetooth: Core ver 2.19

[   17.645725] Bluetooth: HCI device and connection manager initialized

[   17.645735] Bluetooth: HCI socket layer initialized

[   17.645740] Bluetooth: L2CAP socket layer initialized

[   17.645753] Bluetooth: SCO socket layer initialized

[   41.050654] Bluetooth: BNEP (Ethernet Emulation) ver 1.3

[   41.050660] Bluetooth: BNEP filters: protocol multicast

[   41.050674] Bluetooth: BNEP socket layer initialized

[   76.515845] Bluetooth: RFCOMM TTY layer initialized

[   76.515863] Bluetooth: RFCOMM socket layer initialized

[   76.515874] Bluetooth: RFCOMM ver 1.11

# dmesg | grep -i bt

[   17.678205] usbcore: registered new interface driver btusb
```

----------

## Adel Ahmed

this is all I can find, I dont see anything regarding firmware loading

localhost ~ # dmesg | grep -i bt

[    0.851501] [drm] VBT doesn't support DRRS

[    6.018551] usbcore: registered new interface driver btusb

[  677.745332] Modules linked in: nfsv3 nfs lockd sunrpc btusb nvidia(PO) rtl8723be btcoexist rtl_pci rtlwifi rtl8723_common bbswitch(O)

localhost ~ # dmesg | grep -i blue

[    0.161889] Bluetooth: Core ver 2.19

[    0.161895] Bluetooth: HCI device and connection manager initialized

[    0.161897] Bluetooth: HCI socket layer initialized

[    0.161898] Bluetooth: L2CAP socket layer initialized

[    0.161901] Bluetooth: SCO socket layer initialized

localhost ~ # dmesg | grep -i firm

[    0.000000] Command line: root=/dev/sda1 raid=noautodetect init=/usr/lib/systemd/systemd quiet rootfstype=ext4 rcutree.rcu_idle_gp_delay=1 drm_kms_helper.edid_firmware=edid/1920x1080_clevo_W670SR.bin 

[    0.000000] Kernel command line: root=/dev/sda1 raid=noautodetect init=/usr/lib/systemd/systemd quiet rootfstype=ext4 rcutree.rcu_idle_gp_delay=1 drm_kms_helper.edid_firmware=edid/1920x1080_clevo_W670SR.bin 

[    0.105795] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored

[    1.946225] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS

[    3.555080] rtl8723be: Using firmware rtlwifi/rtl8723befw.bin

If all else fails, i'll update the system I guess

----------

## Adel Ahmed

bump

----------

## BT

Which chipset does your controller have and which kernel options did you enable?

----------

## Adel Ahmed

04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter

	Subsystem: Lenovo Device b728

	Kernel driver in use: rtl8723be

	Kernel modules: rtl8723be

and I have enabled rtl8723be(for wifi), and btusb

----------

## BT

There is an open issue at the official rtlwifi repository regarding your problem. It seems that the in-kernel rtl8723be driver doesn't fully support Bluetooth yet. There is also an out-of-tree rtl8723be driver that has been reported to work.

----------

## Adel Ahmed

I tried that module and nothing, here's my dmesg, got some output with this module:

[   64.563939] rtk_btusb: This is not 8723a, use new patch style!

[   64.563945] rtk_btusb: rtk_get_eversion::gEVersion=255

[   64.565700] rtk_btusb: rtk_get_eversion : eversion->status = 0x0, eversion->version = 0x1

[   64.565704] rtk_btusb: gEVersion=1

[   64.565707] rtk_btusb: opcode = 0x0

[   64.565708] rtk_btusb: length = 0x1

[   64.565709] rtk_btusb: data = 0x1

[   64.565711] rtk_btusb: lmp_version is 8723, project_id is 8723, match!

[   64.565713] rtk_btusb: fm_version = 0xe2f9f73

[   64.565715] rtk_btusb: number_of_total_patch = 2

[   64.565717] rtk_btusb: chipID = 2

[   64.565718] rtk_btusb: patch_length = 0x57e0

[   64.565732] rtk_btusb: start_offset = 0x5800

[   64.565734] rtk_btusb: buf_len = 0x57e0

[   64.565752] rtk_btusb: Fw: exists, config file:not exists

[   64.565754] rtk_btusb: load_firmware done

[   64.565770] rtk_btusb: get_firmware done

[   64.565771] rtk_btusb: download_data start

[   65.008216] rtk_btusb: download_data done

[   65.009214] rtk_btusb: check_fw_version : read_ver_rsp->lmp_subver = 0x9f73

[   65.009216] rtk_btusb: check_fw_version : patch_entry->lmp_sub = 0x8723

[   65.009218] rtk_btusb: Rtk patch end 0

[   65.009226] rtk_btusb: btusb_open end  pm_usage_cnt(0x0)

[   65.031239] rtk_btusb: hci0 evt 3

[   65.031240] rtk_btusb: btusb_notify : hci0 evt 3

[  420.807223] snd_hda_intel 0000:00:1b.0: IRQ timing workaround is activated for card #1. Suggest a bigger bdl_pos_adj.

----------

## BT

I guess it just doesn't work.

If you can't do without Bluetooth, your best option is to get a USB Bluetooth adapter that is known to work with Linux.Last edited by BT on Sat Jan 03, 2015 10:54 pm; edited 2 times in total

----------

## Adel Ahmed

hmm, I can survive without bluetooth, but I'' keep on looking for a solution, if I get things to work, I'lll be posting the solution.

----------

## www.rzr.online.fr

 *Adel Ahmed wrote:*   

> hmm, I can survive without bluetooth, but I'' keep on looking for a solution, if I get things to work, I'lll be posting the solution.

 

If it helps I have listed some upstreaming efforts at :

http://rzr.online.fr/q/ideapad

Feedback from testers is welcome

----------

