diff --git a/bluetooth_bcm43xx/CHANGELOG.md b/bluetooth_bcm43xx/CHANGELOG.md index 0a858c6..e61e3b8 100644 --- a/bluetooth_bcm43xx/CHANGELOG.md +++ b/bluetooth_bcm43xx/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.1 +- Some cleanups +- Use new baudrate +- Set bluetooth mac + ## 1.0 - Update base image -- Update Firmware (https://github.com/RPi-Distro/firmware-nonfree) diff --git a/bluetooth_bcm43xx/config.json b/bluetooth_bcm43xx/config.json index 2ce26eb..50ee2e2 100644 --- a/bluetooth_bcm43xx/config.json +++ b/bluetooth_bcm43xx/config.json @@ -1,6 +1,6 @@ { "name": "Bluetooth BCM43xx", - "version": "1.0", + "version": "1.1", "slug": "bluetooth_bcm43xx", "description": "Activate Bluetooth for Broadcom 43xx chips", "url": "https://home-assistant.io/addons/bluetooth_bcm43xx/", diff --git a/bluetooth_bcm43xx/firmware/LICENCE.broadcom_bcm43xx b/bluetooth_bcm43xx/firmware/LICENCE.broadcom_bcm43xx deleted file mode 100644 index ff26fdd..0000000 --- a/bluetooth_bcm43xx/firmware/LICENCE.broadcom_bcm43xx +++ /dev/null @@ -1,65 +0,0 @@ -SOFTWARE LICENSE AGREEMENT - -The accompanying software in binary code form (“Software”), is licensed to you, -or, if you are accepting on behalf of an entity, the entity and its affiliates -exercising rights hereunder (“Licensee”) subject to the terms of this software -license agreement (“Agreement”), unless Licensee and Broadcom Corporation -(“Broadcom”) execute a separate written software license agreement governing -use of the Software. ANY USE, REPRODUCTION, OR DISTRIBUTION OF THE SOFTWARE -CONSTITUTES LICENSEE’S ACCEPTANCE OF THIS AGREEMENT. - -1. License. Subject to the terms and conditions of this Agreement, -Broadcom hereby grants to Licensee a limited, non-exclusive, non-transferable, -royalty-free license: (i) to use and integrate the Software with any other -software; and (ii) to reproduce and distribute the Software complete, -unmodified, and as provided by Broadcom, solely for use with Broadcom -proprietary integrated circuit product(s) sold by Broadcom with which the -Software was designed to be used, or their successors. - -2. Restrictions. Licensee shall distribute Software with a copy of this -Agreement. Licensee shall not remove, efface or obscure any copyright or -trademark notices from the Software. Reproductions of the Broadcom copyright -notice shall be included with each copy of the Software, except where such -Software is embedded in a manner not readily accessible to the end user. -Licensee shall not: (i) use, license, sell or otherwise distribute the Software -except as provided in this Agreement; (ii) attempt to modify in any way, -reverse engineer, decompile or disassemble any portion of the Software; or -(iii) use the Software or other material in violation of any applicable law or -regulation, including but not limited to any regulatory agency. This Agreement -shall automatically terminate upon Licensee’s failure to comply with any of the -terms of this Agreement. In such event, Licensee will destroy all copies of the -Software and its component parts. - -3. Ownership. The Software is licensed and not sold. Title to and -ownership of the Software, including all intellectual property rights thereto, -and any portion thereof remain with Broadcom or its licensors. Licensee hereby -covenants that it will not assert any claim that the Software created by or for -Broadcom infringe any intellectual property right owned or controlled by -Licensee. - -4. Disclaimer. THE SOFTWARE IS OFFERED “AS IS,” AND BROADCOM PROVIDES AND -GRANTS AND LICENSEE RECEIVES NO SUPPORT AND NO WARRANTIES OF ANY KIND, EXPRESS -OR IMPLIED, BY STATUTE, COMMUNICATION OR CONDUCT WITH LICENSEE, OR OTHERWISE. -BROADCOM SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A SPECIFIC PURPOSE, OR NONINFRINGEMENT CONCERNING THE SOFTWARE OR -ANY UPGRADES TO OR DOCUMENTATION FOR THE SOFTWARE. WITHOUT LIMITATION OF THE -ABOVE, BROADCOM GRANTS NO WARRANTY THAT THE SOFTWARE IS ERROR-FREE OR WILL -OPERATE WITHOUT INTERRUPTION, AND GRANTS NO WARRANTY REGARDING ITS USE OR THE -RESULTS THEREFROM INCLUDING, WITHOUT LIMITATION, ITS CORRECTNESS, ACCURACY, OR -RELIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM -OR ANY OF ITS LICENSORS HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER FOR BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE) OR -OTHERWISE, ARISING OUT OF THIS AGREEMENT OR USE, REPRODUCTION, OR DISTRIBUTION -OF THE SOFTWARE, INCLUDING BUT NOT LIMITED TO LOSS OF DATA AND LOSS OF PROFITS, -EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THESE -LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY -LIMITED REMEDY. - -5. Export Laws. LICENSEE UNDERSTANDS AND AGREES THAT THE SOFTWARE IS -SUBJECT TO UNITED STATES AND OTHER APPLICABLE EXPORT-RELATED LAWS AND -REGULATIONS AND THAT LICENSEE MAY NOT EXPORT, RE-EXPORT OR TRANSFER THE -SOFTWARE OR ANY DIRECT PRODUCT OF THE SOFTWARE EXCEPT AS PERMITTED UNDER THOSE -LAWS. WITHOUT LIMITING THE FOREGOING, EXPORT, RE-EXPORT, OR TRANSFER OF THE -SOFTWARE TO CUBA, IRAN, NORTH KOREA, SUDAN, AND SYRIA IS PROHIBITED. - diff --git a/bluetooth_bcm43xx/firmware/bcm43xx-0.fw-610.812 b/bluetooth_bcm43xx/firmware/bcm43xx-0.fw-610.812 deleted file mode 100644 index 9ee5ccc..0000000 Binary files a/bluetooth_bcm43xx/firmware/bcm43xx-0.fw-610.812 and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/bcm43xx_hdr-0.fw-610.812 b/bluetooth_bcm43xx/firmware/bcm43xx_hdr-0.fw-610.812 deleted file mode 100644 index a6db78d..0000000 Binary files a/bluetooth_bcm43xx/firmware/bcm43xx_hdr-0.fw-610.812 and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac-sdio.bin deleted file mode 100644 index 99d951f..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac43143-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac43143-sdio.bin deleted file mode 100644 index e4f56f3..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac43143-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac43143.bin b/bluetooth_bcm43xx/firmware/brcmfmac43143.bin deleted file mode 100644 index 28b8db9..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac43143.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac43241b0-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac43241b0-sdio.bin deleted file mode 100644 index 729b894..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac43241b0-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac43241b4-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac43241b4-sdio.bin deleted file mode 100644 index 5d10c24..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac43241b4-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac4329-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac4329-sdio.bin deleted file mode 100644 index d4c4560..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac4329-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac4330-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac4330-sdio.bin deleted file mode 100644 index e3bc355..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac4330-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac4334-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac4334-sdio.bin deleted file mode 100644 index ade994f..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac4334-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac4335-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac4335-sdio.bin deleted file mode 100644 index a670e96..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac4335-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac43362-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac43362-sdio.bin deleted file mode 100644 index c11dfb2..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac43362-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac43430-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac43430-sdio.bin deleted file mode 100644 index 2f96472..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac43430-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/firmware/brcmfmac43430-sdio.txt b/bluetooth_bcm43xx/firmware/brcmfmac43430-sdio.txt deleted file mode 100644 index ea4f648..0000000 --- a/bluetooth_bcm43xx/firmware/brcmfmac43430-sdio.txt +++ /dev/null @@ -1,66 +0,0 @@ -# NVRAM file for BCM943430WLPTH -# 2.4 GHz, 20 MHz BW mode - -# The following parameter values are just placeholders, need to be updated. -manfid=0x2d0 -prodid=0x0727 -vendid=0x14e4 -devid=0x43e2 -boardtype=0x0727 -boardrev=0x1101 -boardnum=22 -macaddr=00:90:4c:c5:12:38 -sromrev=11 -boardflags=0x00404201 -boardflags3=0x08000000 -xtalfreq=37400 -nocrc=1 -ag0=255 -aa2g=1 -ccode=ALL - -pa0itssit=0x20 -extpagain2g=0 -#PA parameters for 2.4GHz, measured at CHIP OUTPUT -pa2ga0=-168,7161,-820 -AvVmid_c0=0x0,0xc8 -cckpwroffset0=5 - -# PPR params -maxp2ga0=84 -txpwrbckof=6 -cckbw202gpo=0 -legofdmbw202gpo=0x66111111 -mcsbw202gpo=0x77711111 -propbw202gpo=0xdd - -# OFDM IIR : -ofdmdigfilttype=18 -ofdmdigfilttypebe=18 -# PAPD mode: -papdmode=1 -papdvalidtest=1 -pacalidx2g=42 -papdepsoffset=-22 -papdendidx=58 - -# LTECX flags -ltecxmux=0 -ltecxpadnum=0x0102 -ltecxfnsel=0x44 -ltecxgcigpio=0x01 - -il0macaddr=00:90:4c:c5:12:38 -wl0id=0x431b - -deadman_to=0xffffffff -# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG -muxenab=0x1 -# CLDO PWM voltage settings - 0x4 - 1.1 volt -#cldo_pwm=0x4 - -#VCO freq 326.4MHz -spurconfig=0x3 - -edonthd20l=-75 -edoffthd20ul=-80 diff --git a/bluetooth_bcm43xx/firmware/brcmfmac4354-sdio.bin b/bluetooth_bcm43xx/firmware/brcmfmac4354-sdio.bin deleted file mode 100644 index 9e96585..0000000 Binary files a/bluetooth_bcm43xx/firmware/brcmfmac4354-sdio.bin and /dev/null differ diff --git a/bluetooth_bcm43xx/run.sh b/bluetooth_bcm43xx/run.sh index d7e53d9..af65631 100644 --- a/bluetooth_bcm43xx/run.sh +++ b/bluetooth_bcm43xx/run.sh @@ -1,10 +1,16 @@ #!/bin/bash set -e -hciattach /dev/ttyAMA0 bcm43xx 115200 noflow - +SERIAL="$(grep Serial /proc/cpuinfo | cut -c19-)" +B1="$(echo "$SERIAL" | cut -c3-4)" +B2="$(echo "$SERIAL" | cut -c5-6)" +B3="$(echo "$SERIAL" | cut -c7-8)" +BDADDR="$(printf b8:27:eb:%02x:%02x:%02x $((0x$B1 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B3 ^ 0xaa)))" + +hciattach /dev/ttyAMA0 bcm43xx 921600 noflow - "$BDADDR" hciconfig hci0 up while pgrep hciattach > /dev/null do - sleep 600 + sleep 600 done