CodeLess AT+GAPSCAN finds nothing....

⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
13 posts / 0 new
Last post
janosn.
离线
Last seen:2 months 3 weeks ago
Joined:2020-11-16 14:59
CodeLess AT+GAPSCAN finds nothing....

Dear Support Team,

I installed the SDK with daughter board with the DA14531MOD dev.kit. I successfully flashedDodeless_531_SET_TWO_STASTALONE.BIN.

Issuing commands:

AT+ADVSTOP AT+CENTRAL AT+GAPSTATUS 1,0 OK AT+GAPSCAN SCANNING SCAN COMPLETE OK

It does not discover anything, however we have 3-4 Blutooth devices around.

我们想要阅读的设备之一是Ruuvi标签BLE BECON:

https://ruuvi.com/ruuvitag-specs/

谢谢....

PM_Dialog
离线
Last seen:1天17小时前
Staff
Joined:2018-02-08 11:03
Hi janosN,

Hi janosN,

感谢您在线问题,并为您的兴趣进行小模块BLE解决方案。

似乎AT命令的序列是正确的。您可以在BLE通用应用程序中找到这些设备吗?

Would it be possible to check this with another DA14531?

Thanks, PM_Dialog

janosn.
离线
Last seen:2 months 3 weeks ago
Joined:2020-11-16 14:59
Hi Dialog Staff,

Hi Dialog Staff,

Thanks for your answer. Regarding your first question: yes, I can find my devices with another scanner. I took my Raspberry Pi and installed a BLE-scanner. Here is the result:

PI @ RaspBerryPI:〜$ Sudo Blescan扫描设备......设备(新):64:1C:B0:89:2B:0E(公共),-94 DBM(不可连接)制造商:<75004204018060641CB0892B0661CB0892B0D01B91BAEA59500>设备(新):28:39:5E:3F:79:8E(公共),-48 dBm少量本地名称:'[TV]三星5系列(43)'标志:<1A>制造商:<75004204014128395CE3F798E2A395E3F798DFF00000000000000>设备(新闻):DF:C7:96:0D:31:89(随机),-57 dBm(不可连接)标志:<06>制造商:<990405146E4272BEAFC48010CFF40ADB6013940DFC7960D3189> PI @ RaspBerryPI:〜$

As you see, it finds three devices, whereas my DA14531MOD_devkit finds none.

Regarding your second question checking with other DA14531 modules; we have ordered 10 pieces of DA14531 TINY Modules. I want to flash a few modules to test the AT+GAPSCAN function. I will try all three CodeLess fw. I shall report you about the result....

Thank you for your support.

PM_Dialog
离线
Last seen:1天17小时前
Staff
Joined:2018-02-08 11:03
Hi janosN,

Hi janosN,

是的,请尝试将微小的模块配置为间隙外围设备,并告诉我是否充当Gap Central的模块可以在空中找到它。

Thanks, PM_Dialog

janosn.
离线
Last seen:2 months 3 weeks ago
Joined:2020-11-16 14:59
亲爱的pm_dialog,

亲爱的pm_dialog,

现在,正如我可以编程微小模块(感谢User:Cole),我正如您所建议的那样配置;作为中央和一个作为外围,现在中央可以扫描外围模块:

AT + Papscan扫描(*)48:23:35:35:35:00:72:77,P,类型:ADV,RSSI:-24(*)48:23:35:00:72:77,P,类型:ADV,RSSI:-21(*)48:23:35:00:72:77,P,类型:ADV,RSSI:-22扫描完成确定

所以,DA14531模块到另一个模块工作。但它仍然无法扫描其他任何东西。正如我之前提到的那样,我需要扫描BLE传感器广告温度,压力,湿度在制造的代码中编码如下:

PI @ RASPBERYPI:〜$ SUDO BLESCAN扫描设备...设备(新):DF:C7:96:0D:31:89(随机),-57 dBm(不可连接)标志:<06>制造商:<990405146E4272BEAFC48010CFF40ADB6013940DFC7960D3189> pi @ raspberypi:〜$

传感器协议描述于:

https://github.com/ruuvi/ruuvi-sensor-protocols/blob/master/dataformat_0...

I hardly believe that there is no CodeLess AT command solution for this. We don't even need BLE-connection to these sensors, just scan them. For CodeLess AT there are only 3 fw-versions and I tried all of them.

If no CodeLess scan possible, then what next?

Thank you very much in advance.

PM_Dialog
离线
Last seen:1天17小时前
Staff
Joined:2018-02-08 11:03
Hi janosN,

Hi janosN,

请你能在无附庸前的固件上做一个小变化,重新建立并运行它吗?

在user_on_adv_report_ind()中,请在if-stalal中执行以下更改:删除表演 &&

Initial :

if(show &&(param-> report.evt_type == 0x00 || Param-> Report.evt_type == 0x04)))//只有adv_ind和scan_response

Modified :

if ((param->report.evt_type == 0x00 || param->report.evt_type == 0x04)) // Only ADV_IND and SCAN_RESPONSE

Thanks, PM_Dialog

janosn.
离线
Last seen:2 months 3 weeks ago
Joined:2020-11-16 14:59
亲爱的pm_dialog,

亲爱的pm_dialog,

Thanks to the suggestion. I modified the file: user_codeless.c

Compiled the project without error. But the Linker reported error that the code size exceeded the limit.

linking... .\out_531\codeless_531_datapump.axf: error: L6050U: The code size of this image (32792 bytes) exceeds the maximum allowed for this version of the linker. Not enough information to produce a SYMDEFs file. Finished: 1 information, 0 warning, 0 error and 1 fatal error messages.

I compiled with maximum optimization O3 (Level 3).

Either I need a license from Keil, or another option would be that Dialog is so kind and sends me the hex file.

Thank you very much in advance.

PM_Dialog
离线
Last seen:1天17小时前
Staff
Joined:2018-02-08 11:03
Hi janosN,

Hi janosN,

Let me check it and I’ll get back to you.

Thanks, PM_Dialog

sfuentes-digi
离线
Last seen:2个月1周前
Joined:2021-01-18 09:26
Any solution?

Any solution?

PM_Dialog
离线
Last seen:1天17小时前
Staff
Joined:2018-02-08 11:03
嗨sfuentes-digi,

嗨sfuentes-digi,

Please see my previous comment. A modification should be done in the user_on_adv_report_ind().

Thanks, PM_Dialog

sfuentes-digi
离线
Last seen:2个月1周前
Joined:2021-01-18 09:26
Hi PM_Dialog,

Hi PM_Dialog,

Thank you for responding so quickly but I mean if there is any solution to compile the file.

I have the same error, there is another program for compilation or other way?

感谢。

janosn.
离线
Last seen:2 months 3 weeks ago
Joined:2020-11-16 14:59
Dear PM-Dialog,

Dear PM-Dialog,

亲爱的Sfentes-Digi,

Below I write in more details about CodeLessat +帕普斯坎issue. My problems at the beginning were the following:

  1. It scanned nothing else but only other Dialog-peripheral devices
  2. 从对话框收到修改建议后,它会扫描更多的外围设备。但它没有扫描Itemetry数据所需的某些信标设备。
  3. 它没有显示测量数据编码的实际原始数据。它仅列出了地址,类型和RSSI数据。
  4. How to compile the project with Keil-demo license, even the original CodeLess project was too large for Keil linker.

NR.1解决了:建议遗漏的对话表演 &&喜欢:

if(show &&(param-> report.evt_type == 0x00 || param-> report.evt_type == 0x04)))//只有adv_ind和scan_response * /

至:

if((param-> eport.evt_type == 0x00 || param-> report.evt_type == 0x04)))//仅adv_ind和scan_response * /

解决NR.2:

检查上面的代码很清楚param-> eport.evt_type.is responsible what kind of advertising is accepted by AT+GAPSCAN. So, I was looking for another file which describes these types. It was really hard to locate the following header file:... \ common \ api \ co_bt.h; Here the lines 1340-1355:

///广告HCI类型

枚举

{

///Connectable Undirected advertising

adv_conn_undir = 0x00,

///可连接的高占空比定向广告

ADV_CONN_DIR,

///Discoverable undirected advertising

ADV_DISC_UNDIR,

///Non-connectable undirected advertising

ADV_NONCONN_UNDIR,

///Connectable low duty cycle directed advertising

ADV_CONN_DIR_LDC,

///枚举终端值用于广告类型值检查

ADV_END

};

In this enumeration from 0x00-0x05 there are different types we can choose. So, I needed onlyADV_NONCONN_UNDIR(0x03值)因为遥测信标识宣传不可连接的无向数据包。您可以阅读更多关于广告类型的信息:

https://www.novelbits.io/bluetooth-low-energy-advertisements-part-1/(scroll to the middle of the page…) So, I further modified the function to:

if ((param->report.evt_type == 0x03)) // Only ADV_NONCONN_UNDIR

Now all beacon devices were listed and others are filtered out.

最后一个问题:我的原始数据在哪里信标应该像温度,气压,湿度,x-y z加速,电池电压一样传输?

解决NR.3:

For this you need to further modify the function to

char avd_rep_str [260];/ *原始40 * // * orig * / / *“(%c)%02x:%02x:%02x:%02x:%02x:%02x,%c,类型:%s,rssi:%d \ r\ n“* // *已更改* / / *”(%c)%02x:%02x:%02x:%02x:%02x:%02x,%c,类型:%s,rssi:%d \ r \nrawdata-length:\ r \ n%d \ r \ n“* / arch_sprintf(avd_rep_str,%c)%02x:%02x:%02x:%02x:%02x:%02x,%c,type:%S,RSSI:%d,RAWDATA-长度:%d \ r \ n”个“RAWDATA(十六进制):%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X“;“%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02X;%02x;%02x;%02x;%02x;%02x;%02x;%02x“”\ r \ n“,dodeless_service,param-> report.adv_addr.addr [5],param-> eport.addr [5],[4param-> eport.addr.ddr [3],param-> eport.addr.addr [2],param-> report.addr.addr [1],param-> eport.addr.ddr [0],address_type,type_str,param->报告.rssi  -  255,sizeof(param-> report.data),param-> report.data [0],param-> report.data [1],param-> report.data [2],Param-> Report.Data [3],Param-> Report.Data [4],Param-> Report.Data [5],Param-> Report.Data [6],Param-> Report.Data [7],Param-> Report.Data [8],Param-> ReporT.Data [9],Param-> Report.Data [10],Param-> Report.Data [11],Param-> Report.Data [12],Param-> Report.Data [13],Param->Report.Data [14],Param-> Report.Data [15],Param-> Report.Data [16],Param-> Report.Data [17],Param-> Report.Data [18],Param->Report.Data [19],Param-> Report.Data [20],Param-> Report.Data [21],Param-> Report.Data [22],Param-> Report.Data [23],Param->Report.Data [24],Param-> Report.Data [25],Param-> Report.Data [26],Param-> Report.Data [27],Param-> Report.Data [28],Param->Report.Data [29],Param-> Report.Data [30]);send_to_local(adv_rep_str);

您在这里看到Param-> Report.Data [30]是原始数据阵列中的最后一个字节。当然,Adv_rep_str [40]的原始大小还不够,现在是260

char avd_rep_str [260];/* original 40*/

The above code is a bit ugly; I could have written in more elegant way in a loop, but it works, I do it later…

解决NR.4:我有一个30天的keil许可证到期。我需要一种减少代码大小的方法。看到我之前的主题:CODELESS Project Size Reducing - Problem Solved....

在这里,我发现了2行user_at_commands.h你可以评论出更多的房间:

//#定义USE_AT_CONPAR//#define USE_AT_BND是有效的链接之后,代码大小代表orted is:27812(对于Dodeless_531_DataPump)。所以,我现在可以在没有额外的KEIL许可证的情况下编译项目。“

这是一个很长的解释,但我认为你可以解决你的AT +烟道问题。整个修改的功能我拉链和封闭在一起显示结果。

Thanks to Dialog for the support.

Good luck and good health!

问候,

Janos N.

Attachment:
sfuentes-digi
离线
Last seen:2个月1周前
Joined:2021-01-18 09:26
Thanks so much for the help.

Thanks so much for the help. Now I can see my devices.

为了编译我必须在user_at_command.h中发表更多的行,只评论你指示的两种增加了增加了程序的大小。
我非常感谢您对您的信息回复的时间,这很有帮助。

问候。