-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Piotr Parfeniuk
committed
Aug 18, 2022
0 parents
commit c74e5b0
Showing
9 changed files
with
545 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"restructuredtext.confPath": "", | ||
"cmake.configureArgs": [ | ||
"-DBOARD=jupiter_nrf5340_cpuapp", | ||
"-DNO_BUILD_TYPE_WARNING=TRUE", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"restructuredtext.confPath": "", | ||
"cmake.configureArgs": [ | ||
"-DBOARD=nucleo_wb55rg", | ||
"-DNO_BUILD_TYPE_WARNING=TRUE", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(ibeacon) | ||
|
||
target_sources(app PRIVATE src/main.c) | ||
|
||
if(IBEACON_RSSI) | ||
zephyr_compile_definitions(IBEACON_RSSI=${IBEACON_RSSI}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.. _bluetooth-ibeacon-sample: | ||
|
||
Bluetooth: iBeacon | ||
################## | ||
|
||
Overview | ||
******** | ||
|
||
This simple application demonstrates the BLE Broadcaster role | ||
functionality by advertising an Apple iBeacon. The calibrated RSSI @ 1 | ||
meter distance can be set using an IBEACON_RSSI build variable | ||
(e.g. IBEACON_RSSI=0xb8 for -72 dBm RSSI @ 1 meter), or by manually | ||
editing the default value in the ``main.c`` file. | ||
|
||
Because of the hard-coded values of iBeacon UUID, major, and minor, | ||
the application is not suitable for production use, but is quite | ||
convenient for quick demonstrations of iBeacon functionality. | ||
|
||
Requirements | ||
************ | ||
|
||
* A board with Bluetooth LE support, or | ||
* QEMU with BlueZ running on the host | ||
|
||
Building and Running | ||
******************** | ||
|
||
This sample can be found under :zephyr_file:`samples/bluetooth/ibeacon` in the | ||
Zephyr tree. | ||
|
||
See :ref:`bluetooth samples section <bluetooth-samples>` for details on how | ||
to run the sample inside QEMU. | ||
|
||
For other boards, build and flash the application as follows: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/bluetooth/ibeacon | ||
:board: <board> | ||
:goals: flash | ||
:compact: | ||
|
||
Refer to your :ref:`board's documentation <boards>` for alternative | ||
flash instructions if your board doesn't support the ``flash`` target. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
/*/ { | ||
chosen { | ||
zephyr,bt-mon-uart = &usart1; | ||
zephyr,console = &lpuart1; | ||
}; | ||
};*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
CONFIG_BT=y | ||
#CONFIG_BT_DEBUG_LOG=y | ||
#CONFIG_BT_LOG_LEVEL_INF=y | ||
#CONFIG_DEBUG=y | ||
#CONFIG_BT_DEBUG_HCI_CORE=y | ||
|
||
CONFIG_LOG_BUFFER_SIZE=8192 | ||
|
||
CONFIG_BT_DEBUG_MONITOR_UART=y | ||
#CONFIG_SERIAL=n | ||
CONFIG_RTT_CONSOLE=y | ||
CONFIG_USE_SEGGER_RTT=y | ||
#CONFIG_UART_CONSOLE=n | ||
#CONFIG_LOG=n | ||
|
||
CONFIG_BT_EXT_ADV=y | ||
#CONFIG_BT_EXT_ADV_LEGACY_SUPPORT=y | ||
CONFIG_BT_EXT_ADV_MAX_ADV_SET=2 | ||
CONFIG_BT_ID_MAX=2 | ||
|
||
CONFIG_BT_DIS=y | ||
CONFIG_BT_PERIPHERAL=y | ||
CONFIG_BT_DIS=y | ||
CONFIG_BT_MAX_CONN=16 | ||
|
||
CONFIG_DEBUG_OPTIMIZATIONS=y | ||
CONFIG_IDLE_STACK_SIZE=2048 | ||
CONFIG_BT_RX_STACK_SIZE=4096 | ||
CONFIG_PRIVILEGED_STACK_SIZE=4096 | ||
CONFIG_MAIN_STACK_SIZE=4096 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
sample: | ||
description: Sample code for Zephyr iBeacon Demo | ||
name: iBeacon | ||
tests: | ||
sample.bluetooth.ibeacon: | ||
harness: bluetooth | ||
platform_allow: bbc_microbit qemu_x86 | ||
tags: bluetooth |
Oops, something went wrong.