| BlueNRG-1 ACI APIs and events callbacks

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

bluenrg1_api.h
Go to the documentation of this file.
1 #ifndef __BLUENRG1_API_H__
2 #define __BLUENRG1_API_H__
3
4
25 #include <stdint.h>
27 typedef struct Whitelist_Entry_t_s {
28 uint8_t Peer_Address_Type ;
31 uint8_t Peer_Address[6] ;
33 } Whitelist_Entry_t;
35 typedef struct Bonded_Device_Entry_t_s {
36 uint8_t Address_Type ;
39 uint8_t Address[6] ;
41 } Bonded_Device_Entry_t;
43 typedef union Service_UUID_t_s {
44 uint16_t Service_UUID_16 ;
45 uint8_t Service_UUID_128[16] ;
46 } Service_UUID_t;
48 typedef union Include_UUID_t_s {
49 uint16_t Include_UUID_16 ;
50 uint8_t Include_UUID_128[16] ;
51 } Include_UUID_t;
53 typedef union Char_UUID_t_s {
54 uint16_t Char_UUID_16 ;
55 uint8_t Char_UUID_128[16] ;
56 } Char_UUID_t;
58 typedef union Char_Desc_Uuid_t_s {
59 uint16_t Char_UUID_16 ;
60 uint8_t Char_UUID_128[16] ;
61 } Char_Desc_Uuid_t;
63 typedef union UUID_t_s {
64 uint16_t UUID_16 ;
65 uint8_t UUID_128[16] ;
66 } UUID_t;
68 typedef struct Handle_Entry_t_s {
69 uint16_t Handle ;
70 } Handle_Entry_t;
71 typedef uint8_t tBleStatus;
94 tBleStatus hci_disconnect(uint16_t Connection_Handle,
95 uint8_t Reason);
105 tBleStatus hci_read_remote_version_information(uint16_t Connection_Handle);
183 tBleStatus hci_set_event_mask(uint8_t Event_Mask[8]);
200 tBleStatus hci_reset(void);
217 tBleStatus hci_read_transmit_power_level(uint16_t Connection_Handle,
218 uint8_t Type,
219 uint8_t *Transmit_Power_Level);
237 tBleStatus hci_read_local_version_information(uint8_t *HCI_Version,
238 uint16_t *HCI_Revision,
239 uint8_t *LMP_PAL_Version,
240 uint16_t *Manufacturer_Name,
241 uint16_t *LMP_PAL_Subversion);
253 tBleStatus hci_read_local_supported_commands(uint8_t Supported_Commands[64]);
262 tBleStatus hci_read_local_supported_features(uint8_t LMP_Features[8]);
277 tBleStatus hci_read_bd_addr(uint8_t BD_ADDR[6]);
321 tBleStatus hci_read_rssi(uint16_t Connection_Handle,
322 uint8_t *RSSI);
343 tBleStatus hci_le_set_event_mask(uint8_t LE_Event_Mask[8]);
381 tBleStatus hci_le_read_buffer_size(uint16_t *HC_LE_ACL_Data_Packet_Length,
382 uint8_t *HC_Total_Num_LE_ACL_Data_Packets);
389 tBleStatus hci_le_read_local_supported_features(uint8_t LE_Features[8]);
397 tBleStatus hci_le_set_random_address(uint8_t Random_Address[6]);
461 tBleStatus hci_le_set_advertising_parameters(uint16_t Advertising_Interval_Min,
462 uint16_t Advertising_Interval_Max,
463 uint8_t Advertising_Type,
464 uint8_t Own_Address_Type,
465 uint8_t Direct_Address_Type,
466 uint8_t Direct_Address[6],
467 uint8_t Advertising_Channel_Map,
468 uint8_t Advertising_Filter_Policy);
479 tBleStatus hci_le_read_advertising_channel_tx_power(uint8_t *Transmit_Power_Level);
492 tBleStatus hci_le_set_advertising_data(uint8_t Advertising_Data_Length,
493 uint8_t Advertising_Data[31]);
506 tBleStatus hci_le_set_scan_response_data(uint8_t Scan_Response_Data_Length,
507 uint8_t Scan_Response_Data[31]);
524 tBleStatus hci_le_set_advertise_enable(uint8_t Advertising_Enable);
564 tBleStatus hci_le_set_scan_parameters(uint8_t LE_Scan_Type,
565 uint16_t LE_Scan_Interval,
566 uint16_t LE_Scan_Window,
567 uint8_t Own_Address_Type,
568 uint8_t Scanning_Filter_Policy);
584 tBleStatus hci_le_set_scan_enable(uint8_t LE_Scan_Enable,
585 uint8_t Filter_Duplicates);
642 tBleStatus hci_le_create_connection(uint16_t LE_Scan_Interval,
643 uint16_t LE_Scan_Window,
644 uint8_t Initiator_Filter_Policy,
645 uint8_t Peer_Address_Type,
646 uint8_t Peer_Address[6],
647 uint8_t Own_Address_Type,
648 uint16_t Conn_Interval_Min,
649 uint16_t Conn_Interval_Max,
650 uint16_t Conn_Latency,
651 uint16_t Supervision_Timeout,
652 uint16_t Minimum_CE_Length,
653 uint16_t Maximum_CE_Length);
663 tBleStatus hci_le_create_connection_cancel(void);
672 tBleStatus hci_le_read_white_list_size(uint8_t *White_List_Size);
684 tBleStatus hci_le_clear_white_list(void);
701 tBleStatus hci_le_add_device_to_white_list(uint8_t Address_Type,
702 uint8_t Address[6]);
719 tBleStatus hci_le_remove_device_from_white_list(uint8_t Address_Type,
720 uint8_t Address[6]);
773 tBleStatus hci_le_connection_update(uint16_t Connection_Handle,
774 uint16_t Conn_Interval_Min,
775 uint16_t Conn_Interval_Max,
776 uint16_t Conn_Latency,
777 uint16_t Supervision_Timeout,
778 uint16_t Minimum_CE_Length,
779 uint16_t Maximum_CE_Length);
801 tBleStatus hci_le_set_host_channel_classification(uint8_t LE_Channel_Map[5]);
820 tBleStatus hci_le_read_channel_map(uint16_t Connection_Handle,
821 uint8_t LE_Channel_Map[5]);
832 tBleStatus hci_le_read_remote_used_features(uint16_t Connection_Handle);
845 tBleStatus hci_le_encrypt(uint8_t Key[16],
846 uint8_t Plaintext_Data[16],
847 uint8_t Encrypted_Data[16]);
857 tBleStatus hci_le_rand(uint8_t Random_Number[8]);
879 tBleStatus hci_le_start_encryption(uint16_t Connection_Handle,
880 uint8_t Random_Number[8],
881 uint16_t Encrypted_Diversifier,
882 uint8_t Long_Term_Key[16]);
894 tBleStatus hci_le_long_term_key_request_reply(uint16_t Connection_Handle,
895 uint8_t Long_Term_Key[16]);
905 tBleStatus hci_le_long_term_key_requested_negative_reply(uint16_t Connection_Handle);
970 tBleStatus hci_le_read_supported_states(uint8_t LE_States[8]);
987 tBleStatus hci_le_receiver_test(uint8_t RX_Frequency);
1010 tBleStatus hci_le_transmitter_test(uint8_t TX_Frequency,
1011 uint8_t Length_Of_Test_Data,
1012 uint8_t Packet_Payload);
1022 tBleStatus hci_le_test_end(uint16_t *Number_Of_Packets);
1048 tBleStatus aci_hal_write_config_data(uint8_t Offset,
1049 uint8_t Length,
1050 uint8_t Value[]);
1069 tBleStatus aci_hal_read_config_data(uint8_t Offset,
1070 uint8_t *Data_Length,
1071 uint8_t Data[]);
1106 tBleStatus aci_hal_set_tx_power_level(uint8_t En_High_Power,
1107 uint8_t PA_Level);
1121 tBleStatus aci_hal_device_standby(void);
1131 tBleStatus aci_hal_le_tx_test_packet_number(uint32_t *Number_Of_Packets);
1145 tBleStatus aci_hal_tone_start(uint8_t RF_Channel);
1150 tBleStatus aci_hal_tone_stop(void);
1157 tBleStatus aci_hal_set_radio_activity_mask(uint16_t Radio_Activity_Mask);
1172 tBleStatus aci_hal_get_link_status(uint8_t Link_Status[8],
1173 uint16_t Link_Connection_Handle[16 / 2]);
1179 tBleStatus aci_hal_get_fw_build_number(uint16_t *Build_Number);
1189 tBleStatus aci_hal_get_anchor_period(uint32_t *Anchor_Period,
1190 uint32_t *Max_Free_Slot);
1204 tBleStatus aci_gap_set_non_discoverable(void);
1271 tBleStatus aci_gap_set_limited_discoverable(uint8_t Advertising_Type,
1272 uint16_t Advertising_Interval_Min,
1273 uint16_t Advertising_Interval_Max,
1274 uint8_t Own_Address_Type,
1275 uint8_t Advertising_Filter_Policy,
1276 uint8_t Local_Name_Length,
1277 uint8_t Local_Name[],
1278 uint8_t Service_Uuid_length,
1279 uint8_t Service_Uuid_List[],
1280 uint16_t Slave_Conn_Interval_Min,
1281 uint16_t Slave_Conn_Interval_Max);
1349 tBleStatus aci_gap_set_discoverable(uint8_t Advertising_Type,
1350 uint16_t Advertising_Interval_Min,
1351 uint16_t Advertising_Interval_Max,
1352 uint8_t Own_Address_Type,
1353 uint8_t Advertising_Filter_Policy,
1354 uint8_t Local_Name_Length,
1355 uint8_t Local_Name[],
1356 uint8_t Service_Uuid_length,
1357 uint8_t Service_Uuid_List[],
1358 uint16_t Slave_Conn_Interval_Min,
1359 uint16_t Slave_Conn_Interval_Max);
1391 tBleStatus aci_gap_set_direct_connectable(uint8_t Own_Address_Type,
1392 uint8_t Directed_Advertising_Type,
1393 uint8_t Direct_Address_Type,
1394 uint8_t Direct_Address[6],
1395 uint16_t Advertising_Interval_Min,
1396 uint16_t Advertising_Interval_Max);
1409 tBleStatus aci_gap_set_io_capability(uint8_t IO_Capability);
1432 tBleStatus aci_gap_set_authentication_requirement(uint8_t MITM_Mode,
1433 uint8_t OOB_Enable,
1434 uint8_t OOB_Data[16],
1435 uint8_t Min_Encryption_Key_Size,
1436 uint8_t Max_Encryption_Key_Size,
1437 uint8_t Use_Fixed_Pin,
1438 uint32_t Fixed_Pin,
1439 uint8_t Bonding_Mode);
1453 tBleStatus aci_gap_set_authorization_requirement(uint16_t Connection_Handle,
1454 uint8_t Authorization_Enable);
1465 tBleStatus aci_gap_pass_key_resp(uint16_t Connection_Handle,
1466 uint32_t Pass_Key);
1477 tBleStatus aci_gap_authorization_resp(uint16_t Connection_Handle,
1478 uint8_t Authorize);
1498 tBleStatus aci_gap_init(uint8_t Role,
1499 uint8_t privacy_enabled,
1500 uint8_t device_name_char_len,
1501 uint16_t *Service_Handle,
1502 uint16_t *Dev_Name_Char_Handle,
1503 uint16_t *Appearance_Char_Handle);
1518 tBleStatus aci_gap_set_non_connectable(uint8_t Advertising_Event_Type,
1519 uint8_t Own_Address_Type);
1535 tBleStatus aci_gap_set_undirected_connectable(uint8_t Adv_Filter_Policy,
1536 uint8_t Own_Address_Type);
1549 tBleStatus aci_gap_slave_security_req(uint16_t Connection_Handle,
1550 uint8_t Bonding,
1551 uint8_t MITM_Protection);
1561 tBleStatus aci_gap_update_adv_data(uint8_t AdvDataLen,
1562 uint8_t AdvData[]);
1569 tBleStatus aci_gap_delete_ad_type(uint8_t ADType);
1583 tBleStatus aci_gap_get_security_level(uint8_t *MITM_Mode,
1584 uint8_t *Bonding_Mode,
1585 uint8_t *OOB_Enable,
1586 uint8_t *Passkey_required);
1604 tBleStatus aci_gap_set_event_mask(uint16_t GAP_Evt_Mask);
1611 tBleStatus aci_gap_configure_whitelist(void);
1623 tBleStatus aci_gap_terminate(uint16_t Connection_Handle,
1624 uint8_t Reason);
1629 tBleStatus aci_gap_clear_security_db(void);
1639 tBleStatus aci_gap_allow_rebond(uint16_t Connection_Handle);
1669 tBleStatus aci_gap_start_limited_discovery_proc(uint16_t LE_Scan_Interval,
1670 uint16_t LE_Scan_Window,
1671 uint8_t Own_Address_Type,
1672 uint8_t Filter_Duplicates);
1699 tBleStatus aci_gap_start_general_discovery_proc(uint16_t LE_Scan_Interval,
1700 uint16_t LE_Scan_Window,
1701 uint8_t Own_Address_Type,
1702 uint8_t Filter_Duplicates);
1760 tBleStatus aci_gap_start_name_discovery_proc(uint16_t LE_Scan_Interval,
1761 uint16_t LE_Scan_Window,
1762 uint8_t Peer_Address_Type,
1763 uint8_t Peer_Address[6],
1764 uint8_t Own_Address_Type,
1765 uint16_t Conn_Interval_Min,
1766 uint16_t Conn_Interval_Max,
1767 uint16_t Conn_Latency,
1768 uint16_t Supervision_Timeout,
1769 uint16_t Minimum_CE_Length,
1770 uint16_t Maximum_CE_Length);
1827 tBleStatus aci_gap_start_auto_connection_establish_proc(uint16_t LE_Scan_Interval,
1828 uint16_t LE_Scan_Window,
1829 uint8_t Own_Address_Type,
1830 uint16_t Conn_Interval_Min,
1831 uint16_t Conn_Interval_Max,
1832 uint16_t Conn_Latency,
1833 uint16_t Supervision_Timeout,
1834 uint16_t Minimum_CE_Length,
1835 uint16_t Maximum_CE_Length,
1836 uint8_t Num_of_Whitelist_Entries,
1837 Whitelist_Entry_t Whitelist_Entry[]);
1876 tBleStatus aci_gap_start_general_connection_establish_proc(uint8_t LE_Scan_Type,
1877 uint16_t LE_Scan_Interval,
1878 uint16_t LE_Scan_Window,
1879 uint8_t Own_Address_Type,
1880 uint8_t Filter_Duplicates);
1914 tBleStatus aci_gap_start_selective_connection_establish_proc(uint8_t LE_Scan_Type,
1915 uint16_t LE_Scan_Interval,
1916 uint16_t LE_Scan_Window,
1917 uint8_t Own_Address_Type,
1918 uint8_t Filter_Duplicates,
1919 uint8_t Num_of_Whitelist_Entries,
1920 Whitelist_Entry_t Whitelist_Entry[]);
1981 tBleStatus aci_gap_create_connection(uint16_t LE_Scan_Interval,
1982 uint16_t LE_Scan_Window,
1983 uint8_t Peer_Address_Type,
1984 uint8_t Peer_Address[6],
1985 uint8_t Own_Address_Type,
1986 uint16_t Conn_Interval_Min,
1987 uint16_t Conn_Interval_Max,
1988 uint16_t Conn_Latency,
1989 uint16_t Supervision_Timeout,
1990 uint16_t Minimum_CE_Length,
1991 uint16_t Maximum_CE_Length);
2006 tBleStatus aci_gap_terminate_gap_proc(uint8_t Procedure_Code);
2044 tBleStatus aci_gap_start_connection_update(uint16_t Connection_Handle,
2045 uint16_t Conn_Interval_Min,
2046 uint16_t Conn_Interval_Max,
2047 uint16_t Conn_Latency,
2048 uint16_t Supervision_Timeout,
2049 uint16_t Minimum_CE_Length,
2050 uint16_t Maximum_CE_Length);
2062 tBleStatus aci_gap_send_pairing_req(uint16_t Connection_Handle,
2063 uint8_t Force_Rebond);
2073 tBleStatus aci_gap_resolve_private_addr(uint8_t Address[6],
2074 uint8_t Actual_Address[6]);
2082 tBleStatus aci_gap_get_bonded_devices(uint8_t *Num_of_Addresses,
2083 Bonded_Device_Entry_t Bonded_Device_Entry[]);
2110 tBleStatus aci_gap_set_broadcast_mode(uint16_t Advertising_Interval_Min,
2111 uint16_t Advertising_Interval_Max,
2112 uint8_t Advertising_Type,
2113 uint8_t Own_Address_Type,
2114 uint8_t Adv_Data_Length,
2115 uint8_t Adv_Data[],
2116 uint8_t Num_of_Whitelist_Entries,
2117 Whitelist_Entry_t Whitelist_Entry[]);
2147 tBleStatus aci_gap_start_observation_proc(uint16_t LE_Scan_Interval,
2148 uint16_t LE_Scan_Window,
2149 uint8_t LE_Scan_Type,
2150 uint8_t Own_Address_Type,
2151 uint8_t Filter_Duplicates);
2162 tBleStatus aci_gap_is_device_bonded(uint8_t Peer_Address_Type,
2163 uint8_t Peer_Address[6]);
2179 tBleStatus aci_gatt_init(void);
2199 tBleStatus aci_gatt_add_service(uint8_t Service_UUID_Type,
2200 Service_UUID_t *Service_UUID,
2201 uint8_t Service_Type,
2202 uint8_t Max_Attribute_Records,
2203 uint16_t *Service_Handle);
2217 tBleStatus aci_gatt_include_service(uint16_t Service_Handle,
2218 uint16_t Include_Start_Handle,
2219 uint16_t Include_End_Handle,
2220 uint8_t Include_UUID_Type,
2221 Include_UUID_t *Include_UUID,
2222 uint16_t *Include_Handle);
2261 tBleStatus aci_gatt_add_char(uint16_t Service_Handle,
2262 uint8_t Char_UUID_Type,
2263 Char_UUID_t *Char_UUID,
2264 uint16_t Char_Value_Length,
2265 uint8_t Char_Properties,
2266 uint8_t Security_Permissions,
2267 uint8_t GATT_Evt_Mask,
2268 uint8_t Enc_Key_Size,
2269 uint8_t Is_Variable,
2270 uint16_t *Char_Handle);
2304 tBleStatus aci_gatt_add_char_desc(uint16_t Service_Handle,
2305 uint16_t Char_Handle,
2306 uint8_t Char_Desc_Uuid_Type,
2307 Char_Desc_Uuid_t *Char_Desc_Uuid,
2308 uint8_t Char_Desc_Value_Max_Len,
2309 uint8_t Char_Desc_Value_Length,
2310 uint8_t Char_Desc_Value[],
2311 uint8_t Security_Permissions,
2312 uint8_t Access_Permissions,
2313 uint8_t GATT_Evt_Mask,
2314 uint8_t Enc_Key_Size,
2315 uint8_t Is_Variable,
2316 uint16_t *Char_Desc_Handle);
2341 tBleStatus aci_gatt_update_char_value(uint16_t Service_Handle,
2342 uint16_t Char_Handle,
2343 uint8_t Val_Offset,
2344 uint8_t Char_Value_Length,
2345 uint8_t Char_Value[]);
2352 tBleStatus aci_gatt_del_char(uint16_t Serv_Handle,
2353 uint16_t Char_Handle);
2359 tBleStatus aci_gatt_del_service(uint16_t Serv_Handle);
2366 tBleStatus aci_gatt_del_include_service(uint16_t Serv_Handle,
2367 uint16_t Include_Handle);
2390 tBleStatus aci_gatt_set_event_mask(uint32_t GATT_Evt_Mask);
2400 tBleStatus aci_gatt_exchange_config(uint16_t Connection_Handle);
2413 tBleStatus aci_att_find_info_req(uint16_t Connection_Handle,
2414 uint16_t Start_Handle,
2415 uint16_t End_Handle);
2431 tBleStatus aci_att_find_by_type_value_req(uint16_t Connection_Handle,
2432 uint16_t Start_Handle,
2433 uint16_t End_Handle,
2434 uint16_t UUID,
2435 uint8_t Attribute_Val_Length,
2436 uint8_t Attribute_Val[]);
2452 tBleStatus aci_att_read_by_type_req(uint16_t Connection_Handle,
2453 uint16_t Start_Handle,
2454 uint16_t End_Handle,
2455 uint8_t UUID_Type,
2456 UUID_t *UUID);
2474 tBleStatus aci_att_read_by_group_type_req(uint16_t Connection_Handle,
2475 uint16_t Start_Handle,
2476 uint16_t End_Handle,
2477 uint8_t UUID_Type,
2478 UUID_t *UUID);
2492 tBleStatus aci_att_prepare_write_req(uint16_t Connection_Handle,
2493 uint16_t Attr_Handle,
2494 uint16_t Val_Offset,
2495 uint8_t Attribute_Val_Length,
2496 uint8_t Attribute_Val[]);
2509 tBleStatus aci_att_execute_write_req(uint16_t Connection_Handle,
2510 uint8_t Execute);
2518 tBleStatus aci_gatt_disc_all_primary_services(uint16_t Connection_Handle);
2530 tBleStatus aci_gatt_disc_primary_service_by_uuid(uint16_t Connection_Handle,
2531 uint8_t UUID_Type,
2532 UUID_t *UUID);
2543 tBleStatus aci_gatt_find_included_services(uint16_t Connection_Handle,
2544 uint16_t Start_Handle,
2545 uint16_t End_Handle);
2557 tBleStatus aci_gatt_disc_all_char_of_service(uint16_t Connection_Handle,
2558 uint16_t Start_Handle,
2559 uint16_t End_Handle);
2574 tBleStatus aci_gatt_disc_char_by_uuid(uint16_t Connection_Handle,
2575 uint16_t Start_Handle,
2576 uint16_t End_Handle,
2577 uint8_t UUID_Type,
2578 UUID_t *UUID);
2590 tBleStatus aci_gatt_disc_all_char_desc(uint16_t Connection_Handle,
2591 uint16_t Char_Handle,
2592 uint16_t End_Handle);
2602 tBleStatus aci_gatt_read_char_value(uint16_t Connection_Handle,
2603 uint16_t Attr_Handle);
2618 tBleStatus aci_gatt_read_using_char_uuid(uint16_t Connection_Handle,
2619 uint16_t Start_Handle,
2620 uint16_t End_Handle,
2621 uint8_t UUID_Type,
2622 UUID_t *UUID);
2633 tBleStatus aci_gatt_read_long_char_value(uint16_t Connection_Handle,
2634 uint16_t Attr_Handle,
2635 uint16_t Val_Offset);
2649 tBleStatus aci_gatt_read_multiple_char_value(uint16_t Connection_Handle,
2650 uint8_t Number_of_Handles,
2651 Handle_Entry_t Handle_Entry[]);
2664 tBleStatus aci_gatt_write_char_value(uint16_t Connection_Handle,
2665 uint16_t Attr_Handle,
2666 uint8_t Attribute_Val_Length,
2667 uint8_t Attribute_Val[]);
2681 tBleStatus aci_gatt_write_long_char_value(uint16_t Connection_Handle,
2682 uint16_t Attr_Handle,
2683 uint16_t Val_Offset,
2684 uint8_t Attribute_Val_Length,
2685 uint8_t Attribute_Val[]);
2699 tBleStatus aci_gatt_write_char_reliable(uint16_t Connection_Handle,
2700 uint16_t Attr_Handle,
2701 uint16_t Val_Offset,
2702 uint8_t Attribute_Val_Length,
2703 uint8_t Attribute_Val[]);
2717 tBleStatus aci_gatt_write_long_char_desc(uint16_t Connection_Handle,
2718 uint16_t Attr_Handle,
2719 uint16_t Val_Offset,
2720 uint8_t Attribute_Val_Length,
2721 uint8_t Attribute_Val[]);
2733 tBleStatus aci_gatt_read_long_char_desc(uint16_t Connection_Handle,
2734 uint16_t Attr_Handle,
2735 uint16_t Val_Offset);
2746 tBleStatus aci_gatt_write_char_desc(uint16_t Connection_Handle,
2747 uint16_t Attr_Handle,
2748 uint8_t Attribute_Val_Length,
2749 uint8_t Attribute_Val[]);
2759 tBleStatus aci_gatt_read_char_desc(uint16_t Connection_Handle,
2760 uint16_t Attr_Handle);
2771 tBleStatus aci_gatt_write_without_resp(uint16_t Connection_Handle,
2772 uint16_t Attr_Handle,
2773 uint8_t Attribute_Val_Length,
2774 uint8_t Attribute_Val[]);
2786 tBleStatus aci_gatt_signed_write_without_resp(uint16_t Connection_Handle,
2787 uint16_t Attr_Handle,
2788 uint8_t Attribute_Val_Length,
2789 uint8_t Attribute_Val[]);
2797 tBleStatus aci_gatt_confirm_indication(uint16_t Connection_Handle);
2814 tBleStatus aci_gatt_write_resp(uint16_t Connection_Handle,
2815 uint16_t Attr_Handle,
2816 uint8_t Write_status,
2817 uint8_t Error_Code,
2818 uint8_t Attribute_Val_Length,
2819 uint8_t Attribute_Val[]);
2833 tBleStatus aci_gatt_allow_read(uint16_t Connection_Handle);
2848 tBleStatus aci_gatt_set_security_permission(uint16_t Serv_Handle,
2849 uint16_t Attr_Handle,
2850 uint8_t Security_Permissions);
2861 tBleStatus aci_gatt_set_desc_value(uint16_t Serv_Handle,
2862 uint16_t Char_Handle,
2863 uint16_t Char_Desc_Handle,
2864 uint16_t Val_Offset,
2865 uint8_t Char_Desc_Value_Length,
2866 uint8_t Char_Desc_Value[]);
2877 tBleStatus aci_gatt_read_handle_value(uint16_t Attr_Handle,
2878 uint16_t Offset,
2879 uint16_t Value_Length_Requested,
2880 uint16_t *Length,
2881 uint16_t *Value_Length,
2882 uint8_t Value[]);
2896 tBleStatus aci_gatt_update_char_value_ext(uint16_t Service_Handle,
2897 uint16_t Char_Handle,
2898 uint8_t Update_Type,
2899 uint16_t Char_Length,
2900 uint16_t Value_Offset,
2901 uint8_t Value_Length,
2902 uint8_t Value[]);
2934 tBleStatus aci_l2cap_connection_parameter_update_req(uint16_t Connection_Handle,
2935 uint16_t Conn_Interval_Min,
2936 uint16_t Conn_Interval_Max,
2937 uint16_t Slave_latency,
2938 uint16_t Timeout_Multiplier);
2973 tBleStatus aci_l2cap_connection_parameter_update_resp(uint16_t Connection_Handle,
2974 uint16_t Conn_Interval_Min,
2975 uint16_t Conn_Interval_Max,
2976 uint16_t Slave_latency,
2977 uint16_t Timeout_Multiplier,
2978 uint16_t Minimum_CE_Length,
2979 uint16_t Maximum_CE_Length,
2980 uint8_t Identifier,
2981 uint8_t Accept);
2985 #endif /* __BLUENRG1_API_H__*/
hci_le_rand
tBleStatus hci_le_rand(uint8_t Random_Number[8])
The LE_Rand command is used to request the Controller to generate 8 octets of random data to be sent ...
hci_le_set_scan_enable
tBleStatus hci_le_set_scan_enable(uint8_t LE_Scan_Enable, uint8_t Filter_Duplicates)
The LE_Set_Scan_Enable command is used to start scanning. Scanning is used to discover advertising de...
hci_reset
tBleStatus hci_reset(void)
The Reset command will reset the Link Layer on an LE Controller.
aci_gatt_init
tBleStatus aci_gatt_init(void)
Initialize the GATT layer for server and client roles. It adds also the GATT service with Service Cha...
aci_gatt_update_char_value_ext
tBleStatus aci_gatt_update_char_value_ext(uint16_t Service_Handle, uint16_t Char_Handle, uint8_t Update_Type, uint16_t Char_Length, uint16_t Value_Offset, uint8_t Value_Length, uint8_t Value[])
This command is a more flexible version of aci_gatt_update_char_value to support update of long attri...
aci_hal_get_anchor_period
tBleStatus aci_hal_get_anchor_period(uint32_t *Anchor_Period, uint32_t *Max_Free_Slot)
This command returns information about the Anchor Period to help application in selecting slot timing...
aci_gap_configure_whitelist
tBleStatus aci_gap_configure_whitelist(void)
Add addresses of bonded devices into the controller's whitelist. The command will return an error if ...
aci_gap_set_non_discoverable
tBleStatus aci_gap_set_non_discoverable(void)
Put the device in non-discoverable mode. This command will disable the LL advertising and put the dev...
aci_gatt_del_service
tBleStatus aci_gatt_del_service(uint16_t Serv_Handle)
Delete the specified service from the GATT server database.
Handle_Entry_t_s
Definition: bluenrg1_api.h:68
Bonded_Device_Entry_t_s::Address
uint8_t Address[6]
Definition: bluenrg1_api.h:40
aci_gap_set_broadcast_mode
tBleStatus aci_gap_set_broadcast_mode(uint16_t Advertising_Interval_Min, uint16_t Advertising_Interval_Max, uint8_t Advertising_Type, uint8_t Own_Address_Type, uint8_t Adv_Data_Length, uint8_t Adv_Data[], uint8_t Num_of_Whitelist_Entries, Whitelist_Entry_t Whitelist_Entry[])
This command puts the device into broadcast mode. A privacy enabled device uses either a resolvable p...
aci_hal_get_link_status
tBleStatus aci_hal_get_link_status(uint8_t Link_Status[8], uint16_t Link_Connection_Handle[16/2])
This command returns the status of the 8 Bluetooth low energy links managed by the device...
aci_att_read_by_type_req
tBleStatus aci_att_read_by_type_req(uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle, uint8_t UUID_Type, UUID_t *UUID)
Send a Read By Type Request. The Read By Type Request is used to obtain the values of attributes wher...
UUID_t
union UUID_t_s UUID_t
hci_read_remote_version_information
tBleStatus hci_read_remote_version_information(uint16_t Connection_Handle)
This command will obtain the values for the version information for the remote device identified by t...
aci_gatt_read_multiple_char_value
tBleStatus aci_gatt_read_multiple_char_value(uint16_t Connection_Handle, uint8_t Number_of_Handles, Handle_Entry_t Handle_Entry[])
Start a procedure to read multiple characteristic values from a server. This sub-procedure is used to...
aci_gatt_del_char
tBleStatus aci_gatt_del_char(uint16_t Serv_Handle, uint16_t Char_Handle)
Delete the specified characteristic from the service.
aci_gatt_write_long_char_value
tBleStatus aci_gatt_write_long_char_value(uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
Start the procedure to write a long characteristic value. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. During the procedure, aci_att_prepare_write_resp_event and aci_att_exec_write_resp_event events are raised.
Handle_Entry_t_s::Handle
uint16_t Handle
Definition: bluenrg1_api.h:69
aci_gap_start_connection_update
tBleStatus aci_gap_start_connection_update(uint16_t Connection_Handle, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length)
Start the connection update procedure (only when role is Master). A hci_le_connection_update is calle...
Include_UUID_t_s::Include_UUID_128
uint8_t Include_UUID_128[16]
Definition: bluenrg1_api.h:50
hci_le_set_advertise_enable
tBleStatus hci_le_set_advertise_enable(uint8_t Advertising_Enable)
The LE_Set_Advertise_Enable command is used to request the Controller to start or stop advertising...
Service_UUID_t_s
Definition: bluenrg1_api.h:43
Char_UUID_t_s::Char_UUID_128
uint8_t Char_UUID_128[16]
Definition: bluenrg1_api.h:55
aci_gap_set_authorization_requirement
tBleStatus aci_gap_set_authorization_requirement(uint16_t Connection_Handle, uint8_t Authorization_Enable)
Set the authorization requirements of the device. This command has to be given when connected to a de...
aci_gap_authorization_resp
tBleStatus aci_gap_authorization_resp(uint16_t Connection_Handle, uint8_t Authorize)
Authorize a device to access attributes. This command should be send by the host in response to aci_g...
aci_gatt_disc_all_char_of_service
tBleStatus aci_gatt_disc_all_char_of_service(uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle)
Start the procedure to discover all the characteristics of a given service. When the procedure is com...
aci_gap_start_observation_proc
tBleStatus aci_gap_start_observation_proc(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t LE_Scan_Type, uint8_t Own_Address_Type, uint8_t Filter_Duplicates)
Starts an Observation procedure, when the device is in Observer Role. The host enables scanning in th...
Whitelist_Entry_t
struct Whitelist_Entry_t_s Whitelist_Entry_t
hci_le_connection_update
tBleStatus hci_le_connection_update(uint16_t Connection_Handle, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length)
The LE_Connection_Update command is used to change the Link Layer connection parameters of a connecti...
aci_hal_tone_start
tBleStatus aci_hal_tone_start(uint8_t RF_Channel)
This command starts a carrier frequency, i.e. a tone, on a specific channel. The frequency sine wave ...
aci_gap_set_event_mask
tBleStatus aci_gap_set_event_mask(uint16_t GAP_Evt_Mask)
It allows masking events from the GAP. The default configuration is all the events masked...
Char_UUID_t
union Char_UUID_t_s Char_UUID_t
hci_le_set_advertising_parameters
tBleStatus hci_le_set_advertising_parameters(uint16_t Advertising_Interval_Min, uint16_t Advertising_Interval_Max, uint8_t Advertising_Type, uint8_t Own_Address_Type, uint8_t Direct_Address_Type, uint8_t Direct_Address[6], uint8_t Advertising_Channel_Map, uint8_t Advertising_Filter_Policy)
The LE_Set_Advertising_Parameters command is used by the Host to set the advertising parameters...
aci_gatt_disc_primary_service_by_uuid
tBleStatus aci_gatt_disc_primary_service_by_uuid(uint16_t Connection_Handle, uint8_t UUID_Type, UUID_t *UUID)
Start the procedure to discover the primary services of the specified UUID on the server...
hci_le_set_event_mask
tBleStatus hci_le_set_event_mask(uint8_t LE_Event_Mask[8])
The LE_Set_Event_Mask command is used to control which LE events are generated by the HCI for the Hos...
hci_read_local_supported_commands
tBleStatus hci_read_local_supported_commands(uint8_t Supported_Commands[64])
This command reads the list of HCI commands supported for the local Controller. This command shall re...
aci_gatt_include_service
tBleStatus aci_gatt_include_service(uint16_t Service_Handle, uint16_t Include_Start_Handle, uint16_t Include_End_Handle, uint8_t Include_UUID_Type, Include_UUID_t *Include_UUID, uint16_t *Include_Handle)
Include a service given by Include_Start_Handle and Include_End_Handle to another service given by Se...
aci_gatt_write_char_value
tBleStatus aci_gatt_write_char_value(uint16_t Connection_Handle, uint16_t Attr_Handle, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
Start the procedure to write a long characteristic value. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. During the procedure, aci_att_prepare_write_resp_event and aci_att_exec_write_resp_event events are raised.
aci_gatt_write_char_desc
tBleStatus aci_gatt_write_char_desc(uint16_t Connection_Handle, uint16_t Attr_Handle, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
Start the procedure to write a characteristic descriptor. When the procedure is completed, a aci_gatt_proc_complete_event event is generated.
hci_le_read_local_supported_features
tBleStatus hci_le_read_local_supported_features(uint8_t LE_Features[8])
This command requests the list of the supported LE features for the Controller. (See Bluetooth Specif...
hci_le_read_remote_used_features
tBleStatus hci_le_read_remote_used_features(uint16_t Connection_Handle)
This command requests a list of the used LE features from the remote device. This command shall retur...
tBleStatus
uint8_t tBleStatus
Definition: bluenrg1_api.h:71
aci_gap_pass_key_resp
tBleStatus aci_gap_pass_key_resp(uint16_t Connection_Handle, uint32_t Pass_Key)
This command should be send by the host in response to aci_gap_pass_key_req_event event...
hci_le_set_random_address
tBleStatus hci_le_set_random_address(uint8_t Random_Address[6])
The LE_Set_Random_Address command is used by the Host to set the LE Random Device Address in the Cont...
hci_le_set_advertising_data
tBleStatus hci_le_set_advertising_data(uint8_t Advertising_Data_Length, uint8_t Advertising_Data[31])
The LE_Set_Advertising_Data command is used to set the data used in advertising packets that have a d...
aci_att_execute_write_req
tBleStatus aci_att_execute_write_req(uint16_t Connection_Handle, uint8_t Execute)
Send an Execute Write Request. The Execute Write Request is used to request the server to write or ca...
Bonded_Device_Entry_t
struct Bonded_Device_Entry_t_s Bonded_Device_Entry_t
Include_UUID_t
union Include_UUID_t_s Include_UUID_t
aci_hal_read_config_data
tBleStatus aci_hal_read_config_data(uint8_t Offset, uint8_t *Data_Length, uint8_t Data[])
This command requests the value in the low level configure data structure. The number of read bytes c...
aci_gap_set_non_connectable
tBleStatus aci_gap_set_non_connectable(uint8_t Advertising_Event_Type, uint8_t Own_Address_Type)
Put the device into non connectable mode. This mode does not support connection. The privacy setting ...
aci_gatt_read_using_char_uuid
tBleStatus aci_gatt_read_using_char_uuid(uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle, uint8_t UUID_Type, UUID_t *UUID)
Start the procedure to read all the characteristics specified by the UUID. When the procedure is comp...
aci_gap_allow_rebond
tBleStatus aci_gap_allow_rebond(uint16_t Connection_Handle)
Allows the security manager to complete the pairing procedure and re-bond with the master...
aci_gap_init
tBleStatus aci_gap_init(uint8_t Role, uint8_t privacy_enabled, uint8_t device_name_char_len, uint16_t *Service_Handle, uint16_t *Dev_Name_Char_Handle, uint16_t *Appearance_Char_Handle)
Initialize the GAP layer. Register the GAP service with the GATT. All the standard GAP characteristic...
aci_gatt_signed_write_without_resp
tBleStatus aci_gatt_signed_write_without_resp(uint16_t Connection_Handle, uint16_t Attr_Handle, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
Start a signed write without response from the server. The procedure is used to write a characteristi...
aci_gatt_disc_all_char_desc
tBleStatus aci_gatt_disc_all_char_desc(uint16_t Connection_Handle, uint16_t Char_Handle, uint16_t End_Handle)
Start the procedure to discover all characteristic descriptors on the server. When the procedure is c...
hci_le_read_channel_map
tBleStatus hci_le_read_channel_map(uint16_t Connection_Handle, uint8_t LE_Channel_Map[5])
The LE_Read_Channel_Map command returns the current Channel_Map for the specified Connection_Handle...
hci_le_read_buffer_size
tBleStatus hci_le_read_buffer_size(uint16_t *HC_LE_ACL_Data_Packet_Length, uint8_t *HC_Total_Num_LE_ACL_Data_Packets)
The LE_Read_Buffer_Size command is used to read the maximum size of the data portion of HCI LE ACL Da...
hci_set_event_mask
tBleStatus hci_set_event_mask(uint8_t Event_Mask[8])
The Set_Event_Mask command is used to control which events are generated by the HCI for the Host...
aci_gap_get_bonded_devices
tBleStatus aci_gap_get_bonded_devices(uint8_t *Num_of_Addresses, Bonded_Device_Entry_t Bonded_Device_Entry[])
This command gets the list of the devices which are bonded. It returns the number of addresses and th...
hci_le_long_term_key_request_reply
tBleStatus hci_le_long_term_key_request_reply(uint16_t Connection_Handle, uint8_t Long_Term_Key[16])
The LE_Long_Term_Key_Request_Reply command is used to reply to an LE Long Term Key Request event from...
aci_gatt_write_resp
tBleStatus aci_gatt_write_resp(uint16_t Connection_Handle, uint16_t Attr_Handle, uint8_t Write_status, uint8_t Error_Code, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
Allow or reject a write request from a client. This command has to be sent by the application when it...
aci_gatt_disc_char_by_uuid
tBleStatus aci_gatt_disc_char_by_uuid(uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle, uint8_t UUID_Type, UUID_t *UUID)
Start the procedure to discover all the characteristics specified by a UUID. When the procedure is co...
aci_att_find_info_req
tBleStatus aci_att_find_info_req(uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle)
Send a Find Information Request. This command is used to obtain the mapping of attribute handles with...
aci_gatt_confirm_indication
tBleStatus aci_gatt_confirm_indication(uint16_t Connection_Handle)
Allow application to confirm indication. This command has to be sent when the application receives th...
aci_hal_device_standby
tBleStatus aci_hal_device_standby(void)
Put the device in standby mode. Normally the BlueNRG will automatically enter sleep mode to save powe...
UUID_t_s::UUID_128
uint8_t UUID_128[16]
Definition: bluenrg1_api.h:65
aci_gatt_add_char
tBleStatus aci_gatt_add_char(uint16_t Service_Handle, uint8_t Char_UUID_Type, Char_UUID_t *Char_UUID, uint16_t Char_Value_Length, uint8_t Char_Properties, uint8_t Security_Permissions, uint8_t GATT_Evt_Mask, uint8_t Enc_Key_Size, uint8_t Is_Variable, uint16_t *Char_Handle)
Add a characteristic to a service.
aci_gap_set_direct_connectable
tBleStatus aci_gap_set_direct_connectable(uint8_t Own_Address_Type, uint8_t Directed_Advertising_Type, uint8_t Direct_Address_Type, uint8_t Direct_Address[6], uint16_t Advertising_Interval_Min, uint16_t Advertising_Interval_Max)
Set the device in direct connectable mode (as defined in Bluetooth Specification v.4.1, Vol. 3, Part C, section 9.3.3). Device uses direct connectable mode to advertise using High Duty cycle advertisement events or Low Duty cycle advertisement events and the address as either what is specified in the Own Address Type parameter. The command specifies the type of the advertising used. If the privacy is enabled, the Type parameter in reconnection address is used for advertising, otherwise the address of the type specified in OwnAddrType is used. The device will be in directed connectable mode only for 1.28 seconds. If no connection is established within this duration, the device enters non discoverable mode and advertising will have to be again enabled explicitly. The controller generates a hci_le_connection_complete_event event with the status set to HCI_DIRECTED_ADV_TIMEOUT if the connection was not established and 0x00 if the connection was successfully established.
aci_gap_start_auto_connection_establish_proc
tBleStatus aci_gap_start_auto_connection_establish_proc(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length, uint8_t Num_of_Whitelist_Entries, Whitelist_Entry_t Whitelist_Entry[])
Start the auto connection establishment procedure. The devices specified are added to the white list ...
aci_gatt_read_handle_value
tBleStatus aci_gatt_read_handle_value(uint16_t Attr_Handle, uint16_t Offset, uint16_t Value_Length_Requested, uint16_t *Length, uint16_t *Value_Length, uint8_t Value[])
Reads the value of the attribute handle specified from the local GATT database.
aci_att_read_by_group_type_req
tBleStatus aci_att_read_by_group_type_req(uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle, uint8_t UUID_Type, UUID_t *UUID)
Send a Read By Group Type Request. The Read By Group Type Request is used to obtain the values of gro...
aci_gatt_allow_read
tBleStatus aci_gatt_allow_read(uint16_t Connection_Handle)
Allow the GATT server to send a response to a read request from a client. The application has to send...
aci_gatt_update_char_value
tBleStatus aci_gatt_update_char_value(uint16_t Service_Handle, uint16_t Char_Handle, uint8_t Val_Offset, uint8_t Char_Value_Length, uint8_t Char_Value[])
Update a characteristic value in a service. If notifications (or indications) are enabled on that cha...
hci_le_clear_white_list
tBleStatus hci_le_clear_white_list(void)
The LE_Clear_White_List command is used to clear the white list stored in the Controller. This command can be used at any time except when:
aci_l2cap_connection_parameter_update_resp
tBleStatus aci_l2cap_connection_parameter_update_resp(uint16_t Connection_Handle, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Slave_latency, uint16_t Timeout_Multiplier, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length, uint8_t Identifier, uint8_t Accept)
Accept or reject a connection update. This command should be sent in response to a aci_l2cap_connecti...
hci_le_add_device_to_white_list
tBleStatus hci_le_add_device_to_white_list(uint8_t Address_Type, uint8_t Address[6])
The LE_Add_Device_To_White_List command is used to add a single device to the white list stored in th...
aci_gatt_read_char_value
tBleStatus aci_gatt_read_char_value(uint16_t Connection_Handle, uint16_t Attr_Handle)
Start the procedure to read the attribute value. When the procedure is completed, a aci_gatt_proc_com...
aci_gap_delete_ad_type
tBleStatus aci_gap_delete_ad_type(uint8_t ADType)
This command can be used to delete the specified AD type from the advertisement data if present...
Include_UUID_t_s
Definition: bluenrg1_api.h:48
UUID_t_s
Definition: bluenrg1_api.h:63
hci_read_local_version_information
tBleStatus hci_read_local_version_information(uint8_t *HCI_Version, uint16_t *HCI_Revision, uint8_t *LMP_PAL_Version, uint16_t *Manufacturer_Name, uint16_t *LMP_PAL_Subversion)
This command reads the values for the version information for the local Controller. The HCI Version information defines the version information of the HCI layer. The LMP/PAL Version information defines the version of the LMP or PAL. The Manufacturer_Name information indicates the manufacturer of the local device. The HCI Revision and LMP/PAL Subversion are implementation dependent. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.4.1)
hci_read_rssi
tBleStatus hci_read_rssi(uint16_t Connection_Handle, uint8_t *RSSI)
This command reads the Received Signal Strength Indication (RSSI) value from a Controller. For a BR/EDR Controller, a Connection_Handle is used as the Handle command parameter and return parameter. The RSSI parameter returns the difference between the measured Received Signal Strength Indication (RSSI) and the limits of the Golden Receive Power Range for a Connection Handle to another BR/EDR Controller. The Connection_Handle must be a Connection_Handle for an ACL connection. Any positive RSSI value returned by the Controller indicates how many dB the RSSI is above the upper limit, any negative value indicates how many dB the RSSI is below the lower limit. The value zero indicates that the RSSI is inside the Golden Receive Power Range. Note: How accurate the dB values will be depends on the Bluetooth hardware. The only requirements for the hardware are that the BR/EDR Controller is able to tell whether the RSSI is inside, above or below the Golden Device Power Range. The RSSI measurement compares the received signal power with two threshold levels, which define the Golden Receive Power Range. The lower threshold level corresponds to a received power between -56 dBm and 6 dB above the actual sensitivity of the receiver. The upper threshold level is 20 dB above the lower threshold level to an accuracy of +/- 6 dB. For an AMP Controller, a Physical_Link_Handle is used for the Handle command parameter and return parameter. The meaning of the RSSI metric is AMP type specific and defined in the AMP PALs (see Volume 5, Core System Package [AMP Controller volume]). For an LE transport, a Connection_Handle is used as the Handle command parameter and return parameter. The meaning of the RSSI metric is an absolute receiver signal strength value in dBm to +/- 6 dB accuracy. If the RSSI cannot be read, the RSSI metric shall be set to 127. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.5.4)
aci_gatt_add_service
tBleStatus aci_gatt_add_service(uint8_t Service_UUID_Type, Service_UUID_t *Service_UUID, uint8_t Service_Type, uint8_t Max_Attribute_Records, uint16_t *Service_Handle)
Add a service to GATT Server. When a service is created in the server, the host needs to reserve the ...
aci_gap_start_selective_connection_establish_proc
tBleStatus aci_gap_start_selective_connection_establish_proc(uint8_t LE_Scan_Type, uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint8_t Filter_Duplicates, uint8_t Num_of_Whitelist_Entries, Whitelist_Entry_t Whitelist_Entry[])
Start a selective connection establishment procedure. The GAP adds the specified device addresses int...
Whitelist_Entry_t_s::Peer_Address_Type
uint8_t Peer_Address_Type
Definition: bluenrg1_api.h:30
aci_gap_set_io_capability
tBleStatus aci_gap_set_io_capability(uint8_t IO_Capability)
Set the IO capabilities of the device. This command has to be given only when the device is not in a ...
aci_gap_set_limited_discoverable
tBleStatus aci_gap_set_limited_discoverable(uint8_t Advertising_Type, uint16_t Advertising_Interval_Min, uint16_t Advertising_Interval_Max, uint8_t Own_Address_Type, uint8_t Advertising_Filter_Policy, uint8_t Local_Name_Length, uint8_t Local_Name[], uint8_t Service_Uuid_length, uint8_t Service_Uuid_List[], uint16_t Slave_Conn_Interval_Min, uint16_t Slave_Conn_Interval_Max)
Put the device in limited discoverable mode (as defined in Bluetooth Specification v...
Service_UUID_t_s::Service_UUID_128
uint8_t Service_UUID_128[16]
Definition: bluenrg1_api.h:45
hci_le_start_encryption
tBleStatus hci_le_start_encryption(uint16_t Connection_Handle, uint8_t Random_Number[8], uint16_t Encrypted_Diversifier, uint8_t Long_Term_Key[16])
The LE_Start_Encryption command is used to authenticate the given encryption key associated with the ...
aci_hal_tone_stop
tBleStatus aci_hal_tone_stop(void)
This command is used to stop the previously started aci_hal_tone_start command.
aci_att_prepare_write_req
tBleStatus aci_att_prepare_write_req(uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
Send a Prepare Write Request. The Prepare Write Request is used to request the server to prepare to w...
aci_hal_get_fw_build_number
tBleStatus aci_hal_get_fw_build_number(uint16_t *Build_Number)
This command returns the build number associated with the firmware version currently running...
Service_UUID_t_s::Service_UUID_16
uint16_t Service_UUID_16
Definition: bluenrg1_api.h:44
hci_le_receiver_test
tBleStatus hci_le_receiver_test(uint8_t RX_Frequency)
This command is used to start a test where the DUT receives test reference packets at a fixed interva...
hci_read_transmit_power_level
tBleStatus hci_read_transmit_power_level(uint16_t Connection_Handle, uint8_t Type, uint8_t *Transmit_Power_Level)
This command reads the values for the Transmit_Power_Level parameter for the specified Connection_Han...
aci_gatt_set_security_permission
tBleStatus aci_gatt_set_security_permission(uint16_t Serv_Handle, uint16_t Attr_Handle, uint8_t Security_Permissions)
This command sets the security permission for the attribute handle specified. Currently the setting o...
hci_le_transmitter_test
tBleStatus hci_le_transmitter_test(uint8_t TX_Frequency, uint8_t Length_Of_Test_Data, uint8_t Packet_Payload)
This command is used to start a test where the DUT generates test reference packets at a fixed interv...
aci_gatt_del_include_service
tBleStatus aci_gatt_del_include_service(uint16_t Serv_Handle, uint16_t Include_Handle)
Delete the Include definition from the service.
aci_gap_start_name_discovery_proc
tBleStatus aci_gap_start_name_discovery_proc(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Peer_Address_Type, uint8_t Peer_Address[6], uint8_t Own_Address_Type, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length)
Start the name discovery procedure. A LE_Create_Connection call will be made to the controller by GAP...
aci_gatt_read_long_char_value
tBleStatus aci_gatt_read_long_char_value(uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset)
Start the procedure to read a long characteristic value. the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packets are given through aci_att_read_blob_resp_event event.
Char_Desc_Uuid_t_s::Char_UUID_16
uint16_t Char_UUID_16
Definition: bluenrg1_api.h:59
hci_le_long_term_key_requested_negative_reply
tBleStatus hci_le_long_term_key_requested_negative_reply(uint16_t Connection_Handle)
The LE_Long_Term_Key_Request_Negative_Reply command is used to reply to an LE Long Term Key Request e...
hci_le_encrypt
tBleStatus hci_le_encrypt(uint8_t Key[16], uint8_t Plaintext_Data[16], uint8_t Encrypted_Data[16])
The LE_Encrypt command is used to request the Controller to encrypt the Plaintext_Data in the command...
aci_gap_set_authentication_requirement
tBleStatus aci_gap_set_authentication_requirement(uint8_t MITM_Mode, uint8_t OOB_Enable, uint8_t OOB_Data[16], uint8_t Min_Encryption_Key_Size, uint8_t Max_Encryption_Key_Size, uint8_t Use_Fixed_Pin, uint32_t Fixed_Pin, uint8_t Bonding_Mode)
Set the authentication requirements for the device. If the OOB_Enable is set to 0, the following 16 octets of OOB_Data will be ignored on reception. This command has to be given only when the device is not in a connected state.
aci_hal_le_tx_test_packet_number
tBleStatus aci_hal_le_tx_test_packet_number(uint32_t *Number_Of_Packets)
This command returns the number of packets sent in Direct Test Mode. When the Direct TX test is start...
aci_gap_terminate
tBleStatus aci_gap_terminate(uint16_t Connection_Handle, uint8_t Reason)
Command the controller to terminate the connection. A hci_disconnection_complete_event event will be ...
aci_gatt_write_without_resp
tBleStatus aci_gatt_write_without_resp(uint16_t Connection_Handle, uint16_t Attr_Handle, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
Start the procedure to write a characteristic value without waiting for any response from the server...
Bonded_Device_Entry_t_s::Address_Type
uint8_t Address_Type
Definition: bluenrg1_api.h:38
hci_le_test_end
tBleStatus hci_le_test_end(uint16_t *Number_Of_Packets)
This command is used to stop any test which is in progress. The Number_Of_Packets for a transmitter t...
aci_att_find_by_type_value_req
tBleStatus aci_att_find_by_type_value_req(uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle, uint16_t UUID, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
Send a Find By Type Value Request The Find By Type Value Request is used to obtain the handles of att...
aci_hal_set_radio_activity_mask
tBleStatus aci_hal_set_radio_activity_mask(uint16_t Radio_Activity_Mask)
This command set the bitmask associated to aci_hal_end_of_radio_activity_event. Only the radio acitiv...
hci_le_remove_device_from_white_list
tBleStatus hci_le_remove_device_from_white_list(uint8_t Address_Type, uint8_t Address[6])
The LE_Remove_Device_From_White_List command is used to remove a single device from the white list st...
hci_le_read_white_list_size
tBleStatus hci_le_read_white_list_size(uint8_t *White_List_Size)
The LE_Read_White_List_Size command is used to read the total number of white list entries that can b...
Handle_Entry_t
struct Handle_Entry_t_s Handle_Entry_t
aci_gatt_find_included_services
tBleStatus aci_gatt_find_included_services(uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle)
Start the procedure to find all included services. The responses of the procedure are given through t...
UUID_t_s::UUID_16
uint16_t UUID_16
Definition: bluenrg1_api.h:64
aci_gatt_write_long_char_desc
tBleStatus aci_gatt_write_long_char_desc(uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
Start the procedure to write a long characteristic descriptor. When the procedure is completed...
Whitelist_Entry_t_s
Definition: bluenrg1_api.h:27
hci_le_read_advertising_channel_tx_power
tBleStatus hci_le_read_advertising_channel_tx_power(uint8_t *Transmit_Power_Level)
The LE_Read_Advertising_Channel_Tx_Power command is used by the Host to read the transmit power level...
hci_read_local_supported_features
tBleStatus hci_read_local_supported_features(uint8_t LMP_Features[8])
This command requests a list of the supported features for the local BR/EDR Controller. This command will return a list of the LMP features. For details see Part C, Link Manager Protocol Specification on page 227. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.4.3)
Char_UUID_t_s
Definition: bluenrg1_api.h:53
aci_gatt_set_desc_value
tBleStatus aci_gatt_set_desc_value(uint16_t Serv_Handle, uint16_t Char_Handle, uint16_t Char_Desc_Handle, uint16_t Val_Offset, uint8_t Char_Desc_Value_Length, uint8_t Char_Desc_Value[])
This command sets the value of the descriptor specified by charDescHandle.
aci_gap_resolve_private_addr
tBleStatus aci_gap_resolve_private_addr(uint8_t Address[6], uint8_t Actual_Address[6])
This command tries to resolve the address provided with the IRKs present in its database. If the address is resolved successfully with any one of the IRKs present in the database, it returns success and also the corresponding public/static random address stored with the IRK in the database.
aci_hal_set_tx_power_level
tBleStatus aci_hal_set_tx_power_level(uint8_t En_High_Power, uint8_t PA_Level)
This command sets the TX power level of the device. By controlling the EN_HIGH_POWER and the PA_LEVEL...
aci_gatt_read_char_desc
tBleStatus aci_gatt_read_char_desc(uint16_t Connection_Handle, uint16_t Attr_Handle)
Start the procedure to read the descriptor specified. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packet is given through aci_att_read_resp_event event.
aci_gatt_set_event_mask
tBleStatus aci_gatt_set_event_mask(uint32_t GATT_Evt_Mask)
Mask events from the GATT. The default configuration is all the events masked.
aci_gap_terminate_gap_proc
tBleStatus aci_gap_terminate_gap_proc(uint8_t Procedure_Code)
Terminate the specified GATT procedure. An aci_gap_proc_complete_event event is returned with the pro...
hci_le_set_scan_parameters
tBleStatus hci_le_set_scan_parameters(uint8_t LE_Scan_Type, uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint8_t Scanning_Filter_Policy)
The LE_Set_Scan_Parameters command is used to set the scan parameters. The LE_Scan_Type parameter con...
Service_UUID_t
union Service_UUID_t_s Service_UUID_t
hci_le_create_connection
tBleStatus hci_le_create_connection(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Initiator_Filter_Policy, uint8_t Peer_Address_Type, uint8_t Peer_Address[6], uint8_t Own_Address_Type, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length)
TBD.
Char_UUID_t_s::Char_UUID_16
uint16_t Char_UUID_16
Definition: bluenrg1_api.h:54
Char_Desc_Uuid_t_s::Char_UUID_128
uint8_t Char_UUID_128[16]
Definition: bluenrg1_api.h:60
aci_gap_is_device_bonded
tBleStatus aci_gap_is_device_bonded(uint8_t Peer_Address_Type, uint8_t Peer_Address[6])
The command finds whether the device, whose address is specified in the command, is bonded...
aci_gatt_exchange_config
tBleStatus aci_gatt_exchange_config(uint16_t Connection_Handle)
Perform an ATT MTU exchange procedure. When the ATT MTU exchange procedure is completed, a aci_att_exchange_mtu_resp_event event is generated. A aci_gatt_proc_complete_event event is also generated to indicate the end of the procedure.
aci_hal_write_config_data
tBleStatus aci_hal_write_config_data(uint8_t Offset, uint8_t Length, uint8_t Value[])
This command writes a value to a low level configure data structure. It is useful to setup directly s...
aci_gatt_write_char_reliable
tBleStatus aci_gatt_write_char_reliable(uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
Start the procedure to write a characteristic reliably. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. During the procedure, aci_att_prepare_write_resp_event and aci_att_exec_write_resp_event events are raised.
aci_gap_start_general_discovery_proc
tBleStatus aci_gap_start_general_discovery_proc(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint8_t Filter_Duplicates)
Start the general discovery procedure. The controller is commanded to start active scanning...
aci_gatt_read_long_char_desc
tBleStatus aci_gatt_read_long_char_desc(uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset)
Start the procedure to read a long characteristic value. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packets are given through aci_att_read_blob_resp_event event.
hci_le_set_host_channel_classification
tBleStatus hci_le_set_host_channel_classification(uint8_t LE_Channel_Map[5])
The LE_Set_Host_Channel_Classification command allows the Host to specify a channel classification fo...
aci_gap_start_general_connection_establish_proc
tBleStatus aci_gap_start_general_connection_establish_proc(uint8_t LE_Scan_Type, uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint8_t Filter_Duplicates)
Start a general connection establishment procedure. The host enables scanning in the controller with ...
aci_gap_send_pairing_req
tBleStatus aci_gap_send_pairing_req(uint16_t Connection_Handle, uint8_t Force_Rebond)
Send the SM pairing request to start a pairing process. The authentication requirements and IO capabi...
aci_gap_start_limited_discovery_proc
tBleStatus aci_gap_start_limited_discovery_proc(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint8_t Filter_Duplicates)
Start the limited discovery procedure. The controller is commanded to start active scanning...
aci_gatt_disc_all_primary_services
tBleStatus aci_gatt_disc_all_primary_services(uint16_t Connection_Handle)
Start the GATT client procedure to discover all primary services on the server. The responses of the ...
Whitelist_Entry_t_s::Peer_Address
uint8_t Peer_Address[6]
Definition: bluenrg1_api.h:32
aci_gap_set_undirected_connectable
tBleStatus aci_gap_set_undirected_connectable(uint8_t Adv_Filter_Policy, uint8_t Own_Address_Type)
Put the device into undirected connectable mode. If privacy is enabled in the device, a resolvable private address is generated and used as the advertiser's address. If not, the address of the type specified in own_addr_type is used for advertising.
aci_gap_create_connection
tBleStatus aci_gap_create_connection(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Peer_Address_Type, uint8_t Peer_Address[6], uint8_t Own_Address_Type, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length)
Start the direct connection establishment procedure. A LE_Create_Connection call will be made to the ...
aci_gap_update_adv_data
tBleStatus aci_gap_update_adv_data(uint8_t AdvDataLen, uint8_t AdvData[])
This command can be used to update the advertising data for a particular AD type. If the AD type spec...
Bonded_Device_Entry_t_s
Definition: bluenrg1_api.h:35
aci_gap_slave_security_req
tBleStatus aci_gap_slave_security_req(uint16_t Connection_Handle, uint8_t Bonding, uint8_t MITM_Protection)
Send a slave security request to the master. This command has to be issued to notify the master of th...
aci_l2cap_connection_parameter_update_req
tBleStatus aci_l2cap_connection_parameter_update_req(uint16_t Connection_Handle, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Slave_latency, uint16_t Timeout_Multiplier)
Send an L2CAP connection parameter update request from the slave to the master. An aci_l2cap_connecti...
Include_UUID_t_s::Include_UUID_16
uint16_t Include_UUID_16
Definition: bluenrg1_api.h:49
hci_le_create_connection_cancel
tBleStatus hci_le_create_connection_cancel(void)
The LE_Create_Connection_Cancel command is used to cancel the LE_Create_Connection command...
Char_Desc_Uuid_t_s
Definition: bluenrg1_api.h:58
hci_le_read_supported_states
tBleStatus hci_le_read_supported_states(uint8_t LE_States[8])
The LE_Read_Supported_States command reads the states and state combinations that the link layer supp...
hci_read_bd_addr
tBleStatus hci_read_bd_addr(uint8_t BD_ADDR[6])
On a BR/EDR Controller, this command reads the Bluetooth Controller address (BD_ADDR). See the Part B, Baseband Specification on page 59 for details of how BD_ADDR is used (see [Vol 3] Part C, Section 3.2.1). On an LE Controller, this command shall read the Public Device Address as defined in [Vol 6] Part B, Section 1.3, Device Address. If this Controller does not have a Public Device Address, the value 0x000000000000 shall be returned. On a BR/EDR/LE Controller, the public address shall be the same as the BD_ADDR. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.3.2)
aci_gap_clear_security_db
tBleStatus aci_gap_clear_security_db(void)
Clear the security database. All the devices in the security database will be removed.
aci_gatt_add_char_desc
tBleStatus aci_gatt_add_char_desc(uint16_t Service_Handle, uint16_t Char_Handle, uint8_t Char_Desc_Uuid_Type, Char_Desc_Uuid_t *Char_Desc_Uuid, uint8_t Char_Desc_Value_Max_Len, uint8_t Char_Desc_Value_Length, uint8_t Char_Desc_Value[], uint8_t Security_Permissions, uint8_t Access_Permissions, uint8_t GATT_Evt_Mask, uint8_t Enc_Key_Size, uint8_t Is_Variable, uint16_t *Char_Desc_Handle)
Add a characteristic descriptor to a service.
Char_Desc_Uuid_t
union Char_Desc_Uuid_t_s Char_Desc_Uuid_t
aci_gap_set_discoverable
tBleStatus aci_gap_set_discoverable(uint8_t Advertising_Type, uint16_t Advertising_Interval_Min, uint16_t Advertising_Interval_Max, uint8_t Own_Address_Type, uint8_t Advertising_Filter_Policy, uint8_t Local_Name_Length, uint8_t Local_Name[], uint8_t Service_Uuid_length, uint8_t Service_Uuid_List[], uint16_t Slave_Conn_Interval_Min, uint16_t Slave_Conn_Interval_Max)
Put the device in general discoverable mode (as defined in Bluetooth Specification v...
hci_le_set_scan_response_data
tBleStatus hci_le_set_scan_response_data(uint8_t Scan_Response_Data_Length, uint8_t Scan_Response_Data[31])
This command is used to provide data used in Scanning Packets that have a data field. Only the significant part of the Scan_Response_Data is transmitted in the Scanning Packets, as defined in [Vol 3] Part C, Section 11. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.8)
hci_disconnect
tBleStatus hci_disconnect(uint16_t Connection_Handle, uint8_t Reason)
The hci_disconnect is used to terminate an existing connection. The Connection_Handle command paramet...
aci_gap_get_security_level
tBleStatus aci_gap_get_security_level(uint8_t *MITM_Mode, uint8_t *Bonding_Mode, uint8_t *OOB_Enable, uint8_t *Passkey_required)
This command can be used to get the current security settings of the device.