1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
美好的一天,支持团队,
我有一个关于BlueNRG-1同时主/从模式支持的问题。 正如我从文档“BlueNRG-1,BlueNRG-2 BLE堆栈编程指南.pdf”中看到的那样--BlueNRG-1可以支持主/从模式作为外围设备连接到手机,同时可以作为主设备进行扫描和连接到另一个BLE外围设备。 在我的情况下,我需要开发BLE设备,它将作为BLE从属外设与移动电话通信,同时将作为BLE主机与BLE外设与温度/湿度传感器进行交互。 主BLE设备应定期连接到BLE外设以读取温度/湿度值,并在其程序中使用它们,并将温度/湿度值发送到手机。 我尝试启用同时主/从模式,但一次只能扫描或连接到BLE外设(作为主设备)或连接到电话(作为从设备)。 我用这段代码来配置GAP: / * GAP Init * / aci_gap_init(GAP_PERIPHERAL_ROLE | GAP_CENTRAL_ROLE,...); 我正在使用()扫描BLE设备,()检查BLE扫描过程的结束和()以获取扫描结果。 我使用()从主BLE主设备连接到BLE外设。 我还找到了BLE堆栈模式的一个设置(在“bluenrg1_hal.h”中): / ** *选择BlueNRG角色和模式配置。 n * @li模式1:,1个连接,仅限RAM1(小型GATT DB) * @li模式2:,1个连接,RAM1和RAM2(大型GATT DB) * @li模式3:,8个连接,RAM1和RAM2。 * / #define CONFIG_DATA_ROLE(0x2D) 我在这里看不到同步模式...... 我还在我的项目中检查过: #define MIN_NUM_LINK设置为2 但我无法同时从手机连接到主/从设备,并通过主/从设备扫描其他从设备或从主/从设备连接到另一个从设备。 您能否澄清一下,BlueNRG-1是否真的支持主/从模式以及我必须进行哪些设置才能启用它? 我应该在simultanious主/从模式下获得什么功能? - 广告和扫描可以同时提供吗? - 从主/从设备到从机的连接,以及从主/从设备到电话的连接可以同时使用? 提前谢谢, Evgeny Boltunov 以上来自于谷歌翻译 以下为原文 Good day, Support Team, I have a question regarding BlueNRG-1 simultaneous master/slave mode support. As I see from documentation "BlueNRG-1, BlueNRG-2 BLE stack programming guidelines.pdf" - BlueNRG-1 can support master/slave mode to be connected to the phone as peripheral device and at the same time can scan and connect as master to another BLE peripherals. In my case I need to develop BLE device, which will communicate as BLE slave peripheral with mobile phone and at the same time will interact as BLE master with BLE peripheral with temperature/humidity sensor. Main BLE device should periodically connect to BLE peripheral to read temperature/humidity values, and use them in it's program and also send temperature/humidity values to mobile phone. I have tried to enable simultaneous master/slave mode, but can only scan or connect to BLE peripheral (as master) or connect to phone (as slave) at a time. I used this code to configure GAP: /* GAP Init */ aci_gap_init(GAP_PERIPHERAL_ROLE | GAP_CENTRAL_ROLE, ...); I am using () to scan for BLE devices, () to check for the end of BLE scanning process and () for getting the results of scanning. I use () to connect from main BLE master device to BLE peripheral. I also found one setting for BLE stack mode (in "bluenrg1_hal.h"): /** * Select the BlueNRG roles and mode configurations.n * @li Mode 1: , 1 connection, RAM1 only (small GATT DB) * @li Mode 2: , 1 connection, RAM1 and RAM2 (large GATT DB) * @li Mode 3: , 8 connections, RAM1 and RAM2. */ #define CONFIG_DATA_ROLE (0x2D) And I don't see the simultaneous mode here... I also checked that in my project: #define MIN_NUM_LINK is set to 2 But I can't simultaneously connect to master/slave device from phone and scan by master/slave device for another slave devices or to connect to another slaves from master/slave device. Can you please clarify, does BlueNRG-1 really support master/slave mode and what settings I have to make to enable it? What functionality should I get in simultaniously master/slave mode? - Advertising and scan can be both available at the same time? - Connection to slave from master/slave device, and connection to phone from master/slave device can be both available at the same time? In advance thanks, Evgeny Boltunov |
|
相关推荐
1个回答
|
|
涵盖BlueNRG的@ST社区(ST员工)?
以上来自于谷歌翻译 以下为原文 @ST Community (ST Employee) who covers BlueNRG? |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2723 浏览 1 评论
3237 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1807 浏览 1 评论
3646 浏览 6 评论
6034 浏览 21 评论
1334浏览 4评论
209浏览 3评论
197浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
350浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
442浏览 2评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 20:23 , Processed in 1.087960 second(s), Total 75, Slave 59 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号