Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute management command 'scanend' #3

Closed
Firestorm7893 opened this issue Jan 16, 2021 · 10 comments
Closed

Failed to execute management command 'scanend' #3

Firestorm7893 opened this issue Jan 16, 2021 · 10 comments

Comments

@Firestorm7893
Copy link

Hello everyone. After finding out that the lightouses on steam vr for linux are borked i wanted to give this script a try.
But unfortunately it seems like my computer hates bluethoot with a passion and it just refuses to work.
Whenever I launch the scrip for turning on the base stations the following error pops up:

2021-01-16 20:19:31 [DEBUG]: dry_run: False
2021-01-16 20:19:31 [INFO ]: SteamvrUtils turning on:
2021-01-16 20:19:31 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-16 20:19:31 [ERROR]: Failure of attempt 1 of 5
2021-01-16 20:19:31 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-16 20:19:31 [ERROR]: Failure of attempt 2 of 5
2021-01-16 20:19:32 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-16 20:19:32 [ERROR]: Failure of attempt 3 of 5
2021-01-16 20:19:32 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-16 20:19:32 [ERROR]: Failure of attempt 4 of 5
2021-01-16 20:19:33 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-16 20:19:33 [ERROR]: Failure of attempt 5 of 5
2021-01-16 20:19:33 [ERROR]: No successful attempt in any of the 5 attempts. Last error:
2021-01-16 20:19:33 [ERROR]: 
Traceback (most recent call last):
  File "./steamvr_utils.py", line 110, in main
    steamvr_utils.action(selected_action)
  File "./steamvr_utils.py", line 35, in action
    self.turn_on()
  File "./steamvr_utils.py", line 60, in turn_on
    self.basestation_power_interface.robust_action(BasestationPowerInterface.Action.ON)
  File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 124, in robust_action
    attempt_loop(lambda: self.scan(), self.config.basestation_attempt_count_scan())
  File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 122, in attempt_loop
    raise last_error
  File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 110, in attempt_loop
    return function()
  File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 124, in <lambda>
    attempt_loop(lambda: self.scan(), self.config.basestation_attempt_count_scan())
  File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 63, in scan
    raise e
  File "/home/firestorm7893/Desktop/steamvr_utils/scripts/basestation_interface.py", line 49, in scan
    scanner.scan(2)
  File "/usr/local/lib/python3.8/dist-packages/bluepy/btle.py", line 852, in scan
    self.start(passive=passive)
  File "/usr/local/lib/python3.8/dist-packages/bluepy/btle.py", line 797, in start
    self._mgmtCmd(self._cmd()+"end")
  File "/usr/local/lib/python3.8/dist-packages/bluepy/btle.py", line 312, in _mgmtCmd
    raise BTLEManagementError("Failed to execute management command '%s'" % (cmd), rsp)
bluepy.btle.BTLEManagementError: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)

It would be really cool if I managed to get it working

@DavidRisch
Copy link
Owner

Please send me the output of hciconfig -a.
If you have exactly one bluetooth device, this is a problem with your hardware and not this repo.
If you have multiple bluetooth devices the wrong one might be used for scanning, I might be able to help you in that case.

@Firestorm7893
Copy link
Author

Here it is. I have two totally different bluetooth adapaters, so i'll show the hciconfig for both:
This is from a tp-link bluetooth adapter

hci0:	Type: Primary  Bus: USB
	BD Address: 00:1A:7D:DA:71:15  ACL MTU: 310:10  SCO MTU: 64:8
	UP RUNNING PSCAN ISCAN 
	RX bytes:738 acl:0 sco:0 events:56 errors:0
	TX bytes:3682 acl:0 sco:0 commands:55 errors:0
	Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH HOLD SNIFF PARK 
	Link mode: SLAVE ACCEPT 
	Name: 'firestorm7893-desktop'
	Class: 0x2c0104
	Service Classes: Rendering, Capturing, Audio
	Device Class: Computer, Desktop workstation
	HCI Version: 4.0 (0x6)  Revision: 0x22bb
	LMP Version: 4.0 (0x6)  Subversion: 0x22bb
	Manufacturer: Cambridge Silicon Radio (10)

And this is from a Hamlet one:

hci0:	Type: Primary  Bus: USB
	BD Address: 00:1A:7D:DA:71:0D  ACL MTU: 310:10  SCO MTU: 64:8
	UP RUNNING 
	RX bytes:979 acl:0 sco:0 events:53 errors:0
	TX bytes:3181 acl:0 sco:0 commands:53 errors:0
	Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH HOLD SNIFF PARK 
	Link mode: SLAVE ACCEPT 
	Name: 'firestorm7893-desktop'
	Class: 0x2c0104
	Service Classes: Rendering, Capturing, Audio
	Device Class: Computer, Desktop workstation
	HCI Version: 4.0 (0x6)  Revision: 0x22bb
	LMP Version: 4.0 (0x6)  Subversion: 0x22bb
	Manufacturer: Cambridge Silicon Radio (10)

But looks like they are basically the same, only a slightly different Bd address

@Firestorm7893
Copy link
Author

Just noticed the scripts runs kind of randomly:
Most of the time it errors at every attempt. Then once in a while looks like it succeeds.
These are the logs of two runs of the same script without any change anywhere:

firestorm7893@firestorm7893-desktop:~/.steamvr_utils/scripts$ ./steamvr_utils.py on
2021-01-17 11:23:48 [DEBUG]: dry_run: False
2021-01-17 11:23:48 [INFO ]: SteamvrUtils turning on:
2021-01-17 11:23:48 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-17 11:23:48 [ERROR]: Failure of attempt 1 of 5
2021-01-17 11:23:49 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-17 11:23:49 [ERROR]: Failure of attempt 2 of 5
2021-01-17 11:23:49 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-17 11:23:49 [ERROR]: Failure of attempt 3 of 5
2021-01-17 11:23:50 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-17 11:23:50 [ERROR]: Failure of attempt 4 of 5
2021-01-17 11:23:50 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-17 11:23:50 [ERROR]: Failure of attempt 5 of 5
2021-01-17 11:23:51 [ERROR]: No successful attempt in any of the 5 attempts. Last error:
2021-01-17 11:23:51 [ERROR]: 
Traceback (most recent call last):
  File "./steamvr_utils.py", line 110, in main
    steamvr_utils.action(selected_action)
  File "./steamvr_utils.py", line 35, in action
    self.turn_on()
  File "./steamvr_utils.py", line 60, in turn_on
    self.basestation_power_interface.robust_action(BasestationPowerInterface.Action.ON)
  File "/home/firestorm7893/.steamvr_utils/scripts/basestation_interface.py", line 124, in robust_action
    attempt_loop(lambda: self.scan(), self.config.basestation_attempt_count_scan())
  File "/home/firestorm7893/.steamvr_utils/scripts/basestation_interface.py", line 122, in attempt_loop
    raise last_error
  File "/home/firestorm7893/.steamvr_utils/scripts/basestation_interface.py", line 110, in attempt_loop
    return function()
  File "/home/firestorm7893/.steamvr_utils/scripts/basestation_interface.py", line 124, in <lambda>
    attempt_loop(lambda: self.scan(), self.config.basestation_attempt_count_scan())
  File "/home/firestorm7893/.steamvr_utils/scripts/basestation_interface.py", line 63, in scan
    raise e
  File "/home/firestorm7893/.steamvr_utils/scripts/basestation_interface.py", line 49, in scan
    scanner.scan(2)
  File "/home/firestorm7893/.local/lib/python3.8/site-packages/bluepy/btle.py", line 852, in scan
    self.start(passive=passive)
  File "/home/firestorm7893/.local/lib/python3.8/site-packages/bluepy/btle.py", line 797, in start
    self._mgmtCmd(self._cmd()+"end")
  File "/home/firestorm7893/.local/lib/python3.8/site-packages/bluepy/btle.py", line 312, in _mgmtCmd
    raise BTLEManagementError("Failed to execute management command '%s'" % (cmd), rsp)
bluepy.btle.BTLEManagementError: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
firestorm7893@firestorm7893-desktop:~/.steamvr_utils/scripts$ ./steamvr_utils.py on
2021-01-17 11:23:51 [DEBUG]: dry_run: False
2021-01-17 11:23:51 [INFO ]: SteamvrUtils turning on:
2021-01-17 11:23:51 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-17 11:23:51 [ERROR]: Failure of attempt 1 of 5
2021-01-17 11:23:54 [INFO ]: Success of attempt 1 of 5
2021-01-17 11:23:54 [INFO ]: Success of attempt 2 of 5
2021-01-17 11:23:55 [INFO ]: Success of attempt 3 of 5
2021-01-17 11:23:55 [INFO ]: Success of attempt 4 of 5
2021-01-17 11:23:56 [INFO ]: Success of attempt 5 of 5
firestorm7893@firestorm7893-desktop:~/.steamvr_utils/scripts$ 

@DavidRisch
Copy link
Owner

Can you please send me the output of hciconfig hci0 features (with one of your adapters connected)?

Does the success of the script depend on :

  • which adapter is connected?
  • how long it has been connected for?
  • if the previous run was successful?

I only have a single none removable Bluetooth device, so I cant test this myself: how does the output of hciconfig -a look like when both devices are connected and what happens when hci0 is disconnected (but hci1 remains pluged in), can the be a hci1 without a hci0 (which would probably cause the script to fail)?

In the second log you send the scan also failed. There should be lines like Connecting to c2:ce:42:ef:fd:a0, but your scan did not find any Base Stations (I am assuming there are Base Stations near you). I will add an error message for that.

@DavidRisch
Copy link
Owner

I will add an error message for that.

Added in 34dd4f3.

@Firestorm7893
Copy link
Author

Heres the output of both adsapters:


firestorm7893@firestorm7893-desktop:~$ hciconfig hci0 features
hci0:	Type: Primary  Bus: USB
	BD Address: 00:1A:7D:DA:71:15  ACL MTU: 310:10  SCO MTU: 64:8
	Features page 0: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
		<3-slot packets> <5-slot packets> <encryption> <slot offset> 
		<timing accuracy> <role switch> <hold mode> <sniff mode> 
		<park state> <RSSI> <channel quality> <SCO link> <HV2 packets> 
		<HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme> 
		<power control> <transparent SCO> <broadcast encrypt> 
		<EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan> 
		<interlaced iscan> <interlaced pscan> <inquiry with RSSI> 
		<extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave> 
		<AFH class. slave> <LE support> <3-slot EDR ACL> 
		<5-slot EDR ACL> <sniff subrating> <pause encryption> 
		<AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps> 
		<EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended inquiry> 
		<LE and BR/EDR> <simple pairing> <encapsulated PDU> 
		<non-flush flag> <LSTO> <inquiry TX power> <EPC> 
		<extended features> 
	Features page 1: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00
firestorm7893@firestorm7893-desktop:~$ hciconfig hci0 features
hci0:	Type: Primary  Bus: USB
	BD Address: 00:1A:7D:DA:71:0D  ACL MTU: 310:10  SCO MTU: 64:8
	Features page 0: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
		<3-slot packets> <5-slot packets> <encryption> <slot offset> 
		<timing accuracy> <role switch> <hold mode> <sniff mode> 
		<park state> <RSSI> <channel quality> <SCO link> <HV2 packets> 
		<HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme> 
		<power control> <transparent SCO> <broadcast encrypt> 
		<EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan> 
		<interlaced iscan> <interlaced pscan> <inquiry with RSSI> 
		<extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave> 
		<AFH class. slave> <LE support> <3-slot EDR ACL> 
		<5-slot EDR ACL> <sniff subrating> <pause encryption> 
		<AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps> 
		<EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended inquiry> 
		<LE and BR/EDR> <simple pairing> <encapsulated PDU> 
		<non-flush flag> <LSTO> <inquiry TX power> <EPC> 
		<extended features> 
	Features page 1: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00
firestorm7893@firestorm7893-desktop:~$ 

Screenshot from 2021-01-17 16-55-50

And the stations looks like they are being detected. (i also tried connecting to the trough the menu but nothing :( )

which adapter is connected?
Looks like pure luck to me, 9/10 it doesn't work. I tried various combinations (different adapters, using sudo, setting the stations up in the settings
how long it has been connected for?
plugging and unplugging them do not seem to matter. It's really weird.
if the previous run was successful?
It will fail for sure, or at least it happened every time

@DavidRisch
Copy link
Owner

Based on the image I assume you have V1 Base Stations. That might be an additional problem here, I only have V2. And as far as I know no one (except now you) has tested this repo with them.

But the Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters) is definitely not caused by the version of your Base Stations. Based on my limited knowledge, both of your adapters should be capable of running this repo. But that does not seem to be the case, I don't know why.

You can try this repo (no relation to this one): https://github.com/risa2000/lhctrl
It supposedly works with V1 Lighthouses. If that works for you, you can make a new issue here to include their script in this repo.
Other than that I am unable to help you.

@Firestorm7893
Copy link
Author

😮 omg i tried all of this time with the wrong version, i feel stupid. Thanks for pointing me in the right direction

@Tschrock
Copy link

I'm having the same issue with V2 lighthouses. It looks like it might be an issue with bluepy (see IanHarvey/bluepy#150).

Following a suggestion in that thread, I was able to get it working by replacing

scanner.scan(2)

with

scanner.scan(2, passive=True)

in ./scripts/basestation_interface/v2_interface.py.

./scripts/steamvr_utils.py off
$ ./scripts/steamvr_utils.py off
2021-01-27 15:41:05 [DEBUG]: dry_run: False
2021-01-27 15:41:05 [DEBUG]: 'pactl list short sinks':
1       alsa_output.pci-0000_0c_00.4.analog-stereo      module-alsa-card.c      s16le 2ch 48000Hz       IDLE
3       alsa_output.usb-Razer_Inc_Razer_Seiren_X_UC1846L01300074-00.iec958-stereo       module-alsa-card.c      s16le 2ch 48000Hz       IDLE
5       alsa_output.pci-0000_0a_00.1.hdmi-stereo        module-alsa-card.c      s16le 2ch 48000Hz       IDLE

2021-01-27 15:41:05 [DEBUG]: normal sink: alsa_output.usb-Razer_Inc_Razer_Seiren_X_UC1846L01300074-00.iec958-stereo
2021-01-27 15:41:05 [DEBUG]: vr sink: alsa_output.pci-0000_0a_00.1.hdmi-stereo
2021-01-27 15:41:05 [INFO ]: SteamvrUtils turning off:
2021-01-27 15:41:05 [INFO ]: Scanning for Base Stations:
2021-01-27 15:41:05 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-27 15:41:05 [ERROR]: Failure of attempt 1 of 5: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-27 15:41:05 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-27 15:41:05 [ERROR]: Failure of attempt 2 of 5: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-27 15:41:06 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-27 15:41:06 [ERROR]: Failure of attempt 3 of 5: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-27 15:41:06 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-27 15:41:06 [ERROR]: Failure of attempt 4 of 5: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-27 15:41:07 [ERROR]: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-27 15:41:07 [ERROR]: Failure of attempt 5 of 5: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
2021-01-27 15:41:07 [ERROR]: No successful attempt in any of the 5 attempts. Last error:
2021-01-27 15:41:07 [ERROR]: 
Traceback (most recent call last):
  File "./scripts/steamvr_utils.py", line 128, in main
    steamvr_utils.action(selected_action)
  File "./scripts/steamvr_utils.py", line 48, in action
    self.turn_off()
  File "./scripts/steamvr_utils.py", line 62, in turn_off
    self.basestation_power_interface.action(basestation_interface.Action.OFF)
  File "/home/cyber/build/steamvr_utils/scripts/basestation_interface/v2_interface.py", line 115, in action
    attempt_loop(lambda: self.scan(), self.config.basestation_attempt_count_scan())
  File "/home/cyber/build/steamvr_utils/scripts/basestation_interface/v2_interface.py", line 112, in attempt_loop
    raise last_error
  File "/home/cyber/build/steamvr_utils/scripts/basestation_interface/v2_interface.py", line 100, in attempt_loop
    return function()
  File "/home/cyber/build/steamvr_utils/scripts/basestation_interface/v2_interface.py", line 115, in <lambda>
    attempt_loop(lambda: self.scan(), self.config.basestation_attempt_count_scan())
  File "/home/cyber/build/steamvr_utils/scripts/basestation_interface/v2_interface.py", line 59, in scan
    raise e
  File "/home/cyber/build/steamvr_utils/scripts/basestation_interface/v2_interface.py", line 45, in scan
    scanner.scan(2)
  File "/usr/local/lib/python3.8/dist-packages/bluepy/btle.py", line 852, in scan
    self.start(passive=passive)
  File "/usr/local/lib/python3.8/dist-packages/bluepy/btle.py", line 797, in start
    self._mgmtCmd(self._cmd()+"end")
  File "/usr/local/lib/python3.8/dist-packages/bluepy/btle.py", line 312, in _mgmtCmd
    raise BTLEManagementError("Failed to execute management command '%s'" % (cmd), rsp)
bluepy.btle.BTLEManagementError: Failed to execute management command 'scanend' (code: 13, error: Invalid Parameters)
hciconfig -a
$ hciconfig -a
hci0:   Type: Primary  Bus: USB
        BD Address: 00:1A:7D:DA:71:13  ACL MTU: 310:10  SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN INQUIRY 
        RX bytes:495572 acl:0 sco:0 events:14576 errors:0
        TX bytes:9877 acl:14 sco:0 commands:513 errors:0
        Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH HOLD SNIFF PARK 
        Link mode: SLAVE ACCEPT 
        Name: 'Cyber-Ubuntu-PC'
        Class: 0x3c0104
        Service Classes: Rendering, Capturing, Object Transfer, Audio
        Device Class: Computer, Desktop workstation
        HCI Version: 4.0 (0x6)  Revision: 0x22bb
        LMP Version: 4.0 (0x6)  Subversion: 0x22bb
        Manufacturer: Cambridge Silicon Radio (10)
hciconfig hci0 features
$ hciconfig hci0 features
hci0:   Type: Primary  Bus: USB
        BD Address: 00:1A:7D:DA:71:13  ACL MTU: 310:10  SCO MTU: 64:8
        Features page 0: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
                <3-slot packets> <5-slot packets> <encryption> <slot offset> 
                <timing accuracy> <role switch> <hold mode> <sniff mode> 
                <park state> <RSSI> <channel quality> <SCO link> <HV2 packets> 
                <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme> 
                <power control> <transparent SCO> <broadcast encrypt> 
                <EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan> 
                <interlaced iscan> <interlaced pscan> <inquiry with RSSI> 
                <extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave> 
                <AFH class. slave> <LE support> <3-slot EDR ACL> 
                <5-slot EDR ACL> <sniff subrating> <pause encryption> 
                <AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps> 
                <EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended inquiry> 
                <LE and BR/EDR> <simple pairing> <encapsulated PDU> 
                <non-flush flag> <LSTO> <inquiry TX power> <EPC> 
                <extended features> 
        Features page 1: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00
lsusb -v
$ lsusb -v
...
Bus 003 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x0a12 Cambridge Silicon Radio, Ltd
  idProduct          0x0001 Bluetooth Dongle (HCI mode)
  bcdDevice           88.91
  iManufacturer           0 
  iProduct                2 CSR8510 A10
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x00b1
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0019  1x 25 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0019  1x 25 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0021  1x 33 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0021  1x 33 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered
...

OS: Ubuntu 20.10 x86_64
Kernel: 5.8.0-41-generic

@DavidRisch
Copy link
Owner

Interestingly on my hardware I have the exact opposite behavior, It works without passive=True and does not work with it.
I added a config option and error messages in 5970a39 so that the scan type (active/passive) can be set without editing code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants