text stringlengths 9 39.2M | dir stringlengths 25 226 | lang stringclasses 163
values | created_date timestamp[s] | updated_date timestamp[s] | repo_name stringclasses 751
values | repo_full_name stringclasses 752
values | star int64 1.01k 183k | len_tokens int64 1 18.5M |
|---|---|---|---|---|---|---|---|---|
```unknown
/*
*
*/
&lptmr1 {
interrupt-parent = <&intmux0_ch2>;
};
&intmux0_ch2 {
status = "okay";
};
&intmux0_ch3 {
status = "okay";
};
&generic_fsk {
interrupt-parent = <&intmux0_ch3>;
status = "okay";
};
``` | /content/code_sandbox/samples/bluetooth/mesh/boards/rv32m1_vega_openisa_rv32m1_ri5cy.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```c
/* main.c - Application main entry point */
/*
*
*/
#include <zephyr/sys/printk.h>
#include <zephyr/settings/settings.h>
#include <zephyr/devicetree.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/hwinfo.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/b... | /content/code_sandbox/samples/bluetooth/mesh/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,909 |
```unknown
CONFIG_INIT_STACKS=y
CONFIG_ISR_STACK_SIZE=768
CONFIG_MAIN_STACK_SIZE=512
CONFIG_DISPLAY=y
CONFIG_MICROBIT_DISPLAY=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1024
CONFIG_MICROBIT_DISPLAY_STR_MAX=5
CONFIG_GPIO=y
CONFIG_PM=n
CONFIG_BT_PERIPHERAL=n
CONFIG_BT_EXT_ADV=n
CONFIG_BT_RX_STACK_SIZE=1100
CONFIG_BT_BUF_EVT_... | /content/code_sandbox/samples/bluetooth/mesh/boards/bbc_microbit.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 227 |
```unknown
CONFIG_BT=y
CONFIG_LOG=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_DEVICE_NAME="VS Scan Notify"
CONFIG_BT_HCI_VS_EVT_USER=y
CONFIG_BT_CTLR_VS_SCAN_REQ_RX=y
``` | /content/code_sandbox/samples/bluetooth/hci_vs_scan_req/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 46 |
```yaml
sample:
name: Bluetooth HCI Vendor-Specific Scan Request
tests:
sample.bluetooth.hci_vs_scan_req:
harness: bluetooth
platform_allow:
- nrf52dk/nrf52832
integration_platforms:
- nrf52dk/nrf52832
extra_configs:
- CONFIG_BT_LL_SW_SPLIT=y
tags: bluetooth
``` | /content/code_sandbox/samples/bluetooth/hci_vs_scan_req/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 79 |
```restructuredtext
.. _bluetooth-hci-vs-scan-req-sample:
Bluetooth: HCI VS Scan Request
##############################
Overview
********
This simple application is a usage example to manage HCI VS commands to obtain
scan equest events even using legacy advertisements, while may result in lower
RAM usage than using ... | /content/code_sandbox/samples/bluetooth/hci_vs_scan_req/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 203 |
```restructuredtext
.. _bluetooth-hci-spi-sample:
Bluetooth: HCI SPI
##################
Overview
********
Expose Zephyr Bluetooth Controller support over SPI to another device/CPU using
the Zephyr SPI HCI transport protocol (similar to BlueNRG).
Requirements
************
A board with SPI slave, GPIO and Bluetooth ... | /content/code_sandbox/samples/bluetooth/hci_spi/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 342 |
```unknown
CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_SPI_SLAVE=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_MAX_CONN=16
CONFIG_BT_TINYCRYPT_ECC=n
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
# Host number of completed commands does not follow normal flow control.
CONFIG_... | /content/code_sandbox/samples/bluetooth/hci_spi/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 86 |
```yaml
sample:
description: Allows Zephyr to provide Bluetooth connectivity via SPI.
name: Bluetooth HCI SPI
tests:
sample.bluetooth.hci_spi:
harness: bluetooth
platform_allow:
- 96b_carbon/nrf51822
- nrf51dk/nrf51822
integration_platforms:
- 96b_carbon/nrf51822
- nrf51dk/nrf5... | /content/code_sandbox/samples/bluetooth/hci_spi/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 104 |
```c
/* main.c - Application main entry point */
/*
*
*/
#include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/hci_vs.h>
#include <zephyr/bluetooth/addr.h>
#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
#define DEVICE_NAME_LENGTH (sizeof(DEVICE_NAME) - 1)
/* Advertising Interval: the longer, the less energy con... | /content/code_sandbox/samples/bluetooth/hci_vs_scan_req/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,022 |
```unknown
/*
*
*/
&pinctrl {
spi1_default_alt: spi1_default_alt {
group1 {
psels = <NRF_PSEL(SPIS_SCK, 0, 6)>,
<NRF_PSEL(SPIS_MOSI, 0, 5)>,
<NRF_PSEL(SPIS_MISO, 0, 4)>,
<NRF_PSEL(SPIS_CSN, 0, 3)>;
};
};
};
&spi1 {
compatible = "nordic,nrf-spis";
status = "okay";
def-char = <0x00>;
pinctrl-... | /content/code_sandbox/samples/bluetooth/hci_spi/boards/nrf51dk_nrf51822.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 219 |
```restructuredtext
.. _bluetooth_central_ht:
Bluetooth: Central / Health Thermometer sensor
##############################################
Overview
********
Similar to the :ref:`Central <bluetooth_central>` sample, except that this
application specifically looks for health thermometer sensor and reports the
die tem... | /content/code_sandbox/samples/bluetooth/central_ht/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 132 |
```unknown
CONFIG_BT=y
CONFIG_LOG=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_SMP=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_CBPRINTF_FP_SUPPORT=y
``` | /content/code_sandbox/samples/bluetooth/central_ht/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 36 |
```yaml
sample:
name: Bluetooth Central HT
tests:
sample.bluetooth.central_ht:
harness: bluetooth
platform_allow:
- qemu_cortex_m3
- qemu_x86
- nrf51dk/nrf51822
- nrf52dk/nrf52832
tags: bluetooth
integration_platforms:
- qemu_cortex_m3
sample.bluetooth.central_ht.nxp:... | /content/code_sandbox/samples/bluetooth/central_ht/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 143 |
```c
/*
*
*/
#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/logging/log.h>
#include <zephyr/debug/stack.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/spi.h>
#... | /content/code_sandbox/samples/bluetooth/hci_spi/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,350 |
```unknown
CONFIG_PM=y
``` | /content/code_sandbox/samples/bluetooth/central_ht/boards/rd_rw612_bga.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 5 |
```unknown
CONFIG_PM=y
``` | /content/code_sandbox/samples/bluetooth/central_ht/boards/frdm_rw612.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 5 |
```restructuredtext
.. _bluetooth-st_ble_sensor:
Bluetooth: ST BLE Sensor Demo
#############################
Overview
********
This application demonstrates BLE peripheral by exposing vendor-specific
GATT services. Currently only button notification and LED service are
implemented. Other BLE sensor services can easi... | /content/code_sandbox/samples/bluetooth/st_ble_sensor/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 225 |
```unknown
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="P2PSRV1"
CONFIG_BT_GATT_CLIENT=y
CONFIG_LOG=y
CONFIG_LOG_BUFFER_SIZE=2048
``` | /content/code_sandbox/samples/bluetooth/st_ble_sensor/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 42 |
```yaml
sample:
name: Bluetooth ST BLE Sensor Demo
description: Demonstrates BLE peripheral by exposing vendor-specific GATT
services
tests:
sample.bluetooth.st_ble_sensor:
harness: bluetooth
platform_allow: nucleo_wb55rg
tags: bluetooth
``` | /content/code_sandbox/samples/bluetooth/st_ble_sensor/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 59 |
```c
/* main.c - Application main entry point */
/*
*
*/
#include <stdio.h>
#include <stddef.h>
#include <errno.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/conn.h... | /content/code_sandbox/samples/bluetooth/central_ht/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,851 |
```objective-c
/** @file
* @brief LED Service sample
*/
/*
*
*/
#ifndef ST_BLE_SENSOR_LED_SVC_H_
#define ST_BLE_SENSOR_LED_SVC_H_
#ifdef __cplusplus
extern "C" {
#endif
void led_update(void);
int led_init(void);
#ifdef __cplusplus
}
#endif
#endif
``` | /content/code_sandbox/samples/bluetooth/st_ble_sensor/src/led_svc.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 65 |
```c
/** @file
* @brief Button Service sample
*/
/*
*
*/
#include "led_svc.h"
#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(led_svc);
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios);
static bool led_state; /* Trac... | /content/code_sandbox/samples/bluetooth/st_ble_sensor/src/led_svc.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 276 |
```objective-c
/** @file
* @brief Button Service
*/
/*
*
*/
#ifndef ST_BLE_SENSOR_BUTTON_SVC_H_
#define ST_BLE_SENSOR_BUTTON_SVC_H_
#include <zephyr/drivers/gpio.h>
#ifdef __cplusplus
extern "C" {
#endif
int button_init(gpio_callback_handler_t handler);
#ifdef __cplusplus
}
#endif
#endif
``` | /content/code_sandbox/samples/bluetooth/st_ble_sensor/src/button_svc.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 73 |
```c
/* main.c - Application main entry point */
/*
*
*/
#include <zephyr/types.h>
#include <stddef.h>
#include <string.h>
#include <errno.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/logging/log.h>
#include <zephyr... | /content/code_sandbox/samples/bluetooth/st_ble_sensor/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,425 |
```c
/** @file
* @brief Button Service sample
*/
/*
*
*/
#include "button_svc.h"
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/... | /content/code_sandbox/samples/bluetooth/st_ble_sensor/src/button_svc.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 332 |
```unknown
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Zephyr Peripheral MTU Update Sample"
CONFIG_BT_MAX_CONN=1
CONFIG_LOG=y
CONFIG_BT_L2CAP_LOG_LEVEL_DBG=y
# HCI ACL buffers size
# BT_L2CAP_RX_MTU = CONFIG_BT_BUF_ACL_RX_SIZE - BT_L2CAP_HDR_SIZE
CONFIG_BT_BUF_ACL_RX_SIZE=251
# L2CAP SDU/PDU TX MTU
CON... | /content/code_sandbox/samples/bluetooth/mtu_update/peripheral/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 108 |
```yaml
sample:
name: Bluetooth Peripheral MTU Update
tests:
sample.bluetooth.peripheral_mtu_update:
harness: bluetooth
platform_allow:
- qemu_cortex_m3
- qemu_x86
- nrf52_bsim
tags: bluetooth
integration_platforms:
- qemu_cortex_m3
``` | /content/code_sandbox/samples/bluetooth/mtu_update/peripheral/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```restructuredtext
.. _bluetooth_mtu_update_sample:
Bluetooth: MTU Update
#####################
Q&A:
****
Question: What do I have to do to update my ATT MTU?
| Answer: To get an ATT MTU of x octets, do the following:
| Set :kconfig:option:`CONFIG_BT_L2CAP_TX_MTU` to at least x
| Set :kconfig:option:`CONFIG_BT_B... | /content/code_sandbox/samples/bluetooth/mtu_update/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,164 |
```c
/* main.c - Application main entry point */
/*
*
*/
#include <stddef.h>
#include <stdint.h>
extern void run_peripheral_sample(uint8_t *notify_data, size_t notify_data_size, uint16_t seconds);
int main(void)
{
uint8_t notify_data[100] = {};
notify_data[13] = 0x7f;
notify_data[99] = 0x55;
run_peripheral_... | /content/code_sandbox/samples/bluetooth/mtu_update/peripheral/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 108 |
```unknown
CONFIG_BT=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_DEVICE_NAME="Zephyr Central MTU Update Sample"
CONFIG_BT_MAX_CONN=1
CONFIG_BT_GATT_CLIENT=y
CONFIG_LOG=y
CONFIG_BT_L2CAP_LOG_LEVEL_DBG=y
# HCI ACL buffers size
# BT_L2CAP_RX_MTU = CONFIG_BT_BUF_ACL_RX_SIZE - BT_L2CAP_HDR_SIZE
CONFIG_BT_BUF_ACL_RX_SIZE=251
# L2CAP... | /content/code_sandbox/samples/bluetooth/mtu_update/central/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 115 |
```c
/*
*
*/
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/kernel.h>
#include <stddef.h>
#include <stdint.h>
#include <zephyr/sys/printk.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/sys/util.h>
#define MTU_TEST_SERVICE_TYPE ... | /content/code_sandbox/samples/bluetooth/mtu_update/peripheral/src/peripheral_mtu_update.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 923 |
```yaml
sample:
name: Bluetooth Central MTU Update
tests:
sample.bluetooth.central_mtu_update:
harness: bluetooth
platform_allow:
- qemu_cortex_m3
- qemu_x86
- nrf52_bsim
tags: bluetooth
integration_platforms:
- qemu_cortex_m3
``` | /content/code_sandbox/samples/bluetooth/mtu_update/central/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 71 |
```c
/* main.c - Application main entry point */
/*
*
*/
#include <zephyr/bluetooth/gatt.h>
#include <stddef.h>
#include <stdint.h>
extern void run_central_sample(bt_gatt_notify_func_t cb);
int main(void)
{
run_central_sample(NULL);
return 0;
}
``` | /content/code_sandbox/samples/bluetooth/mtu_update/central/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 64 |
```restructuredtext
.. _ble_mesh_provisioner:
Bluetooth: Mesh Provisioner
###########################
Overview
********
This sample demonstrates how to use the Bluetooth Mesh APIs related to
provisioning and using the Configuration Database (CDB). It is intended
to be tested together with a device capable of being p... | /content/code_sandbox/samples/bluetooth/mesh_provisioner/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 540 |
```unknown
#CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
# The Bluetooth API should not be used from a preemptive thread:
CONFIG_MAIN_THREAD_PRIORITY=-2
CONFIG_BT=y
#CONFIG_LOG=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_CTLR_DUP_FILTER_LEN=0
CONFIG_BT_CTLR_LE_... | /content/code_sandbox/samples/bluetooth/mesh_provisioner/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 455 |
```c
/*
*
*/
#include <stddef.h>
#include <errno.h>
#include <stdint.h>
#include <string.h>
#include <zephyr/types.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/bluetooth/att.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci... | /content/code_sandbox/samples/bluetooth/mtu_update/central/src/central_mtu_update.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,775 |
```yaml
sample:
name: Bluetooth Mesh Provisioner
tests:
sample.bluetooth.mesh_provisioner:
harness: bluetooth
platform_allow:
- qemu_x86
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp/ns
integration_platforms:
- qemu_x86
tags: bluetooth
``` | /content/code_sandbox/samples/bluetooth/mesh_provisioner/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 79 |
```unknown
# Enable PSA as a crypto backend in host
CONFIG_BT_USE_PSA_API=y
``` | /content/code_sandbox/samples/bluetooth/mesh_provisioner/boards/nrf5340dk_nrf5340_cpuapp_ns.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 19 |
```restructuredtext
.. _bluetooth_encrypted_advertising_sample:
Bluetooth: Encrypted Advertising
################################
Overview
********
This sample demonstrates the use of the encrypted advertising feature, such as:
- the exchange of the session key and the initialization vector using the Key
Materi... | /content/code_sandbox/samples/bluetooth/encrypted_advertising/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 871 |
```unknown
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Peripheral test EAD"
CONFIG_GPIO=y
CONFIG_BT_SMP=y
CONFIG_BT_PRIVACY=y
CONFIG_BT_RPA_TIMEOUT=300
CONFIG_BT_EXT_ADV=y
CONFIG_BT_EAD=y
CONFIG_LOG=y
CONFIG_BT_EAD_LOG_LEVEL_INF=y
CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=64
``` | /content/code_sandbox/samples/bluetooth/encrypted_advertising/peripheral/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 82 |
```yaml
sample:
name: Bluetooth Peripheral Encrypted Advertising Data
tests:
sample.bluetooth.peripheral_ead:
harness: bluetooth
platform_allow: nrf52840dk/nrf52840
tags: bluetooth
``` | /content/code_sandbox/samples/bluetooth/encrypted_advertising/peripheral/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 47 |
```c
/*
*
*/
#include <zephyr/sys/printk.h>
#include <zephyr/settings/settings.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/mesh.h>
#include <zephyr/drivers/gpio.h>
#define SW0_NODE DT_ALIAS(sw0)
static const uint16_t net_idx;
static const uint16_t app_idx;
static uint16_t self_addr = 1, n... | /content/code_sandbox/samples/bluetooth/mesh_provisioner/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,932 |
```c
/* main.c - Application main entry point */
/*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/printk.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/logging/log.h>
#include "common.h"
LOG_MODULE_DECLARE(... | /content/code_sandbox/samples/bluetooth/encrypted_advertising/peripheral/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 639 |
```c
/*
*
*/
#include <stdint.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/printk.h>
#include <zephyr/bluetooth/ead.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/addr.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/blue... | /content/code_sandbox/samples/bluetooth/encrypted_advertising/peripheral/src/peripheral_ead.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,366 |
```unknown
CONFIG_BT=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_DEVICE_NAME="Central test EAD"
CONFIG_GPIO=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_SMP=y
CONFIG_BT_PRIVACY=y
CONFIG_BT_EAD=y
CONFIG_LOG=y
CONFIG_BT_EAD_LOG_LEVEL_INF=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX=64
``` | /content/code_sandbox/samples/bluetooth/encrypted_advertising/central/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 81 |
```yaml
sample:
name: Bluetooth Central Encrypted Advertising Data
tests:
sample.bluetooth.central_ead:
harness: bluetooth
platform_allow: nrf52840dk/nrf52840
tags: bluetooth
``` | /content/code_sandbox/samples/bluetooth/encrypted_advertising/central/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 46 |
```objective-c
/*
*
*/
#include <stdint.h>
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/gap.h>
#include <zephyr/bluetooth/bluetooth.h>
#include "common.h"
#define LF_ID_MSB ((BT_COMP_ID_LF >> 8) & 0xff)
#define LF_ID_LSB ((BT_COMP_ID_LF) & 0xff)
#define AD_DATA_0_SIZE 10
static uint8_t ad_data_0[] = {'... | /content/code_sandbox/samples/bluetooth/encrypted_advertising/peripheral/src/data.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 621 |
```c
/* main.c - Application main entry point */
/*
*
*/
#include <stdint.h>
#include <stddef.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/printk.h>
#include <zephyr/bluetooth/ead.h>
#include <zephyr/bluetooth/conn.h>... | /content/code_sandbox/samples/bluetooth/encrypted_advertising/central/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 689 |
```objective-c
/*
*
*/
#include <stdint.h>
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/ead.h>
#ifndef __EAD_SAMPLE_COMMON_H
#define __EAD_SAMPLE_COMMON_H
struct key_material {
uint8_t session_key[BT_EAD_KEY_SIZE];
uint8_t iv[BT_EAD_IV_SIZE];
} __packed;
#define CUSTOM_SERVICE_TYPE BT_UUID_128_ENCODE(... | /content/code_sandbox/samples/bluetooth/encrypted_advertising/include/common.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 204 |
```restructuredtext
.. _central_otc:
Bluetooth: Central OTC
######################
Overview
********
Similar to the :ref:`Central <bluetooth_central>` sample, except that this
application specifically looks for the OTS (Object Transfer) GATT Service.
And this sample is to select object sequentially, to read metadata... | /content/code_sandbox/samples/bluetooth/central_otc/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 149 |
```unknown
CONFIG_BT=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_OTS=y
CONFIG_BT_SMP=y
CONFIG_BT_OTS_CLIENT=y
CONFIG_BT_OTS_OACP_CHECKSUM_SUPPORT=y
# This example requires more workqueue stack
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=8192
CONFIG_LOG=y
CONFIG_ASSERT=y
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
``` | /content/code_sandbox/samples/bluetooth/central_otc/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 80 |
```yaml
sample:
name: Bluetooth Central Object transfer client
tests:
sample.bluetooth.central_otc:
harness: bluetooth
platform_allow:
- nrf21540dk/nrf52840
- nrf52840dk/nrf52840
- nrf52833dk/nrf52833
tags: bluetooth
integration_platforms:
- nrf21540dk/nrf52840
``` | /content/code_sandbox/samples/bluetooth/central_otc/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 88 |
```c
/*
*
*/
#include <stdint.h>
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/net/buf.h>
#include <zephyr/sys/printk.h>
#include <zephyr/logging/log.h>
#include <zephyr/bluetooth/ead.h>
#include <zephyr/bluetooth/att.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/addr.h>
#incl... | /content/code_sandbox/samples/bluetooth/encrypted_advertising/central/src/central_ead.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,419 |
```restructuredtext
.. _peripheral_sc_only:
Bluetooth: Peripheral SC-only
#############################
Overview
********
Similar to the :ref:`Peripheral <ble_peripheral>` sample, except that this
application enables the Secure Connections Only mode, i.e. will only
accept connections that are secured using security ... | /content/code_sandbox/samples/bluetooth/peripheral_sc_only/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 137 |
```unknown
# Uncomment the following two options to get thread stack usage logs
#CONFIG_INIT_STACKS=y
#CONFIG_THREAD_STACK_INFO=y
CONFIG_BT=y
CONFIG_LOG=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SMP=y
CONFIG_BT_SMP_SC_ONLY=y
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_BT_MAX_PAIRED=2
CONFIG_BT_DEVICE_NAME="SC only peripheral"
``` | /content/code_sandbox/samples/bluetooth/peripheral_sc_only/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 84 |
```yaml
sample:
name: Bluetooth Peripheral SC-only
description: Demonstrates Secure Connections Only mode
tests:
sample.bluetooth.peripheral_sc_only:
harness: bluetooth
platform_allow:
- qemu_cortex_m3
- qemu_x86
tags: bluetooth
integration_platforms:
- qemu_cortex_m3
``` | /content/code_sandbox/samples/bluetooth/peripheral_sc_only/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```c
/* main.c - Application main entry point */
/*
*
*/
#include <zephyr/types.h>
#include <stddef.h>
#include <string.h>
#include <errno.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>
#includ... | /content/code_sandbox/samples/bluetooth/peripheral_sc_only/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 995 |
```unknown
CONFIG_BT_TINYCRYPT_ECC=n
``` | /content/code_sandbox/samples/bluetooth/peripheral_sc_only/boards/tlsr9518adk80d.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 11 |
```unknown
/*
*
*/
&lptmr1 {
interrupt-parent = <&intmux0_ch2>;
};
&intmux0_ch2 {
status = "okay";
};
&intmux0_ch3 {
status = "okay";
};
&generic_fsk {
interrupt-parent = <&intmux0_ch3>;
status = "okay";
};
``` | /content/code_sandbox/samples/bluetooth/peripheral_sc_only/boards/rv32m1_vega_openisa_rv32m1_ri5cy.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 72 |
```restructuredtext
.. _ble_peripheral_accept_list:
Bluetooth: Peripheral Accept List
#################################
Overview
********
This application demonstrates the BLE advertising accept filter list feature.
If no device is bonded to the peripheral, casual advertising will be performed.
Once a device is bond... | /content/code_sandbox/samples/bluetooth/peripheral_accept_list/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 245 |
```unknown
# Increased stack due to settings API usage
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_BT=y
CONFIG_LOG=y
CONFIG_BT_SMP=y
CONFIG_BT_SIGNING=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DIS=y
CONFIG_BT_ATT_PREPARE_COUNT=1
CONFIG_BT_PRIVACY=y
CONFIG_BT_DEVICE_NAME="Accept list"
CONFIG_BT_DEVICE_APPEARANCE=833
CONFI... | /content/code_sandbox/samples/bluetooth/peripheral_accept_list/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 130 |
```yaml
sample:
name: Bluetooh Peripheral Accept List
tests:
sample.bluetooth.peripheral_accept_list:
harness: bluetooth
platform_allow: qemu_x86
tags: bluetooth
``` | /content/code_sandbox/samples/bluetooth/peripheral_accept_list/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 41 |
```c
/*
*
*/
#include <zephyr/types.h>
#include <stddef.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/reboot.h>
#include <zephyr/settings/settings.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/gatt.h>
#include <zep... | /content/code_sandbox/samples/bluetooth/peripheral_accept_list/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,223 |
```unknown
#
#
#
# Disable AoD Feature (antenna switching) in Tx mode in Controller and Host
CONFIG_BT_CTLR_DF_ANT_SWITCH_TX=n
CONFIG_BT_DF_CTE_TX_AOD=n
``` | /content/code_sandbox/samples/bluetooth/direction_finding_connectionless_tx/overlay-aoa.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 42 |
```c
/** @file
* @brief Bluetooth Object Transfer Client Sample
*
*
*/
#include <errno.h>
#include <stddef.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/services/ots.h>
#include <zephyr... | /content/code_sandbox/samples/bluetooth/central_otc/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 5,870 |
```restructuredtext
.. _bluetooth_direction_finding_connectionless_tx:
Bluetooth: Direction Finding Periodic Advertising Beacon
########################################################
Overview
********
A simple application demonstrating the BLE Direction Finding CTE Broadcaster
functionality by sending Constant Ton... | /content/code_sandbox/samples/bluetooth/direction_finding_connectionless_tx/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 901 |
```yaml
sample:
name: Direction Finding Connectionless Beacon
tests:
sample.bluetooth.direction_finding_connectionless:
harness: bluetooth
platform_allow:
- nrf52833dk/nrf52833
- nrf52833dk/nrf52820
- nrf5340dk/nrf5340/cpuapp
tags: bluetooth
integration_platforms:
- nrf52833d... | /content/code_sandbox/samples/bluetooth/direction_finding_connectionless_tx/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 234 |
```unknown
CONFIG_BT=y
CONFIG_BT_DEVICE_NAME="DF Connectionless Beacon App"
CONFIG_BT_EXT_ADV=y
CONFIG_BT_PER_ADV=y
CONFIG_BT_BROADCASTER=y
# Enable Direction Finding Feature including AoA and AoD
CONFIG_BT_DF=y
CONFIG_BT_DF_CONNECTIONLESS_CTE_TX=y
``` | /content/code_sandbox/samples/bluetooth/direction_finding_connectionless_tx/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 62 |
```unknown
/*
*
*/
&radio {
status = "okay";
/* This is an example number of antennas that may be available
* on antenna matrix board.
*/
dfe-antenna-num = <10>;
/* This is an example switch pattern that will be used to set an
* antenna for Tx PDU (period before start of Tx CTE).
*/
dfe-pdu-antenna = <0... | /content/code_sandbox/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52833.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 197 |
```c
/*
*
*/
#include <zephyr/types.h>
#include <stddef.h>
#include <errno.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/direction.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/util.h>
/* Length of CTE in unit of 8[us] */... | /content/code_sandbox/samples/bluetooth/direction_finding_connectionless_tx/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,153 |
```unknown
CONFIG_BT_CTLR=y
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_CTLR_ADV_EXT=y
CONFIG_BT_CTLR_ADV_PERIODIC=y
# Enable Direction Finding TX Feature including AoA and AoD
CONFIG_BT_CTLR_DF=y
CONFIG_BT_CTLR_DF_ANT_SWITCH_RX=n
CONFIG_BT_CTLR_DF_SCAN_CTE_RX=n
# Enable chaining of multiple CTEs in periodic advertising
CONFI... | /content/code_sandbox/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52833.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 121 |
```unknown
/*
*
*/
&radio {
status = "okay";
/* This is an example number of antennas that may be available
* on antenna matrix board.
*/
dfe-antenna-num = <10>;
/* This is an example switch pattern that will be used to set an
* antenna for Tx PDU (period before start of Tx CTE).
*/
dfe-pdu-antenna = <0... | /content/code_sandbox/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52820.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 197 |
```unknown
CONFIG_BT_CTLR=y
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_CTLR_ADV_EXT=y
CONFIG_BT_CTLR_ADV_PERIODIC=y
# Enable Direction Finding TX Feature including AoA and AoD
CONFIG_BT_CTLR_DF=y
CONFIG_BT_CTLR_DF_ANT_SWITCH_RX=n
CONFIG_BT_CTLR_DF_SCAN_CTE_RX=n
# Enable chaining of multiple CTEs in periodic advertising
CONFI... | /content/code_sandbox/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52820.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 121 |
```unknown
/*
*
*/
/* Enable pin forwarding to network core. The selected pins will be used by
* Radio Direction Finding Extension for antenna switching purposes.
*
* Note: Pay attention to assign the same GPIO pins as those provided in
* network core DTS overlay.
*/
&gpio_fwd {
dfe-gpio-if {
gpios = <... | /content/code_sandbox/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf5340dk_nrf5340_cpuapp.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 117 |
```unknown
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_PER_ADV_SYNC=y
CONFIG_LOG=y
CONFIG_BT_DEVICE_NAME="Peripheral PAST"
CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER=y
``` | /content/code_sandbox/samples/bluetooth/peripheral_past/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 54 |
```restructuredtext
.. _bluetooth-peripheral-past-sample:
Bluetooth: Periodic Advertising Synchronization Transfer
########################################################
Overview
********
A simple application demonstrating the BLE Periodic Advertising Synchronization
Transfer (PAST) functionality as the receiver.
... | /content/code_sandbox/samples/bluetooth/peripheral_past/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 147 |
```yaml
sample:
name: Bluetooth Peripheral Periodic Advertising Synchronization Transfer (PAST)
tests:
sample.bluetooth.peripheral_past:
harness: bluetooth
platform_allow:
- qemu_cortex_m3
- qemu_x86
tags: bluetooth
integration_platforms:
- qemu_cortex_m3
``` | /content/code_sandbox/samples/bluetooth/peripheral_past/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 68 |
```unknown
#
#
#
# Disable AoD Feature (antenna switching) in Tx mode in Controller and Host
CONFIG_BT_CTLR_DF_ANT_SWITCH_TX=n
CONFIG_BT_DF_CTE_TX_AOD=n
``` | /content/code_sandbox/samples/bluetooth/direction_finding_peripheral/overlay-aoa.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 42 |
```c
/*
*
*/
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/hci.h>
static struct bt_conn *default_conn;
static K_SEM_DEFINE(sem_per_sync, 0, 1);
static K_SEM_DEFINE(sem_... | /content/code_sandbox/samples/bluetooth/peripheral_past/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,208 |
```restructuredtext
.. _bluetooth_direction_finding_peripheral:
Bluetooth: Direction Finding Peripheral
#######################################
Overview
********
A simple application demonstrating the BLE Direction Finding CTE transmission in
connected mode by response to a request received from connected peer devic... | /content/code_sandbox/samples/bluetooth/direction_finding_peripheral/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 771 |
```unknown
#
#
#
CONFIG_BT=y
CONFIG_LOG=y
CONFIG_BT_DEVICE_NAME="DF Conn App"
CONFIG_BT_SMP=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_APPEARANCE=833
# Enable Direction Finding Feature RX in connected mode
CONFIG_BT_DF=y
CONFIG_BT_DF_CONNECTION_CTE_TX=y
CONFIG_BT_DF_CONNECTION_CTE_RSP=y
``` | /content/code_sandbox/samples/bluetooth/direction_finding_peripheral/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 76 |
```yaml
sample:
name: Direction Finding Peripheral
description: Sample application showing peripheral role of Direction Finding in
connected mode
tests:
sample.bluetooth.direction_finding.peripheral:
harness: bluetooth
platform_allow:
- nrf52833dk/nrf52833
- nrf52833dk/nrf52820
- nrf... | /content/code_sandbox/samples/bluetooth/direction_finding_peripheral/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 253 |
```unknown
/*
*
*/
&radio {
status = "okay";
/* This is a number of antennas that are available on antenna matrix
* designed by Nordic. For more information see README.rst.
*/
dfe-antenna-num = <12>;
/* This is a setting that enables antenna 12 (in antenna matrix designed
* by Nordic) for Rx PDU. For more ... | /content/code_sandbox/samples/bluetooth/direction_finding_peripheral/boards/nrf52833dk_nrf52833.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 234 |
```unknown
/*
*
*/
&radio {
status = "okay";
/* This is an example number of antennas that may be available
* on antenna matrix board.
*/
dfe-antenna-num = <10>;
/* This is an example switch pattern that will be used to set an
* antenna for Tx PDU (period before start of Tx CTE).
*/
dfe-pdu-antenna = <0... | /content/code_sandbox/samples/bluetooth/direction_finding_peripheral/boards/nrf52833dk_nrf52820.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 197 |
```c
/*
*
*/
#include <zephyr/types.h>
#include <stddef.h>
#include <string.h>
#include <errno.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/... | /content/code_sandbox/samples/bluetooth/direction_finding_peripheral/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 874 |
```unknown
#
#
#
CONFIG_BT_CTLR=y
CONFIG_BT_LL_SW_SPLIT=y
# Enable Direction Finding Feature including AoA and AoD
CONFIG_BT_CTLR_DF=y
CONFIG_BT_CTLR_DF_CTE_TX=y
CONFIG_BT_CTLR_DF_CONN_CTE_TX=y
CONFIG_BT_CTLR_DF_ANT_SWITCH_TX=y
CONFIG_BT_CTLR_DF_CONN_CTE_RSP=y
# Ensure that there is enough control procedure context... | /content/code_sandbox/samples/bluetooth/direction_finding_peripheral/boards/nrf52833dk_nrf52833.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 118 |
```unknown
/*
*
*/
/* Enable pin forwarding to network core. The selected pins will be used by
* Radio Direction Finding Extension for antenna switching purposes.
*
* Note: Pay attention to assign the same GPIO pins as those provided in
* network core DTS overlay.
*/
&gpio_fwd {
dfe-gpio-if {
gpios = <... | /content/code_sandbox/samples/bluetooth/direction_finding_peripheral/boards/nrf5340dk_nrf5340_cpuapp.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 117 |
```unknown
#
#
#
CONFIG_BT_CTLR=y
CONFIG_BT_LL_SW_SPLIT=y
# Enable Direction Finding Feature including AoA and AoD
CONFIG_BT_CTLR_DF=y
CONFIG_BT_CTLR_DF_CTE_TX=y
CONFIG_BT_CTLR_DF_CONN_CTE_TX=y
CONFIG_BT_CTLR_DF_ANT_SWITCH_TX=y
CONFIG_BT_CTLR_DF_CONN_CTE_RSP=y
# Ensure that there is enough control procedure context... | /content/code_sandbox/samples/bluetooth/direction_finding_peripheral/boards/nrf52833dk_nrf52820.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 118 |
```restructuredtext
.. _bluetooth_tmap_central:
Bluetooth: TMAP Central
#######################
Overview
********
Application demonstrating the LE Audio TMAP central functionality. Implements the CG and UMS roles.
Requirements
************
* A board with Bluetooth Low Energy 5.2 support
Building and Running
****... | /content/code_sandbox/samples/bluetooth/tmap_central/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 109 |
```yaml
sample:
description: Bluetooth Low Energy Audio TMAP Central sample
name: Bluetooth Low Energy Audio TMAP Central sample
tests:
sample.bluetooth.tmap_central:
harness: bluetooth
platform_allow:
- qemu_cortex_m3
- qemu_x86
- native_sim
tags: bluetooth
integration_platforms... | /content/code_sandbox/samples/bluetooth/tmap_central/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 83 |
```unknown
CONFIG_BT=y
CONFIG_LOG=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_AUDIO=y
CONFIG_BT_SMP=y
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
CONFIG_BT_L2CAP_TX_BUF_COUNT=20
# TMAP support
CONFIG_BT_TMAP=y
# CAP support
CONFIG_BT_CAP_INITIATOR=y
# CSIP support
CONFIG_BT_CSIP_SET_COORDINATOR=y
# BAP support
CONFIG_BT_BAP_UNICAST_CLI... | /content/code_sandbox/samples/bluetooth/tmap_central/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 273 |
```c
/** @file
* @brief Bluetooth Media Control Profile (MCP) Server role.
*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <stdlib.h>
#include <stdio.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/audio/media_proxy.h>
int mcp_server_init(void)
{
int err;
err = medi... | /content/code_sandbox/samples/bluetooth/tmap_central/src/mcp_server.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 96 |
```c
/** @file
* @brief Bluetooth Call Control Profile (CCP) Server role.
*
*
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <stdlib.h>
#include <stdio.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/audio/tbs.h>
#define URI_LIST_LEN 2
static const char *uri_list[URI_LIS... | /content/code_sandbox/samples/bluetooth/tmap_central/src/ccp_server.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 323 |
```c
/*
*
*/
#if defined(CONFIG_BT_CAP_INITIATOR)
#include <zephyr/types.h>
#include <stddef.h>
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
#include <zephyr/bluetoot... | /content/code_sandbox/samples/bluetooth/tmap_central/src/cap_initiator.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,305 |
```c
/*
*
*/
#include <zephyr/types.h>
#include <stddef.h>
#include <errno.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/printk.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/audio/audio.h>
#include <zephyr/bluetooth/au... | /content/code_sandbox/samples/bluetooth/tmap_central/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,141 |
```objective-c
/*
*
*/
#include <zephyr/types.h>
/**
* @brief Initialize the MCP Server role
*
* @return 0 if success, errno on failure.
*/
int mcp_server_init(void);
/**
* @brief Initialize the CCP Server role
*
* @return 0 if success, errno on failure.
*/
int ccp_server_init(void);
/**
* @brief Initial... | /content/code_sandbox/samples/bluetooth/tmap_central/src/tmap_central.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 297 |
```unknown
# For LC3 the following configs are needed
CONFIG_FPU=y
CONFIG_LIBLC3=y
# The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence
# inctease stack size for that thread.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
``` | /content/code_sandbox/samples/bluetooth/tmap_central/boards/nrf5340dk_nrf5340_cpuapp.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 67 |
```unknown
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_LIBLC3=y
CONFIG_FPU=y
# For LE-audio at 10ms intervals we need the tick counter to occur more frequently
# than every 10 ms as each PDU for some reason takes 2 ticks to process.
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
CONFIG_NATIVE_SIM_SLOWDOWN_TO_RE... | /content/code_sandbox/samples/bluetooth/tmap_central/boards/native_sim.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 90 |
```unknown
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_LIBLC3=y
CONFIG_FPU=y
# For LE-audio at 10ms intervals we need the tick counter to occur more frequently
# than every 10 ms as each PDU for some reason takes 2 ticks to process.
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
CONFIG_NATIVE_POSIX_SLOWDOWN_TO_... | /content/code_sandbox/samples/bluetooth/tmap_central/boards/native_posix.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 91 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.