Hi
1).How to list out all the BLE devices that are advertising in our DSPS (v_5.150.2) host program.
2). After listing all the devices in Host, I need to connect to a particular device by selecting that device.Please suggest where the changes are to be made in the BLE host program.
我正在使用da14580 pro套件。
Please refer some links regarding this or example projects or documents
设备:
Hi RatheeshT,
1)每次都会暗示您可以只打印数据时,DSPS应用程序在user_od_adv_report_ind()中实现了ARCH_PRINF()函数,只要您在DA1458x_config_basic.h中定义了CFG_PRINTF定义文件(也可以打印您还需要额外修改它在此帖子中指示https://support.dialog-semicondiondiondum/forums/post/dialog-smartbond-bl ...)
2)如果您想拥有这种功能,那么您应该有一个数组将发现的设备放置并在扫描过程期间将索引分配给每个发现的设备(扫描过程作为中央持续10秒的中央持续时间)。关于打印何时会发生,这取决于您希望如何实现它(扫描期间或扫描完成时)。没有完全托管的例子,具有这种功能,但是邻近监视器Windows应用程序确实如此(在Windows上),也许这将为您提供一些想法。
Thanks MT_dialog
Hi
当我列出设备地址时,即可两次获取单个设备地址。为什么它发生了如此,如何解决它。
Hi RatheeshT,
The scan command message has an option configured by the .filter_duplic member of the user_scan_conf, that member takes as a value SCAN_FILT_DUPLIC_EN or SCAN_FILT_DUPLIC_DIS. So if the configure the SCAN_FILT_DUPLIC_EN for the current scan (that lasts for about 8 seconds - it timesout automatically) there wont be duplicated devices (unless the advertising devices are more than 10). So if you have this option enabled and you get the same address on each scan that is normal and you will need an additional filter implemented by your application in order to filter the advertising devices out that will be independent from the instance of the scanning procedure.
Thanks MT_dialog
嗨mt_dialog,
1. ok, it is already in SCAN_FILT_DUPLIC_EN mode only but i am not able to understand the last sentence of your previous post
i.e. ""you will need an additional filter implemented by your application in order to filter the advertising devices out that will be independent from the instance of the scanning procedure.".
你可以用更多细节描述它吗?
I have two DIALOG BLE and three other BLE's .
2.此外,它只列出一个设备地址,但我们的期望是,它应该发现所有设备地址。
我用下面的设置运行ble
HOST settings : (scaning)
GAP_GEN_DISCOVERY
scan_allow_adv_all.
GAPM_CONNECTION_SELECTIVE.
设备设置:(广告)
GAP_GEN_DISCOVERABLE
gap_peripheral_slv.
ADV_ALLOW_SCAN_ANY_CON_ANY
你能提供你的建议吗?
Hi RatheeshT,
1. The scan procedure has a timeout (about 8 seconds), so for one scan operation the device scans for about 8 seconds and in those 8 seconds you should not see duplicated devices (as long as you have the SCAN_FILT_DUPLIC_EN). In case that you would like to scan for a longer amount of time, that means that you should restart the scanning operation on each timeout, thus in every scan you will get the devices that are reported from the previous scan. If you would like to avoid this you should apply a filter in application level that will prevent printing devices that are allready reported. That means that you would have to create an array on which you will store the devices that you ve picked up in previous scans and check each advertising indication (each db address) against the entries of the array in order to avoid printing devices that are found in previous scans.
2.我没有看到你的设置有什么问题,是范围内的广告设备吗?如果在中央扫描时检查外围设备是否是广告的(减少广告间隔,以便广告客户更频繁地发送广告字符串并减少扫描窗口和间隔,以便中央更频繁地扫描广告频道),在空中的噪音也可以防止中央从外围获取广告指示。此外,由于您只能从一个设备中获取一个广告字符串,以防user_on_adv_report_ind()中有任何if()条件,该条件会检查广告消息中的特定字符串(如果您从它使用的DSP复制user_on_adv_report_ind()验证外围设备在广告字符串中具有特定序列的条件)。
Thanks MT_dialog
嗨对话框
Thank you
I am able to list out the advertising devices. The scanning starts immediately after the initialization but i need to scan the device with the command scan or even connect using the command to connect to other devices by selecting. I am using uart2. I referred to the example uart2_async.I made the changes as
mode-arch_sleep_off.
连接端口1引脚2和端口1 PIN3。
ARCH_PRINTF工作,但我无法接收任何命令并给出响应。
我的代码更改了
void user_on_set_dev_config_complete( void )
{
//在数据库中添加第一个必需的服务
if(app_db_init_start()))
{
uart2_read_in_progress = 1;
uart2_read (b (uint8_t *)uffer, READ_CHAR_COUNT, uart2_read_completion_cb);
while (uart2_read_in_progress);
buffer[READ_CHAR_COUNT]=0;
//arch_printf("working");
arch_printf(buffer);
//
// uart2_print_string(缓冲区);
//user_scan_start();
}
}
the code is to check for the receive only..but it doesnt receive any data. Actually the received data has to be compared and if the command is scan then the host should start scanning and same for the connection.
Kindly help me to solve the issue.
Hi RatheeshT,
您确定设备是否未收到数据?当您在read_char_count中声明的数据量时,应发生UART2_READ_Completion_cb()函数,因此在键入终端中的特定数据量时,请检查调用回调是否会调用回调。此外,因为i VE测试了代码,所以需要将UART_READ_IN_PROGREST变量设置为易失性以便工作。
Thanks MT_dialog