1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我只见过这一次,但我碰巧正在监控从终端的RN861的串行数据。作为我的PIC启动序列的一部分,它发布一个LS命令来学习自定义特性的句柄。我碰巧在同一时间启动蓝牙连接。我已经把波特率降低到了RN1478上的2400,我有四个定制特性和定制服务,所以响应“LS”需要相当长的时间。反应停了一段时间,从来没有到“结束”,我的PIC正在等待。谁能用RN878确认这一点?
以上来自于百度翻译 以下为原文 I have only seen this once, but I happened to be monitoring the serial data from the RN4871 with a terminal. As part of my PIC's boot-up sequence, it issues an LS command to learn the handles of the custom characteristics. I happened to initiate a Bluetooth connection at the same time. I had lowered the baudrate to 2400 on the RN4871 and I have four custom characteristics and a custom service so it takes a fairly long time to respond to "LS". The response stopped part way through and never came to the "END", which my PIC was waiting for. Can anyone confirm this with their RN4871? |
|
相关推荐
2个回答
|
|
我以前只手动发布这个命令,从来没有见过它不完整,所以不能确认。我不确定检查句柄是必要的,尽管——从一个干净的板岩开始,句柄总是被分配相同的顺序,所以我只需把句柄硬编码成字符。ErristAccess命令;第一个特性总是0072,并且我认为它们从那里增加了2。在启动过程中,通过执行句柄的读取来检查最后一个特性是否存在。如果这产生错误,我擦除设备(PZ)并重写所有服务/特性。这是初始设备需要的真正必要的,因为此后服务/特性持续存在。
以上来自于百度翻译 以下为原文 I have only ever issued this command manually and have never seen it not complete so can't confirm. I am not sure that checking the handles is necessary, though - AFAIK the handles are always assigned the same sequence when starting from a clean slate, so I just hard-code the handle into the characteristic access commands; the first characteristic is always 0072 and I think they increment by 2 from there. On boot up I check if the last characteristic exist by performing a read from its handle. If this produces an error, I wipe the device (PZ) and rewrite all services/characteristics. This is only really necessary for initial device bring-up as the services/characteristics persist thereafter. |
|
|
|
谢谢你的建议。我没有重复过我所报告的问题,所以可能是由别的原因引起的。关于硬连接的句柄,我已经考虑过了,但是如果RN861固件中的一些设计改变改变了最初的句柄分配,我不希望我的代码变得过时,然后必须WOR。关于如何编写一个处理新旧RN871S的PIC代码。此外,我已经把LS解析工作得很好,所以我不妨使用它。
以上来自于百度翻译 以下为原文 Thanks for the advice. I have not had a repeat of the problem I reported, so maybe it was caused by something else. Regarding hardwiring the handles, I had considered that, but if some design change in the RN4871 firmware changes the initial handle assignments I didn't want my code to become obsolete, and then have to worry about how to write one PIC code that handles new and old RN4871s. Besides, I've got the LS parsing working well, so I might as well use it. |
|
|
|
只有小组成员才能发言,加入小组>>
5238 浏览 9 评论
2028 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3204 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
777浏览 1评论
666浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
595浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
676浏览 0评论
576浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 04:53 , Processed in 1.284041 second(s), Total 78, Slave 62 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号