├── ext └── tinycrypt │ ├── VERSION │ └── AUTHORS ├── babblesim ├── sdk │ ├── .gitignore │ └── scripts │ │ └── link_nrfx.sh ├── README.md ├── core │ ├── include │ │ ├── argparse.h │ │ ├── core_cm4.h │ │ ├── cmsis.h │ │ └── time_machine.h │ └── pkg.yml ├── hw │ ├── mcu │ │ └── nordic │ │ │ └── nrf52_bsim │ │ │ ├── include │ │ │ └── mcu │ │ │ │ ├── cmsis_nvic.h │ │ │ │ ├── nrf52_periph.h │ │ │ │ ├── cortex_m4.h │ │ │ │ ├── native_bsp.h │ │ │ │ └── mcu_sim.h │ │ │ ├── src │ │ │ ├── hal_native_priv.h │ │ │ ├── hal_watchdog.c │ │ │ └── native_uart_cfg_priv.h │ │ │ └── pkg.yml │ └── bsp │ │ └── nrf52_bsim │ │ ├── nordic_pca10040_debug.cmd │ │ └── nordic_pca10040_download.cmd ├── edtt │ ├── hci_transport │ │ └── include │ │ │ ├── edtt_driver.h │ │ │ └── ble_hci_edtt.h │ └── hci_test │ │ ├── syscfg.yml │ │ ├── pkg.yml │ │ └── src │ │ └── main.c └── targets │ ├── blecent │ ├── syscfg.yml │ ├── target.yml │ └── pkg.yml │ ├── bleprph │ ├── syscfg.yml │ ├── target.yml │ └── pkg.yml │ ├── btshell │ ├── syscfg.yml │ ├── target.yml │ └── pkg.yml │ ├── blehci │ ├── syscfg.yml │ ├── target.yml │ └── pkg.yml │ └── edtthci │ ├── pkg.yml │ └── target.yml ├── porting ├── npl │ ├── riot │ │ └── include │ │ │ ├── npl_syscfg │ │ │ └── npl_sycfg.h │ │ │ ├── sysflash │ │ │ └── sysflash.h │ │ │ └── logcfg │ │ │ └── logcfg.h │ ├── rtthread │ │ ├── include │ │ │ └── console │ │ │ │ └── console.h │ │ └── src │ │ │ └── nrf5x_isr.c │ ├── mynewt │ │ └── pkg.yml │ ├── linux │ │ ├── include │ │ │ └── console │ │ │ │ └── console.h │ │ └── src │ │ │ └── os_atomic.c │ ├── nuttx │ │ ├── include │ │ │ └── console │ │ │ │ └── console.h │ │ └── src │ │ │ └── os_atomic.c │ └── freertos │ │ └── include │ │ └── nimble │ │ └── nimble_port_freertos.h ├── nimble │ ├── include │ │ ├── sysflash │ │ │ └── sysflash.h │ │ ├── sysinit │ │ │ └── sysinit.h │ │ └── nimble │ │ │ └── nimble_port.h │ ├── Makefile.mesh │ └── Makefile.tinycrypt ├── examples │ ├── linux │ │ └── include │ │ │ ├── sysflash │ │ │ └── sysflash.h │ │ │ └── logcfg │ │ │ └── logcfg.h │ ├── nuttx │ │ └── include │ │ │ ├── sysflash │ │ │ └── sysflash.h │ │ │ └── logcfg │ │ │ └── logcfg.h │ ├── linux_blemesh │ │ └── include │ │ │ └── sysflash │ │ │ └── sysflash.h │ └── dummy │ │ └── main.c └── targets │ ├── linux │ ├── target.yml │ └── syscfg.yml │ ├── nuttx │ ├── target.yml │ └── syscfg.yml │ ├── porting_default │ ├── syscfg.yml │ └── target.yml │ ├── linux_blemesh │ └── target.yml │ ├── riot │ └── target.yml │ └── dummy_app │ ├── src │ └── dummy.c │ └── pkg.yml ├── docs ├── .gitignore ├── mesh │ ├── mesh_topology.jpg │ └── mesh_lightning_model.jpg ├── firmwares │ └── images │ │ ├── JLINK_U.png │ │ ├── nrf52840dk.png │ │ ├── nrf52840dongle.png │ │ └── nrf52dk_nrf52832.jpg ├── ble_hs │ ├── ble_gap.rst │ ├── ble_gattc.rst │ ├── ble_gatts.rst │ ├── ble_hs.rst │ └── ble_att.rst ├── ble_setup │ └── ble_setup_intro.rst ├── Makefile └── README.rst ├── nimble ├── host │ ├── mesh │ │ ├── src │ │ │ ├── shell.h │ │ │ ├── cfg.h │ │ │ ├── provisioner.h │ │ │ ├── cdb_priv.h │ │ │ ├── beacon.h │ │ │ ├── light_model.h │ │ │ ├── testing.h │ │ │ ├── settings.h │ │ │ ├── rpl.h │ │ │ ├── pb_gatt_srv.h │ │ │ └── heartbeat.h │ │ └── include │ │ │ └── mesh │ │ │ ├── porting.h │ │ │ ├── mesh.h │ │ │ ├── cfg_srv.h │ │ │ └── proxy.h │ ├── pts │ │ └── README.txt │ ├── util │ │ ├── syscfg.yml │ │ └── pkg.yml │ ├── services │ │ ├── lls │ │ │ ├── syscfg.yml │ │ │ └── pkg.yml │ │ ├── gatt │ │ │ ├── syscfg.yml │ │ │ ├── pkg.yml │ │ │ └── include │ │ │ │ └── services │ │ │ │ └── gatt │ │ │ │ └── ble_svc_gatt.h │ │ ├── ias │ │ │ ├── syscfg.yml │ │ │ └── pkg.yml │ │ ├── ipss │ │ │ ├── syscfg.yml │ │ │ ├── include │ │ │ │ └── services │ │ │ │ │ └── ipss │ │ │ │ │ └── ble_svc_ipss.h │ │ │ └── pkg.yml │ │ ├── tps │ │ │ ├── syscfg.yml │ │ │ ├── include │ │ │ │ └── services │ │ │ │ │ └── tps │ │ │ │ │ └── ble_svc_tps.h │ │ │ └── pkg.yml │ │ ├── bleuart │ │ │ ├── syscfg.yml │ │ │ ├── pkg.yml │ │ │ └── include │ │ │ │ └── bleuart │ │ │ │ └── bleuart.h │ │ ├── bas │ │ │ ├── pkg.yml │ │ │ └── include │ │ │ │ └── services │ │ │ │ └── bas │ │ │ │ └── ble_svc_bas.h │ │ ├── gap │ │ │ └── pkg.yml │ │ ├── ans │ │ │ ├── pkg.yml │ │ │ └── syscfg.yml │ │ └── dis │ │ │ └── pkg.yml │ ├── src │ │ ├── ble_hs_startup_priv.h │ │ ├── ble_hs_flow_priv.h │ │ ├── ble_hs_mbuf_priv.h │ │ ├── ble_hs_adv_priv.h │ │ └── ble_hs_id_priv.h │ ├── store │ │ ├── config │ │ │ └── syscfg.yml │ │ └── ram │ │ │ ├── syscfg.yml │ │ │ └── pkg.yml │ ├── include │ │ └── host │ │ │ └── ble_ibeacon.h │ └── test │ │ └── syscfg.yml ├── transport │ ├── usb │ │ ├── syscfg.yml │ │ └── pkg.yml │ ├── nrf5340 │ │ ├── syscfg.yml │ │ └── pkg.yml │ ├── common │ │ └── hci_h4 │ │ │ └── pkg.yml │ ├── uart │ │ ├── include │ │ │ └── transport │ │ │ │ └── uart │ │ │ │ └── ble_hci_uart.h │ │ └── pkg.yml │ ├── emspi │ │ ├── include │ │ │ └── transport │ │ │ │ └── emspi │ │ │ │ └── ble_hci_emspi.h │ │ └── pkg.yml │ ├── socket │ │ ├── include │ │ │ └── socket │ │ │ │ └── ble_hci_socket.h │ │ └── pkg.yml │ └── dialog_cmac │ │ ├── cmac_driver │ │ ├── diag │ │ │ └── pkg.yml │ │ ├── include │ │ │ └── cmac_driver │ │ │ │ ├── cmac_diag.h │ │ │ │ └── cmac_host.h │ │ └── scripts │ │ │ └── create_cmac_bin.sh │ │ └── pkg.yml ├── controller │ ├── test │ │ ├── src │ │ │ ├── ble_ll_csa2_test.h │ │ │ └── ble_ll_test.c │ │ ├── syscfg.yml │ │ └── pkg.yml │ ├── syscfg.hbd.yml │ ├── include │ │ └── controller │ │ │ └── ble_ll_test.h │ ├── src │ │ ├── ble_ll_ctrl_priv.h │ │ └── ble_ll_hci_priv.h │ └── pkg.yml ├── include │ └── nimble │ │ └── nimble_opt.h ├── drivers │ ├── native │ │ └── pkg.yml │ ├── nrf51 │ │ └── pkg.yml │ ├── nrf52 │ │ └── pkg.yml │ ├── dialog_cmac │ │ ├── syscfg.yml │ │ ├── src │ │ │ └── ble_hw_priv.h │ │ ├── pkg.yml │ │ └── include │ │ │ └── ble │ │ │ └── xcvr.h │ ├── nrf5340 │ │ └── pkg.yml │ └── plna │ │ └── sky66112 │ │ └── pkg.yml └── pkg.yml ├── .style_ignored_dirs ├── .gitignore ├── apps ├── blehr │ ├── README.md │ └── syscfg.yml ├── blecsc │ └── README.md ├── blemesh_models_example_2 │ └── src │ │ ├── state_binding.h │ │ ├── common.h │ │ ├── publisher.h │ │ └── ble_mesh.h ├── blehci │ ├── syscfg.yml │ ├── src │ │ └── main.c │ └── pkg.yml ├── advertiser │ └── syscfg.yml ├── blecent │ └── syscfg.yml ├── bleuart │ └── syscfg.yml ├── bletest │ ├── syscfg.yml │ └── pkg.yml ├── btshell │ └── src │ │ └── cmd_l2cap.h └── blemesh_light │ └── src │ └── ws2812.h ├── NOTICE ├── .rat-excludes ├── RELEASE_NOTES.md ├── targets ├── nordic_pca10056-blehci-usb │ ├── syscfg.yml │ ├── target.yml │ └── pkg.yml ├── dialog_cmac │ ├── target.yml │ └── pkg.yml ├── nordic_pca10095_net-blehci │ ├── target.yml │ └── pkg.yml └── unittest │ ├── target.yml │ └── pkg.yml └── version.yml /ext/tinycrypt/VERSION: -------------------------------------------------------------------------------- 1 | 0.2.8 2 | -------------------------------------------------------------------------------- /babblesim/sdk/.gitignore: -------------------------------------------------------------------------------- 1 | components 2 | nrfx 3 | src -------------------------------------------------------------------------------- /babblesim/README.md: -------------------------------------------------------------------------------- 1 | BabbleSim support for Apache NimBLE 2 | -------------------------------------------------------------------------------- /porting/npl/riot/include/npl_syscfg/npl_sycfg.h: -------------------------------------------------------------------------------- 1 | ../syscfg/syscfg.h -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | xml 2 | node_modules 3 | _build 4 | doxygen_* 5 | *.pyc 6 | -------------------------------------------------------------------------------- /docs/mesh/mesh_topology.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RT-Thread-packages/nimble/HEAD/docs/mesh/mesh_topology.jpg -------------------------------------------------------------------------------- /docs/firmwares/images/JLINK_U.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RT-Thread-packages/nimble/HEAD/docs/firmwares/images/JLINK_U.png -------------------------------------------------------------------------------- /docs/firmwares/images/nrf52840dk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RT-Thread-packages/nimble/HEAD/docs/firmwares/images/nrf52840dk.png -------------------------------------------------------------------------------- /docs/mesh/mesh_lightning_model.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RT-Thread-packages/nimble/HEAD/docs/mesh/mesh_lightning_model.jpg -------------------------------------------------------------------------------- /nimble/host/mesh/src/shell.h: -------------------------------------------------------------------------------- 1 | #ifndef __SHELL_H__ 2 | #define __SHELL_H__ 3 | 4 | void ble_mesh_shell_init(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /docs/firmwares/images/nrf52840dongle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RT-Thread-packages/nimble/HEAD/docs/firmwares/images/nrf52840dongle.png -------------------------------------------------------------------------------- /.style_ignored_dirs: -------------------------------------------------------------------------------- 1 | # Skip those directories while doing style checks in the CI. Do not add '/' at 2 | # the beginning! 3 | 4 | ext/tinycrypt 5 | -------------------------------------------------------------------------------- /docs/firmwares/images/nrf52dk_nrf52832.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RT-Thread-packages/nimble/HEAD/docs/firmwares/images/nrf52dk_nrf52832.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dummy NPL build 2 | *.o 3 | /porting/examples/dummy/dummy 4 | /porting/examples/linux/nimble-linux 5 | /porting/examples/linux_blemesh/nimble-linux-blemesh 6 | .vscode 7 | -------------------------------------------------------------------------------- /apps/blehr/README.md: -------------------------------------------------------------------------------- 1 | # BLE Heart Rate peripheral app. 2 | 3 | The source files are located in the src/ directory. 4 | 5 | pkg.yml contains the base definition of the app. 6 | 7 | syscfg.yml contains setting definitions and overrides. 8 | 9 | 10 | -------------------------------------------------------------------------------- /apps/blecsc/README.md: -------------------------------------------------------------------------------- 1 | # BLE Cycling Speed and Cadence peripheral app. 2 | 3 | The source files are located in the src/ directory. 4 | 5 | pkg.yml contains the base definition of the app. 6 | 7 | syscfg.yml contains setting definitions and overrides. 8 | 9 | 10 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache Mynewt NimBLE 2 | Copyright 2015-2022 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | Portions of this software were developed at 8 | Runtime Inc, copyright 2015. 9 | -------------------------------------------------------------------------------- /nimble/host/mesh/src/cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Nordic Semiconductor ASA 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | void bt_mesh_cfg_default_set(void); 8 | void bt_mesh_cfg_pending_store(void); 9 | 10 | bool bt_mesh_fixed_group_match(uint16_t addr); 11 | -------------------------------------------------------------------------------- /nimble/host/mesh/src/provisioner.h: -------------------------------------------------------------------------------- 1 | /* Bluetooth Mesh */ 2 | 3 | /* 4 | * Copyright (c) 2017 Intel Corporation 5 | * 6 | * SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | int bt_mesh_pb_adv_open(const uint8_t uuid[16], uint16_t net_idx, uint16_t addr, 10 | uint8_t attention_duration); 11 | -------------------------------------------------------------------------------- /docs/ble_hs/ble_gap.rst: -------------------------------------------------------------------------------- 1 | NimBLE Host GAP Reference 2 | ------------------------- 3 | 4 | Introduction 5 | ~~~~~~~~~~~~ 6 | 7 | The Generic Access Profile (GAP) is responsible for all connecting, advertising, scanning, and connection updating operations. 8 | 9 | API 10 | ~~~~~~ 11 | 12 | .. doxygengroup:: bt_host_gap 13 | :content-only: 14 | :members: 15 | -------------------------------------------------------------------------------- /apps/blemesh_models_example_2/src/state_binding.h: -------------------------------------------------------------------------------- 1 | /* Bluetooth: Mesh Generic OnOff, Generic Level, Lighting & Vendor Models 2 | * 3 | * Copyright (c) 2018 Vikrant More 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | 8 | #ifndef _STATE_BINDING_H 9 | #define _STATE_BINDING_H 10 | 11 | void state_binding(u8_t lightness, u8_t temperature); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /docs/ble_setup/ble_setup_intro.rst: -------------------------------------------------------------------------------- 1 | NimBLE Setup 2 | ------------ 3 | 4 | Most NimBLE initialization is done automatically by 5 | :doc:`sysinit <../../../os/modules/sysinitconfig/sysinitconfig>`. This 6 | section documents the few bits of initialization that an application 7 | must perform manually. 8 | 9 | .. toctree:: 10 | 11 | ble_lp_clock 12 | ble_addr 13 | ble_sync_cb 14 | -------------------------------------------------------------------------------- /apps/blemesh_models_example_2/src/common.h: -------------------------------------------------------------------------------- 1 | /* Bluetooth: Mesh Generic OnOff, Generic Level, Lighting & Vendor Models 2 | * 3 | * Copyright (c) 2018 Vikrant More 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | 8 | #ifndef _COMMON_H 9 | #define _COMMON_H 10 | 11 | extern int button_device[]; 12 | extern int led_device[]; 13 | 14 | void update_light_state(void); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /nimble/host/pts/README.txt: -------------------------------------------------------------------------------- 1 | This folder contains qualification tests results against BT SIG Profile Test 2 | Suite. 3 | 4 | pts-FOO.txt files contain result for specific profiles or protocols. This 5 | includes PTS version, test date, enabled tests, results etc. 6 | 7 | In addition to tests results 'tpg' folder constains Test Plang Generator 8 | configuration files that can be imported by PTS for tests configuration. 9 | -------------------------------------------------------------------------------- /docs/ble_hs/ble_gattc.rst: -------------------------------------------------------------------------------- 1 | NimBLE Host GATT Client Reference 2 | --------------------------------- 3 | 4 | Introduction 5 | ~~~~~~~~~~~~ 6 | 7 | The Generic Attribute Profile (GATT) manages all activities involving services, characteristics, and descriptors. The 8 | client half of the GATT API initiates GATT procedures. 9 | 10 | API 11 | ~~~~~~ 12 | 13 | .. doxygengroup:: bt_gatt 14 | :content-only: 15 | :members: 16 | -------------------------------------------------------------------------------- /nimble/host/mesh/src/cdb_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Nordic Semiconductor ASA 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /* ommitted `bt_mesh_cdb_node_store` declaration - every header 8 | * includes mesh/mesh.h, which already has it 9 | * void bt_mesh_cdb_node_store(const struct bt_mesh_cdb_node *node); 10 | */ 11 | void bt_mesh_cdb_pending_store(void); 12 | void bt_mesh_cdb_init(void); 13 | -------------------------------------------------------------------------------- /porting/npl/rtthread/include/console/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: Apache-2.0 3 | * 4 | * Date Author Notes 5 | * 2018-12-29 ChenYong first implementation 6 | * 2022-05-20 Jackistang remove MODLOG_DFLT 7 | */ 8 | 9 | #ifndef __CONSOLE_H__ 10 | #define __CONSOLE_H__ 11 | 12 | // TODO: 13 | #include 14 | 15 | #define console_printf rt_kprintf 16 | 17 | 18 | #endif -------------------------------------------------------------------------------- /docs/ble_hs/ble_gatts.rst: -------------------------------------------------------------------------------- 1 | NimBLE Host GATT Server Reference 2 | --------------------------------- 3 | 4 | Introduction 5 | ~~~~~~~~~~~~ 6 | 7 | The Generic Attribute Profile (GATT) manages all activities involving services, characteristics, and descriptors. The 8 | server half of the GATT API handles registration and responding to GATT clients. 9 | 10 | API 11 | ~~~~~~ 12 | 13 | .. doxygengroup:: bt_gatt 14 | :content-only: 15 | :members: 16 | -------------------------------------------------------------------------------- /ext/tinycrypt/AUTHORS: -------------------------------------------------------------------------------- 1 | Architect: 2 | Rafael Misoczki 3 | 4 | Open Source Maintainer: 5 | Constanza Heath 6 | Rafael Misoczki 7 | 8 | Contributors: 9 | Constanza Heath 10 | Rafael Misoczki 11 | Flavio Santes 12 | Jarkko Sakkinen 13 | Chris Morrison 14 | Marti Bolivar 15 | Colin Ian King 16 | -------------------------------------------------------------------------------- /nimble/host/mesh/include/mesh/porting.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief Bluetooth Mesh Porting APIs. 3 | */ 4 | 5 | /* 6 | * Copyright (c) 2017 Intel Corporation 7 | * 8 | * SPDX-License-Identifier: Apache-2.0 9 | */ 10 | #ifndef __BT_MESH_PORTING_H 11 | #define __BT_MESH_PORTING_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | void mesh_adv_thread(void *args); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | /** 24 | * @} 25 | */ 26 | 27 | #endif /* __BT_MESH_PORTING_H */ 28 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Make a preview site for Sphinx & Doxygen output 2 | 3 | SPHINXOPTS = 4 | SPHINXBUILD = sphinx-build 5 | SPHINXPROJ = Mynewt 6 | SOURCEDIR = . 7 | BUILDDIR = _build/sphinx 8 | 9 | .PHONY: Makefile clean preview doxygen 10 | 11 | clean: 12 | rm -rf _build 13 | 14 | preview: _build doxygen sphinx 15 | 16 | _build: 17 | mkdir -p _build 18 | 19 | doxygen: 20 | mkdir -p _build/html 21 | cd .. && doxygen docs/doxygen.xml 22 | 23 | sphinx: 24 | sphinx-build . _build/sphinx 25 | mv _build/sphinx _build/html/documentation 26 | -------------------------------------------------------------------------------- /nimble/host/mesh/src/beacon.h: -------------------------------------------------------------------------------- 1 | /* Bluetooth Mesh */ 2 | 3 | /* 4 | * Copyright (c) 2017 Intel Corporation 5 | * 6 | * SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | #ifndef __BEACON_H__ 10 | #define __BEACON_H__ 11 | 12 | #include "os/os_mbuf.h" 13 | 14 | void bt_mesh_beacon_enable(void); 15 | void bt_mesh_beacon_disable(void); 16 | 17 | void bt_mesh_beacon_ivu_initiator(bool enable); 18 | 19 | void bt_mesh_beacon_recv(struct os_mbuf *buf); 20 | 21 | void bt_mesh_beacon_create(struct bt_mesh_subnet *sub, 22 | struct os_mbuf *buf); 23 | 24 | void bt_mesh_beacon_init(void); 25 | void bt_mesh_beacon_update(struct bt_mesh_subnet *sub); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /babblesim/core/include/argparse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Oticon A/S 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef BSIM_NRF_ARGS_H 7 | #define BSIM_NRF_ARGS_H 8 | 9 | #include 10 | #include "NRF_hw_args.h" 11 | #include "bs_cmd_line.h" 12 | #include "bs_cmd_line_typical.h" 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | struct nrf52_bsim_args_t { 19 | BS_BASIC_DEVICE_OPTIONS_FIELDS 20 | nrf_hw_sub_args_t nrf_hw; 21 | }; 22 | 23 | struct nrf52_bsim_args_t *nrfbsim_argsparse(int argc, char *argv[]); 24 | void nrfbsim_register_args(void); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /babblesim/core/include/core_cm4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Oticon A/S 3 | * Copyright (c) 2021 Codecoup 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | 8 | #ifndef _BSIM_CORE_CM4_H 9 | #define _BSIM_CORE_CM4_H 10 | 11 | #include 12 | 13 | /* Include the original ext_NRF52_hw_models core_cm4.h */ 14 | #include <../HW_models/core_cm4.h> 15 | 16 | /* Add missing function definitions */ 17 | extern void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority); 18 | extern void NVIC_EnableIRQ(IRQn_Type IRQn); 19 | extern void NVIC_DisableIRQ(IRQn_Type IRQn); 20 | 21 | void __WFI(void); 22 | 23 | #ifndef __REV 24 | #define __REV __builtin_bswap32 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /apps/blemesh_models_example_2/src/publisher.h: -------------------------------------------------------------------------------- 1 | /* Bluetooth: Mesh Generic OnOff, Generic Level, Lighting & Vendor Models 2 | * 3 | * Copyright (c) 2018 Vikrant More 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | 8 | #ifndef _PUBLISHER_H 9 | #define _PUBLISHER_H 10 | 11 | /* Others */ 12 | #define LEVEL_S0 -32768 13 | #define LEVEL_S25 -16384 14 | #define LEVEL_S50 0 15 | #define LEVEL_S75 16384 16 | #define LEVEL_S100 32767 17 | 18 | #define LEVEL_U0 0 19 | #define LEVEL_U25 16384 20 | #define LEVEL_U50 32768 21 | #define LEVEL_U75 49152 22 | #define LEVEL_U100 65535 23 | 24 | void randomize_publishers_TID(void); 25 | void publish(struct ble_npl_event *work); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /babblesim/hw/mcu/nordic/nrf52_bsim/include/mcu/cmsis_nvic.h: -------------------------------------------------------------------------------- 1 | /* mbed Microcontroller Library - cmsis_nvic 2 | * Copyright (c) 2009-2011 ARM Limited. All rights reserved. 3 | * 4 | * CMSIS-style functionality to support dynamic vectors 5 | */ 6 | 7 | #ifndef MBED_CMSIS_NVIC_H 8 | #define MBED_CMSIS_NVIC_H 9 | 10 | #include 11 | #include "nrf.h" 12 | 13 | #define NVIC_NUM_VECTORS (16 + 38) // CORE + MCU Peripherals 14 | #define NVIC_USER_IRQ_OFFSET 16 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | void NVIC_Relocate(void); 21 | void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector); 22 | uint32_t NVIC_GetVector(IRQn_Type IRQn); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /.rat-excludes: -------------------------------------------------------------------------------- 1 | # Can't easily add license to rat-excludes file. 2 | .rat-excludes 3 | 4 | # Ignore documentation folder 5 | docs 6 | 7 | # Non-source files 8 | RELEASE_NOTES.md 9 | .gitignore 10 | README.md 11 | pts-gap.txt 12 | pts-gatt.txt 13 | pts-l2cap.txt 14 | pts-sm.txt 15 | 94654-20170317-085122560.tpg 16 | 94654-20170317-085441153.pts 17 | uncrustify.cfg 18 | .style_ignored_dirs 19 | .mailmap 20 | 21 | # tinycrypt - BSD License. 22 | tinycrypt 23 | 24 | # Bluetooth Mesh - Apache 2.0 License 25 | mesh 26 | 27 | # Queue implementation - BSD License 28 | queue.h 29 | 30 | # mbuf implementation - BSD License 31 | os_mbuf.c 32 | 33 | # Bluetooth Mesh badge sample - Apache 2.0 License 34 | mesh_badge 35 | 36 | #BabbleSim and EDDT - Apache 2.0 License 37 | babblesim 38 | -------------------------------------------------------------------------------- /nimble/host/mesh/include/mesh/mesh.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief Bluetooth Mesh Profile APIs. 3 | */ 4 | 5 | /* 6 | * Copyright (c) 2017 Intel Corporation 7 | * 8 | * SPDX-License-Identifier: Apache-2.0 9 | */ 10 | #ifndef __BT_MESH_H 11 | #define __BT_MESH_H 12 | 13 | #include 14 | #include "syscfg/syscfg.h" 15 | #include "os/os_mbuf.h" 16 | 17 | #include "glue.h" 18 | #include "msg.h" 19 | #include "access.h" 20 | #include "main.h" 21 | #include "cfg.h" 22 | #include "cfg_srv.h" 23 | #include "health_srv.h" 24 | #include "cfg_cli.h" 25 | #include "health_cli.h" 26 | #include "proxy.h" 27 | #include "cdb.h" 28 | #include "cfg.h" 29 | #include "heartbeat.h" 30 | #include "../src/app_keys.h" 31 | #include "../src/net.h" 32 | 33 | #endif /* __BT_MESH_H */ 34 | -------------------------------------------------------------------------------- /docs/ble_hs/ble_hs.rst: -------------------------------------------------------------------------------- 1 | NimBLE Host 2 | ----------- 3 | 4 | Introduction 5 | ~~~~~~~~~~~~ 6 | 7 | At a high level, the NimBLE stack is divided into two components: 8 | 9 | - Host 10 | - Controller 11 | 12 | This document is an API reference for the host component. If you are 13 | interested in the general structure of the NimBLE stack and its non-host 14 | components, you might want to read the :doc:`../index`. 15 | 16 | The host sits directly below the application, and it serves as the 17 | interface to the application for all BLE operations. 18 | 19 | .. toctree:: 20 | :titlesonly: 21 | 22 | Return Codes 23 | GAP 24 | GATT Client 25 | GATT Server 26 | Identity 27 | ATT 28 | -------------------------------------------------------------------------------- /nimble/host/mesh/src/light_model.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Intel Corporation 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | #ifndef __BT_MESH_LIGHT_MODEL_H 7 | #define __BT_MESH_LIGHT_MODEL_H 8 | 9 | #include "syscfg/syscfg.h" 10 | #include "mesh/mesh.h" 11 | 12 | int light_model_gen_onoff_get(struct bt_mesh_model *model, uint8_t *state); 13 | int light_model_gen_onoff_set(struct bt_mesh_model *model, uint8_t state); 14 | int light_model_gen_level_get(struct bt_mesh_model *model, int16_t *level); 15 | int light_model_gen_level_set(struct bt_mesh_model *model, int16_t level); 16 | int light_model_light_lightness_get(struct bt_mesh_model *model, int16_t *lightness); 17 | int light_model_light_lightness_set(struct bt_mesh_model *model, int16_t lightness); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /nimble/host/mesh/src/testing.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file testing.h 3 | * @brief Internal API for Bluetooth testing. 4 | */ 5 | 6 | /* 7 | * Copyright (c) 2017 Intel Corporation 8 | * 9 | * SPDX-License-Identifier: Apache-2.0 10 | */ 11 | 12 | #include "mesh/glue.h" 13 | #include "mesh/access.h" 14 | 15 | void bt_test_mesh_model_bound(uint16_t addr, struct bt_mesh_model *model, 16 | uint16_t key_idx); 17 | void bt_test_mesh_model_unbound(uint16_t addr, struct bt_mesh_model *model, 18 | uint16_t key_idx); 19 | void bt_test_mesh_prov_invalid_bearer(uint8_t opcode); 20 | void bt_test_mesh_net_recv(uint8_t ttl, uint8_t ctl, uint16_t src, uint16_t dst, 21 | const void *payload, size_t payload_len); 22 | void bt_test_mesh_trans_incomp_timer_exp(void); 23 | void bt_test_print_credentials(void); 24 | -------------------------------------------------------------------------------- /babblesim/edtt/hci_transport/include/edtt_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Oticon A/S 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef EDTT_DRIVER_H 8 | #define EDTT_DRIVER_H 9 | 10 | #include 11 | #include 12 | 13 | #define EDTTT_NONBLOCK 0 14 | #define EDTTT_BLOCK 1 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | /** 21 | * Generic EDTT interface 22 | */ 23 | bool edtt_start(void); 24 | bool edtt_stop(void); 25 | int edtt_read(uint8_t *ptr, size_t size, int flags); 26 | int edtt_write(uint8_t *ptr, size_t size, int flags); 27 | 28 | /** 29 | * Exclusive functions for the BabbleSim driver 30 | */ 31 | void enable_edtt_mode(void); 32 | void set_edtt_autoshutdown(bool mode); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* EDTT_DRIVER_H */ 39 | -------------------------------------------------------------------------------- /porting/nimble/include/sysflash/sysflash.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was generated by Apache newt version: 1.10.0-dev 3 | */ 4 | 5 | #ifndef H_MYNEWT_SYSFLASH_ 6 | #define H_MYNEWT_SYSFLASH_ 7 | 8 | #include "flash_map/flash_map.h" 9 | 10 | /** 11 | * This flash map definition is used for two purposes: 12 | * 1. To locate the meta area, which contains the true flash map definition. 13 | * 2. As a fallback in case the meta area cannot be read from flash. 14 | */ 15 | extern const struct flash_area sysflash_map_dflt[6]; 16 | 17 | #define FLASH_AREA_BOOTLOADER 0 18 | #define FLASH_AREA_IMAGE_0 1 19 | #define FLASH_AREA_IMAGE_1 2 20 | #define FLASH_AREA_IMAGE_SCRATCH 3 21 | #define FLASH_AREA_REBOOT_LOG 16 22 | #define FLASH_AREA_NFFS 17 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /porting/npl/riot/include/sysflash/sysflash.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was generated by Apache newt version: 1.10.0-dev 3 | */ 4 | 5 | #ifndef H_MYNEWT_SYSFLASH_ 6 | #define H_MYNEWT_SYSFLASH_ 7 | 8 | #include "flash_map/flash_map.h" 9 | 10 | /** 11 | * This flash map definition is used for two purposes: 12 | * 1. To locate the meta area, which contains the true flash map definition. 13 | * 2. As a fallback in case the meta area cannot be read from flash. 14 | */ 15 | extern const struct flash_area sysflash_map_dflt[6]; 16 | 17 | #define FLASH_AREA_BOOTLOADER 0 18 | #define FLASH_AREA_IMAGE_0 1 19 | #define FLASH_AREA_IMAGE_1 2 20 | #define FLASH_AREA_IMAGE_SCRATCH 3 21 | #define FLASH_AREA_REBOOT_LOG 16 22 | #define FLASH_AREA_NFFS 17 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /porting/examples/linux/include/sysflash/sysflash.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was generated by Apache newt version: 1.10.0-dev 3 | */ 4 | 5 | #ifndef H_MYNEWT_SYSFLASH_ 6 | #define H_MYNEWT_SYSFLASH_ 7 | 8 | #include "flash_map/flash_map.h" 9 | 10 | /** 11 | * This flash map definition is used for two purposes: 12 | * 1. To locate the meta area, which contains the true flash map definition. 13 | * 2. As a fallback in case the meta area cannot be read from flash. 14 | */ 15 | extern const struct flash_area sysflash_map_dflt[6]; 16 | 17 | #define FLASH_AREA_BOOTLOADER 0 18 | #define FLASH_AREA_IMAGE_0 1 19 | #define FLASH_AREA_IMAGE_1 2 20 | #define FLASH_AREA_IMAGE_SCRATCH 3 21 | #define FLASH_AREA_REBOOT_LOG 16 22 | #define FLASH_AREA_NFFS 17 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /porting/examples/nuttx/include/sysflash/sysflash.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was generated by Apache newt version: 1.10.0-dev 3 | */ 4 | 5 | #ifndef H_MYNEWT_SYSFLASH_ 6 | #define H_MYNEWT_SYSFLASH_ 7 | 8 | #include "flash_map/flash_map.h" 9 | 10 | /** 11 | * This flash map definition is used for two purposes: 12 | * 1. To locate the meta area, which contains the true flash map definition. 13 | * 2. As a fallback in case the meta area cannot be read from flash. 14 | */ 15 | extern const struct flash_area sysflash_map_dflt[6]; 16 | 17 | #define FLASH_AREA_BOOTLOADER 0 18 | #define FLASH_AREA_IMAGE_0 1 19 | #define FLASH_AREA_IMAGE_1 2 20 | #define FLASH_AREA_IMAGE_SCRATCH 3 21 | #define FLASH_AREA_REBOOT_LOG 16 22 | #define FLASH_AREA_NFFS 17 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /porting/examples/linux_blemesh/include/sysflash/sysflash.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was generated by Apache newt version: 1.10.0-dev 3 | */ 4 | 5 | #ifndef H_MYNEWT_SYSFLASH_ 6 | #define H_MYNEWT_SYSFLASH_ 7 | 8 | #include "flash_map/flash_map.h" 9 | 10 | /** 11 | * This flash map definition is used for two purposes: 12 | * 1. To locate the meta area, which contains the true flash map definition. 13 | * 2. As a fallback in case the meta area cannot be read from flash. 14 | */ 15 | extern const struct flash_area sysflash_map_dflt[6]; 16 | 17 | #define FLASH_AREA_BOOTLOADER 0 18 | #define FLASH_AREA_IMAGE_0 1 19 | #define FLASH_AREA_IMAGE_1 2 20 | #define FLASH_AREA_IMAGE_SCRATCH 3 21 | #define FLASH_AREA_REBOOT_LOG 16 22 | #define FLASH_AREA_NFFS 17 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /nimble/host/mesh/src/settings.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Intel Corporation 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | /* Pending storage actions. */ 7 | enum bt_mesh_settings_flag { 8 | BT_MESH_SETTINGS_RPL_PENDING, 9 | BT_MESH_SETTINGS_NET_KEYS_PENDING, 10 | BT_MESH_SETTINGS_APP_KEYS_PENDING, 11 | BT_MESH_SETTINGS_NET_PENDING, 12 | BT_MESH_SETTINGS_IV_PENDING, 13 | BT_MESH_SETTINGS_SEQ_PENDING, 14 | BT_MESH_SETTINGS_HB_PUB_PENDING, 15 | BT_MESH_SETTINGS_CFG_PENDING, 16 | BT_MESH_SETTINGS_MOD_PENDING, 17 | BT_MESH_SETTINGS_VA_PENDING, 18 | BT_MESH_SETTINGS_CDB_PENDING, 19 | 20 | BT_MESH_SETTINGS_FLAG_COUNT, 21 | }; 22 | 23 | void bt_mesh_settings_init(void); 24 | int settings_name_next(char *name, char **next); 25 | void bt_mesh_settings_store_schedule(enum bt_mesh_settings_flag flag); 26 | void bt_mesh_settings_store_cancel(enum bt_mesh_settings_flag flag); 27 | -------------------------------------------------------------------------------- /nimble/host/util/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.defs: 20 | -------------------------------------------------------------------------------- /nimble/transport/usb/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.defs: 20 | -------------------------------------------------------------------------------- /nimble/host/mesh/src/rpl.h: -------------------------------------------------------------------------------- 1 | /* Bluetooth Mesh */ 2 | 3 | /* 4 | * Copyright (c) 2017 Intel Corporation 5 | * Copyright (c) 2020 Lingao Meng 6 | * 7 | * SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | struct bt_mesh_rpl { 11 | uint64_t src:15, 12 | old_iv:1, 13 | seq:24, 14 | /** Sequence authentication value for the previous segmented 15 | * message received from this address. 16 | * 17 | * This value is used to manage the parallel RPL of the 18 | * SeqAuth values in transport. 19 | */ 20 | seg:24; 21 | }; 22 | 23 | typedef void (*bt_mesh_rpl_func_t)(struct bt_mesh_rpl *rpl, 24 | void *user_data); 25 | 26 | void bt_mesh_rpl_reset(void); 27 | bool bt_mesh_rpl_check(struct bt_mesh_net_rx *rx, 28 | struct bt_mesh_rpl **match); 29 | void bt_mesh_rpl_clear(void); 30 | void bt_mesh_rpl_update(struct bt_mesh_rpl *rpl, 31 | struct bt_mesh_net_rx *rx); 32 | void bt_mesh_rpl_init(void); 33 | -------------------------------------------------------------------------------- /nimble/host/mesh/src/pb_gatt_srv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Intel Corporation 3 | * Copyright (c) 2021 Lingao Meng 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | 8 | #ifndef __PB_GATT_SRV_H__ 9 | #define __PB_GATT_SRV_H__ 10 | 11 | int bt_mesh_pb_gatt_send(uint16_t conn_handle, struct os_mbuf *buf); 12 | 13 | int bt_mesh_pb_gatt_enable(void); 14 | int bt_mesh_pb_gatt_disable(void); 15 | 16 | int prov_ccc_write(uint16_t conn_handle, uint8_t type); 17 | void gatt_disconnected_pb_gatt(struct ble_gap_conn_desc conn, uint8_t err); 18 | void gatt_connected_pb_gatt(uint16_t conn_handle, uint8_t err); 19 | void resolve_svc_handles(void); 20 | 21 | int bt_mesh_pb_gatt_adv_start(void); 22 | 23 | extern struct svc_handles { 24 | uint16_t proxy_h; 25 | uint16_t proxy_data_out_h; 26 | uint16_t prov_h; 27 | uint16_t prov_data_in_h; 28 | uint16_t prov_data_out_h; 29 | } svc_handles; 30 | 31 | #endif /* __PB_GATT_SRV_H__ */ 32 | -------------------------------------------------------------------------------- /babblesim/sdk/scripts/link_nrfx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | 21 | ln -sfn ${NRFX_BASE} ./nrfx 22 | -------------------------------------------------------------------------------- /nimble/transport/nrf5340/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.defs: 20 | BLE_TRANSPORT_INT_FLOW_CTL: 1 21 | -------------------------------------------------------------------------------- /babblesim/targets/blecent/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | BLE_LL_PUBLIC_DEV_ADDR: 0xbabb1e000002 21 | -------------------------------------------------------------------------------- /babblesim/targets/bleprph/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | BLE_LL_PUBLIC_DEV_ADDR: 0xbabb1e000003 21 | -------------------------------------------------------------------------------- /babblesim/targets/btshell/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | BLE_LL_PUBLIC_DEV_ADDR: 0xbabb1e000004 21 | -------------------------------------------------------------------------------- /apps/blehci/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | # Default task settings 21 | OS_MAIN_STACK_SIZE: 64 22 | -------------------------------------------------------------------------------- /porting/npl/rtthread/src/nrf5x_isr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: Apache-2.0 3 | * 4 | * Date Author Notes 5 | * 2018-12-18 ZeroFree first implementation 6 | */ 7 | 8 | #include "nimble/nimble_npl.h" 9 | #include "nrfx.h" 10 | 11 | static void (*radio_isr_addr)(void); 12 | static void (*rng_isr_addr)(void); 13 | static void (*rtc0_isr_addr)(void); 14 | 15 | void RADIO_IRQHandler(void) 16 | { 17 | radio_isr_addr(); 18 | } 19 | 20 | void RNG_IRQHandler(void) 21 | { 22 | rng_isr_addr(); 23 | } 24 | 25 | void RTC0_IRQHandler(void) 26 | { 27 | rtc0_isr_addr(); 28 | } 29 | 30 | void ble_npl_hw_set_isr(int irqn, void (*addr)(void)) 31 | { 32 | switch (irqn) 33 | { 34 | case RADIO_IRQn: 35 | radio_isr_addr = addr; 36 | break; 37 | case RNG_IRQn: 38 | rng_isr_addr = addr; 39 | break; 40 | case RTC0_IRQn: 41 | rtc0_isr_addr = addr; 42 | break; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /nimble/host/mesh/include/mesh/cfg_srv.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief Bluetooth Mesh Configuration Server Model APIs. 3 | */ 4 | 5 | /* 6 | * Copyright (c) 2017 Intel Corporation 7 | * 8 | * SPDX-License-Identifier: Apache-2.0 9 | */ 10 | #ifndef __BT_MESH_CFG_SRV_H 11 | #define __BT_MESH_CFG_SRV_H 12 | 13 | /** 14 | * @brief Bluetooth Mesh 15 | * @defgroup bt_mesh_cfg_srv Bluetooth Mesh Configuration Server Model 16 | * @ingroup bt_mesh 17 | * @{ 18 | */ 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | 25 | extern const struct bt_mesh_model_op bt_mesh_cfg_srv_op[]; 26 | extern const struct bt_mesh_model_cb bt_mesh_cfg_srv_cb; 27 | 28 | #define BT_MESH_MODEL_CFG_SRV \ 29 | BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_CFG_SRV, bt_mesh_cfg_srv_op, NULL, \ 30 | NULL, &bt_mesh_cfg_srv_cb) 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | /** 37 | * @} 38 | */ 39 | 40 | #endif /* __BT_MESH_CFG_SRV_H */ 41 | -------------------------------------------------------------------------------- /RELEASE_NOTES.md: -------------------------------------------------------------------------------- 1 | # RELEASE NOTES 2 | 3 | 20 April 2022 - Apache NimBLE v1.5.0 4 | 5 | For full release notes, please visit the 6 | [Apache Mynewt Wiki](https://cwiki.apache.org/confluence/display/MYNEWT/Release+Notes). 7 | 8 | Apache NimBLE is an open-source Bluetooth 5.3 stack (both Host & Controller) that completely 9 | replaces the proprietary SoftDevice on Nordic chipsets. 10 | 11 | New features in this version of NimBLE include: 12 | 13 | * Fake dual-mode option for controller 14 | * LLCP tracing via HCI events 15 | * Code size optimization for disabled GAP roles 16 | * Support for PA/LNA 17 | * LE Secure Connections Only mode 18 | * Support for Bluetooth Core Specification 5.3 19 | * Connection subrating 20 | * BabbleSim support 21 | * Various bugfixes and improvements 22 | 23 | If working on next-generation RTOS and Bluetooth protocol stack 24 | sounds exciting to you, get in touch, by sending a mail to the Apache Mynewt 25 | Developer's list, dev@mynewt.apache.org. 26 | -------------------------------------------------------------------------------- /babblesim/targets/blehci/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | BLE_LL_PUBLIC_DEV_ADDR: 0xbabb1e000001 21 | BLE_HCI_TRANSPORT: uart 22 | -------------------------------------------------------------------------------- /nimble/host/mesh/include/mesh/proxy.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief Bluetooth Mesh Proxy APIs. 3 | */ 4 | 5 | /* 6 | * Copyright (c) 2017 Intel Corporation 7 | * 8 | * SPDX-License-Identifier: Apache-2.0 9 | */ 10 | #ifndef __BT_MESH_PROXY_H 11 | #define __BT_MESH_PROXY_H 12 | 13 | /** 14 | * @brief Bluetooth Mesh Proxy 15 | * @defgroup bt_mesh_proxy Bluetooth Mesh Proxy 16 | * @ingroup bt_mesh 17 | * @{ 18 | */ 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /** 25 | * @brief Enable advertising with Node Identity. 26 | * 27 | * This API requires that GATT Proxy support has been enabled. Once called 28 | * each subnet will start advertising using Node Identity for the next 29 | * 60 seconds. 30 | * 31 | * @return 0 on success, or (negative) error code on failure. 32 | */ 33 | int bt_mesh_proxy_identity_enable(void); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | /** 40 | * @} 41 | */ 42 | 43 | #endif /* __BT_MESH_PROXY_H */ 44 | -------------------------------------------------------------------------------- /porting/targets/linux/target.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | target.app: "porting/targets/dummy_app" 19 | target.bsp: "@apache-mynewt-core/hw/bsp/native" 20 | target.build_profile: "debug" 21 | -------------------------------------------------------------------------------- /porting/targets/nuttx/target.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | target.app: "porting/targets/dummy_app" 19 | target.bsp: "@apache-mynewt-core/hw/bsp/native" 20 | target.build_profile: "debug" 21 | -------------------------------------------------------------------------------- /porting/targets/porting_default/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | BLE_TRANSPORT_LL: socket 21 | BLE_SOCK_USE_TCP: 0 22 | BLE_SOCK_USE_LINUX_BLUE: 1 23 | -------------------------------------------------------------------------------- /babblesim/targets/edtthci/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: babblesim/targets/edtthci 21 | pkg.type: target 22 | pkg.description: 23 | pkg.author: 24 | pkg.homepage: 25 | -------------------------------------------------------------------------------- /apps/advertiser/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | 19 | syscfg.vals: 20 | BLE_ROLE_BROADCASTER: 1 21 | BLE_ROLE_CENTRAL: 0 22 | BLE_ROLE_OBSERVER: 0 23 | BLE_ROLE_PERIPHERAL: 0 24 | -------------------------------------------------------------------------------- /porting/targets/linux_blemesh/target.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | target.app: "porting/targets/dummy_app" 20 | target.bsp: "@apache-mynewt-core/hw/bsp/native" 21 | target.build_profile: "debug" 22 | -------------------------------------------------------------------------------- /porting/targets/porting_default/target.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | target.app: "porting/targets/dummy_app" 20 | target.bsp: "@apache-mynewt-core/hw/bsp/native" 21 | target.build_profile: "debug" 22 | -------------------------------------------------------------------------------- /porting/targets/riot/target.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | target.app: "porting/targets/dummy_app" 20 | target.bsp: "@apache-mynewt-core/hw/bsp/nordic_pca10056" 21 | target.build_profile: "debug" 22 | -------------------------------------------------------------------------------- /targets/nordic_pca10056-blehci-usb/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | BLE_TRANSPORT_HS: usb 21 | USBD_BTH: 1 22 | 23 | USBD_PID: 0xC01A 24 | USBD_VID: 0xC0CA 25 | -------------------------------------------------------------------------------- /version.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | # Newt uses this file to determine the version of a checked out repo. 21 | # This should always be 0.0.0 in the master branch. 22 | repo.version: 0.0.0 23 | -------------------------------------------------------------------------------- /porting/npl/riot/include/logcfg/logcfg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was generated by Apache newt version: 1.10.0-dev 3 | */ 4 | 5 | #ifndef H_MYNEWT_LOGCFG_ 6 | #define H_MYNEWT_LOGCFG_ 7 | 8 | #include "modlog/modlog.h" 9 | #include "log_common/log_common.h" 10 | 11 | #define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) 12 | #define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__) 13 | #define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__) 14 | #define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__) 15 | #define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__) 16 | #define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__) 17 | 18 | #define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) 19 | #define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__) 20 | #define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__) 21 | #define DFLT_LOG_ERROR(...) MODLOG_ERROR(0, __VA_ARGS__) 22 | #define DFLT_LOG_CRITICAL(...) MODLOG_CRITICAL(0, __VA_ARGS__) 23 | #define DFLT_LOG_DISABLED(...) MODLOG_DISABLED(0, __VA_ARGS__) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /porting/examples/linux/include/logcfg/logcfg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was generated by Apache newt version: 1.10.0-dev 3 | */ 4 | 5 | #ifndef H_MYNEWT_LOGCFG_ 6 | #define H_MYNEWT_LOGCFG_ 7 | 8 | #include "modlog/modlog.h" 9 | #include "log_common/log_common.h" 10 | 11 | #define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) 12 | #define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__) 13 | #define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__) 14 | #define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__) 15 | #define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__) 16 | #define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__) 17 | 18 | #define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) 19 | #define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__) 20 | #define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__) 21 | #define DFLT_LOG_ERROR(...) MODLOG_ERROR(0, __VA_ARGS__) 22 | #define DFLT_LOG_CRITICAL(...) MODLOG_CRITICAL(0, __VA_ARGS__) 23 | #define DFLT_LOG_DISABLED(...) MODLOG_DISABLED(0, __VA_ARGS__) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /porting/examples/nuttx/include/logcfg/logcfg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was generated by Apache newt version: 1.10.0-dev 3 | */ 4 | 5 | #ifndef H_MYNEWT_LOGCFG_ 6 | #define H_MYNEWT_LOGCFG_ 7 | 8 | #include "modlog/modlog.h" 9 | #include "log_common/log_common.h" 10 | 11 | #define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) 12 | #define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__) 13 | #define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__) 14 | #define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__) 15 | #define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__) 16 | #define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__) 17 | 18 | #define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) 19 | #define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__) 20 | #define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__) 21 | #define DFLT_LOG_ERROR(...) MODLOG_ERROR(0, __VA_ARGS__) 22 | #define DFLT_LOG_CRITICAL(...) MODLOG_CRITICAL(0, __VA_ARGS__) 23 | #define DFLT_LOG_DISABLED(...) MODLOG_DISABLED(0, __VA_ARGS__) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /targets/dialog_cmac/target.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | target.app: "@apache-mynewt-nimble/apps/blehci" 21 | target.bsp: "@apache-mynewt-core/hw/bsp/dialog_cmac" 22 | target.build_profile: speed 23 | -------------------------------------------------------------------------------- /apps/blecent/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | # DEBUG logging is a bit noisy; use INFO. 21 | LOG_LEVEL: 1 22 | 23 | # Default task settings 24 | OS_MAIN_STACK_SIZE: 336 25 | -------------------------------------------------------------------------------- /babblesim/targets/blehci/target.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | target.app: "@apache-mynewt-nimble/apps/blehci" 20 | target.bsp: "@apache-mynewt-nimble/babblesim/hw/bsp/nrf52_bsim" 21 | target.build_profile: debug 22 | -------------------------------------------------------------------------------- /babblesim/targets/blecent/target.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | target.app: "@apache-mynewt-nimble/apps/blecent" 20 | target.bsp: "@apache-mynewt-nimble/babblesim/hw/bsp/nrf52_bsim" 21 | target.build_profile: debug 22 | -------------------------------------------------------------------------------- /babblesim/targets/bleprph/target.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | target.app: "@apache-mynewt-nimble/apps/bleprph" 20 | target.bsp: "@apache-mynewt-nimble/babblesim/hw/bsp/nrf52_bsim" 21 | target.build_profile: debug 22 | -------------------------------------------------------------------------------- /babblesim/targets/btshell/target.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | target.app: "@apache-mynewt-nimble/apps/btshell" 20 | target.bsp: "@apache-mynewt-nimble/babblesim/hw/bsp/nrf52_bsim" 21 | target.build_profile: debug 22 | -------------------------------------------------------------------------------- /targets/nordic_pca10056-blehci-usb/target.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | target.app: "@apache-mynewt-nimble/apps/blehci" 20 | target.bsp: "@apache-mynewt-core/hw/bsp/nordic_pca10056" 21 | target.build_profile: debug 22 | -------------------------------------------------------------------------------- /nimble/host/services/lls/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | syscfg.defs: 19 | BLE_SVC_LLS_SYSINIT_STAGE: 20 | description: > 21 | Sysinit stage for the link loss BLE service. 22 | value: 303 23 | -------------------------------------------------------------------------------- /porting/examples/dummy/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #include "nimble/nimble_port.h" 21 | 22 | int main(int argc, char **argv) 23 | { 24 | nimble_port_init(); 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /targets/nordic_pca10095_net-blehci/target.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | target.app: "@apache-mynewt-nimble/apps/blehci" 21 | target.bsp: "@apache-mynewt-core/hw/bsp/nordic_pca10095_net" 22 | target.build_profile: debug 23 | -------------------------------------------------------------------------------- /babblesim/targets/edtthci/target.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | target.app: "@apache-mynewt-nimble/babblesim/edtt/hci_test" 21 | target.bsp: "@apache-mynewt-nimble/babblesim/hw/bsp/nrf52_bsim" 22 | target.build_profile: debug 23 | -------------------------------------------------------------------------------- /nimble/host/services/gatt/syscfg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | syscfg.defs: 21 | BLE_SVC_GATT_SYSINIT_STAGE: 22 | description: > 23 | Sysinit stage for the GATT BLE service 24 | value: 302 25 | -------------------------------------------------------------------------------- /nimble/host/services/ias/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.defs: 20 | BLE_SVC_IAS_SYSINIT_STAGE: 21 | description: > 22 | Sysinit stage for the immediate alert BLE service. 23 | value: 303 24 | -------------------------------------------------------------------------------- /nimble/host/services/ipss/syscfg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | syscfg.defs: 21 | BLE_SVC_IPSS_SYSINIT_STAGE: 22 | description: > 23 | Sysinit stage for the IPSS BLE service 24 | value: 303 25 | -------------------------------------------------------------------------------- /nimble/host/services/tps/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | syscfg.defs: 19 | BLE_SVC_TPS_SYSINIT_STAGE: 20 | description: > 21 | Sysinit stage for the transmit power BLE service. 22 | value: 303 23 | 24 | -------------------------------------------------------------------------------- /targets/unittest/target.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | ### Target: targets/unittest 21 | target.bsp: "@apache-mynewt-core/hw/bsp/native" 22 | target.build_profile: "debug" 23 | target.compiler: "@apache-mynewt-core/compiler/sim" 24 | -------------------------------------------------------------------------------- /babblesim/hw/bsp/nrf52_bsim/nordic_pca10040_debug.cmd: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Licensed to the Apache Software Foundation (ASF) under one 3 | @rem or more contributor license agreements. See the NOTICE file 4 | @rem distributed with this work for additional information 5 | @rem regarding copyright ownership. The ASF licenses this file 6 | @rem to you under the Apache License, Version 2.0 (the 7 | @rem "License"); you may not use this file except in compliance 8 | @rem with the License. You may obtain a copy of the License at 9 | @rem 10 | @rem http://www.apache.org/licenses/LICENSE-2.0 11 | @rem 12 | @rem Unless required by applicable law or agreed to in writing, 13 | @rem software distributed under the License is distributed on an 14 | @rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @rem KIND, either express or implied. See the License for the 16 | @rem specific language governing permissions and limitations 17 | @rem under the License. 18 | @rem 19 | 20 | @rem Execute a shell with a script of the same name and .sh extension 21 | 22 | @bash "%~dp0%~n0.sh" 23 | -------------------------------------------------------------------------------- /babblesim/hw/bsp/nrf52_bsim/nordic_pca10040_download.cmd: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Licensed to the Apache Software Foundation (ASF) under one 3 | @rem or more contributor license agreements. See the NOTICE file 4 | @rem distributed with this work for additional information 5 | @rem regarding copyright ownership. The ASF licenses this file 6 | @rem to you under the Apache License, Version 2.0 (the 7 | @rem "License"); you may not use this file except in compliance 8 | @rem with the License. You may obtain a copy of the License at 9 | @rem 10 | @rem http://www.apache.org/licenses/LICENSE-2.0 11 | @rem 12 | @rem Unless required by applicable law or agreed to in writing, 13 | @rem software distributed under the License is distributed on an 14 | @rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @rem KIND, either express or implied. See the License for the 16 | @rem specific language governing permissions and limitations 17 | @rem under the License. 18 | @rem 19 | 20 | @rem Execute a shell with a script of the same name and .sh extension 21 | 22 | @bash "%~dp0%~n0.sh" 23 | -------------------------------------------------------------------------------- /apps/bleuart/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | # Disable unused roles; bleuart is a peripheral-only app. 21 | BLE_ROLE_OBSERVER: 0 22 | BLE_ROLE_CENTRAL: 0 23 | 24 | # Default task settings 25 | OS_MAIN_STACK_SIZE: 336 26 | -------------------------------------------------------------------------------- /porting/targets/dummy_app/src/dummy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #pragma message ( "This will probably not compile. Used to generate syscfg.h file and other artifacts." ) 21 | 22 | int 23 | main(void) 24 | { 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /porting/targets/linux/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | BLE_TRANSPORT_LL: socket 21 | BLE_SOCK_USE_TCP: 0 22 | BLE_SOCK_USE_LINUX_BLUE: 1 23 | BLE_SOCK_TASK_PRIO: 3 24 | BLE_SOCK_STACK_SIZE: 1028 25 | 26 | LOG_LEVEL: 0 27 | -------------------------------------------------------------------------------- /nimble/controller/test/src/ble_ll_csa2_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_LL_CSA2_TEST_ 21 | #define H_BLE_LL_CSA2_TEST_ 22 | 23 | #include "testutil/testutil.h" 24 | 25 | TEST_SUITE_DECL(ble_ll_csa2_test_suite); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /porting/nimble/Makefile.mesh: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # * http://www.apache.org/licenses/LICENSE-2.0 10 | # * Unless required by applicable law or agreed to in writing, 11 | # software distributed under the License is distributed on an 12 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | # KIND, either express or implied. See the License for the 14 | # specific language governing permissions and limitations 15 | # under the License. 16 | # 17 | 18 | NIMBLE_INCLUDE += \ 19 | $(NIMBLE_ROOT)/nimble/host/mesh/include \ 20 | $(NULL) 21 | 22 | NIMBLE_SRC += \ 23 | $(filter-out $(NIMBLE_IGNORE), $(wildcard $(NIMBLE_ROOT)/nimble/host/mesh/src/*.c)) \ 24 | $(NULL) 25 | -------------------------------------------------------------------------------- /nimble/controller/test/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | BLE_LL_CFG_FEAT_LE_CSA2: 1 21 | 22 | # Prevent priority conflict with controller task. 23 | MCU_TIMER_POLLER_PRIO: 1 24 | MCU_UART_POLLER_PRIO: 2 25 | NATIVE_SOCKETS_PRIO: 3 26 | -------------------------------------------------------------------------------- /porting/targets/dummy_app/pkg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | pkg.name: porting/targets/dummy_app 20 | pkg.type: app 21 | pkg.description: Dummy application 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | -------------------------------------------------------------------------------- /docs/ble_hs/ble_att.rst: -------------------------------------------------------------------------------- 1 | NimBLE Host ATT Client Reference 2 | -------------------------------- 3 | 4 | Introduction 5 | ~~~~~~~~~~~~ 6 | 7 | The Attribute Protocol (ATT) is a mid-level protocol that all BLE devices use to exchange data. Data is exchanged when 8 | an ATT client reads or writes an attribute belonging to an ATT server. Any device that needs to send or receive data 9 | must support both the client and server functionality of the ATT protocol. The only devices which do not support ATT 10 | are the most basic ones: broadcasters and observers (i.e., beaconing devices and listening devices). 11 | 12 | Most ATT functionality is not interesting to an application. Rather than use ATT directly, an application uses the 13 | higher level GATT profile, which sits directly above ATT in the host. NimBLE exposes the few bits of ATT functionality 14 | which are not encompassed by higher level GATT functions. This section documents the ATT functionality that the NimBLE 15 | host exposes to the application. 16 | 17 | API 18 | ~~~~~~ 19 | 20 | .. doxygengroup:: bt_host 21 | :content-only: 22 | :members: 23 | -------------------------------------------------------------------------------- /targets/dialog_cmac/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: targets/dialog_cmac 21 | pkg.type: target 22 | pkg.description: Sample target for BLE controller on Dialog CMAC 23 | pkg.author: "Apache Mynewt " 24 | pkg.homepage: "http://mynewt.apache.org/" 25 | -------------------------------------------------------------------------------- /babblesim/targets/blecent/pkg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | pkg.name: babblesim/targets/blecent 20 | pkg.type: target 21 | pkg.descrption: Sample target for running blecent on BabbleSim 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "https://mynewt.apache.org/" 24 | -------------------------------------------------------------------------------- /babblesim/targets/blehci/pkg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | pkg.name: babblesim/targets/blehci 20 | pkg.type: target 21 | pkg.descrption: Sample target for running blehci on BabbleSim 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "https://mynewt.apache.org/" 24 | -------------------------------------------------------------------------------- /babblesim/targets/bleprph/pkg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | pkg.name: babblesim/targets/bleprph 20 | pkg.type: target 21 | pkg.descrption: Sample target for running bleprph on BabbleSim 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "https://mynewt.apache.org/" 24 | -------------------------------------------------------------------------------- /babblesim/targets/btshell/pkg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | pkg.name: babblesim/targets/btshell 20 | pkg.type: target 21 | pkg.descrption: Sample target for running btshell on BabbleSim 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "https://mynewt.apache.org/" 24 | -------------------------------------------------------------------------------- /nimble/transport/common/hci_h4/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/transport/common/hci_h4 21 | pkg.description: HCI H4 protocol 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "https://mynewt.apache.org/" 24 | 25 | pkg.deps: 26 | - nimble 27 | -------------------------------------------------------------------------------- /babblesim/core/include/cmsis.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Oticon A/S 3 | * Copyright (c) 2021 Codecoup 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | 8 | /** 9 | * This header defines replacements for inline 10 | * ARM Cortex-M CMSIS intrinsics. 11 | */ 12 | 13 | #ifndef BOARDS_POSIX_NRF52_BSIM_CMSIS_H 14 | #define BOARDS_POSIX_NRF52_BSIM_CMSIS_H 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | /* Implement the following ARM intrinsics as no-op: 21 | * - ARM Data Synchronization Barrier 22 | * - ARM Data Memory Synchronization Barrier 23 | * - ARM Instruction Synchronization Barrier 24 | * - ARM No Operation 25 | */ 26 | #ifndef __DMB 27 | #define __DMB() 28 | #endif 29 | 30 | #ifndef __DSB 31 | #define __DSB() 32 | #endif 33 | 34 | #ifndef __ISB 35 | #define __ISB() 36 | #endif 37 | 38 | #ifndef __NOP 39 | #define __NOP() 40 | #endif 41 | 42 | void NVIC_SystemReset(void); 43 | void __disable_irq(void); 44 | void __enable_irq(void); 45 | uint32_t __get_PRIMASK(void); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif /* BOARDS_POSIX_NRF52_BSIM_CMSIS_H */ 52 | -------------------------------------------------------------------------------- /babblesim/hw/mcu/nordic/nrf52_bsim/src/hal_native_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef __HAL_NATIVE_PRIV_H__ 21 | #define __HAL_NATIVE_PRIV_H__ 22 | 23 | #include 24 | 25 | void hal_bsp_set_hw_id(const uint8_t *id, int len); 26 | 27 | #endif /* __HAL_NATIVE_PRIV_H__ */ 28 | -------------------------------------------------------------------------------- /nimble/host/src/ble_hs_startup_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_HS_STARTUP_ 21 | #define H_BLE_HS_STARTUP_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | int ble_hs_startup_go(void); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /porting/nimble/Makefile.tinycrypt: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # * http://www.apache.org/licenses/LICENSE-2.0 10 | # * Unless required by applicable law or agreed to in writing, 11 | # software distributed under the License is distributed on an 12 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 13 | # KIND, either express or implied. See the License for the 14 | # specific language governing permissions and limitations 15 | # under the License. 16 | # 17 | 18 | TINYCRYPT_CFLAGS := -std=c99 19 | 20 | TINYCRYPT_INCLUDE := \ 21 | $(NIMBLE_ROOT)/ext/tinycrypt/include \ 22 | $(NULL) 23 | 24 | TINYCRYPT_SRC := \ 25 | $(filter-out $(NIMBLE_IGNORE), $(wildcard $(NIMBLE_ROOT)/ext/tinycrypt/src/*.c)) \ 26 | $(NULL) 27 | -------------------------------------------------------------------------------- /targets/nordic_pca10095_net-blehci/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: targets/nordic_pca10095_net-blehci 21 | pkg.type: target 22 | pkg.description: Sample target for BLE controller on NRF5340 23 | pkg.author: "Apache Mynewt " 24 | pkg.homepage: "http://mynewt.apache.org/" 25 | -------------------------------------------------------------------------------- /apps/blehci/src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #include 21 | #include "os/mynewt.h" 22 | 23 | int 24 | main(void) 25 | { 26 | /* Initialize OS */ 27 | sysinit(); 28 | 29 | while (1) { 30 | os_eventq_run(os_eventq_dflt_get()); 31 | } 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /babblesim/core/include/time_machine.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Oticon A/S 3 | * Copyright (c) 2021 Codecoup 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | 8 | #ifndef _TIME_MACHINE_H 9 | #define _TIME_MACHINE_H 10 | 11 | #include "bs_types.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C"{ 15 | #endif 16 | 17 | extern bs_time_t now; 18 | bs_time_t tm_get_abs_time(void); 19 | bs_time_t tm_get_hw_time(void); 20 | bs_time_t tm_hw_time_to_abs_time(bs_time_t hwtime); 21 | bs_time_t tm_abs_time_to_hw_time(bs_time_t abstime); 22 | 23 | void tm_reset_hw_times(void); 24 | 25 | void tm_find_next_timer_to_trigger(void); 26 | bs_time_t tm_get_next_timer_abstime(void); 27 | 28 | void tm_update_last_phy_sync_time(bs_time_t abs_time); 29 | 30 | void tm_set_phy_max_resync_offset(bs_time_t offset_in_us); 31 | 32 | void tm_run_forever(void); 33 | 34 | void tm_sleep_until_hw_time(bs_time_t hw_time); 35 | 36 | void tm_sleep_until_abs_time(bs_time_t time); 37 | 38 | void tm_start(void); 39 | 40 | void tm_tick(void); 41 | 42 | void tm_tick_limited(bs_time_t max_time_diff); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /targets/nordic_pca10056-blehci-usb/pkg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | pkg.name: "targets/nordic_pca10056-blehci-usb" 20 | pkg.type: target 21 | pkg.description: 22 | pkg.author: 23 | pkg.homepage: 24 | 25 | pkg.deps: 26 | - "@apache-mynewt-core/hw/usb/tinyusb" 27 | - "@apache-mynewt-core/hw/usb/tinyusb/std_descriptors" 28 | -------------------------------------------------------------------------------- /nimble/transport/uart/include/transport/uart/ble_hci_uart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_HCI_UART_ 21 | #define H_BLE_HCI_UART_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void ble_hci_uart_init(void); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /nimble/controller/syscfg.hbd.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.defs: 20 | BLE_LL_HBD_FAKE_DUAL_MODE: 21 | description: > 22 | This enables hacks to allow initialize controler as dual-mode 23 | device. It can be initialized and used by Windows 10 to some 24 | extent. 25 | value: 0 26 | -------------------------------------------------------------------------------- /nimble/transport/emspi/include/transport/emspi/ble_hci_emspi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_HCI_EMSPI_ 21 | #define H_BLE_HCI_EMSPI_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void ble_hci_emspi_init(void); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /porting/targets/nuttx/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | BLE_TRANSPORT_LL: socket 21 | BLE_SOCK_USE_TCP: 0 22 | BLE_SOCK_USE_NUTTX: 1 23 | BLE_SOCK_TASK_PRIO: 3 24 | BLE_SOCK_STACK_SIZE: 1028 25 | BLE_LL_CFG_FEAT_LL_PRIVACY: 0 26 | LOG_LEVEL: 2 27 | BLE_SM_LEGACY: 1 28 | BLE_SM_SC: 1 29 | -------------------------------------------------------------------------------- /nimble/controller/include/controller/ble_ll_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_LL_TEST_ 21 | #define H_LL_TEST_ 22 | 23 | #include 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | int ble_ll_csa2_test_all(void); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /porting/npl/mynewt/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: porting/npl/mynewt 21 | pkg.description: NimBLE porting layer for Apache Mynewt 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | 26 | pkg.deps: 27 | - "@apache-mynewt-core/kernel/os" 28 | -------------------------------------------------------------------------------- /babblesim/hw/mcu/nordic/nrf52_bsim/src/hal_watchdog.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #include "hal/hal_watchdog.h" 21 | 22 | int 23 | hal_watchdog_init(uint32_t expire_msecs) 24 | { 25 | return (0); 26 | } 27 | 28 | void 29 | hal_watchdog_enable(void) 30 | { 31 | } 32 | 33 | void 34 | hal_watchdog_tickle(void) 35 | { 36 | } 37 | -------------------------------------------------------------------------------- /docs/README.rst: -------------------------------------------------------------------------------- 1 | NimBLE Bluetooth Stack Documentation 2 | ################################# 3 | 4 | This folder holds the documentation for the NimBLE Bluetooth stack from the 5 | `Apache Mynewt`_ project. It is built using `Sphinx`_. 6 | The source code also contains inline comments in `Doxygen`_ 7 | format to document the APIs. 8 | 9 | The complete project documentation can be found at `mynewt documentation`_ 10 | 11 | .. contents:: 12 | 13 | Writing Documentation 14 | ======================= 15 | 16 | See: https://github.com/apache/mynewt-documentation#writing-documentation 17 | 18 | Previewing Changes 19 | ========================== 20 | 21 | In order to preview any changes you make you must first install a Sphinx 22 | toolchain as described at https://github.com/apache/mynewt-documentation#id3. 23 | Then: 24 | 25 | .. code-block:: bash 26 | 27 | $ cd docs 28 | $ make clean && make preview && (cd _build/html && python -m SimpleHTTPServer 8080) 29 | 30 | .. _Apache Mynewt: https://mynewt.apache.org/ 31 | .. _mynewt documentation: https://github.com/apache/mynewt-documentation 32 | .. _Sphinx: http://www.sphinx-doc.org/ 33 | .. _Doxygen: http://www.doxygen.org/ 34 | -------------------------------------------------------------------------------- /nimble/host/util/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/util 21 | pkg.description: Supplementary utilities for the NimBLE host 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | 28 | pkg.deps: 29 | - nimble/host 30 | -------------------------------------------------------------------------------- /babblesim/edtt/hci_transport/include/ble_hci_edtt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Codecoup 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | #ifndef H_BLE_HCI_EDTT_ 23 | #define H_BLE_HCI_EDTT_ 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | int edtt_init(void); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /babblesim/hw/mcu/nordic/nrf52_bsim/include/mcu/nrf52_periph.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_NRF52_PERIPH_ 21 | #define H_NRF52_PERIPH_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void nrf52_periph_create(void); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* H_NRF52_PERIPH_ */ 34 | -------------------------------------------------------------------------------- /nimble/host/mesh/src/heartbeat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Nordic Semiconductor ASA 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #include "mesh/heartbeat.h" 8 | 9 | static inline uint16_t bt_mesh_hb_pwr2(uint8_t val) 10 | { 11 | if (!val) { 12 | return 0x0000; 13 | } else if (val == 0xff || val == 0x11) { 14 | return 0xffff; 15 | } else { 16 | return (1 << (val - 1)); 17 | } 18 | } 19 | 20 | static inline uint8_t bt_mesh_hb_log(uint32_t val) 21 | { 22 | if (!val) { 23 | return 0x00; 24 | } else if (val == 0xffff) { 25 | return 0xff; 26 | } else { 27 | return 32 - __builtin_clz(val); 28 | } 29 | } 30 | 31 | void bt_mesh_hb_init(void); 32 | void bt_mesh_hb_start(void); 33 | void bt_mesh_hb_suspend(void); 34 | void bt_mesh_hb_resume(void); 35 | 36 | int bt_mesh_hb_recv(struct bt_mesh_net_rx *rx, struct os_mbuf *buf); 37 | void bt_mesh_hb_feature_changed(uint16_t features); 38 | 39 | uint8_t bt_mesh_hb_pub_set(struct bt_mesh_hb_pub *hb_pub); 40 | uint8_t bt_mesh_hb_sub_set(uint16_t src, uint16_t dst, uint32_t period); 41 | void bt_mesh_hb_sub_reset_count(void); 42 | void bt_mesh_hb_pub_pending_store(void); 43 | void bt_mesh_hb_pub_init(void); 44 | -------------------------------------------------------------------------------- /nimble/include/nimble/nimble_opt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_NIMBLE_OPT_ 21 | #define H_NIMBLE_OPT_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Include automatically-generated settings. */ 28 | #include "nimble/nimble_opt_auto.h" 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /nimble/host/store/config/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.defs: 20 | BLE_STORE_CONFIG_PERSIST: 21 | description: > 22 | Whether to save data to sys/config, or just keep it in RAM. 23 | value: 1 24 | BLE_STORE_SYSINIT_STAGE: 25 | description: > 26 | Sysinit stage for BLE host store. 27 | value: 500 28 | -------------------------------------------------------------------------------- /nimble/transport/socket/include/socket/ble_hci_socket.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef _BLE_HCI_SOCKET_H_ 21 | #define _BLE_HCI_SOCKET_H_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | struct os_eventq; 28 | void ble_hci_sock_set_evq(struct os_eventq *); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /nimble/drivers/native/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/drivers/native 21 | pkg.description: BLE driver for simulations. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | 28 | pkg.apis: ble_driver 29 | pkg.deps: 30 | - nimble/controller 31 | -------------------------------------------------------------------------------- /targets/unittest/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | ### Package: targets/unittest 21 | pkg.name: "targets/unittest" 22 | pkg.type: "target" 23 | pkg.description: "Used for unit tests by the \"newt test\" command." 24 | pkg.author: "Apache Mynewt " 25 | pkg.homepage: "http://mynewt.apache.org/" 26 | 27 | pkg.deps: "@apache-mynewt-core/sys/sysinit" 28 | -------------------------------------------------------------------------------- /babblesim/core/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: babblesim/core 21 | pkg.description: time machine, irq handeler, core 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | 26 | pkg.deps: 27 | - "babblesim/sdk" 28 | 29 | pkg.cflags: -std=gnu99 30 | 31 | pkg.init: 32 | bsim_start: 9999 33 | -------------------------------------------------------------------------------- /babblesim/hw/mcu/nordic/nrf52_bsim/include/mcu/cortex_m4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef __MCU_CORTEX_M4_H__ 21 | #define __MCU_CORTEX_M4_H__ 22 | 23 | #include "nrf.h" 24 | #include 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /* __MCU_CORTEX_M4_H__ */ 35 | -------------------------------------------------------------------------------- /porting/npl/linux/include/console/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef __CONSOLE_H__ 21 | #define __CONSOLE_H__ 22 | 23 | #include 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | #define console_printf(_fmt, ...) printf(_fmt, ##__VA_ARGS__) 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif /* __CONSOLE_H__ */ 36 | -------------------------------------------------------------------------------- /nimble/drivers/nrf51/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/drivers/nrf51 21 | pkg.description: BLE driver for nRF51 systems. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | 28 | pkg.apis: ble_driver 29 | pkg.deps: 30 | - nimble 31 | - nimble/controller 32 | -------------------------------------------------------------------------------- /nimble/drivers/nrf52/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/drivers/nrf52 21 | pkg.description: BLE driver for nRF52 systems. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | 28 | pkg.apis: ble_driver 29 | pkg.deps: 30 | - nimble 31 | - nimble/controller 32 | -------------------------------------------------------------------------------- /nimble/drivers/dialog_cmac/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.defs: 20 | BLE_PHY_RF_HP_MODE: 21 | description: Enable high-performance RF mode. 22 | value: 1 23 | 24 | BLE_PHY_DEBUG_DSER: 25 | description: Enable DSER output from PHY 26 | value: 0 27 | 28 | syscfg.restrictions: 29 | - BLE_LL_RFMGMT_ENABLE_TIME == 0 || BLE_LL_RFMGMT_ENABLE_TIME >= 20 30 | -------------------------------------------------------------------------------- /nimble/drivers/nrf5340/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/drivers/nrf5340 21 | pkg.description: BLE driver for nRF5340 systems. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | 28 | pkg.apis: ble_driver 29 | pkg.deps: 30 | - nimble 31 | - nimble/controller 32 | -------------------------------------------------------------------------------- /nimble/host/services/bleuart/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.defs: 20 | BLEUART_MAX_INPUT: 21 | description: > 22 | The size of the largest line that can be received over the UART 23 | service. 24 | value: 120 25 | BLEUART_SYSINIT_STAGE: 26 | description: > 27 | Sysinit stage for the BLE UART service. 28 | value: 500 29 | -------------------------------------------------------------------------------- /nimble/transport/dialog_cmac/cmac_driver/diag/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/transport/dialog_cmac/cmac_driver/diag 21 | pkg.description: Default diag configuration for CMAC 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - dialog 26 | - da1469x 27 | - cmac 28 | pkg.apis: dialog_cmac_diag 29 | -------------------------------------------------------------------------------- /nimble/drivers/dialog_cmac/src/ble_hw_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef _BLE_HW_PRIV_H_ 21 | #define _BLE_HW_PRIV_H_ 22 | 23 | #include 24 | 25 | void ble_hw_resolv_proc_enable(void); 26 | void ble_hw_resolv_proc_disable(void); 27 | void ble_hw_resolv_proc_reset(void); 28 | void ble_hw_resolv_proc_start(const uint8_t *addr); 29 | 30 | #endif /* _BLE_HW_PRIV_H_ */ 31 | -------------------------------------------------------------------------------- /nimble/host/include/host/ble_ibeacon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_IBEACON_ 21 | #define H_BLE_IBEACON_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | int ble_ibeacon_set_adv_data(void *uuid128, uint16_t major, 28 | uint16_t minor, int8_t measured_power); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /nimble/host/services/tps/include/services/tps/ble_svc_tps.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_SVC_TPS_ 21 | #define H_BLE_SVC_TPS_ 22 | 23 | struct ble_hs_cfg; 24 | 25 | #define BLE_SVC_TPS_UUID16 0x1804 26 | #define BLE_SVC_TPS_CHR_UUID16_TX_POWER_LEVEL 0x2a07 27 | 28 | void ble_svc_tps_init(void); 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /babblesim/hw/mcu/nordic/nrf52_bsim/include/mcu/native_bsp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | #ifndef H_NATIVE_BSP_ 20 | #define H_NATIVE_BSP_ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern const struct hal_flash native_flash_dev; 27 | 28 | int uart_set_dev(int port, const char *dev_str); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /* H_NATIVE_BSP_ */ 35 | -------------------------------------------------------------------------------- /nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_diag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef __MCU_CMAC_DIAG_H_ 21 | #define __MCU_CMAC_DIAG_H_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void cmac_diag_setup_host(void); 28 | void cmac_diag_setup_cmac(void); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /* __MCU_CMAC_DIAG_H_ */ 35 | -------------------------------------------------------------------------------- /nimble/controller/src/ble_ll_ctrl_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_LL_CTRL_PRIV_ 21 | #define H_BLE_LL_CTRL_PRIV_ 22 | 23 | #include "controller/ble_ll_conn.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void ble_ll_ctrl_init_conn_sm(struct ble_ll_conn_sm *connsm); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif /* H_BLE_LL_CTRL_PRIV_ */ 36 | -------------------------------------------------------------------------------- /nimble/drivers/plna/sky66112/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/drivers/plna/sky66112 21 | pkg.description: Driver for SKY66112 front-end module 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "https://mynewt.apache.org/" 24 | pkg.apis: 25 | - ble_ll_pa 26 | - ble_ll_lna 27 | pkg.deps: 28 | - nimble/controller 29 | 30 | pkg.init: 31 | sky66112_init: 999 32 | -------------------------------------------------------------------------------- /porting/npl/nuttx/include/console/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef __CONSOLE_H__ 21 | #define __CONSOLE_H__ 22 | 23 | #include 24 | #include 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #define console_printf(_fmt, ...) printf(_fmt, ##__VA_ARGS__) 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /* __CONSOLE_H__ */ 37 | -------------------------------------------------------------------------------- /nimble/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble 21 | pkg.description: Generic functionality for the nimble Bluetooth Smart stack; used by both the controller and the host. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | 28 | pkg.deps: 29 | - porting/npl/mynewt 30 | - "@apache-mynewt-core/kernel/os" 31 | -------------------------------------------------------------------------------- /nimble/host/test/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.vals: 20 | BLE_HS_DEBUG: 1 21 | BLE_HS_PHONY_HCI_ACKS: 1 22 | BLE_HS_REQUIRE_OS: 0 23 | BLE_MAX_CONNECTIONS: 8 24 | BLE_GATT_MAX_PROCS: 16 25 | BLE_SM: 1 26 | BLE_SM_SC: 1 27 | MSYS_1_BLOCK_COUNT: 100 28 | BLE_L2CAP_COC_MAX_NUM: 2 29 | CONFIG_FCB: 1 30 | BLE_VERSION: 52 31 | BLE_L2CAP_ENHANCED_COC: 1 32 | BLE_TRANSPORT_LL: custom 33 | -------------------------------------------------------------------------------- /babblesim/hw/mcu/nordic/nrf52_bsim/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: babblesim/hw/mcu/nordic/nrf52_bsim 21 | pkg.description: nRF52 on BabbleSim 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | 25 | pkg.lflags: 26 | - -lpthread 27 | 28 | pkg.deps: 29 | - "babblesim/core" 30 | 31 | pkg.deps.BLE_CONTROLLER: 32 | - "@apache-mynewt-nimble/nimble/drivers/nrf52" 33 | -------------------------------------------------------------------------------- /porting/npl/freertos/include/nimble/nimble_port_freertos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef _NIMBLE_PORT_FREERTOS_H 21 | #define _NIMBLE_PORT_FREERTOS_H 22 | 23 | #include "nimble/nimble_npl.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void nimble_port_freertos_init(TaskFunction_t host_task_fn); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif /* _NIMBLE_PORT_FREERTOS_H */ 36 | -------------------------------------------------------------------------------- /apps/bletest/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | 19 | syscfg.defs: 20 | BLETEST_ROLE: 21 | description: > 22 | The role of the bletest code. Should be set to: 23 | 1: Advertiser 24 | 2: Scanner 25 | 3: Initiator 26 | value: 1 27 | 28 | syscfg.vals: 29 | MSYS_1_BLOCK_COUNT: 16 30 | BLE_SM_LEGACY: 0 31 | 32 | # Default task settings 33 | OS_MAIN_STACK_SIZE: 256 34 | -------------------------------------------------------------------------------- /babblesim/edtt/hci_test/syscfg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | syscfg.vals: 21 | BLE_TRANSPORT_LL: native 22 | BLE_TRANSPORT_HS: custom 23 | 24 | # EDTT requires 0x123456789ABC address for first device 25 | # and 0x456789ABCDEF for second 26 | BLE_LL_PUBLIC_DEV_ADDR: 0x123456789ABC 27 | # BLE_LL_PUBLIC_DEV_ADDR: 0x456789ABCDEF 28 | 29 | # For LL/CON/ADV/BV-09-C, LL/CON/ADV/BV-10-C 30 | BLE_LL_CFG_FEAT_LE_CSA2: 1 31 | -------------------------------------------------------------------------------- /nimble/host/services/ipss/include/services/ipss/ble_svc_ipss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_SVC_IPSS_ 21 | #define H_BLE_SVC_IPSS_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | #define BLE_SVC_IPSS_UUID16 0x1820 28 | 29 | /** 30 | * @brief Initialize the IPSS service 31 | */ 32 | void ble_svc_ipss_init(void); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_host.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef __DA1469X_CMAC_V2_H_ 21 | #define __DA1469X_CMAC_V2_H_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void cmac_host_init(void); 28 | void cmac_host_signal2cmac(void); 29 | void cmac_host_rf_calibrate(void); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif /* __DA1469X_CMAC_V2_H_ */ 36 | -------------------------------------------------------------------------------- /nimble/transport/uart/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/transport/uart 21 | pkg.description: HCI H4 transport over UART 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "https://mynewt.apache.org/" 24 | 25 | pkg.deps: 26 | - "@apache-mynewt-core/hw/hal" 27 | - "@apache-mynewt-core/kernel/os" 28 | - nimble 29 | - nimble/transport/common/hci_h4 30 | 31 | pkg.apis: 32 | - ble_transport 33 | -------------------------------------------------------------------------------- /nimble/host/services/bas/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/services/bas 21 | pkg.description: Battery Service 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - bas 28 | - nimble 29 | 30 | pkg.deps: 31 | - nimble/host 32 | 33 | pkg.init: 34 | ble_svc_bas_init: 'MYNEWT_VAL(BLE_SVC_BAS_SYSINIT_STAGE)' 35 | -------------------------------------------------------------------------------- /nimble/host/src/ble_hs_flow_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_HS_FLOW_PRIV_ 21 | #define H_BLE_HS_FLOW_PRIV_ 22 | 23 | #include 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | void ble_hs_flow_connection_broken(uint16_t conn_handle); 29 | void ble_hs_flow_track_data_mbuf(struct os_mbuf *om); 30 | int ble_hs_flow_startup(void); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /nimble/controller/test/src/ble_ll_test.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #include "sysinit/sysinit.h" 21 | #include "syscfg/syscfg.h" 22 | #include "controller/ble_ll_test.h" 23 | #include "os/os.h" 24 | #include "testutil/testutil.h" 25 | #include "ble_ll_csa2_test.h" 26 | 27 | #if MYNEWT_VAL(SELFTEST) 28 | 29 | int 30 | main(int argc, char **argv) 31 | { 32 | ble_ll_csa2_test_suite(); 33 | return tu_any_failed; 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /nimble/host/services/gap/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/services/gap 21 | pkg.description: Implements the GAP Service. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - nimble 28 | - gap 29 | 30 | pkg.deps: 31 | - nimble/host 32 | 33 | pkg.init: 34 | ble_svc_gap_init: 'MYNEWT_VAL(BLE_SVC_GAP_SYSINIT_STAGE)' 35 | -------------------------------------------------------------------------------- /nimble/host/services/ans/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/services/ans 21 | pkg.description: Alert Notification Service Server. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - ans 28 | - nimble 29 | 30 | pkg.deps: 31 | - nimble/host 32 | 33 | pkg.init: 34 | ble_svc_ans_init: 'MYNEWT_VAL(BLE_SVC_ANS_SYSINIT_STAGE)' 35 | -------------------------------------------------------------------------------- /nimble/host/services/gatt/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/services/gatt 21 | pkg.description: Implements the GATT service. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - nimble 28 | - gatt 29 | 30 | pkg.deps: 31 | - nimble/host 32 | 33 | pkg.init: 34 | ble_svc_gatt_init: 'MYNEWT_VAL(BLE_SVC_GATT_SYSINIT_STAGE)' 35 | -------------------------------------------------------------------------------- /nimble/host/services/lls/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/services/lls 21 | pkg.description: Link Loss Service Implementation. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - lls 28 | - nimble 29 | 30 | pkg.deps: 31 | - nimble/host 32 | 33 | pkg.init: 34 | ble_svc_lls_init: 'MYNEWT_VAL(BLE_SVC_LLS_SYSINIT_STAGE)' 35 | -------------------------------------------------------------------------------- /nimble/host/services/ias/pkg.yml: -------------------------------------------------------------------------------- 1 | 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/services/ias 21 | pkg.description: Immediate Alert Service Implementation. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - ias 28 | - nimble 29 | 30 | pkg.deps: 31 | - nimble/host 32 | 33 | pkg.init: 34 | ble_svc_ias_init: 'MYNEWT_VAL(BLE_SVC_IAS_SYSINIT_STAGE)' 35 | -------------------------------------------------------------------------------- /nimble/host/services/tps/pkg.yml: -------------------------------------------------------------------------------- 1 | 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/services/tps 21 | pkg.description: Tx Power Service adopted specification. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - tps 28 | - nimble 29 | 30 | pkg.deps: 31 | - nimble/host 32 | 33 | pkg.init: 34 | ble_svc_tps_init: 'MYNEWT_VAL(BLE_SVC_TPS_SYSINIT_STAGE)' 35 | -------------------------------------------------------------------------------- /nimble/transport/dialog_cmac/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/transport/dialog_cmac 21 | pkg.description: HCI H4 transport for Dialog CMAC 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | 28 | pkg.deps: 29 | - nimble/transport/common/hci_h4 30 | - nimble/transport/dialog_cmac/cmac_driver 31 | 32 | pkg.apis: 33 | - ble_transport 34 | -------------------------------------------------------------------------------- /apps/btshell/src/cmd_l2cap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef CMD_L2CAP_H 21 | #define CMD_L2CAP_H 22 | 23 | #include "cmd.h" 24 | 25 | int cmd_l2cap_update(int argc, char **argv); 26 | int cmd_l2cap_create_server(int argc, char **argv); 27 | int cmd_l2cap_connect(int argc, char **argv); 28 | int cmd_l2cap_disconnect(int argc, char **argv); 29 | int cmd_l2cap_send(int argc, char **argv); 30 | int cmd_l2cap_show_coc(int argc, char **argv); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /nimble/host/services/dis/pkg.yml: -------------------------------------------------------------------------------- 1 | 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/services/dis 21 | pkg.description: Device Information Service Implementation. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - dis 28 | - nimble 29 | 30 | pkg.deps: 31 | - nimble/host 32 | 33 | pkg.init: 34 | ble_svc_dis_init: 'MYNEWT_VAL(BLE_SVC_DIS_SYSINIT_STAGE)' 35 | -------------------------------------------------------------------------------- /porting/nimble/include/sysinit/sysinit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef __SYSINIT_H__ 21 | #define __SYSINIT_H__ 22 | 23 | #include 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | #define SYSINIT_ASSERT_ACTIVE() 30 | 31 | #define SYSINIT_PANIC_ASSERT(rc) assert(rc) 32 | #define SYSINIT_PANIC_ASSERT_MSG(rc, msg) assert(rc) 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* __SYSINIT_H__ */ 39 | -------------------------------------------------------------------------------- /porting/npl/linux/src/os_atomic.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | #include "nimble/nimble_npl.h" 24 | 25 | static pthread_mutex_t s_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; 26 | 27 | uint32_t ble_npl_hw_enter_critical(void) 28 | { 29 | pthread_mutex_lock(&s_mutex); 30 | return 0; 31 | } 32 | 33 | void ble_npl_hw_exit_critical(uint32_t ctx) 34 | { 35 | pthread_mutex_unlock(&s_mutex); 36 | } 37 | -------------------------------------------------------------------------------- /apps/blehci/pkg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | pkg.name: apps/blehci 19 | pkg.type: app 20 | pkg.description: BLE controller application exposing HCI over UART 21 | pkg.author: "Johan Hedberg " 22 | pkg.homepage: "http://mynewt.apache.org/" 23 | pkg.keywords: 24 | 25 | pkg.deps: 26 | - "@apache-mynewt-core/sys/console/stub" 27 | - "@apache-mynewt-core/sys/stats/full" 28 | - "@apache-mynewt-core/kernel/os" 29 | - nimble/controller 30 | - nimble/transport/uart 31 | -------------------------------------------------------------------------------- /nimble/host/services/ans/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | syscfg.defs: 19 | BLE_SVC_ANS_NEW_ALERT_CAT: 20 | description: "Initial supported new alert category bitmask." 21 | value: 0 22 | 23 | BLE_SVC_ANS_UNR_ALERT_CAT: 24 | description: "Initial supported unread alert category bitmask." 25 | value: 0 26 | 27 | BLE_SVC_ANS_SYSINIT_STAGE: 28 | description: > 29 | Sysinit stage for the alert notification service. 30 | value: 303 31 | -------------------------------------------------------------------------------- /nimble/drivers/dialog_cmac/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/drivers/dialog_cmac 21 | pkg.description: BLE driver for Dialog CMAC 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | pkg.deps: 28 | - "@apache-mynewt-nimble/nimble/controller" 29 | - "@apache-mynewt-core/crypto/tinycrypt" 30 | pkg.apis: 31 | - ble_driver 32 | pkg.req_apis: 33 | - ble_transport 34 | -------------------------------------------------------------------------------- /nimble/host/services/ipss/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/services/ipss 21 | pkg.description: Implements the IPSS service for IPSP suppoort. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - nimble 28 | - ipsp 29 | - ipss 30 | 31 | pkg.deps: 32 | - nimble/host 33 | 34 | pkg.init: 35 | ble_svc_ipss_init: 'MYNEWT_VAL(BLE_SVC_IPSS_SYSINIT_STAGE)' 36 | -------------------------------------------------------------------------------- /nimble/host/src/ble_hs_mbuf_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_HS_MBUF_PRIV_ 21 | #define H_BLE_HS_MBUF_PRIV_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | struct os_mbuf; 28 | 29 | struct os_mbuf *ble_hs_mbuf_bare_pkt(void); 30 | struct os_mbuf *ble_hs_mbuf_acl_pkt(void); 31 | struct os_mbuf *ble_hs_mbuf_l2cap_pkt(void); 32 | int ble_hs_mbuf_pullup_base(struct os_mbuf **om, int base_len); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /nimble/host/store/ram/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | syscfg.defs: 19 | BLE_STORE_RAM_SYSINIT_STAGE: 20 | description: > 21 | Sysinit stage for the RAM BLE store. 22 | value: 500 23 | BLE_STORE_RAM_DEPRECATED_FLAG: 24 | description: > 25 | Package store/ram is deprecated and store/config shall be used with BLE_STORE_CONFIG_PERSIST set to 0 26 | value: 0 27 | deprecated: 1 28 | 29 | 30 | syscfg.vals: 31 | BLE_STORE_RAM_DEPRECATED_FLAG: 1 32 | 33 | -------------------------------------------------------------------------------- /apps/blemesh_light/src/ws2812.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef __WS2812_H__ 21 | #define __WS2812_H__ 22 | 23 | #include 24 | #include 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #define WS2812_PWM 0 31 | #define WS2812_GPIO 30 32 | #define WS2812_NUM_LED 32 33 | 34 | int ws2812_init(void); 35 | 36 | int ws2812_write(const uint32_t *rgb); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* __WS2812_H__ */ 43 | -------------------------------------------------------------------------------- /babblesim/hw/mcu/nordic/nrf52_bsim/src/native_uart_cfg_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_NATIVE_UART_CFG_PRIV_ 21 | #define H_NATIVE_UART_CFG_PRIV_ 22 | 23 | #include 24 | #include "hal/hal_uart.h" 25 | 26 | speed_t uart_baud_to_speed(int_least32_t baud); 27 | int uart_dev_set_attr(int fd, int32_t baudrate, uint8_t databits, 28 | uint8_t stopbits, enum hal_uart_parity parity, 29 | enum hal_uart_flow_ctl flow_ctl); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /nimble/transport/dialog_cmac/cmac_driver/scripts/create_cmac_bin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | OBJCOPY=${MYNEWT_OBJCOPY_PATH} 21 | ELF=${MYNEWT_APP_BIN_DIR}/blehci.elf 22 | 23 | cd ${WORK_DIR} 24 | 25 | # Strip .ram section from ROM image 26 | ${OBJCOPY} -R .ram -O binary ${ELF} ${BASENAME_ROM}.bin 27 | # RAM image is the same as binary created by newt 28 | cp ${ELF}.bin ${BASENAME_RAM}.bin 29 | 30 | # Create a copy of ROM image to flash to partition, if required 31 | cp ${BASENAME_ROM}.bin ${ELF}.rom.bin 32 | -------------------------------------------------------------------------------- /babblesim/edtt/hci_test/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | pkg.name: babblesim/edtt/hci_test 20 | pkg.type: app 21 | pkg.description: nRF52 on BabbleSim - EDTT tester 22 | pkg.author: "Codecoup" 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | 26 | pkg.deps: 27 | - "@apache-mynewt-core/sys/console/stub" 28 | - "@apache-mynewt-core/sys/log/stub" 29 | - "@apache-mynewt-core/sys/stats/full" 30 | - "@apache-mynewt-core/kernel/os" 31 | - nimble/transport 32 | - babblesim/edtt/hci_transport 33 | -------------------------------------------------------------------------------- /nimble/host/services/bas/include/services/bas/ble_svc_bas.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_SVC_BAS_ 21 | #define H_BLE_SVC_BAS_ 22 | 23 | /* 16 Bit Battery Service UUID */ 24 | #define BLE_SVC_BAS_UUID16 0x180F 25 | 26 | /* 16 Bit Battery Service Characteristic UUIDs */ 27 | #define BLE_SVC_BAS_CHR_UUID16_BATTERY_LEVEL 0x2A19 28 | 29 | int ble_svc_bas_battery_level_set(uint8_t level); 30 | 31 | void ble_svc_bas_init(void); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /nimble/host/services/bleuart/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/services/bleuart 21 | pkg.description: BLE uart service. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - uart 28 | 29 | pkg.deps: 30 | - "@apache-mynewt-core/kernel/os" 31 | - nimble/host 32 | 33 | pkg.req_apis: 34 | - console 35 | 36 | pkg.init: 37 | bleuart_init: 'MYNEWT_VAL(BLEUART_SYSINIT_STAGE)' 38 | -------------------------------------------------------------------------------- /porting/npl/nuttx/src/os_atomic.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #include "nimble/nimble_npl.h" 25 | 26 | static pthread_mutex_t s_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; 27 | 28 | uint32_t 29 | ble_npl_hw_enter_critical(void) 30 | { 31 | pthread_mutex_lock(&s_mutex); 32 | return 0; 33 | } 34 | 35 | void 36 | ble_npl_hw_exit_critical(uint32_t ctx) 37 | { 38 | pthread_mutex_unlock(&s_mutex); 39 | } 40 | -------------------------------------------------------------------------------- /nimble/controller/src/ble_ll_hci_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_LL_HCI_PRIV_ 21 | #define H_BLE_LL_HCI_PRIV_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | #if MYNEWT_VAL(BLE_LL_HCI_VS) 28 | void ble_ll_hci_vs_init(void); 29 | int ble_ll_hci_vs_cmd_proc(const uint8_t *cmdbuf, uint8_t cmdlen, uint16_t ocf, 30 | uint8_t *rspbuf, uint8_t *rsplen); 31 | #endif 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif /* H_BLE_LL_HCI_ */ 38 | -------------------------------------------------------------------------------- /babblesim/hw/mcu/nordic/nrf52_bsim/include/mcu/mcu_sim.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | #ifndef __MCU_SIM_H__ 20 | #define __MCU_SIM_H__ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern char *native_flash_file; 27 | extern char *native_uart_log_file; 28 | extern const char *native_uart_dev_strs[]; 29 | 30 | void mcu_sim_parse_args(int argc, char **argv); 31 | 32 | void static inline hal_debug_break(void) {} 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* __MCU_SIM_H__ */ 39 | -------------------------------------------------------------------------------- /nimble/host/services/bleuart/include/bleuart/bleuart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef _BLEUART_H_ 21 | #define _BLEUART_H_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void 28 | bleuart_init(void); 29 | int 30 | bleuart_svc_register(void); 31 | int 32 | bleuart_gatt_svr_init(void); 33 | void 34 | bleuart_set_conn_handle(uint16_t conn_handle); 35 | 36 | extern const ble_uuid128_t gatt_svr_svc_uart_uuid; 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* _BLEUART_H */ 43 | -------------------------------------------------------------------------------- /nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_SVC_GATT_ 21 | #define H_BLE_SVC_GATT_ 22 | 23 | #include 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | struct ble_hs_cfg; 30 | 31 | #define BLE_SVC_GATT_CHR_SERVICE_CHANGED_UUID16 0x2a05 32 | 33 | void ble_svc_gatt_changed(uint16_t start_handle, uint16_t end_handle); 34 | void ble_svc_gatt_init(void); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /nimble/transport/emspi/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/transport/emspi 21 | pkg.description: "HCI transport using EM's HCI SPI protocol." 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | 28 | pkg.deps: 29 | - "@apache-mynewt-core/kernel/os" 30 | - nimble 31 | 32 | pkg.apis: 33 | - ble_transport 34 | 35 | pkg.init: 36 | ble_hci_emspi_init: 'MYNEWT_VAL(BLE_HCI_EMSPI_SYSINIT_STAGE)' 37 | -------------------------------------------------------------------------------- /nimble/transport/nrf5340/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/transport/nrf5340 21 | pkg.description: HCI transport for nRF5340 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - nrf5340 28 | 29 | pkg.deps: 30 | - nimble 31 | - nimble/transport/common/hci_h4 32 | - "@apache-mynewt-core/kernel/os" 33 | - "@apache-mynewt-core/hw/drivers/ipc_nrf5340" 34 | 35 | pkg.apis: 36 | - ble_transport 37 | -------------------------------------------------------------------------------- /nimble/drivers/dialog_cmac/include/ble/xcvr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_XCVR_ 21 | #define H_BLE_XCVR_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | #define XCVR_TX_SCHED_DELAY_USECS (250) 28 | 29 | /* 30 | * Define HW whitelist size. This is the total possible whitelist size; 31 | * not necessarily the size that will be used (may be smaller) 32 | */ 33 | #define BLE_HW_WHITE_LIST_SIZE (8) 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif /* H_BLE_XCVR_ */ 40 | -------------------------------------------------------------------------------- /apps/blehr/syscfg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | 19 | syscfg.vals: 20 | # Disable central and observer roles. 21 | BLE_ROLE_BROADCASTER: 1 22 | BLE_ROLE_CENTRAL: 0 23 | BLE_ROLE_OBSERVER: 0 24 | BLE_ROLE_PERIPHERAL: 1 25 | 26 | # Disable unused eddystone feature. 27 | BLE_EDDYSTONE: 0 28 | 29 | # Log reboot messages to a flash circular buffer. 30 | REBOOT_LOG_FCB: 1 31 | LOG_FCB: 1 32 | CONFIG_FCB: 1 33 | 34 | # Set public device address. 35 | BLE_PUBLIC_DEV_ADDR: ((uint8_t[6]){0xcc, 0xbb, 0xaa, 0x33, 0x22, 0x11}) 36 | -------------------------------------------------------------------------------- /porting/nimble/include/nimble/nimble_port.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef _NIMBLE_PORT_H 21 | #define _NIMBLE_PORT_H 22 | 23 | #include "nimble/nimble_npl.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void nimble_port_init(void); 30 | 31 | void nimble_port_run(void); 32 | 33 | struct ble_npl_eventq *nimble_port_get_dflt_eventq(void); 34 | 35 | #if NIMBLE_CFG_CONTROLLER 36 | void nimble_port_ll_task_func(void *arg); 37 | #endif 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /* _NIMBLE_PORT_H */ 44 | -------------------------------------------------------------------------------- /nimble/host/src/ble_hs_adv_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_HS_ADV_PRIV_ 21 | #define H_BLE_HS_ADV_PRIV_ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | int ble_hs_adv_set_flat(uint8_t type, int data_len, const void *data, 28 | uint8_t *dst, uint8_t *dst_len, uint8_t max_len); 29 | int ble_hs_adv_find_field(uint8_t type, const uint8_t *data, uint8_t length, 30 | const struct ble_hs_adv_field **out); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /nimble/transport/usb/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/transport/usb 21 | pkg.description: Provides HCI transport over USB interface 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | - usb 28 | 29 | pkg.deps: 30 | - "@apache-mynewt-core/hw/hal" 31 | - "@apache-mynewt-core/kernel/os" 32 | - "@apache-mynewt-core/util/mem" 33 | - nimble 34 | - "@apache-mynewt-core/hw/usb/tinyusb" 35 | 36 | pkg.apis: 37 | - ble_transport 38 | -------------------------------------------------------------------------------- /apps/bletest/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: apps/bletest 21 | pkg.type: app 22 | pkg.description: Test project for the nimble BLE controller. 23 | pkg.author: "Apache Mynewt " 24 | pkg.homepage: "http://mynewt.apache.org/" 25 | pkg.keywords: 26 | 27 | pkg.deps: 28 | - net/nimble/controller 29 | - net/nimble/host 30 | - net/nimble/transport/ram 31 | - kernel/os 32 | - sys/console/full 33 | - sys/shell 34 | - sys/config 35 | - sys/log/full 36 | - sys/log/modlog 37 | - sys/stats/full 38 | pkg.cflags: -DBLETEST 39 | -------------------------------------------------------------------------------- /nimble/host/src/ble_hs_id_priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifndef H_BLE_HS_ID_PRIV_ 21 | #define H_BLE_HS_ID_PRIV_ 22 | 23 | #include 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void ble_hs_id_set_pub(const uint8_t *pub_addr); 30 | int ble_hs_id_addr(uint8_t id_addr_type, const uint8_t **out_id_addr, 31 | int *out_is_nrpa); 32 | int ble_hs_id_use_addr(uint8_t addr_type); 33 | void ble_hs_id_reset(void); 34 | void ble_hs_id_rnd_reset(void); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /apps/blemesh_models_example_2/src/ble_mesh.h: -------------------------------------------------------------------------------- 1 | /* Bluetooth: Mesh Generic OnOff, Generic Level, Lighting & Vendor Models 2 | * 3 | * Copyright (c) 2018 Vikrant More 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | 8 | #ifndef _BLE_MESH_H 9 | #define _BLE_MESH_H 10 | 11 | #include "mesh/mesh.h" 12 | #include "mesh/glue.h" 13 | 14 | /* Model Operation Codes */ 15 | #define BT_MESH_MODEL_OP_GEN_ONOFF_GET BT_MESH_MODEL_OP_2(0x82, 0x01) 16 | #define BT_MESH_MODEL_OP_GEN_ONOFF_SET BT_MESH_MODEL_OP_2(0x82, 0x02) 17 | #define BT_MESH_MODEL_OP_GEN_ONOFF_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x03) 18 | #define BT_MESH_MODEL_OP_GEN_ONOFF_STATUS BT_MESH_MODEL_OP_2(0x82, 0x04) 19 | 20 | #define BT_MESH_MODEL_OP_GEN_LEVEL_GET BT_MESH_MODEL_OP_2(0x82, 0x05) 21 | #define BT_MESH_MODEL_OP_GEN_LEVEL_SET BT_MESH_MODEL_OP_2(0x82, 0x06) 22 | #define BT_MESH_MODEL_OP_GEN_LEVEL_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x07) 23 | #define BT_MESH_MODEL_OP_GEN_LEVEL_STATUS BT_MESH_MODEL_OP_2(0x82, 0x08) 24 | #define BT_MESH_MODEL_OP_GEN_DELTA_SET BT_MESH_MODEL_OP_2(0x82, 0x09) 25 | #define BT_MESH_MODEL_OP_GEN_DELTA_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x0A) 26 | #define BT_MESH_MODEL_OP_GEN_MOVE_SET BT_MESH_MODEL_OP_2(0x82, 0x0B) 27 | #define BT_MESH_MODEL_OP_GEN_MOVE_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x0C) 28 | 29 | void blemesh_on_reset(int reason); 30 | void blemesh_on_sync(void); 31 | void init_pub(void); 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /babblesim/edtt/hci_test/src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Codecoup 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | #include "os/mynewt.h" 23 | #include "ble_hci_edtt.h" 24 | 25 | static int 26 | main_fn(int argc, char **argv) 27 | { 28 | sysinit(); 29 | 30 | edtt_init(); 31 | 32 | while (1) { 33 | os_eventq_run(os_eventq_dflt_get()); 34 | } 35 | return 0; 36 | } 37 | 38 | int 39 | main(int argc, char **argv) 40 | { 41 | extern void bsim_init(int argc, char** argv, void *main_fn); 42 | bsim_init(argc, argv, main_fn); 43 | 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /nimble/controller/test/pkg.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | pkg.name: nimble/controller/test 19 | pkg.type: unittest 20 | pkg.description: "NimBLE controller unit tests." 21 | pkg.author: "Apache Mynewt " 22 | pkg.homepage: "http://mynewt.apache.org/" 23 | pkg.keywords: 24 | 25 | pkg.deps: 26 | - "@apache-mynewt-core/test/testutil" 27 | - nimble/controller 28 | 29 | pkg.deps.SELFTEST: 30 | - "@apache-mynewt-core/sys/console/stub" 31 | - "@apache-mynewt-core/sys/log/full" 32 | - "@apache-mynewt-core/sys/stats/stub" 33 | - nimble/drivers/native 34 | - nimble/transport 35 | -------------------------------------------------------------------------------- /nimble/controller/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/controller 21 | pkg.description: Controller side of the nimble Bluetooth Smart stack. 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | 28 | pkg.req_apis: 29 | - ble_driver 30 | - ble_transport 31 | - stats 32 | pkg.req_apis.BLE_LL_PA: 33 | - ble_ll_pa 34 | pkg.req_apis.BLE_LL_LNA: 35 | - ble_ll_lna 36 | 37 | pkg.deps: 38 | - "@apache-mynewt-core/kernel/os" 39 | - nimble 40 | - nimble/transport 41 | -------------------------------------------------------------------------------- /nimble/host/store/ram/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/host/store/ram 21 | pkg.description: > 22 | DEPRECATED; for a RAM-only BLE store, use store/config and set 23 | BLE_STORE_CONFIG_PERSIST to 0. RAM-based persistence layer for the NimBLE 24 | host. 25 | pkg.author: "Apache Mynewt " 26 | pkg.homepage: "http://mynewt.apache.org/" 27 | pkg.keywords: 28 | - ble 29 | - bluetooth 30 | - nimble 31 | - persistence 32 | 33 | pkg.deps: 34 | - nimble/host 35 | 36 | pkg.init: 37 | ble_store_ram_init: 'MYNEWT_VAL(BLE_STORE_RAM_SYSINIT_STAGE)' 38 | -------------------------------------------------------------------------------- /nimble/transport/socket/pkg.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | pkg.name: nimble/transport/socket 21 | pkg.description: Provides HCI transport over socket interface 22 | pkg.author: "Apache Mynewt " 23 | pkg.homepage: "http://mynewt.apache.org/" 24 | pkg.keywords: 25 | - ble 26 | - bluetooth 27 | 28 | pkg.deps: 29 | - "@apache-mynewt-core/hw/hal" 30 | - "@apache-mynewt-core/kernel/os" 31 | - "@apache-mynewt-core/util/mem" 32 | - nimble 33 | 34 | pkg.apis: 35 | - ble_transport 36 | 37 | pkg.init: 38 | ble_hci_sock_init: 'MYNEWT_VAL(BLE_SOCK_CLI_SYSINIT_STAGE)' 39 | --------------------------------------------------------------------------------