Problem To Discover DA14580 by DSPS

15 posts / 0 new
Last post
kaoutar
Offline
Last seen:4 years 6 months ago
Joined:2016-03-30 10:16
Problem To Discover DA14580 by DSPS

Hi everybody,

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.

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

Thanks for help

Device:
MT_dialog
Offline
Last seen:2 months 5 days ago
Staff
Joined:2015-06-08 11:34
Hi kaoutar,

Hi 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.

Thanks MT_dialog

kaoutar
Offline
Last seen:4 years 6 months ago
Joined:2016-03-30 10:16
Hi MT_dialog,

Hi MT_dialog,

Thanks for your request.
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: I'm using Keil.

Thanks.
Kaoutar

kaoutar
Offline
Last seen:4 years 6 months ago
Joined: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.

Kaoutar

MT_dialog
Offline
Last seen:2 months 5 days ago
Staff
Joined:2015-06-08 11:34
Hi kaoutar,

Hi 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.

Thanks MT_dialog

shuixiu
Offline
Last seen:4 years 8 months ago
Joined:2014-09-18 07:00
HI 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?
thanks for your answer!

kaoutar
Offline
Last seen:4 years 6 months ago
Joined:2016-03-30 10:16
HI MT_dialog

HI 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 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...
I am really beginner at this, and I try to ask more questions to understand that I lead on my project.

Thank you.
Kaoutar

MT_dialog
Offline
Last seen:2 months 5 days ago
Staff
Joined:2015-06-08 11:34
Hi 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

MT_dialog
Offline
Last seen:2 months 5 days ago
Staff
Joined:2015-06-08 11:34
Hi shuixiu,

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

shuixiu
Offline
Last seen:4 years 8 months ago
Joined:2014-09-18 07:00
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 ?
Thank you for your answer

MT_dialog
Offline
Last seen:2 months 5 days ago
Staff
Joined:2015-06-08 11:34
Hi shuixiu,

Hi shuixiu,

Please check your other post for the answerhttp://support.dialog-semiconductor.com/current-start-scanning-event.

Thanks MT_dialog

kaoutar
Offline
Last seen:4 years 6 months ago
Joined:2016-03-30 10:16
Hi MT_Dialog,

Hi MT_Dialog,

Thanks for your reply.
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.

MT_dialog
Offline
Last seen:2 months 5 days ago
Staff
Joined:2015-06-08 11:34
Hi 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():

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

if (!app_asynch_trm())
break;

//SDKIMPROVEMENTS Needs testing!! We can add the following condition and move
// 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())
{
continue; // so that rwip_schedule() is called again
}
else
{
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->report.adv_addr.addr[3],
param->report.adv_addr.addr[2],
param->report.adv_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

kaoutar
Offline
Last seen:4 years 6 months ago
Joined:2016-03-30 10:16
Hi MT_Dialog,

Hi MT_Dialog,

Thank you for your answer.
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.

Thanks for your answer.
Kaoutar.

MT_dialog
Offline
Last seen:2 months 5 days ago
Staff
Joined:2015-06-08 11:34
Hi kaoutar,

Hi 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.

Thanks MT_dialog