The host project can't be discovered, its a scanner, it role is to scan and discover other devices (devices that act as peripherals and advertise), you wont be able to discover a central from another central.
感谢您的要求。 as I want to read data from the exchanged DA14580 , I have one more solution which is to use an hypermterminal to display the variables . for this I know that I have to use a UART cable , but I don't know how to open this hyperterminal or how to introduce controls and where I can find them. have you any idea?
After some research I Know that I have to use an hyperterminal named Tera Term. And when I use the uart cable , I can't see anything on the window of the Hyperterminal . I don't know how to display characters down there. and I want also to know what are the controls on keil that allow me to change the shape of the characters displayed in hexadecimal in ASCII.
Yes, Tera Term is a terminal you can use with the DSPS in order to check the transfered data, please check the instructions in the DSPS application note in order to correctly setup the demo and check your connections. Make sure that you use the correct setup (HW/SW flow control at your PC on the Tera Term in order to properly display the data). In order to change the character settings its a matter of your terminal and has nothing to do with keil, the terminal is going to translate the data that you are sending either as ascii or hexadecimal data.
for the connection tera term , I use the document " DA14580_581_583 Smart Bluetooth development kit -Basic " I did everything as shown in the document , but I see strange characters that are displayed on the hyperterminal, i don't know how to read this data.
我还想知道,例如如何显示与设备状态相对应的变量,如何显示符合扫描仪模块的变量...... I am really beginner at this, and I try to ask more questions to understand that I lead on my project.
Thanks for your reply. 我会向你描述我的整体情况,我想做什么,希望能帮助我。实际上,我有一个DA 14580开发套件基本,具有目标BLE DA 14580(主角色)放置在电子地图中。我想做的是修改目标内的软件以与传感器通信(交换数据,温度,压力......),到目前为止我已修改了Keil上的代码,我希望确保它运行良好,我有使用超终端显示数据。例如,如果我想在超级终端的窗口上查看扫描设备,我怎样才能做到?我必须开始扫描,怎么样?以及如何搜索变量显示?我真的被封锁了很长时间,我已经在论坛和文件中搜索,但我找不到正确的赛道。
////////////////////////////////////code in the SDK//////////////////////////////////////
if (!app_asynch_trm()) break;
// sdkimprovements需要测试!!我们可以添加以下条件并移动 // it out of the loop // we may consider putting it in before the app_asynch_trm // if(getbits16(clk_ctrl_reg,running_at_xtal16m))
// execute the printf process arch_printf_process();
////////////////////////////replace the code above with the code below///////////////////////////////////// if(app_asynch_trm())) { 继续;// rwip_schedule()再次调用 } 别的 { arch_printf_process(); break; } }
After you ve done that, you can place in the user_on_adv_report_ind() (the callback that will be issued whenever you have an advertising message) the following snippet.
Thank you for your answer. 我应用了代码中的那些更改,没有任何工作。我不知道如何显示DA14580的状态,并从DA14580扫描的地址。我想我会在Keil上尝试它,因为我有兴趣找到这些变量的值:DA14580的状态如果它是主机或设备模式,并且扫描地址。如果我只使用keil并且我运行调试器,我可以很好地显示变量及其值,我想确切地了解我需要的这些变量的位置。 我不知道你是否得到了我的意思。
The instructions i mentioned above is in order to print the data in your UART port. If you just want to check the variable's values in keil you should reduce the optimization level from keil (just hit the options for target button, select the C/C++ tab, and change your optimization level to -O0 or -O1). Regarding where to look, when your host finds an advertising string, the user_on_adv_report() callback will be invoked, and the advertising string that your device tracked will be indicated in the param pointer. That pointer points to a gapm_adv_report_ind struct and the tracked bd address will be located in the param->report.adv_addr.addr member. Regarding the fact that it doesn't work, the printing functionallity in DSPS uses UART2 module and the UART2 module is mapped on different pins on DSPS since UART1 module is used for the application. With only the above implementation and the CFG_PRINTF definition in the da1458x_config_basic.h (without placing the printf commands, since the user_on_adv_report() has allready the specified commands) you will be able to print the bd address of the scanned device.
嗨Kaoutar,
The host project can't be discovered, its a scanner, it role is to scan and discover other devices (devices that act as peripherals and advertise), you wont be able to discover a central from another central.
谢谢mt_dialog.
Hi MT_dialog,
感谢您的要求。
as I want to read data from the exchanged DA14580 , I have one more solution which is to use an hypermterminal to display the variables . for this I know that I have to use a UART cable , but I don't know how to open this hyperterminal or how to introduce controls and where I can find them.
have you any idea?
PS:我正在使用Keil。
Thanks.
kaoutar.
Hi MT_Dialog,
After some research I Know that I have to use an hyperterminal named Tera Term. And when I use the uart cable , I can't see anything on the window of the Hyperterminal . I don't know how to display characters down there.
and I want also to know what are the controls on keil that allow me to change the shape of the characters displayed in hexadecimal in ASCII.
Thanks for your help.
kaoutar.
嗨Kaoutar,
Yes, Tera Term is a terminal you can use with the DSPS in order to check the transfered data, please check the instructions in the DSPS application note in order to correctly setup the demo and check your connections. Make sure that you use the correct setup (HW/SW flow control at your PC on the Tera Term in order to properly display the data). In order to change the character settings its a matter of your terminal and has nothing to do with keil, the terminal is going to translate the data that you are sending either as ascii or hexadecimal data.
谢谢mt_dialog.
嗨mt_dialog.
我有两个DA14580设备,我想使用设备广告消息和设备B扫描广告,所以我如何扫描并获得设备A的广告?如果我只需要使用app_start_scanning?什么是app_adv_report_ind_func的方法?
thanks for your answer!
嗨mt_dialog.
Thanks for your answer.
for the connection tera term , I use the document " DA14580_581_583 Smart Bluetooth development kit -Basic " I did everything as shown in the document , but I see strange characters that are displayed on the hyperterminal, i don't know how to read this data.
我还想知道,例如如何显示与设备状态相对应的变量,如何显示符合扫描仪模块的变量......
I am really beginner at this, and I try to ask more questions to understand that I lead on my project.
谢谢你。
kaoutar.
嗨Kaoutar,
奇怪的字符最可能是因为您尚未正确设置终端的流量控制设置(选择HW或SW流量控制的正确设置,您将能够看到适当的数据,您也可以尝试使用其他终端(如Hercules)或TERA术语)。我没有完全得到第二个问题,每个设备都有一个角色,当设备开始时,可以设置此角色,一旦上层获取GapM_Reset操作,调用app_easy_configure()函数以便设置设备的角色,作为一个外设,中央等。没有代码实现,您可以请求设备的功能并通过UART打印设备的角色。
谢谢mt_dialog.
嗨水秀,
当您调用app_start_scanning()您的设备将在所有3个广告频道中开始扫描,当您的设备从外围设备获取广告字符串时,将调用app_adv_report_ind_func以便通知您的应用程序追踪广告字符串。
谢谢mt_dialog.
谢谢mt_dialog.
我有它,现在我可以开始扫描事件。当我唤醒设备并启动扫描事件时,电流约为2.15mA(在睡眠模式下电流约为1.7ua),是正确的吗?如果没有其他设备宣传扫描事件继续大约5s〜6s然后停止?
Thank you for your answer
嗨水秀,
请检查你的其他文章的答案http://support.dialog-semicondiondiondum/current-start-scanning-event.。
谢谢mt_dialog.
Hi MT_Dialog,
Thanks for your reply.
我会向你描述我的整体情况,我想做什么,希望能帮助我。实际上,我有一个DA 14580开发套件基本,具有目标BLE DA 14580(主角色)放置在电子地图中。我想做的是修改目标内的软件以与传感器通信(交换数据,温度,压力......),到目前为止我已修改了Keil上的代码,我希望确保它运行良好,我有使用超终端显示数据。例如,如果我想在超级终端的窗口上查看扫描设备,我怎样才能做到?我必须开始扫描,怎么样?以及如何搜索变量显示?我真的被封锁了很长时间,我已经在论坛和文件中搜索,但我找不到正确的赛道。
如果你可以帮助我,我会非常感激。
谢谢Kaoutar。
嗨Kaoutar,
让我们以显示广告数据为例,您可以启用UART2功能以打印出数据并使用ARCH_PRINTF以推动终端上的数据。在da1458x_config_basic.h中,定义CFG_PrintF以启用UART2函数(如果项目中包含的UART2.c,如果项目中包含的UART2.c)正确配置,请在Schedule_While_ble_On()中使用以下代码替换下面指示的代码:
////////////////////////////////////code in the SDK//////////////////////////////////////
if (!app_asynch_trm())
break;
// sdkimprovements需要测试!!我们可以添加以下条件并移动
// it out of the loop
// we may consider putting it in before the app_asynch_trm
// if(getbits16(clk_ctrl_reg,running_at_xtal16m))
// execute the printf process
arch_printf_process();
////////////////////////////replace the code above with the code below/////////////////////////////////////
if(app_asynch_trm()))
{
继续;// rwip_schedule()再次调用
}
别的
{
arch_printf_process();
break;
}
}
After you ve done that, you can place in the user_on_adv_report_ind() (the callback that will be issued whenever you have an advertising message) the following snippet.
arch_printf("Connect with %02x %02x %02x %02x %02x %02x",
param->report.adv_addr.addr[5],
param->report.adv_addr.addr[4],
param-> eport.adddr.addr [3],
param-> eport.adddr.addr [2],
param->report.adv_addr.addr[1],
param-> report.adddr.addr [0]);
为了打印出广告的设备的BD地址。
谢谢mt_dialog.
Hi MT_Dialog,
Thank you for your answer.
我应用了代码中的那些更改,没有任何工作。我不知道如何显示DA14580的状态,并从DA14580扫描的地址。我想我会在Keil上尝试它,因为我有兴趣找到这些变量的值:DA14580的状态如果它是主机或设备模式,并且扫描地址。如果我只使用keil并且我运行调试器,我可以很好地显示变量及其值,我想确切地了解我需要的这些变量的位置。
我不知道你是否得到了我的意思。
Thanks for your answer.
Kaoutar。
嗨Kaoutar,
The instructions i mentioned above is in order to print the data in your UART port. If you just want to check the variable's values in keil you should reduce the optimization level from keil (just hit the options for target button, select the C/C++ tab, and change your optimization level to -O0 or -O1). Regarding where to look, when your host finds an advertising string, the user_on_adv_report() callback will be invoked, and the advertising string that your device tracked will be indicated in the param pointer. That pointer points to a gapm_adv_report_ind struct and the tracked bd address will be located in the param->report.adv_addr.addr member. Regarding the fact that it doesn't work, the printing functionallity in DSPS uses UART2 module and the UART2 module is mapped on different pins on DSPS since UART1 module is used for the application. With only the above implementation and the CFG_PRINTF definition in the da1458x_config_basic.h (without placing the printf commands, since the user_on_adv_report() has allready the specified commands) you will be able to print the bd address of the scanned device.
谢谢mt_dialog.