10

When I run hcitool scan the shell shows Scanning... for ~10 sec but doesn't show any results.

Same for sudo hcitool scan

(I have an Android phone and a PC nearby with bluetooth activated and set to visible)

(It did work the first time; I didn't change anything since then)


System Specs

Bluetooth adapter is a Hama 00049229 (Manual)

Chipset:
Bus 001 Device 005: ID 0a5c:2121 Broadcom Corp. BCM2210 Bluetooth


hciconfig shows:
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 00:0D:18:01:5A:B3  ACL MTU: 1017:8  SCO MTU: 64:0
        UP RUNNING PSCAN
        RX bytes:849 acl:0 sco:0 events:39 errors:0
        TX bytes:420 acl:0 sco:0 commands:35 errors:0


(As commented by Tim Holt)
hcitool dev shows:

Devices:
    hci0    00:0D:18:01:5A:B3


(Also as commented by Tim Holt)
I ran hcidump --raw and the scan tool found all nearby bluetooth devices. Here is the dump (I scanned twice):

HCI sniffer - Bluetooth packet analyzer ver 2.4
device: hci0 snap_len: 1028 filter: 0xffffffff
< 01 01 04 05 33 8B 9E 08 00
> 04 0F 04 00 01 01 04
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C9
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C8
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C9
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C8
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C8
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B CA
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C7
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C9
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C7
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C8
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C5
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B CA
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C5
> 04 22 0F 01 65 FF 3D 83 15 00 01 00 04 01 12 BD 6B C9
> 04 01 01 00
< 01 19 04 0A 65 FF 3D 83 15 00 01 00 BD EB
> 04 0F 04 00 01 19 04
> 04 07 FF 00 65 FF 3D 83 15 00 4D 69 63 68 69 73 2D 50 43 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

And then, everything went back to normal (broken) again and hcidump --raw showed:

HCI sniffer - Bluetooth packet analyzer ver 2.4
device: hci0 snap_len: 1028 filter: 0xffffffff
< 01 01 04 05 33 8B 9E 08 00
> 04 0F 04 00 01 01 04
> 04 01 01 00


dmesg | grep -i bluetooth shows:

[    5.875950] Bluetooth: Core ver 2.19
[    6.000541] Bluetooth: HCI device and connection manager initialized
[    6.202400] Bluetooth: HCI socket layer initialized
[    6.209332] Bluetooth: L2CAP socket layer initialized
[    6.586384] Bluetooth: SCO socket layer initialized
[   29.059873] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   29.059914] Bluetooth: BNEP filters: protocol multicast
[   29.059972] Bluetooth: BNEP socket layer initialized
[   29.132785] Bluetooth: RFCOMM TTY layer initialized
[   29.132869] Bluetooth: RFCOMM socket layer initialized
[   29.132930] Bluetooth: RFCOMM ver 1.11


Raspberry Pi is model B Rev2

Installed packages:

  • bluetooth
  • bluez-utils
  • bluez-compat
  • bluez-hcidump
gizmo
  • 109
  • 1
  • 1
  • 5
  • What does "hcitool dev" give you? That should list your device. – Tim Holt Mar 22 '15 at 09:28
  • Also, try doing an "hcidump --raw" in one window, then do an "hcitool scan" in another - you ought to see some output in the dump window. – Tim Holt Mar 22 '15 at 09:30
  • hcidump: command not found -> How can I find the package that contains a program in Debian? I realize that question is closed as a duplicate, but the accepted answer is a good one, and if you click through to the duplicate you can check those answers too if you want. – goldilocks Mar 27 '15 at 18:22
  • Since it seems to work intermittently, it could just be the B cannot provide enough power, particularly if you have < 2A supply, so the device keeps failing. If you have a powered hub you could test it in that. – goldilocks Apr 07 '15 at 15:33
  • @goldilocks sadly I don't have a powered hub and the PSU reads 1.5A – gizmo Apr 10 '15 at 16:22
  • I can't promise that's the problem -- if it's just a pi B and the adapter (no keyboard, etc), you'd think it would be enough. However, the B's do have a bit of a problem with power. E.g., I have a wifi adapter that will shut down a B whenever I plug it in due to the sudden current draw, no matter what the power supply is. To use it I have to start the pi w/ it plugged in. But it does not do that to a B+. In your case, the only way to rule the PSU out would be to try a 2 A one; they come with ipads, if you have any friends there. – goldilocks Apr 10 '15 at 16:40
  • I've been struggling with the same problem. I've used 2.0A, 2.1A, and it doesn't seem to work. command line 'hcitool scan' worked only when I got my PI closer to my phone. Strange behavior... because, bluez-gui can discover devices which are much far away. the problems seems to happen only for command line discovery – Yilmaz Guleryuz Oct 23 '16 at 11:15

3 Answers3

6

Try running the following:

sudo bluetoothctl
agent on
default-agent
scan on

Type scan off to stop scanning.

Elliptica
  • 169
  • 1
  • 2
0

This is an ancient but wrong thread. Unfortunately pretty typical- instead of explaining "hcitools" it switches to another commands.... It looks as hcitool {options} are not My best guess

q5@q5-desktop:~$ hcitool dev Devices: hci1 00:50:B6:80:4D:5D

This should work

hcitool -i hciX scan --flush

BUT it is failing

hcitool -i hci1 scan --flush Scanning ... Inquiry failed: Invalid argument

PS hcitool --help has no "argument" - what is this missing argument ? ?

Jan Hus
  • 631
  • 1
  • 8
  • 22
0

From an anonymous edit:


Whenever you see something like:

[bluetooth]# scan on
Failed to start discovery: org.bluez.Error.NotReady

Power the chip on explicitly, type:

[bluetooth]# power on
[CHG] Controller 00:1A:7D:DA:71:08 Class: 0x500000
Changing power on succeeded
[CHG] Controller 00:1A:7D:DA:71:08 Powered: yes
Greenonline
  • 2,740
  • 4
  • 23
  • 36