mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
nrf5-zephyr: use 0x0059 as manufacturer id, add flash scripts to hci-uart sample, provide random static address to host via hci read bd addr, use 115200
This commit is contained in:
parent
33373e4028
commit
bdcbe2ab55
@ -13,6 +13,10 @@ grep -q -F btstack ${NET_MAKEFILE} || echo ${MAKEFILE_ADD_ON} >> ${NET_MAKEFILE}
|
|||||||
SUBSYS_KCONFIG=${ZEPHYR_BASE}/subsys/Kconfig
|
SUBSYS_KCONFIG=${ZEPHYR_BASE}/subsys/Kconfig
|
||||||
grep -q -F btstack ${SUBSYS_KCONFIG} || echo 'source "subsys/btstack/Kconfig"' >> ${SUBSYS_KCONFIG}
|
grep -q -F btstack ${SUBSYS_KCONFIG} || echo 'source "subsys/btstack/Kconfig"' >> ${SUBSYS_KCONFIG}
|
||||||
|
|
||||||
|
# set Nordic Semiconductor as manufacturer
|
||||||
|
CTRL_H=${ZEPHYR_BASE}/subsys/bluetooth/controller/ll/ctrl.h
|
||||||
|
sed -i "s|#define RADIO_BLE_COMPANY_ID.*0xFFFF.|#define RADIO_BLE_COMPANY_ID (0x0059) // Nordic Semiconductor ASA|g" ${CTRL_H}
|
||||||
|
|
||||||
# create net/btstack
|
# create net/btstack
|
||||||
mkdir -p ${ZEPHYR_BASE}/subsys/btstack
|
mkdir -p ${ZEPHYR_BASE}/subsys/btstack
|
||||||
|
|
||||||
@ -37,6 +41,20 @@ rsync -a Makefile.src ${ZEPHYR_BASE}/subsys/btstack/Makefile
|
|||||||
rsync -a Makefile.ble ${ZEPHYR_BASE}/subsys/btstack/ble/Makefile
|
rsync -a Makefile.ble ${ZEPHYR_BASE}/subsys/btstack/ble/Makefile
|
||||||
rsync -a Makefile.gatt-service ${ZEPHYR_BASE}/subsys/btstack/ble/gatt-service/Makefile
|
rsync -a Makefile.gatt-service ${ZEPHYR_BASE}/subsys/btstack/ble/gatt-service/Makefile
|
||||||
|
|
||||||
|
|
||||||
# create samples/btstack
|
# create samples/btstack
|
||||||
./create_examples.py
|
./create_examples.py
|
||||||
|
|
||||||
|
|
||||||
|
## Additonal changes for HCI Controller firmware in samples/bluetooth/hci-uart
|
||||||
|
HCI_UART=${ZEPHYR_BASE}/samples/bluetooth/hci-uart
|
||||||
|
|
||||||
|
# add flash scripts to hci-uart
|
||||||
|
rsync -a flash_nrf51_pca10028.sh ${HCI_UART}/flash_nrf51_pca10028.sh
|
||||||
|
rsync -a flash_nrf52_pca10040.sh ${HCI_UART}/flash_nrf52_pca10040.sh
|
||||||
|
|
||||||
|
# use 115200 baud
|
||||||
|
sed -i 's|CONFIG_UART_NRF5_BAUD_RATE=1000000|CONFIG_UART_NRF5_BAUD_RATE=115200|g' ${HCI_UART}/nrf5.conf
|
||||||
|
|
||||||
|
# provide static random address to host via hci read bd addr
|
||||||
|
grep -q -F ll_address_set ${HCI_UART}/src/main.c || cat hci-uart.patch | patch -d ${ZEPHYR_BASE} -p1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user