User avatar
0xFF
Posts: 202
Joined: Tue Nov 20, 2012 7:52 pm
Location: Poland

RPI3 scanning BLE devices

Mon Apr 18, 2016 1:13 pm

I have RPi3 with USB bluetooth 4.0 dongle

Code: Select all

 hciconfig
hci1:   Type: BR/EDR  Bus: UART
        BD Address: B8:27:EB:C0:5E:5C  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING
        RX bytes:2187 acl:6 sco:0 events:126 errors:0
        TX bytes:2066 acl:6 sco:0 commands:71 errors:0

hci0:   Type: BR/EDR  Bus: USB
        BD Address: 00:1A:7D:DA:71:13  ACL MTU: 310:10  SCO MTU: 64:8
        UP RUNNING
        RX bytes:6921 acl:0 sco:0 events:231 errors:0
        TX bytes:1527 acl:0 sco:0 commands:43 errors:0
When I scan for BLE devices with usb dongle:

Code: Select all

 hcitool -i hci0 lescan


console starts to display BLE devices each time device advertising or reply to scan request.
So console is scrolling endlessly.

But when I scan for BLE devices with on-board bluetooth module:

Code: Select all

 hcitool -i hci1 lescan

console seems to display only unique device's (MAC and name)
So console stops when all devices are discovered.

Is it issue with module firmware or expected behavior ?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2441
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: RPI3 scanning BLE devices

Mon Apr 18, 2016 1:23 pm

Have you tried the --duplicates option?

Code: Select all

Usage:
        lescan [--privacy] enable privacy
        lescan [--passive] set scan type passive (default active)
        lescan [--whitelist] scan for address in the whitelist only
        lescan [--discovery=g|l] enable general or limited discoveryprocedure
        lescan [--duplicates] don't filter duplicates

User avatar
0xFF
Posts: 202
Joined: Tue Nov 20, 2012 7:52 pm
Location: Poland

Re: RPI3 scanning BLE devices

Mon Apr 18, 2016 1:51 pm

ok, thanks. --duplicates option did the trick for on-board module.

Trialanderrors
Posts: 3
Joined: Tue Nov 07, 2017 8:13 pm

Re: RPI3 scanning BLE devices

Tue Nov 07, 2017 8:18 pm

Is there any way to run both the duplicates and whitelist option? I’d like to see every advert from a particular device.

Return to “Advanced users”