CONFIG_BT_SMP 配置问题,下面内容保存为smp_null.c 放到
./src/ble/host/smp_null.c /** * @file smp_null.c * Security Manager Protocol stub */ /* * Copyright (c) 2015-2016 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr.h> #include <errno.h> #include <ble/sys/atomic.h> #include <ble/sys/util.h> #include <bluetooth/bluetooth.h> #include <bluetooth/conn.h> #include <bluetooth/buf.h> #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_CORE) #define LOG_MODULE_NAME bt_smp #include "common/log.h" #include "hci_core.h" #include "conn_internal.h" #include "l2cap_internal.h" #include "smp.h" static struct bt_l2cap_le_chan bt_smp_pool[CONFIG_BT_MAX_CONN]; int bt_smp_sign_verify(struct bt_conn *conn, struct net_buf *buf) { return -ENOTSUP; } int bt_smp_sign(struct bt_conn *conn, struct net_buf *buf) { return -ENOTSUP; } static int bt_smp_recv(struct bt_l2cap_chan *chan, struct net_buf *req_buf) { struct bt_conn *conn = chan->conn; struct bt_smp_pairing_fail *rsp; struct bt_smp_hdr *hdr; struct net_buf *buf; ARG_UNUSED(req_buf); /* If a device does not support pairing then it shall respond with * a Pairing Failed command with the reason set to "Pairing Not * Supported" when any command is received. * Core Specification Vol. 3, Part H, 3.3 */ buf = bt_l2cap_create_pdu(NULL, 0); /* NULL is not a possible return due to K_FOREVER */ hdr = net_buf_add(buf, sizeof(*hdr)); hdr->code = BT_SMP_CMD_PAIRING_FAIL; rsp = net_buf_add(buf, sizeof(*rsp)); rsp->reason = BT_SMP_ERR_PAIRING_NOTSUPP; if (bt_l2cap_send_cb(conn, BT_L2CAP_CID_SMP, buf, NULL, NULL)) { net_buf_unref(buf); } return 0; } static int bt_smp_accept(struct bt_conn *conn, struct bt_l2cap_chan **chan) { int i; static const struct bt_l2cap_chan_ops ops = { .recv = bt_smp_recv, }; BT_DBG("conn %p handle %u", conn, conn->handle); for (i = 0; i < ARRAY_SIZE(bt_smp_pool); i++) { struct bt_l2cap_le_chan *smp = &bt_smp_pool[i]; if (smp->chan.conn) { continue; } smp->chan.ops = &ops; *chan = &smp->chan; return 0; } BT_ERR("No available SMP context for conn %p", conn); return -ENOMEM; } BT_L2CAP_CHANNEL_DEFINE(smp_fixed_chan, BT_L2CAP_CID_SMP, bt_smp_accept, NULL); int bt_smp_init(void) { return 0; } #if defined(CONFIG_BT_DEINIT) int bt_smp_deinit(void) { return 0; } void bt_smp_mem_deinit(void) { return; } void bt_keys_mem_deinit(void) { return; } #endif #if defined(CONFIG_BT_VAR_MEM_DYNC_ALLOC) void keys_dynamic_mem_alloc(void) { } void keys_dynamic_mem_free(void) { } #endif-
【R128】软件配置——配置引脚复用
A Series • 发布于 • livpo -
【R128】外设模块配置——PMU 电源管理
A Series • 发布于 • livpo -
RGB的屏脚没有信号
A Series • 发布于 • dort91011 -
【R128】基础组件开发指南——音频框架②
A Series • 发布于 • livpo -
【R128】基础组件开发指南——音频框架①
A Series • 发布于 • livpo -
R128的M33能跑到384M?
A Series • 发布于 • haaland -
大伙帮忙看看GT911的配置参数
A Series • 发布于 • abcdef -
R128驱动SD卡失败
A Series • 发布于 • biubiu -
R128使用的内存是hspsram还是sram?
A Series • 发布于 • nzdzhd -
【R128】应用开发案例——中断方式驱动旋转编码器
A Series • 发布于 • livpo -
R128休眠流程前期卡住问题定位思路
A Series • 发布于 • giao -
【R128】基础组件开发指南——RTOS 多媒体编码
A Series • 发布于 • livpo -
R128的屏幕颜色显示异常时怎么回事?
A Series • 发布于 • ddrddr -
R128 LCD调试报错
A Series • 发布于 • newcastle -
【R128】基础组件开发指南——RTOS 多媒体解码
A Series • 发布于 • livpo -
R128S2的内存不够用了
A Series • 发布于 • haaland -
R128 BLE最高吞吐量测试正确配置测试
A Series • 发布于 • giao -
请问怎样才能让LVGL跑在R128的M33核呢
A Series • 发布于 • dort91011 -
【R128】应用开发案例——驱动 WS2812 流水灯
A Series • 发布于 • livpo -
【R128】应用开发案例——按键输入
A Series • 发布于 • livpo -
【R128】应用开发案例——点亮一颗 LED 灯
A Series • 发布于 • livpo -
R329 tina 启动卡死问题
A Series • 发布于 • kkkcxf -
全志R128裸奔工具XFEL开发计划
A Series • 发布于 • tripod9 -
R128 IO 翻转测试
A Series • 发布于 • 柚木 鉉 -
关于R329配置文件的编写
A Series • 发布于 • rxhmedia -
关于生成适合R329量化的数据
A Series • 发布于 • rxhmedia -
请问R329的npu是否支持GRU相关的算子?
A Series • 发布于 • rxhmedia -
R11 Qt 运行出错
A Series • 发布于 • memory -
R128 S2 单天线是否需要软件配置为单天线
A Series • 发布于 • 柚木 鉉 -
R818,4+32配置,暂时跑起来狠舒适
A Series • 发布于 • mangogeek -
总之,R818又到了冒烟的时候,好紧张
A Series • 发布于 • mangogeek -
r818 Androd10如何修改屏幕参数
A Series • 发布于 • LeePZ -
r11 tplayerdemo
A Series • 发布于 • yuwei -
关于全志r7 和 v3s的区别问题
A Series • 发布于 • yuwei -
R11的uboot编译报错问题
A Series • 发布于 • one001 -
全志R11文件系统挂载问题
A Series • 发布于 • one001 -
求全志R328-s2硬件芯片,引角定义图
A Series • 发布于 • zhangzhifu -
全志R11GPIO口测试方案问题
A Series • 发布于 • one001 -
R11 debug uart0 换uart1
A Series • 发布于 • one001 -
tina3.5.1 R11 TF卡启动出错
A Series • 发布于 • cube_work -
R329将S_UART1映射为UART4问题咨询
A Series • 发布于 • ROIDMI -
全志R和A系列,哪个功耗最低呢?
A Series • 发布于 • kennethwei -
R329系统启动阻塞问题求救
A Series • 发布于 • ROIDMI -
R329系统启动日志帮忙看下停止原因
A Series • 发布于 • ROIDMI -
R329 SPI Nand 分区问题
A Series • 发布于 • ROIDMI -
R329 tina启动问题
A Series • 发布于 • ROIDMI -
R329工作温度范围?
A Series • 发布于 • sinba -
R11 根文件系统挂载错误,似乎是因为镜像格式问题?
A Series • 发布于 • Ab135 -
R329 支持gstreamer音频硬解码吗?
A Series • 发布于 • tdzh00 -
r329有没有可能做安卓手表(不考虑基带)
A Series • 发布于 • QemuAndroid -
ubus.git not found
A Series • 发布于 • gelao_xiao -
求助:全志R11编译无法通过
A Series • 发布于 • Ab135 -
V3S的RTC电流太大, 很耗电池....
A Series • 发布于 • musich -
收一个r329开发板
A Series • 发布于 • zhangfei714 -
想把V3S当成单片机用, 才开始就卡在网络上了,
A Series • 发布于 • musich -
V3s在哪设置,可以发送42字长短包...
A Series • 发布于 • musich -
修改WiFi/BT模组—R329智能语音开发板入门
A Series • 发布于 • WOW -
R329开发板烧录失败
A Series • 发布于 • yimu163com -
关于CE模块AES算法key的问题
A Series • 发布于 • mengxp -
周易AIPU加持!R329助力研电赛人工智能选题
A Series • 发布于 • budbool -
rtl8723ds高并发时死锁有人遇到过吗
A Series • 发布于 • mengxp