完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在实施以下系统
ChIP1(外设)最初广告数据,CHIP2(中央)扫描,当ChIP2遇到广告时,CHIP1发送扫描响应包并切换到扫描(Central),当ChIP2获得扫描响应包时,它切换到广告(外围设备)。 我的困难 1、我不知道API用于切换角色或任何方法 2、CHIP1是如何知道扫描发生的? 甚至在栈中被触发,或者如何执行一些指令以及发送扫描响应包 3、CIP2如何理解广告包和扫描响应包的区别? 感谢任何帮助, 当做, 维拉杰 以上来自于百度翻译 以下为原文 I'm implementing the following system-
My difficulties- 1.I don't know the API's for switching roles or any method followed 2.How does Chip1 know a scan has taken place? Which even in stack is triggered, or how can I execute some instructions along with sending scan response packet 3.How does Chip2 understand difference between advertisement packet and scan response packet? Any help appreciated, Regards, Viraj |
|
相关推荐
4个回答
|
|
如何切换状态
定义CyByLyState(状态)(CyByLyState =(状态))采用与CyByLyGate()返回值类似的输入参数 仍然需要帮助识别扫描响应包已被发送(外围侧) 并且在中央侧帮助从广告分组识别扫描响应分组。 当做, 维拉杰 以上来自于百度翻译 以下为原文 Got how to switch states
Still need help with recognizing that a scan response packet has been sent(Peripheral side) And help at central side recognizing a scan response packet from a advertisement packet Regards, Viraj |
|
|
|
sihanxie 发表于 2018-12-29 19:42 当中央设备接收到一个扫描响应包时,将出现CyByLyEvtGAPCXSCAN PrimeSsR.结果,然后可以继续处理模式切换。 不幸的是,我看不到一种方法来访问是否有一个扫描响应发出;CyPress处理他们的二进制广告,因此不太可能有钩子来处理扫描响应发出后的切换模式。 此外,为什么有这样一个奇怪的转换过程,哪一边是扫描和广告?ChIP1可以被设置为总是扫描,然后ChIP2将永远是广告。切换连接启动/设置的方向对于我所能想到的应用程序来说没有多大意义。 你是否已经测试过CyLySyState(状态)定义了你写的作品?我认为你必须调用Cyle函数来打开广告,并且正确地扫描ON/OFF,否则BLE堆栈会崩溃或混乱。 以上来自于百度翻译 以下为原文 CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT will occur when the central device receives a scan response packet; You can then proceed to handle the mode switching afterwards. Unfortunately, I don't see a way to access whether there was a scan response sent out; Cypress handles the advertisements in their binary, and thus it is unlikely there are hooks to handle switching modes after a scan response was sent out. Also, why have this odd process of switching which side is scanning and advertising? Chip1 could just be set to always scanning, and then chip2 would be always advertising. Switching the direction of the connection initiation/setup doesn't make alot of sense for applications that I can think of. Have you tested that the CyBle_SetState(state) define that you wrote works? Afaik, I thought you had to call cyble functions to turn the advertising, and scanning on/off properly otherwise the BLE stack crashes or messes up |
|
|
|
CysLyStState(状态)没有,也没有返回任何东西,所以我不知道为什么。我放弃了那个API 我想先从ChIP1开始发布一个中断的广告,然后我希望ChIP1能够从ChIP2中听到指令,而ChIP2也必须等待其他芯片的类似事件。 因此,直到我命令CHIP2,它仍然会扫描,当收到命令,它切换到广告,广告所需的数据,然后回到扫描仪监视其他芯片的其他中断。 当做, 维拉杰 以上来自于百度翻译 以下为原文 The CyBle_SetState(state) didn't and it's not returning anything too, so I couldn't figure out why. I dropped that API I want to issue advertisement initially form Chip1 for an Interrupt, and then I want Chip1 to listen for instructions from Chip2, while Chip2 must wait for similar events form other chips too So until I command Chip2 it will still scan, and when command is received it switches to Advertisement, advertises the required data, and then goes back to Scanner for monitoring other interrupts from other chips Regards, Viraj |
|
|
|
嗯,我建议发送一对夫妇的广告,而不是仅仅一个(无线传输容易出错)。然后,当您切换CHIP1进行扫描时,设置超时,以防CHIP2没有接收到广告,然后它可以重试广告或处理您想要的应用程序中的问题。 对于这样的设置,我将设计CHIP1进行被动扫描,当它得到并中断连接到CHIP2(设置为广告)时,读取当前在广告包中返回的数据/值,然后断开连接,以允许其他设备连接和读取。当他们需要数据时。唯一的缺点是处理多个设备同时试图连接的错误/定时,但是它简化了BLE模式到只有一个。 埃普拉特 以上来自于百度翻译 以下为原文 Hmmmm; I would suggest sending a couple advertisements rather than just one (wireless transmissions are prone to error). Then, when you switch Chip1 to scan, set a timeout in case the Chip2 didn't receive the advertisements and then it can retry the advertisements or handle the issue in your app how you want. For a setup like this, I would architect Chip1 to be passively scanning, and when it gets and interrupt to connect to Chip2 (which is setup as advertising), read the data/values you are currently returning in the advertisement packets, and then disconnect to allow other devices to connect and read the data when they need it. The only downside to this is handling the errors/timing for multiple devices trying to connect at the same time, but it simplifies the BLE mode to only one. Epratt |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2106 浏览 1 评论
1853 浏览 1 评论
3672 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1788 浏览 6 评论
1536 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
575浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
427浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
439浏览 2评论
389浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
921浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-26 12:18 , Processed in 0.998758 second(s), Total 84, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号