完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我试图建立一个连接我的PSoC和blueradios传感器sensorbug—。 在建立连接之后的下一件事就是读了传感器测量数据。 我的训练在C和学会学习是在学校,所以我想我可以做到这一点没有问题。 但我马上意识到我错了,特别是API的BLE盒让我疯狂。 所以我试图建立我的代码连接,我张贴在这里,但它不会连接。 我要到一个地步,我不知道该怎么做了,我会需要一些帮助。 我的代码总是在相同的位置停止。 它总是试图给出一个他阅读比赛MSD。但他们不匹配,我不知道为什么。主要是因为我不知道这些数据是什么给。我试着读出来的数据表,但是有一些数据称为MSD但不是公司的具体数据和manufactuerer具体数据。 谢谢 克里斯 项目01.ZIP 4.6兆字节 感测器接口规范V1.3.0.0A.PDF 2.1兆字节 以上来自于百度翻译 以下为原文 Hi there, I am trying to establish a connection between my PSOC and a BlueRadios Sensor -Sensorbug-. After establishing the connection the next thing would be to read out the light data which the sensor measures. I am trained in C and learned - learning it in school and so I thought I could do this without a problem. But I realized pretty soon that I was wrong especially the API's for the BLE Kit are driving me crazy. So I tried to establish the connection with my code, which I is posted down here, but it won't connect. And I am coming to a point where I don't know what to do anymore, I am stuck and would need some help. My code always stops at the same position. It always tries to match the given MSD with the one he reads. But they don't match and I don't know why. Espescially because I don't know what that data is for and what exactly to give in. I tried to read it out of the datasheet but there is some data called MSD but not company specific data and manufactuerer specific data. Thanks Chris
|
|
相关推荐
12个回答
|
|
你好,克里斯,
在这个项目中,中心将通过检查MSD和其他扫描响应数据连接到外围。但力士传感器(周围)的值不同,所以中央不能检测。 请尝试检测使用力士传感器(周围)地址即在扫描响应报告试图检查传感器的地址然后连接。 谢谢, p YuangdHar。 以上来自于百度翻译 以下为原文 Hello Chris, In this project, the central will connect to the peripheral by checking the MSD and other scan response data. But the Lux sensor (peripheral) the values are different so the central can't detect. Please try to detect using the Lux Sensor (peripheral) Address i.e., in the scan response report try to check with the Sensor Address and then connect.Thanks, P Yugandhar. |
|
|
|
yu1004402274 发表于 2018-8-15 07:30 谢谢您, 这是我做的,试着将宏与价值观念,但有一个问题。 结果: SCANCHORD= *(CyBLY-GAPCXADVIGRePATRORT**)EndoPARAM; / *制造商特定的数据检查扫描响应* / 如果(scanreport。数据[ 1 ] = = manufacturer_specific_data &;&;scanreport。数据[ 2 ] = = company_l*** &;&;scanreport。数据[ 3 ] = = company_m*** &;&;scanreport。数据[ 4 ] = = man_spec_data_l*** &;&;scanreport。数据[ 5 ] = = man_spec_data_m***) { scnareport应该存储厂商数据与宏比较。但它只有1个值存储在数据>;0x02即可扫描无广告。 在这一点上我有点疑惑,因为它不喜欢在工程实例,比较了广告数据。 有没有其他的功能,给了我寻找还是我用错了的结果吗? 谢谢 以上来自于百度翻译 以下为原文 Thank you, I did this and tried to compare the macros with the values but there is one problem. case CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT: scanReport= *(CYBLE_GAPC_ADV_REPORT_T*)eventParam; /*Check for the Manufacturer specific data in scan response*/ if(scanReport.data[1] == MANUFACTURER_SPECIFIC_DATA && scanReport.data[2] == COMPANY_LSB && scanReport.data[3] == COMPANY_MSB && scanReport.data[4] == MAN_SPEC_DATA_LSB && scanReport.data[5] == MAN_SPEC_DATA_MSB) { scnaReport should have stored the manufacturer data to compare it with the macros. But it only has 1 value stored in data -> 0x02 which means scanable undirected advertising. At this point I am a bit confused because it isn't like in the example project where it compares the advertising data. Is there a other function which gives me the result I am searching for or am I using it wrong? Thanks |
|
|
|
你好,克里斯, 在GITHUB中,我们的项目“Day0131client服务器”有两个项目“客户端和服务器外设”和“客户端和服务器中心”。外围设备有一些扫描响应数据,所以中央将把这些数据与扫描报告数据(扫描过程中得到的数据)进行比较,然后识别外围设备。对于你的传感器,这些值是不同的,所以中心无法识别。 请通过客户端和服务器外围项目,在这个外围项目中扫描响应数据如下图所示 中央将比较这些值与scanreport数据然后连接外设。 谢谢, p YuangdHar。 以上来自于百度翻译 以下为原文 Hello Chris, In the GitHub, Our project "Day013_Client_Server" has two projects "Client and Server-Peripheral" and " Client and Server-Central" . Peripheral has some scan response data so the Central will compare these data with the ScanReport data(which we get during scanning) and then identify the Peripheral. For your Sensor these values are different so the Central can't identify. Please go through the Client and Server-Peripheral project, in this Peripheral project scan response data is as shown in below imageThe Central will compare these values with the ScanReport data and then connect to Peripheral. Thanks, P Yugandhar. |
|
|
|
yu1004402274 发表于 2018-8-15 08:04 谢谢你,但我已经做了。 我抬头看表,cysmart什么MSD和fsved为宏扫描。 问题是,我的scanreport只有1价值0x02代表可扫描无广告。 那么,我错过的东西在哪里? 克里斯 以上来自于百度翻译 以下为原文 Thanks for that but I already did that. I looked up in the datasheet and scanned with cysmart what the msd is and fsved it as macros. The thing is that my ScanReport only has 1 value - 0x02 which stands for scanable undirected advertisement. So where's the thing I am missing out? Chris |
|
|
|
jr3367 发表于 2018-8-15 08:21 你好,克里斯, 你可以尝试比较scanreport你的传感器可以通过“scanreport。peerbdaddr [ ]“这给地址报告。SCAN报表的结构如下所示。 CyBLY-GAPCI AdvestRePixt结构 数据字段 CyBLY-GAPCVAdvestEnvivt事件类型 •uint8 peeraddrtype •uint8 * peerbdaddr •uint8 datalen •uint8 *数据 •智力RSSI 有关详细信息,请参阅组件数据表。 谢谢, P yugandhar。 以上来自于百度翻译 以下为原文 Hello Chris, Can you try to compare ScanReport with your sensor Address by using "ScanReport.peerBdAddr[ ]" which gives Address report. The structure of scanreport is as defined below. struct CYBLE_GAPC_ADV_REPORT_T Data Fields • CYBLE_GAPC_ADV_EVENT_T eventType • uint8 peerAddrType • uint8 * peerBdAddr • uint8 dataLen • uint8 * data • int8 rssi Please refer the component datasheet for more details. Thanks, P Yugandhar. |
|
|
|
yu1004402274 发表于 2018-8-15 08:28 你好, 谢谢您. 所以你说我应该和皮诺雷斯比较一下。 但是为什么呢?我想比,MSD是不对等的地址数据的广告数据? 我错过了什么吗? 谢谢, 克里斯 以上来自于百度翻译 以下为原文 Hi, thank you. So you say that I should compare the peeradress. But why? I wanted to compare the advertisement data in which the msd is and not the peer adress data? Am I missing something out? Thanks, Chris |
|
|
|
你好,克里斯, 在你的传感器数据表扫描响应数据显示在下面的图像。 所以在中央装置必须与这些扫描响应数据值比较。 请你给我扫描你的周围你看到的报表数据cysmart适配器。 谢谢, p YuangdHar。 以上来自于百度翻译 以下为原文 Hello Chris, In your sensor datasheet the scan response data is shown in below image. So in the central device you have to compare with these scan response data values only. Can you please send me the scan report data of your Peripheral which you see in CySmart dongle. Thanks, P Yugandhar. |
|
|
|
你好, 再次谢谢你。 我以为它存储的扫描数据和广告数据的响应。 因为这是它在数据表中所说的 以上来自于百度翻译 以下为原文 Hi, thank you again. I thought that it stores the scan respones data OR the advertisement data. Because that is what it says in the datasheet under |
|
|
|
重点是,我只是想比较AD数据的外周发送- >;MSD,我已经想通了,通过cysmart - >;与中央得到其中第三部分的12字节长的MSD应& gt AD数据的数据;如果我没有错,它说在数据表号在cyble_gapc_adv_report_t - >;数据应该存储AD数据和/或扫描响应数据。 谢谢克里斯 以上来自于百度翻译 以下为原文 The point is that I just want to compare the ad data which the pheripheral sends -> the MSD which I already figured out via CySmart -> with the data that the central gets - the ad data in which the 3rd part the 12 byte long msd should be -> and if I am not wrong it says in the datasheet that CYBLE_GAPC_ADV_REPORT_T -> data should have stored the ad data AND / OR the scan repsonse data. Thanks CHris |
|
|
|
jr3367 发表于 2018-8-15 09:14 你好,克里斯, 我们可以比较广告数据或扫描响应数据。 如果外围是广告和中央扫描期间,中央将发送扫描请求到外围设备,然后外设发送扫描响应数据,如图像中所示。 请确保比较正确地发生在中心侧。例如,如果考虑与广告数据进行比较,请确保根据索引在中央分配或不正确的值。例如,W.R.T以上的广告数据SCANCHORD.DATA(1)=0x01,SCANCHORD.DATA(2)=0X05,SCANCHORD.DATA(3)=0X03,SCANCHORD.DATA(8)=0XFF… 谢谢, p YuangdHar。 以上来自于百度翻译 以下为原文 Hello Chris, We can compare with Advertisement data or Scan response data. If Peripheral is advertising and Central is scanning during this period Central will send scan request to peripheral then peripheral sends the scan response data as shown in image. Please make sure that the comparison is properly happening in the Central side. For example, if you are considered to compare with the advertisement data please make sure that according to the indexes correct values are assigned or not in Central. For example, w.r.t above advertisement data ScanReport.data[1]=0x01 , ScanReport.data[2]=0x05 , ScanReport.data[3]=0x03 , ScanReport.data[8]=0xFF ..... Thanks, P Yugandhar. |
|
|
|
yu1004402274 发表于 2018-8-15 09:27 你好, 谢谢。 最后的作品,我现在明白了为什么它不在第一。 我到此为止:CyBLY-GAPCSTOPTSCAN(); 之后,它应该产生:cyble_evt_gapc_scan_start_stop: 但它没有,我找不到原因。 我看着它在API文档也只说它生成此事件。 是否有某种条件让我不充实? 谢谢 克里斯 以上来自于百度翻译 以下为原文 Hi, thanks. It finally works and I understand now why it didn't at first. I come till the point: CyBle_GapcStopScan(); And after that it should generate: CYBLE_EVT_GAPC_SCAN_START_STOP: but it doesn't and I can't find why. I looked it up in the API Document but there it only says it generates this event. Is there some kind of condition to it that I don't fullfil? Thanks Chris |
|
|
|
你好,克里斯, 请确保cyble_processevents()函数调用或不连续。 谢谢, p YuangdHar。 以上来自于百度翻译 以下为原文 Hello Chris, Please make sure that CyBle_ProcessEvents() function is continuously calling or not. Thanks, P Yugandhar. |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2100 浏览 1 评论
1846 浏览 1 评论
3665 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1782 浏览 6 评论
1532 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
561浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
413浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
434浏览 2评论
380浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
907浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-20 20:50 , Processed in 1.085175 second(s), Total 100, Slave 84 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号