mirror of
https://github.com/aljazceru/addons.git
synced 2026-02-01 11:15:38 +01:00
Support new way of read serial number from SoC (#341)
* Support new way of read serial number from SoC * Update config.json * Update CHANGELOG.md * Update run.sh * Update run.sh
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
## 2.1
|
||||
- Support new way to read `serial-number` from device-tree
|
||||
|
||||
## 2.0
|
||||
- Update Firmware blobs
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{
|
||||
"name": "Bluetooth BCM43xx",
|
||||
"version": "2.0",
|
||||
"version": "2.1",
|
||||
"slug": "bluetooth_bcm43xx",
|
||||
"description": "Activate Bluetooth for Broadcom 43xx chips",
|
||||
"url": "https://home-assistant.io/addons/bluetooth_bcm43xx/",
|
||||
"startup": "initialize",
|
||||
"boot": "auto",
|
||||
"host_network": "true",
|
||||
"host_network": true,
|
||||
"devicetree": true,
|
||||
"privileged": ["NET_ADMIN"],
|
||||
"devices": ["/dev/ttyAMA0:/dev/ttyAMA0:rwm"],
|
||||
"options": {},
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
SERIAL="$(grep Serial /proc/cpuinfo | cut -c19-)"
|
||||
# Read serial number
|
||||
if [ -e /proc/device-tree/serial-number ]; then
|
||||
SERIAL="$(cut -c9- /proc/device-tree/serial-number)"
|
||||
else
|
||||
SERIAL="$(grep Serial /proc/cpuinfo | cut -c19-)"
|
||||
fi
|
||||
|
||||
# Generate MAC
|
||||
B1="$(echo "$SERIAL" | cut -c3-4)"
|
||||
B2="$(echo "$SERIAL" | cut -c5-6)"
|
||||
B3="$(echo "$SERIAL" | cut -c7-8)"
|
||||
|
||||
Reference in New Issue
Block a user