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

'Bluetooth' integration does not work with Bluetooth Core Specification Version 5.0 and next versions! #88277

Closed
pvvx opened this issue Feb 16, 2023 · 7 comments

Comments

@pvvx
Copy link

pvvx commented Feb 16, 2023

The problem

'Bluetooth' integration does not work with Bluetooth Core Specification Version 5.0 and next versions.
No support for receiving Coded PHY on BT5.0 adapters. Adapters are able to switch the reception of BLE advertising on the main channels with PHY 1M and Coded PHY, but this integration does not allow this.

What version of Home Assistant Core has the issue?

all

What was the last working version of Home Assistant Core?

Home Assistant 2023.1.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Bluetooth

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bluetooth/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Sample for low cost Realtek RTL8761 BT adapter (current Linux firmware on RTL8761 supports BT5.1)

# btmgmt phy
Supported phys: BR1M1SLOT BR1M3SLOT BR1M5SLOT EDR2M1SLOT EDR2M3SLOT EDR2M5SLOT EDR3M1SLOT EDR3M3SLOT EDR3M5SLOT LE1MTX LE1MRX LE2MTX LE2MRX LECODEDTX LECODEDRX
Configurable phys: BR1M3SLOT BR1M5SLOT EDR2M1SLOT EDR2M3SLOT EDR2M5SLOT EDR3M1SLOT EDR3M3SLOT EDR3M5SLOT LE2MTX LE2MRX LECODEDTX LECODEDRX
Selected phys: BR1M1SLOT BR1M3SLOT BR1M5SLOT EDR2M1SLOT EDR2M3SLOT EDR2M5SLOT EDR3M1SLOT EDR3M3SLOT EDR3M5SLOT LECODEDTX LECODEDRX

# hciconfig -a
hci0:   Type: Primary  Bus: USB
        BD Address: 8C:88:2B:20:8B:42  ACL MTU: 1021:6  SCO MTU: 255:12
        UP RUNNING
        RX bytes:2020 acl:0 sco:0 events:178 errors:0
        TX bytes:23965 acl:0 sco:0 commands:178 errors:0
        Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: 'nanopineoplus2'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Version: 5.1 (0xa)  Revision: 0x999
        LMP Version: 5.1 (0xa)  Subversion: 0x646b
        Manufacturer: Realtek Semiconductor Corporation (93)
  1. Switch the adapter to work with CodedPHY:
    hcitool -i hci0 cmd 08 31 03 04 04
  2. Launch Home Assistant and it will only receive in LongRange mode (Coded PHY).

Example for test in nRFConnect:
image

@home-assistant
Copy link

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (bluetooth) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of bluetooth can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign bluetooth Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


bluetooth documentation
bluetooth source
(message by IssueLinks)

@bdraco
Copy link
Member

bdraco commented Feb 16, 2023

We are limited to what bleak supports https://github.com/hbldh/bleak/issues

@pvvx
Copy link
Author

pvvx commented Feb 16, 2023

Мы ограничены тем, что поддерживает bleak https://github.com/hbldh/bleak/issues .

PHY switching for scan modes in BLE has been fixed in Bluez for a long time.
It's the same with the Android API.

image

image
systemctl stop home-assistant...
hcitool -i hci1 cmd 08 31 03 04 04
systemctl start home-assistant...
image

@bdraco
Copy link
Member

bdraco commented Feb 16, 2023

PHY switching for scan modes in BLE has been fixed in Bluez for a long time.
It's the same with the Android API.

Home Assistant Bluetooth support is entirely based on bleak so we only support what bleak supports.

Anything else is a feature request which belongs at https://community.home-assistant.io/c/feature-requests/13

@bdraco bdraco closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
@pvvx
Copy link
Author

pvvx commented Feb 16, 2023

Why then was chosen "bleak"?
Why not MS-DOS?

Then describe in the documentation - Home Assistant does not support the BT5.0+ standard

@pvvx
Copy link
Author

pvvx commented Feb 16, 2023

Fix bugs here:
https://www.home-assistant.io/integrations/bluetooth
Or do I need to create a new topic?

@bdraco
Copy link
Member

bdraco commented Feb 16, 2023

Fix bugs here: home-assistant.io/integrations/bluetooth Or do I need to create a new topic?

The documentation can be updated via https://github.com/home-assistant/home-assistant.io/edit/current/source/_integrations/bluetooth.markdown

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

No branches or pull requests

2 participants