2 posts / 0 new
Last post
Hermus
Offline
Last seen:1 month 2 weeks ago
加入:2020-06-10 07:46
DA14585 BLE Transmission and reception

Hello Dialog,

I am a newbie in Bluetooth filed.
I am currently send data to DA14585 from ble terminal on my mobile,
and running BLE Example
\DA145xx_SDK\6.0.14.1114\projects\target_apps\ble_examples\prox_reporter

I tried to turn on the LED through Bluetooth transmission in the suotar_task.c file as follows

static int gattc_write_req_ind_handler(ke_msg_id_t const msgid,
struct gattc_write_req_ind const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
{
int msg_status = KE_MSG_CONSUMED;

// for test
if(param->value[2] == 0x07)
{
GPIO_SetActive(GPIO_PORT_1, GPIO_PIN_0);

}

if(ke_state_get(dest_id) == SUOTAR_IDLE)
{
...
}
else if(ke_state_get(dest_id) == SUOTAR_BUSY)
{
msg_status = KE_MSG_SAVED;
}

return msg_status;
}

Unfortunately the LED is turned off in other places, but it has been confirmed that DA14585 has received.
有一个问题,我怎么能让它仓促urn the data to my terminal after receiving it?

I notice that the command ke_msg_send maybe return the data to my mobile. How should I doing before use ke_msg_send command ?

Keywords:
Device:
CYibin
Offline
Last seen:5 months 3 weeks ago
Staff
加入:2017-12-14 02:48
Hi Hermus,

Hi Hermus,

Pls refer to below document to implement GATT data interaction:

//www.wsdof.com/sites/default/files/training_03_cus...

Hope it will help