GoveeBTTempLogger: Failing on ubuntu 22.04 (linux mint 21) - LE Set Scan Parameters Command Disallowed
Hello,
I am facing trouble trying to make goveebttemplogger work, may be because of latest change in bluetooth stack.
The issue happens on first call of hci_le_set_scan_parameters(device_handle, 0x01, htobs(0x0012), htobs(0x0012), 0x01, 0x00, 1000)
and it is failing with error : Error: Failed to set scan parameters: Input/output error due to the action being disallowed (see btmon trace below).
On the other side I am able to complete a manual le scan with bluetoothctl on the very same host and see my Govee devices.
So to me it looks very much like this issue where bluetoothctl works but not hcitools.
It seems people recommend to do a hci_reset before see 1 & 2. Yet I don’t understand how the code should be change to have a succesfull bluetooth initialisation - I tried my own code, but it fail the same. I am completely new to bluetooth stack, so can help much more.
Regards,
Yves
PS:
uname -a
Linux yves-huv 5.19.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 15 12:05:40 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ sudo GoveeBTTempLogger output
2023-02-04T15:41:36] GoveeBTTempLogger Version 2.20221220-1 Built on: Feb 3 2023 at 13:10:48
[2023-02-04T15:41:36] LocalName: yves-huv
[2023-02-04T15:41:36] No BlueTooth Address Filter: [00:00:00:00:00:00]
[ ] Error: Failed to set scan parameters: Input/output error
GoveeBTTempLogger Version 2.20221220-1 Built on: Feb 3 2023 at 13:10:48 (exiting)
btmon output
Bluetooth monitor ver 5.64
= Note: Linux version 5.19.0-28-generic (x86_64) 0.395741
= Note: Bluetooth subsystem version 2.22 0.395747
= New Index: CC:D9:AC:C3:14:A4 (Primary,USB,hci0) [hci0] 0.395749
= Open Index: CC:D9:AC:C3:14:A4 [hci0] 0.395750
= Index Info: CC:D9:AC:C3:14:A4 (Intel Corp.) [hci0] 0.395751
@ MGMT Open: bluetoothd (privileged) version 1.22 {0x0001} 0.395753
@ RAW Open: goveebttemplogg (privileged) version 2.22 {0x0002} 4.406850
@ RAW Close: goveebttemplogg {0x0002} 4.406864
@ RAW Open: goveebttemplogg (privileged) version 2.22 {0x0002} [hci0] 4.406883
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #1 [hci0] 4.406916
Scanning: Disabled (0x00)
Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4 #2 [hci0] 4.525500
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Command Disallowed (0x0c)
< HCI Command: Read Local Name (0x03|0x0014) plen 0 #3 [hci0] 4.525746
> HCI Event: Command Complete (0x0e) plen 252 #4 [hci0] 4.530529
Read Local Name (0x03|0x0014) ncmd 1
Status: Success (0x00)
Name: yves-huv
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #5 [hci0] 4.530891
Type: Active (0x01)
Interval: 11.250 msec (0x0012)
Window: 11.250 msec (0x0012)
Own address type: Random (0x01)
Filter policy: Accept all advertisement (0x00)
> HCI Event: Command Complete (0x0e) plen 4 #6 [hci0] 4.532440
LE Set Scan Parameters (0x08|0x000b) ncmd 1
Status: Command Disallowed (0x0c)
@ RAW Close: goveebttemplogg {0x0002} [hci0] 4.532637
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 20 (10 by maintainers)
This one solves all bluetooth issue. Many thanks! This was an opportunity to learn a lot on bluez et linux bluetooth for me.