0

I'm using bluetoothctl 5.53 to scan for BLE advertisement. Initially, I tried bluetoothctl scan on but I'm not seeing the device advertising. I scanned with the nRfConnect app and was able to verify that the device is indeed advertising. Just not seeing it with the bluetoothctl.

After some searches, I found the following setting allows me to discover the advertising BLE device:

$bluetoothctl
[bluetooth]# menu scan
[bluetooth]# transport le
[bluetooth]# scan on

After looking through the bluez documentation, I saw this and it suggested the default bluetoothctl should be able to discover BLE devices:

string Transport (Default "auto")

                Transport parameter determines the type of
                scan.

                Possible values:
                    "auto"  - interleaved scan
                    "bredr" - BR/EDR inquiry
                    "le"    - LE scan only

                If "le" or "bredr" Transport is requested,
                and the controller doesn't support it,
                org.bluez.Error.Failed error will be returned.
                If "auto" transport is requested, scan will use
                LE, BREDR, or both, depending on what's
                currently enabled on the controller.

Doc here: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt#n95

However, this StackOverflow post suggests that the default filter might blocking me from seeing a lot of advertising devices: How to use bluetoothctl like hcitool lescan to report repeated proximity beacons

I also ran this to clear the filter setting, but I'm still not seeing any BLE devices

$bluetoothctl
[bluetooth]# menu scan
[bluetooth]# clear
[bluetooth]# back
[bluetooth]# scan on

So my question is:

  1. why am I not seeing BLE device advertising with just bluetoothctl scan on?
  2. is there a way to set the transport le permanently? So that everytime I do bluetoothctl scan on it looks for BLE devices?
DavidKanes
  • 183
  • 1
  • 1
  • 10
  • What is `ControllerMode` set to in `/etc/bluetooth/main.conf` – ukBaz Jan 20 '23 at 06:23
  • @ukBaz it's set to dual: ``` # Restricts all controllers to the specified transport. Default value # is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW). # Possible values: "dual", "bredr", "le" #ControllerMode = dual ``` – DavidKanes Jan 20 '23 at 06:30
  • Do you see different behaviour if you uncomment that line and set it to `ControllerMode = le`? – ukBaz Jan 20 '23 at 06:32
  • Unfortunatly I don't see any differences. First I tried to uncomment the line with the `ControllerMode` set to `dual` (since the comment suggests that the dual mode should be able to see le devices). Ran `bluetoothctl scan on`, cannot see the BLE device. Then I tried to set the value to `le`, and run `bluetoothctl scan on`, still no luck – DavidKanes Jan 20 '23 at 07:03
  • I saw one BLE device. Just not the one I'm advertising `[CHG] Device 5A:1D:F6:D8:FD:AA RSSI: -77 [NEW] Device 2C:41:A1:89:7A:1E LE-Bose Micro SoundLink [CHG] Device 28:11:A5:CA:A1:0F RSSI: -69` I can see the one I'm advertising using nRfConnect tho – DavidKanes Jan 20 '23 at 07:14
  • Did your restart the bluetooth service between file changes? e.g. `sudo service bluetooth restart` – ukBaz Jan 20 '23 at 07:16
  • I tried restarting the service and scan the device again, but I'm not seeing the BLE device. Also rebooted the laptop, and not discovering the advertisement as well. I'm running Ubuntu 18 – DavidKanes Jan 23 '23 at 15:07

0 Answers0