These properties have to added to HAL bt_property_type_t enums */
struct hal_prop_device_service_rec {
- uint8_t uuid[16];
- uint16_t channel;
- uint8_t name_len;
- uint8_t name[];
+ uint8_t uuid[16];
+ uint16_t channel;
+ uint8_t name_len;
+ uint8_t name[];
} __attribute__((packed));
#define HAL_PROP_DEVICE_FRIENDLY_NAME 0x0a
#define HAL_PROP_DEVICE_IS_ALIAS_SET 0x19
struct hal_prop_device_info {
- uint8_t version;
- uint16_t sub_version;
- uint16_t manufacturer;
+ uint8_t version;
+ uint16_t sub_version;
+ uint16_t manufacturer;
} __attribute__((packed));
#define HAL_PROP_DEVICE_TIMESTAMP 0xFF
#define HAL_EV_ADAPTER_STATE_CHANGED 0x00
struct hal_ev_adapter_state_changed {
- uint8_t state;
+ uint8_t state;
} __attribute__((packed));
struct hal_property {
- uint8_t type;
- uint16_t len;
- uint8_t val[0];
+ uint8_t type;
+ uint16_t len;
+ uint8_t val[0];
} __attribute__((packed));
#define HAL_EV_ADAPTER_PROPS_CHANGED 0x01
struct hal_ev_adapter_props_changed {
- uint8_t status;
- uint8_t num_props;
- struct hal_property props[0];
+ uint8_t status;
+ uint8_t num_props;
+ struct hal_property props[0];
} __attribute__((packed));
#define HAL_EV_DISCOVERY_STATE_CHANGED 0x85
struct hal_ev_discovery_state_changed {
- uint8_t state;
+ uint8_t state;
} __attribute__((packed));
#define HAL_EV_REMOTE_DEVICE_PROPS 0x83
struct hal_ev_remote_device_props {
- uint8_t status;
- uint8_t bdaddr[6];
- uint8_t num_props;
- struct hal_property props[0];
+ uint8_t status;
+ uint8_t bdaddr[6];
+ uint8_t num_props;
+ struct hal_property props[0];
} __attribute__((packed));
#define HAL_EV_DEVICE_FOUND 0x84
struct hal_ev_device_found {
- uint8_t num_props;
- struct hal_property props[0];
+ uint8_t num_props;
+ struct hal_property props[0];
} __attribute__((packed));
/* Device callbacks */
#define HAL_EV_PIN_REQUEST 0x86
struct hal_ev_pin_request {
- uint8_t bdaddr[6];
- uint8_t name[249];
- uint32_t class_of_dev;
+ uint8_t bdaddr[6];
+ uint8_t name[249];
+ uint32_t class_of_dev;
} __attribute__((packed));
#define HAL_EV_SSP_REQUEST 0x87
struct hal_ev_ssp_request {
- uint8_t bdaddr[6];
- uint8_t name[249];
- uint32_t class_of_dev;
- uint8_t pairing_variant;
- uint32_t passkey;
+ uint8_t bdaddr[6];
+ uint8_t name[249];
+ uint32_t class_of_dev;
+ uint8_t pairing_variant;
+ uint32_t passkey;
} __attribute__((packed));
#define HAL_BOND_STATE_NONE 0
#define HAL_EV_BOND_STATE_CHANGED 0x88
struct hal_ev_bond_state_changed {
- uint8_t status;
- uint8_t bdaddr[6];
- uint8_t state;
+ uint8_t status;
+ uint8_t bdaddr[6];
+ uint8_t state;
} __attribute__((packed));
#define HAL_EV_AUTHORIZE_REQUEST 0x89
#ifdef TIZEN_BT_HAL
#define HAL_EV_SOCK_AUTHORIZE_REQUEST 0x90
struct hal_ev_sock_conn_auth {
- uint8_t uuid[16];
+ uint8_t uuid[16];
uint8_t bdaddr[6];
} __attribute__((packed));
#endif //TIZEN_BT_HAL
#define HAL_EV_ACL_STATE_CHANGED 0x8A
struct hal_ev_acl_state_changed {
- uint8_t status;
- uint8_t bdaddr[6];
- uint8_t state;
+ uint8_t status;
+ uint8_t bdaddr[6];
+ uint8_t state;
} __attribute__((packed));
#define HAL_DEVICE_TRUSTED 0x00
#define HAL_EV_DEVICE_TRUST_CHANGED 0x8B
struct hal_ev_device_trust_state_changed {
- uint8_t bdaddr[6];
- uint8_t trust;
+ uint8_t bdaddr[6];
+ uint8_t trust;
} __attribute__((packed));
#define BT_TRANSPORT_UNKNOWN 0x00
#define HAL_EV_HIDHOST_CONN_STATE 0x81
struct hal_ev_hidhost_conn_state {
- uint8_t bdaddr[6];
- uint8_t state;
+ uint8_t bdaddr[6];
+ uint8_t state;
} __attribute__((packed));
#define HAL_EV_HIDHOST_INFO 0x82
#define HAL_EV_A2DP_CONN_STATE 0x8C
struct hal_ev_a2dp_conn_state {
uint8_t state;
- uint8_t bdaddr[6];
+ uint8_t bdaddr[6];
} __attribute__((packed));
#define HAL_AUDIO_SUSPEND 0x00
#define HAL_EV_A2DP_AUDIO_STATE 0x8D
struct hal_ev_a2dp_audio_state {
- uint8_t state;
- uint8_t bdaddr[6];
+ uint8_t state;
+ uint8_t bdaddr[6];
} __attribute__((packed));
#define HAL_EV_A2DP_AUDIO_CONFIG 0x8E
struct hal_ev_a2dp_audio_config {
- uint8_t bdaddr[6];
- uint32_t sample_rate;
- uint8_t channel_count;
+ uint8_t bdaddr[6];
+ uint32_t sample_rate;
+ uint8_t channel_count;
} __attribute__((packed));
/* A2DP Sink Role connection*/
#define HAL_EV_HANDSFREE_CONN_STATE 0x91
struct hal_ev_handsfree_conn_state {
- uint8_t state;
- uint8_t bdaddr[6];
+ uint8_t state;
+ uint8_t bdaddr[6];
} __attribute__((packed));
#define HAL_EV_HANDSFREE_AUDIO_STATE_DISCONNECTED 0x00
#define HAL_EV_HANDSFREE_AUDIO_STATE 0x92
struct hal_ev_handsfree_audio_state {
- uint8_t state;
- uint8_t bdaddr[6];
+ uint8_t state;
+ uint8_t bdaddr[6];
} __attribute__((packed));
/* HDP HAL Events */
#define HAL_EV_HDP_CONN_STATE 0x94
struct hal_ev_hdp_conn_state {
uint16_t app_id;
- uint8_t bdaddr[6];
+ uint8_t bdaddr[6];
uint8_t mdep_index;
uint16_t channel_id;
uint8_t channel_state;
/* LE-GATT */
#define HAL_EV_SERVER_INSTANCE_INITIALIZED 0xA4
struct hal_ev_server_instance_registered {
- uint32_t status;
- uint32_t server_instance;
- uint8_t app_uuid[16];
+ uint32_t status;
+ uint32_t server_instance;
+ uint8_t app_uuid[16];
} __attribute__((packed));
#define HAL_EV_MULTI_ADV_DATA_SET 0xA5
struct hal_ev_multi_adv_data_set {
- uint8_t status;
- uint8_t server_instance;
+ uint8_t status;
+ uint8_t server_instance;
} __attribute__((packed));
#define HAL_EV_MULTI_ADV_ENABLE 0xA6
struct hal_ev_multi_adv_enable {
- uint32_t status;
- uint32_t server_instance;
+ uint32_t status;
+ uint32_t server_instance;
} __attribute__((packed));
#define HAL_EV_MULTI_ADV_DISABLE 0xA7
struct hal_ev_multi_adv_disable {
- uint32_t status;
- uint32_t server_instance;
+ uint32_t status;
+ uint32_t server_instance;
} __attribute__((packed));
#define HAL_EV_MULTI_ADV_UPDATE 0xA8
struct hal_ev_multi_adv_update {
- uint32_t status;
- uint32_t server_instance;
+ uint32_t status;
+ uint32_t server_instance;
} __attribute__((packed));
#define HAL_EV_LEGACY_ADV_ENABLE 0xA9
struct hal_ev_legacy_adv_status {
- uint32_t status;
- uint32_t server_instance;
+ uint32_t status;
+ uint32_t server_instance;
} __attribute__((packed));
#define HAL_EV_GATT_CLIENT_REGISTERED 0xAA
struct hal_ev_gatt_client_registered {
- uint32_t status;
- uint32_t client_if;
- uint8_t app_uuid[16];
+ uint32_t status;
+ uint32_t client_if;
+ uint8_t app_uuid[16];
} __attribute__((packed));
#define HAL_EV_GATT_CLIENT_SCAN_RESULT 0xAC
#define HAL_EV_GATT_SERVICE_ADDED 0xAD
struct hal_ev_gatt_service_added {
- uint32_t status;
- uint32_t server_instance;
+ uint32_t status;
+ uint32_t server_instance;
uint8_t is_primary;
uint8_t svc_uuid[16];
- uint32_t service_handle;
+ uint32_t service_handle;
} __attribute__((packed));
#define HAL_EV_GATT_CHAR_ADDED 0xAE
struct hal_ev_gatt_char_added {
- uint32_t status;
- uint32_t server_instance;
- uint32_t service_handle;
- uint32_t char_handle;
+ uint32_t status;
+ uint32_t server_instance;
+ uint32_t service_handle;
+ uint32_t char_handle;
uint8_t char_uuid[16];
} __attribute__((packed));
#define HAL_EV_GATT_DESC_ADDED 0xAF
struct hal_ev_gatt_desc_added {
- uint32_t status;
- uint32_t server_instance;
- uint32_t service_handle;
- uint32_t desc_handle;
+ uint32_t status;
+ uint32_t server_instance;
+ uint32_t service_handle;
+ uint32_t desc_handle;
uint8_t desc_uuid[16];
} __attribute__((packed));
#define HAL_EV_GATT_SERVICE_STARTED 0xB0
struct hal_ev_gatt_service_started {
- uint32_t status;
- uint32_t server_instance;
- uint32_t service_handle;
+ uint32_t status;
+ uint32_t server_instance;
+ uint32_t service_handle;
} __attribute__((packed));
#define HAL_EV_GATT_SERVICE_DELETED 0xB1
struct hal_ev_gatt_service_deleted {
- uint32_t status;
- uint32_t server_instance;
- uint32_t service_handle;
+ uint32_t status;
+ uint32_t server_instance;
+ uint32_t service_handle;
} __attribute__((packed));
#define HAL_EV_GATT_SERVER_CONNECTED 0xB2
struct hal_ev_gatt_server_connected {
- uint32_t conn_id;
- uint32_t server_instance;
- uint8_t connected;
+ uint32_t conn_id;
+ uint32_t server_instance;
+ uint8_t connected;
uint8_t bdaddr[6];
} __attribute__((packed));
#define HAL_EV_GATT_READ_REQUESTED 0xB3
struct hal_ev_gatt_server_read_req {
- uint32_t conn_id;
- uint32_t trans_id;
+ uint32_t conn_id;
+ uint32_t trans_id;
uint8_t bdaddr[6];
- uint32_t att_handle;
- uint32_t offset;
- uint8_t is_long;
+ uint32_t att_handle;
+ uint32_t offset;
+ uint8_t is_long;
} __attribute__((packed));
#define HAL_EV_GATT_WRITE_REQUESTED 0xB4
struct hal_ev_gatt_server_write_req {
- uint32_t conn_id;
- uint32_t trans_id;
+ uint32_t conn_id;
+ uint32_t trans_id;
uint8_t bdaddr[6];
- uint32_t att_handle;
- uint32_t offset;
- uint32_t length;
- uint8_t need_rsp;
- uint8_t is_prep;
- uint8_t value[0];
+ uint32_t att_handle;
+ uint32_t offset;
+ uint32_t length;
+ uint8_t need_rsp;
+ uint8_t is_prep;
+ uint8_t value[0];
} __attribute__((packed));
#define HAL_EV_GATT_INDICATE_CFM 0xB5
struct hal_ev_gatt_server_indicate_cfm {
- uint32_t conn_id;
- uint32_t trans_id;
- uint32_t att_handle;
+ uint32_t conn_id;
+ uint32_t trans_id;
+ uint32_t att_handle;
uint8_t bdaddr[6];
} __attribute__((packed));
#ifdef TIZEN_BT_HAL
#define HAL_EV_GATT_NOTIFICATION_CHANGE 0xB6
struct hal_ev_gatt_server_notifcation_change {
- uint32_t conn_id;
- uint32_t trans_id;
- uint32_t att_handle;
+ uint32_t conn_id;
+ uint32_t trans_id;
+ uint32_t att_handle;
uint8_t notify;
uint8_t bdaddr[6];
} __attribute__((packed));
#define HAL_EV_LE_STATE_CHANGED 0xB7
struct hal_ev_le_state_changed {
- uint8_t state;
+ uint8_t state;
} __attribute__((packed));
#endif /* TIZEN_BT_HAL */
#define HAL_EV_LE_CONN_STATE_CHANGED 0xB8
struct hal_ev_le_conn_state_changed {
- uint8_t status;
- uint8_t bdaddr[6];
- uint8_t state;
+ uint8_t status;
+ uint8_t bdaddr[6];
+ uint8_t state;
} __attribute__((packed));
#define HAL_EV_DEVICE_TRUSTED_PROFILES_CHANGED 0xB9
struct hal_ev_device_trusted_profiles_changed {
- uint8_t bdaddr[6];
- uint32_t trust_val;
+ uint8_t bdaddr[6];
+ uint32_t trust_val;
} __attribute__((packed));
#define HAL_RSSI_MONITORING_ENABLED 0x00
#define HAL_EV_RSSI_MONITOR_STATE_CHANGED 0xBA
struct hal_ev_rssi_monitor_state_changed {
- uint8_t bdaddr[6];
+ uint8_t bdaddr[6];
int32_t link_type;
- uint8_t state;
+ uint8_t state;
} __attribute__((packed));
#define HAL_EV_RSSI_ALERT_RECIEVED 0xBB
struct hal_ev_rssi_alert_recieved {
- uint8_t bdaddr[6];
+ uint8_t bdaddr[6];
int32_t link_type;
int32_t alert_type;
int32_t rssi;
#define HAL_EV_RAW_RSSI_RECIEVED 0xBC
struct hal_ev_raw_rssi_recieved {
- uint8_t bdaddr[6];
+ uint8_t bdaddr[6];
int32_t link_type;
int32_t rssi;
} __attribute__((packed));