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:3个月1周前
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 flashedcodeless_531_set_two_standalone.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/

Thanks....

PM_Dialog
离线
Last seen:2天2小时前
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:3个月1周前
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:2天2小时前
Staff
Joined:2018-02-08 11:03
Hi janosN,

Hi janosN,

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

Thanks, PM_Dialog

janosn.
离线
Last seen:3个月1周前
Joined:2020-11-16 14:59
亲爱的pm_dialog,

亲爱的pm_dialog,

Now, as I can program the TINY modules (thanks to user: cole), I configured as you suggested; one as central and one as peripheral and now the central can scan the peripheral module:

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:2天2小时前
Staff
Joined:2018-02-08 11:03
Hi janosN,

Hi janosN,

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

In the user_on_adv_report_ind() please do the following change in the if-statement : remove theshow &&

Initial :

if (show &&(param->report.evt_type == 0x00 || param->report.evt_type == 0x04)) // Only ADV_IND and 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:3个月1周前
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:2天2小时前
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 months 4 weeks ago
Joined:2021-01-18 09:26
Any solution?

Any solution?

PM_Dialog
离线
Last seen:2天2小时前
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 months 4 weeks ago
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:3个月1周前
Joined:2020-11-16 14:59
Dear PM-Dialog,

Dear PM-Dialog,

Dear Sfuentes-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解决了: what Dialog suggested to leave outshow &&喜欢:

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:

examining the code above it was clear thatparam-> 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:

///Advertising HCI Type

枚举

{

///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 adv_rep_str [260];/ * 40 * / / *源自原始* / /* "(%c) %02X:%02X:%02X:%02X:%02X:%02X,%c, Type: %s, RSSI:%d\r\n" */ /*changed*/ /* "(%c) %02X:%02X:%02X:%02X:%02X:%02X,%c, Type: %s, RSSI:%d\r\nRawData-length:\r\n %d\r\n" */ arch_sprintf(adv_rep_str, "(%c) %02X:%02X:%02X:%02X:%02X:%02X,%c, Type: %s, RSSI:%d, RawData-lenght:%d\r\n" " RawData(hex): %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", codeless_service, param->report.adv_addr.addr[5], param->report.adv_addr.addr[4], param->report.adv_addr.addr[3], param->report.adv_addr.addr[2], param->report.adv_addr.addr[1], param->report.adv_addr.addr[0], address_type, type_str, param->report.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 adv_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:I had a 30-day license from Keil which expired. I needed a way to reduce the code-size. See my previous topic:CODELESS Project Size Reducing - Problem Solved....

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

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

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

Thanks to Dialog for the support.

Good luck and good health!

Regards,

Janos N.

Attachment:
sfuentes-digi
离线
Last seen:2 months 4 weeks ago
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中发表更多的行,只评论你指示的两种增加了增加了程序的大小。
我非常感谢您对您的信息回复的时间,这很有帮助。

Regards.