用dsp发现DA14580的问题

15 posts / 0 new
最后一篇文章
kaoutar
离线
最后一次见到:4 years 6 months ago
已加入:2016-03-30 10:16
用dsp发现DA14580的问题

Hi everybody,

我想知道在扫描和配对时,项目“设备”和“主机”的软代码是否有区别。我的目标是从DSPS应用程序进行扫描,发现主模式下的DA14580模块。我测试了一个“设备”项目,它出现在DSP上,但“主机”项目没有出现。

Is there any changes to make in the soft to scan it in DSPS?

Thanks for help

Device:
MT\u对话框
离线
最后一次见到:2个月5天前
工作人员
已加入:2015-06-08 11:34
嗨,考塔,

嗨,考塔,

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.

谢谢你的对话

kaoutar
离线
最后一次见到:4 years 6 months ago
已加入:2016-03-30 10:16
Hi 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
离线
最后一次见到:4 years 6 months ago
已加入:2016-03-30 10:16
Hi MT_Dialog,

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.

考塔尔

MT\u对话框
离线
最后一次见到:2个月5天前
工作人员
已加入:2015-06-08 11:34
嗨,考塔,

嗨,考塔,

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.

谢谢你的对话

shuixiu
离线
最后一次见到:4 years 8 months ago
已加入:2014-09-18 07:00
HI MT\u对话框

HI MT\u对话框
我有两个da14580设备,我想使用设备A的广告消息和设备B扫描广告,那么我如何才能扫描和获得设备A的广告?如果我只需要使用应用程序启动扫描?应用程序高级报告索引功能是什么意思?
thanks for your answer!

kaoutar
离线
最后一次见到:4 years 6 months ago
已加入:2016-03-30 10:16
HI MT\u对话框

HI MT\u对话框

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.

非常感谢。
考塔尔

MT\u对话框
离线
最后一次见到:2个月5天前
工作人员
已加入:2015-06-08 11:34
嗨,考塔,

嗨,考塔,

奇怪的字符很可能是因为您没有正确设置终端的流量控制设置(为硬件或软件流量控制选择正确的设置,您将能够看到正确的数据,也可以尝试使用不同的终端,如hercules或Tera Term)。我不太明白第二个问题,每个设备都有一个角色,这个角色是在设备启动时设置的,只要上层得到GAPM\u RESET操作,就会调用app\u easy\u configure()函数来设置设备作为外设的角色,中央等没有代码实现,您可以请求您的设备的功能,并通过uart打印设备的角色。

谢谢你的对话

MT\u对话框
离线
最后一次见到:2个月5天前
工作人员
已加入:2015-06-08 11:34
嗨,水秀,

嗨,水秀,

当您调用app\u start\u scanning()时,您的设备将开始连续扫描所有3个广告频道,当您的设备从外设获取广告字符串时,将调用app\u adv\u report\u ind\u func以通知您的应用程序已跟踪广告字符串。

谢谢你的对话

shuixiu
离线
最后一次见到:4 years 8 months ago
已加入:2014-09-18 07:00
谢谢你的对话

谢谢你的对话
我知道了,现在我可以开始扫描事件了。当我唤醒设备并启动扫描事件时,电流约为2.15mA(睡眠模式下的电流约为1.7uA),对吗?如果没有其他设备公布扫描事件,则继续大约5s~6s,然后停止?
Thank you for your answer

MT\u对话框
离线
最后一次见到:2个月5天前
工作人员
已加入:2015-06-08 11:34
嗨,水秀,

嗨,水秀,

请查看你的另一个帖子以获得答案http://support.dialog-semiconductor.com/current-start-scanning-event.

谢谢你的对话

kaoutar
离线
最后一次见到:4 years 6 months ago
已加入:2016-03-30 10:16
Hi MT_Dialog,

Hi MT_Dialog,

Thanks for your reply.
我会向你描述我的总体情况,以及我想做什么,希望能对我有所帮助。事实上,我有一个da14580开发包Basic,在电子地图中有一个目标da14580(主角色)。我想做的是修改目标内的软件与传感器通信(交换数据、温度、压力……),到目前为止,我已经修改了Keil上的代码,我想确保它工作良好,我必须使用超终端来显示数据。例如,如果我想在HyperTerminal的窗口上查看DA14580扫描的设备,我该怎么做?我得开始扫描,怎么做?如何搜索要显示的变量?我真的被封锁了很长一段时间,我在论坛和文件中搜索,但我找不到正确的轨道。

如果你能帮助我,我将非常感激。
谢谢考塔。

MT\u对话框
离线
最后一次见到:2个月5天前
工作人员
已加入:2015-06-08 11:34
嗨,考塔,

嗨,考塔,

让我们以显示广告数据为例,您可以启用UART2功能以打印数据,并使用arch\u printf将数据推送到终端上。在da1458x\u config\u basic.h中,定义CFG\u PRINTF以启用uart2功能(如果项目中未包含所有就绪,则还包括uart2.c)正确配置管脚,并在启用时将下面指示的代码替换为计划中的以下代码片段:

////////////////////////////////////code in the SDK//////////////////////////////////////

if (!app_asynch_trm())
break;

//SDK改进需要测试!!我们可以添加以下条件并移动
// it out of the loop
// we may consider putting it in before the app_asynch_trm
//if(GetBits16(CLK\u CTRL\u REG,RUNNING\u AT \u XTAL16M))

// execute the printf process
arch_printf_process();

////////////////////////////replace the code above with the code below/////////////////////////////////////
如果(app\u asynch\u trm())
{
继续;//再次调用rwip\u 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],
参数->report.adv_addr.addr[3],
参数->report.adv_addr.addr[2],
param->report.adv_addr.addr[1],
参数->report.adv_addr.addr[0]);

以便打印出广告设备的bd地址。

谢谢你的对话

kaoutar
离线
最后一次见到:4 years 6 months ago
已加入:2016-03-30 10:16
Hi MT_Dialog,

Hi MT_Dialog,

Thank you for your answer.
我在我的代码中应用了这些更改,但没有任何效果。我不知道如何显示我的da14580的状态,以及从我的da14580扫描的地址。我想我会在keil上试一下,因为我有兴趣找到这些变量的值:da14580的状态(如果是主机或设备模式),以及扫描的地址。如果我只使用Keil并运行调试器,我可以很好地显示变量及其值,我想知道在哪里查找我需要的这些变量。
我不知道你是否明白我的意思。

Thanks for your answer.
考塔。

MT\u对话框
离线
最后一次见到:2个月5天前
工作人员
已加入:2015-06-08 11:34
嗨,考塔,

嗨,考塔,

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.

谢谢你的对话