Pi B3, B3+ Bluetooth wierdness

Raspberry Pi 2

Pi B3, B3+ Bluetooth wierdness

Postby keithspg » Fri Apr 05, 2019 7:53 pm

As best I can tell, I have the same image running on 2 Pis. one is a Pi B3 and the other is a Pi B3+. I built the pi-bluetooth package to enable the bluetooth hardware and start the service on both Pis. The thing is the B3+ has a 'ghost' hci0 device that shows up at boot. When I try to use bluetoothctl, though, it says that there are no devices until I start the brcm43438.service. After I start it, on the 3+, the bluetooth device starts up as hci1 and is now available to bluetoothctl for pairing, etc. On the 3B-, in comparison, the device installs as hci0 (where I expect the first bluetooth device to be) and is available for pairing etc.

What is going on with the 3+ and bluetooth. Why is there a ghost hci0? Can I get rid of it so the software endds up beinfg the same on both the B3- and B3+?

B3-
$this->bbcode_second_pass_code('', '# systemctl | grep blue
sys-subsystem-bluetooth-devices-hci0.device loaded active plugged /sys/subsystem/bluetooth/devices/hci0
bluealsa.service loaded active running BluezAlsa proxy
bluetooth.service loaded active running Bluetooth service
brcm43438.service loaded active running Broadcom BCM43438 bluetooth HCI
system-bluealsa\x2daplay.slice loaded active active system-bluealsa\x2daplay.slice
bluetooth.target ')

B3+
$this->bbcode_second_pass_code('', '# systemctl | grep blue
sys-devices-platform-soc-3f300000.mmc-mmc_host-mmc1-mmc1:0001-mmc1:0001:3-bluetooth-hci0.device loaded active plugged /sys/devices/platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:3/bluetooth/hci0
sys-subsystem-bluetooth-devices-hci0.device loaded active plugged /sys/subsystem/bluetooth/devices/hci0
sys-subsystem-bluetooth-devices-hci1.device loaded active plugged /sys/subsystem/bluetooth/devices/hci1
bluealsa.service loaded active running BluezAlsa proxy
bluetooth.service loaded active running Bluetooth service
brcm43438.service loaded active running Broadcom BCM43438 bluetooth HCI
system-bluealsa\x2daplay.slice loaded active active system-bluealsa\x2daplay.slice
bluetooth.target ')

On a related note... Is there a reason I cannot get a regular BT dongle to work? If I stop the brcm43438.service then plug in a BT dongle, I can interact with it via bluetoothctl, but even if it is advertising, I cannot see it or connect to it with my phone.
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm

Re: Pi B3, B3+ Bluetooth wierdness

Postby keithspg » Mon Apr 08, 2019 2:27 pm

Continuing to pour info as I get it in there in the case that someone knows what is going on can comment.

The bulk of the BT diagnostic info out on the web is based in hcitool which is no longer part of the Bluez package. Since hcitool is not there, much of this info is worthless. I stumbled upon the command in bluez 5.50 which is btmgmt which appears to provide much if not all of the functionality of hcitool.
I think I can probably resolve the BT advertising issue with an external dongle on the B3- with btmgmt and will try this evening if I get time.

On the B3+, though, It gives a strange listing.

I do not know if I messed something up, but this is what I get on the B3:

$this->bbcode_second_pass_code('', '[mgmt]# info
Index list with 1 item
hci1: Primary controller
addr 43:45:C0:00:1F:AC version 7 manufacturer 15 class 0x040000
supported settings: powered connectable fast-connectable discoverable bondable link-security ssp br/edr hs le advertising secure-conn debug-keys privacy configuration static-addr
current settings: powered bondable br/edr secure-conn
name gusrune
short name
hci1: Configuration options
supported options: public-address
missing options:
')

note that is says 'hci1'. This is the onboard BT radio. I find it strange that hci1 is '43:45...' instead og a 'B8:27...' (standard Pi MAC address), but it is what it is and I also did not do anything to it. When I select hci0, I get this:

$this->bbcode_second_pass_code('', '[mgmt]# select hci0
Selected index 0
[hci0]# info
Reading hci0 info failed with status 0x11 (Invalid Index)
[hci0]# config
Reading hci976 config failed with status 0x11 (Invalid Index)
[hci0]# extinfo
Extended index list with 1 item

')

Can anyone shed light on what is going on and where this ghost hci0 comes from and how I can get rid of it? Like I said, I do not think I did anything to make this happen, but it is there according to the Bluez package. At boot, all I get is an hci1:

$this->bbcode_second_pass_code('', '# dmesg | grep hci
[ 4.336822] sdhci: Secure Digital Host Controller Interface driver
[ 4.336825] sdhci: Copyright(c) Pierre Ossman
[ 4.337329] sdhci-pltfm: SDHCI platform and OF driver helper
[ 9.447680] Bluetooth: hci1: BCM: chip id 107
[ 9.449752] Bluetooth: hci1: BCM: features 0x2f
[ 9.476217] Bluetooth: hci1: BCM4345C0
[ 9.476233] Bluetooth: hci1: BCM4345C0 (003.001.025) build 0000
[ 15.054890] Bluetooth: hci1: BCM4345C0 (003.001.025) build 0139')

Keith
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm

Re: Pi B3, B3+ Bluetooth wierdness

Postby keithspg » Tue Apr 09, 2019 4:35 pm

I got a comment on the bluezalsa issues list and was able to resolve one issue. To get rid of the bogus hci0, I had to blacklist btsdio. Create a file /etc/modprobe.d/blacklist-btsdio.conf with the contents blacklist btsdio. I do not know what else this breaks, but it allows bluetooth to pair and set up things with bluealsa on hci0 (default)
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm


Return to Broadcom

Who is online

Users browsing this forum: No registered users and 10 guests