how could I use AD14580 to develop some BLE applications

9 posts / 0 new
Last post
12ycli
Offline
Last seen:5年11个月前
加入:2015-05-20 09:14
how could I use AD14580 to develop some BLE applications

Hi,
Recently I was using AD14580 to develop some BLE applications.Now I met some problems.I can't get any development.
At first,I learned some periphrals,such as timer,spi.They works well.Then I run some BLE examples on DA14580.They also works.But I can't understand the software architecture even I read some pdf file like UM-B-015_DA14580 Software architecture v4.0 or UM-B-003 Software Development Guide 1.4 for several days.
Now I only know a little about RW,profile.I prepare to read some books about BLE to see whether it can become better .
My goal is to know how to write or adapte a proflie myself according to my own application.how could I do that?
By the way,I want to ask a specific software problem.I found a example on the Internet.It can send the same bytes through BLE when it receive some bytes.The function below plays a leading role.It is in streamdatad_task.c,one of the profiles.I don't know how it works.I can't fine any information about some function it calls like attmdb_att_set_value, atts_write_rsp_send,attmdb_att_update_value.This makes me desprate and more confused.
/**
****************************************************************************************
* @brief Handles reception of the @ref GATT_WRITE_CMD_IND message.
* The handler checks if the stream needs to be turned on.
* @param[in] msgid Id of the message received (probably unused).
* @param[in] param Pointer to the parameters of the message.
* @param[in] dest_id ID of the receiving task instance (probably unused).
* @param[in] src_id ID of the sending task instance.
* @return If the message was consumed or not.
****************************************************************************************
*/
static int gattc_write_cmd_ind_handler(ke_msg_id_t const msgid,
struct gattc_write_cmd_ind const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
// Update the attribute value
char ValueBuf[20]={0};
/ * * /
switch (STREAMDATAD_IDX(param->handle))
{
case STREAMDATAD_IDX_ENABLE_VAL:
attmdb_att_update_value(param->handle, param->length, param->offset,
(uint8_t*)&(param->value[0]));
atts_write_rsp_send(streamdatad_env.conhdl, param->handle, PRF_ERR_OK);

memcpy(ValueBuf,&(param->value),param->length);

attmdb_att_set_value(STREAMDATAD_DIR_VAL_HANDLE(0), param->length, (uint8_t*)&(param->value[0]));
prf_server_send_event((prf_env_struct *)&(streamdatad_env.con_info), false, STREAMDATAD_DIR_VAL_HANDLE(0));

if(ValueBuf[0] =='1' )
{
GPIO_SetActive(GPIO_PORT_1, GPIO_PIN_0);
}
else
{
GPIO_SetInactive(GPIO_PORT_1, GPIO_PIN_0);
}
break;

case STREAMDATAD_IDX_STREAMDATAD_D0_EN:
__nop();
break;

case STREAMDATAD_IDX_STREAMDATAD_D0_VAL:
__nop();
break;

}

return (KE_MSG_CONSUMED);
}

Keywords:
Device:
12ycli
Offline
Last seen:5年11个月前
加入:2015-05-20 09:14
anyone can help me ?

anyone can help me ?

JE_Dialog
Offline
Last seen:2 days 7 hours ago
Staff
加入:2013-12-05 14:02
Hi there, if you are looking

Hi there, if you are looking to develop your own profile, the tutorial guide AN-B-029 is hte best place to start : this will guide you through the process from start to finish. There are also some files which you can use as the examples. Look on the support site for AN-B-029 and its assosciated files. BR JE_Dialog.

12ycli
Offline
Last seen:5年11个月前
加入:2015-05-20 09:14
thanks a lot!

thanks a lot!

12ycli
Offline
Last seen:5年11个月前
加入:2015-05-20 09:14
该文件重新stricted

该文件重新stricted.Although I tried many times,I still can't receive any email." You will be emailed when access to the SDK is granted.".

Sam123
Offline
Last seen:5 years 10 months ago
加入:2015-02-19 05:43
Hi,

Hi,
Go to Products>>DA14580>>Documents>>Application notes>>AN-029(PDF Download)
Hope this helps.

12ycli
Offline
Last seen:5年11个月前
加入:2015-05-20 09:14
Thanks a lot!But it still can

Thanks a lot!But it still can't works.Restricted!

Sam123
Offline
Last seen:5 years 10 months ago
加入:2015-02-19 05:43
Click the PDF option on the

Click the PDF option on the right side of the page. Dont click on the name of the document.

lyncxy119
Offline
Last seen:2 years 2 weeks ago
加入:2015-05-14 03:23
My account has some problems

My account has some problems!now it is OK!