Dialog Semiconductor customer support - DA14681 Received data https://support.dialog-semiconductor.com/resource-keywords/da14681-received-data en Received data DA14681 https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/received-data-da14681 < div class = "字段field-name-taxonomy-forums字段-type-taxonomy-term-reference field-label-above">
Forums: 

Hi Dialog,
I want to use da14681 to received data from phone. I used ble_peripheral Example. I can received data send by the da14681 to the phone with ble_gatt_set_value function but that doesn't work when i used ble_gatt_get_value function to received data on the da14681. I don't know where the data received was store. I use a sps profile that I modified.

num_attr = ble_gatts_get_num_attr(0, 3, 0);

ble_uuid_from_string(UUID_SPS, &uuid);
ble_gatts_add_service(&uuid, GATT_SERVICE_PRIMARY, num_attr);

/* SPS Server TX */
ble_uuid_from_string(UUID_SPS_SERVER_TX, &uuid);
ble_gatts_add_characteristic(&uuid, GATT_PROP_READ, ATT_PERM_READ,
sps_server_tx_size, 0, NULL, &sps->sps_tx_val_h);

/* SPS Server RX */
ble_uuid_from_string(UUID_SPS_SERVER_RX, &uuid);
ble_gatts_add_characteristic(&uuid, GATT_PROP_WRITE_NO_RESP, ATT_PERM_WRITE,
sps_server_rx_size, 0, NULL, &sps->sps_rx_val_h);

/* Register SPS Service */
ble_gatts_register_service(&sps->svc.start_h, &sps->sps_tx_val_h, &sps->sps_rx_val_h, 0);

/* Set value of Characteristic Descriptions */
ble_gatts_set_value(sps->sps_tx_val_h, sizeof(test), &test);
ble_gatts_get_value(sps->sps_rx_val_h, &sizeData, &receivedData);

sps->svc.end_h = sps->svc.start_h + num_attr;
sps->svc.write_req = handle_write_req;
sps->svc.read_req = handle_read_req;
sps->svc.event_sent = handle_event_sent;
sps->cb = cb;

return &sps->svc;

Thanks

Dimitri

Device: 
Tue, 18 Jul 2017 10:23:22 +0000 didi17000 68613 at https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/received-data-da14681#comments