大家好你们好,
I want to know if there is a difference between the soft code of the project "Device" and "Host" at the scan and pairing. My objective is to do a scan from the DSPS application and discover the module that is DA14580 in master mode. I tested a "Device" project , It appears on DSPS , but the "host" project doesn't appear.
在软件下扫描它是否有任何更改可以在DSP中扫描?
感谢帮助
设备:
Hi kaoutar,
无法发现主机项目,它的扫描仪,它的角色是扫描并发现其他设备(充当外围设备的设备和通告),您不会发现来自另一个中心的中央。
Thanks MT_dialog
嗨mt_dialog,
Thanks for your request.
由于我想从交换的DA14580读取数据,我还有一个解决方案,它是使用高端锤来显示变量。为此,我知道我必须使用一个UART电缆,但我不知道如何打开这个超级终端或如何介绍控件以及我可以找到它们的位置。
你有什么想法吗?
PS: I'm using Keil.
谢谢。
Kaoutar
嗨mt_dialog,
在一些研究之后,我知道我必须使用超级名为TERA术语。当我使用UART电缆时,我在超级终端的窗口上看不到任何东西。我不知道如何在那里显示字符。
我也希望知道Keil上的控件是什么允许我在ASCII中更改在十六进制中显示的字符的形状。
谢谢你的帮助。
Kaoutar
Hi kaoutar,
是的,TERA术语是一个终端您可以与DSP一起使用,以检查转移数据,请检查DSPS应用程序注意中的说明,以便正确设置DEMO并检查您的连接。确保您在TERA术语上使用正确的设置(在PC上的HW / SW流量控制,以便正确显示数据)。为了更改终端的字符设置并与Keil无关,终端将转换为ASCII或十六进制数据发送的数据。
Thanks MT_dialog
HI MT_dialog
i have two da14580 device,and i want to use device A advertise message and device B scan advertisment ,so how i can scan and get device A's advertisment ? if i just need to use app_start_scanning? and what's means about app_adv_report_ind_func?
感谢您的回答!
HI MT_dialog
感谢您的回答。
对于连接TERA术语,我使用文件“da14580_581_583 -basic”我做了一切,如文档所示,但我看到奇怪的字符显示在超级终端上,我不知道如何阅读这个数据。
I also want to know for example how to display the variable that corresponds to the state of the device , how to display variables that match the scanner module...
我真的很初学,我试图提出更多问题来了解我的项目领导。
Thank you.
Kaoutar
Hi Kaoutar,
奇怪的字符是最可能是因为you haven't set properly your terminal's flow control settings (choose the proper setting for HW or SW flow control and you will be able to see proper data, also you can try with a different terminal like hercules or Tera Term). I dont quite get the second question, each device has a role, this role is set when the device starts, as soon as the upper layers get the GAPM_RESET operation the app_easy_configure() function is called in order to set the device's role, as a peripheral, central etc. There is no code implementation that you can request the function of your device and print the role of the device via uart.
Thanks MT_dialog
Hi shuixiu,
When you invoke the app_start_scanning() your device will start to scan in all 3 advertising channels continuously, when your device gets an advertising string from a peripheral the app_adv_report_ind_func will be called in order to inform your application that an advertising string is traced.
Thanks MT_dialog
Thanks MT_dialog
i have got it,now i can start scanning event. when i wake up the device and start a scanning event , the current is about 2.15mA(which current is about 1.7uA in sleep mode),is this right? if no other device advertise the scanning event continue about 5s~6s then stop ?
谢谢您的回答
Hi shuixiu,
请检查您的其他帖子以获得答案http://support.dialog-semiconductor.com/current-start-scanning-event。
Thanks MT_dialog
嗨mt_dialog,
感谢您的回复。
I will describe you my overall situation, and what I want to do, hoping to help me. In fact , I have a DA 14580 development kit Basic, with a target BLE DA 14580 ( master role ) placed in an electronic map. what I want to do is modify the software within the target to communicate with a sensor (exchange data , temperature , pressure ...) , so far I have modified the code on Keil and I want to ensure that it works well , I have to use an hyper terminal to display the datas. for example if I want to view the scanned devices by DA14580 on the window of hyper terminal, how can I do it? I have to start a scan, and how? and how to search the variables to display? I'm really blocked for a long time , I have searched in the forum and documents but I can't find the right track.
If you can help me I would be really grateful.
Thanks Kaoutar.
Hi kaoutar,
Lets take the displaying of the advertising data as an example, you can enable the UART2 feature in order to print out data and use the arch_printf in order to push the data on a terminal. In the da1458x_config_basic.h define the CFG_PRINTF in order to enable the uart2 functionallity (also include the uart2.c if not allready included in the project) configure your pins properly and replace the the code indicated below with following snippet in the schedule_while_ble_on():
////////////////////////////////////////////////////////////////////////////////////////////
if(!app_asynch_trm())
休息;
//SDKIMPROVEMENTS Needs testing!! We can add the following condition and move
//它从循环中出来
//我们可以考虑在app_asynch_trm之前把它放在
//if (GetBits16(CLK_CTRL_REG, RUNNING_AT_XTAL16M))
//执行printf进程
ARCH_PRINTF_PROCESS();
///////////////////////////////替换上面的代码:使用以下代码////////////////////////////////////////////////////
if (app_asynch_trm())
{
continue; // so that rwip_schedule() is called again
}
else
{
ARCH_PRINTF_PROCESS();
休息;
}
}
完成后,您可以放在User_On_Adv_report_ind()中(每当您提供广告信息时会发出的回调)以下代码段。
ARCH_PRINTF(“连接%02x%02x%02x%02x%02x%02x”,
param-> eport.adddr.addr [5],
param-> eport.addr.addr [4],
param->report.adv_addr.addr[3],
param->report.adv_addr.addr[2],
param-> eport.addr.addr [1],
param->report.adv_addr.addr[0]);
In order to print out the bd address of the device that was advertising.
Thanks MT_dialog
嗨mt_dialog,
谢谢您的回答。
I applied those changes in my code and nothing works. I don't know how to display the state of my da14580, and the address scanned from My da14580. I think I'll try it on keil only because I have interest in finding the values of these variables: State of da14580 if it's a host or a device mode, and scanned addresses. if I use only Keil and I run the debugger, I can well display the variables and their values, I want to know exactly where to look for these variables that I need.
I don't know if you get what I mean.
感谢您的回答。
Kaoutar.
Hi kaoutar,
我提到的指令是为了在UART端口中打印数据。如果您只想检查Keil中的变量的值,则应减少与keil的优化级别(只需点击目标按钮的选项,请选择C / C ++选项卡,然后将优化级别更改为-O0或-O1)。关于查看的位置,当您的主机找到一个广告字符串时,将调用user_on_adv_report()回调,以及您的设备跟踪的广告字符串将在参数指针中指示。该指针指向Gapm_adv_report_ind struct和跟踪的BD地址将位于Param-> Report.addr.addr成员中。关于它不起作用的事实,DSP中的打印功能使用UART2模块,UART2模块映射到DSP上的不同引脚,因为UART1模块用于应用程序。只有上面的实现和DA1458x_config_basic.h中的cfg_printf定义(如果没有放置printf命令,因为user_on_adv_report()已经allready指定的命令),您将能够打印扫描设备的BD地址。
Thanks MT_dialog