Go to the documentation of this file.
60 #include "custom_config.h"
68 #define OTAS_C_CONNECTION_MAX 10
75 #define OTAS_SVC_UUID {0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80, \
76 0x0A, 0x46, 0x44, 0xD3, 0x01, 0x04, 0xED, 0xA6}
77 #define OTAS_TX_CHAR_UUID {0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80, \
78 0x0A, 0x46, 0x44, 0xD3, 0x02, 0x04, 0xED, 0xA6}
79 #define OTAS_RX_CHAR_UUID {0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80, \
80 0x0A, 0x46, 0x44, 0xD3, 0x03, 0x04, 0xED, 0xA6}
81 #define OTAS_CTRL_CHAR_UUID {0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80, \
82 0x0A, 0x46, 0x44, 0xD3, 0x04, 0x04, 0xED, 0xA6}
@ OTAS_C_EVT_CTRL_SUCCESS
OTA Client has set control info.
uint16_t length
Length of event data.
uint16_t otas_rx_handle
OTA rx characteristic handle which has been got from peer.
uint16_t otas_ctrl_handle
OTA control characteristic handle which has been got from peer.
@ OTAS_C_EVT_DISCOVERY_FAIL
OTA Client found THS service failed because of invalid operation or no found at the peer.
@ OTAS_C_EVT_INVALID
OTA Client invalid event.
Handles on the connected peer device needed to interact with it.
uint8_t conn_idx
The connection index.
uint16_t otas_srvc_start_handle
OTA Service start handle.
@ OTAS_C_EVT_WRITE_OP_ERR
Error occured when OTA Client writen to peer.
OTA Service Client event.
@ OTAS_C_EVT_DISCOVERY_COMPLETE
OTA Client has found THS service and its characteristics.
Profile/Service Common Types.
sdk_err_t otas_c_tx_data_send(uint8_t conn_idx, uint8_t *p_data, uint16_t length)
Send data to peer.
uint16_t sdk_err_t
SDK API result type.
sdk_err_t otas_client_init(otas_c_evt_handler_t evt_handler)
Register THS Client event handler.
uint16_t otas_tx_handle
OTA tx characteristic handle which has been got from peer.
otas_c_evt_type_t
OTA Service Client event type.
@ OTAS_C_EVT_TX_CPLT
OTA Client has sent something to a peer successfully.
sdk_err_t otas_c_disc_srvc_start(uint8_t conn_idx)
Discovery OTAS on peer.
uint8_t * p_data
Pointer to event data.
uint16_t otas_tx_cccd_handle
OTA tx characteristic CCCD handle which has been got from peer.
sdk_err_t otas_c_tx_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer OTA tx characteristic notify.
otas_c_evt_type_t evt_type
OTA client event type.
sdk_err_t otas_c_ctrl_data_send(uint8_t conn_idx, uint32_t data)
Send control data to peer.
uint16_t otas_srvc_end_handle
OTA Service end handle.
@ OTAS_C_EVT_PEER_DATA_RECEIVE
OTA Client has received data from peer.
@ OTAS_C_EVT_TX_NTF_SET_SUCCESS
OTA Client has set peer Tx notify.
void(* otas_c_evt_handler_t)(otas_c_evt_t *p_evt)
OTA Service Client event handler type.