xref: /btstack/platform/daemon/src/daemon_cmds.c (revision 1edc4fc7a84e142e2820247cf355d234293eaafe)
12531c97eSMatthias Ringwald /*
22531c97eSMatthias Ringwald  * Copyright (C) 2014 BlueKitchen GmbH
32531c97eSMatthias Ringwald  *
42531c97eSMatthias Ringwald  * Redistribution and use in source and binary forms, with or without
52531c97eSMatthias Ringwald  * modification, are permitted provided that the following conditions
62531c97eSMatthias Ringwald  * are met:
72531c97eSMatthias Ringwald  *
82531c97eSMatthias Ringwald  * 1. Redistributions of source code must retain the above copyright
92531c97eSMatthias Ringwald  *    notice, this list of conditions and the following disclaimer.
102531c97eSMatthias Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
112531c97eSMatthias Ringwald  *    notice, this list of conditions and the following disclaimer in the
122531c97eSMatthias Ringwald  *    documentation and/or other materials provided with the distribution.
132531c97eSMatthias Ringwald  * 3. Neither the name of the copyright holders nor the names of
142531c97eSMatthias Ringwald  *    contributors may be used to endorse or promote products derived
152531c97eSMatthias Ringwald  *    from this software without specific prior written permission.
162531c97eSMatthias Ringwald  * 4. Any redistribution, use, or modification is done solely for
172531c97eSMatthias Ringwald  *    personal benefit and not for any commercial purpose or for
182531c97eSMatthias Ringwald  *    monetary gain.
192531c97eSMatthias Ringwald  *
202531c97eSMatthias Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
212531c97eSMatthias Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
222531c97eSMatthias Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
232531c97eSMatthias Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
242531c97eSMatthias Ringwald  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
252531c97eSMatthias Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
262531c97eSMatthias Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
272531c97eSMatthias Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
282531c97eSMatthias Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
292531c97eSMatthias Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
302531c97eSMatthias Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
312531c97eSMatthias Ringwald  * SUCH DAMAGE.
322531c97eSMatthias Ringwald  *
332531c97eSMatthias Ringwald  * Please inquire about commercial licensing options at
342531c97eSMatthias Ringwald  * [email protected]
352531c97eSMatthias Ringwald  *
362531c97eSMatthias Ringwald  */
372531c97eSMatthias Ringwald 
38ab2c6ae4SMatthias Ringwald #define __BTSTACK_FILE__ "daemon_cmds.c"
39ab2c6ae4SMatthias Ringwald 
402531c97eSMatthias Ringwald /*
412531c97eSMatthias Ringwald  *  hci_cmd.c
422531c97eSMatthias Ringwald  *
432531c97eSMatthias Ringwald  *  Created by Matthias Ringwald on 7/23/09.
442531c97eSMatthias Ringwald  */
452531c97eSMatthias Ringwald 
462531c97eSMatthias Ringwald #include "daemon_cmds.h"
472531c97eSMatthias Ringwald #include "hci.h"
482531c97eSMatthias Ringwald 
492531c97eSMatthias Ringwald // calculate combined ogf/ocf value
502531c97eSMatthias Ringwald #define OPCODE(ogf, ocf) (ocf | ogf << 10)
512531c97eSMatthias Ringwald 
522531c97eSMatthias Ringwald // BTstack commands
532531c97eSMatthias Ringwald const hci_cmd_t btstack_get_state = {
542531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, BTSTACK_GET_STATE), ""
552531c97eSMatthias Ringwald };
562531c97eSMatthias Ringwald 
572531c97eSMatthias Ringwald /**
582531c97eSMatthias Ringwald  * @param power_mode (0 = off, 1 = on)
592531c97eSMatthias Ringwald  */
602531c97eSMatthias Ringwald const hci_cmd_t btstack_set_power_mode = {
612531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, BTSTACK_SET_POWER_MODE), "1"
622531c97eSMatthias Ringwald };
632531c97eSMatthias Ringwald 
642531c97eSMatthias Ringwald /**
652531c97eSMatthias Ringwald  * @param acl_capture_mode (0 = off, 1 = on)
662531c97eSMatthias Ringwald  */
672531c97eSMatthias Ringwald const hci_cmd_t btstack_set_acl_capture_mode = {
682531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, BTSTACK_SET_ACL_CAPTURE_MODE), "1"
692531c97eSMatthias Ringwald };
702531c97eSMatthias Ringwald 
712531c97eSMatthias Ringwald const hci_cmd_t btstack_get_version = {
722531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, BTSTACK_GET_VERSION), ""
732531c97eSMatthias Ringwald };
742531c97eSMatthias Ringwald 
752531c97eSMatthias Ringwald const hci_cmd_t btstack_get_system_bluetooth_enabled = {
762531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, BTSTACK_GET_SYSTEM_BLUETOOTH_ENABLED), ""
772531c97eSMatthias Ringwald };
782531c97eSMatthias Ringwald 
792531c97eSMatthias Ringwald /**
802531c97eSMatthias Ringwald  * @param bluetooth_enabled_flag (0 = off, 1 = on, only used by btstack config)
812531c97eSMatthias Ringwald  */
822531c97eSMatthias Ringwald const hci_cmd_t btstack_set_system_bluetooth_enabled = {
832531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, BTSTACK_SET_SYSTEM_BLUETOOTH_ENABLED), "1"
842531c97eSMatthias Ringwald };
852531c97eSMatthias Ringwald 
862531c97eSMatthias Ringwald /**
872531c97eSMatthias Ringwald  * @param discoverable_flag (0 = off, 1 = on)
882531c97eSMatthias Ringwald  */
892531c97eSMatthias Ringwald const hci_cmd_t btstack_set_discoverable = {
902531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, BTSTACK_SET_DISCOVERABLE), "1"
912531c97eSMatthias Ringwald };
922531c97eSMatthias Ringwald 
932531c97eSMatthias Ringwald /**
942531c97eSMatthias Ringwald  * @param bluetooth_enabled_flag (0 = off, 1 = on, only used by btstack config)
952531c97eSMatthias Ringwald  */
962531c97eSMatthias Ringwald const hci_cmd_t btstack_set_bluetooth_enabled = {
972531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, BTSTACK_SET_BLUETOOTH_ENABLED), "1"
982531c97eSMatthias Ringwald };
992531c97eSMatthias Ringwald 
1002531c97eSMatthias Ringwald /**
1012531c97eSMatthias Ringwald  * @param bd_addr (48)
1022531c97eSMatthias Ringwald  * @param psm (16)
1032531c97eSMatthias Ringwald  */
1042531c97eSMatthias Ringwald const hci_cmd_t l2cap_create_channel_cmd = {
1052531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, L2CAP_CREATE_CHANNEL), "B2"
1062531c97eSMatthias Ringwald };
1072531c97eSMatthias Ringwald 
1082531c97eSMatthias Ringwald /**
1092531c97eSMatthias Ringwald  * @param bd_addr (48)
1102531c97eSMatthias Ringwald  * @param psm (16)
1112531c97eSMatthias Ringwald  * @param mtu (16)
1122531c97eSMatthias Ringwald  */
1132531c97eSMatthias Ringwald const hci_cmd_t l2cap_create_channel_mtu_cmd = {
1142531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, L2CAP_CREATE_CHANNEL_MTU), "B22"
1152531c97eSMatthias Ringwald // @param bd_addr(48), psm (16), mtu (16)
1162531c97eSMatthias Ringwald };
1172531c97eSMatthias Ringwald 
1182531c97eSMatthias Ringwald /**
1192531c97eSMatthias Ringwald  * @param channel (16)
1202531c97eSMatthias Ringwald  * @param reason (16)
1212531c97eSMatthias Ringwald  */
1222531c97eSMatthias Ringwald const hci_cmd_t l2cap_disconnect_cmd = {
1232531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, L2CAP_DISCONNECT), "21"
1242531c97eSMatthias Ringwald };
1252531c97eSMatthias Ringwald 
1262531c97eSMatthias Ringwald /**
1272531c97eSMatthias Ringwald  * @param psm (16)
1282531c97eSMatthias Ringwald  * @param mtu (16)
1292531c97eSMatthias Ringwald  */
1302531c97eSMatthias Ringwald const hci_cmd_t l2cap_register_service_cmd = {
1312531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, L2CAP_REGISTER_SERVICE), "22"
1322531c97eSMatthias Ringwald };
1332531c97eSMatthias Ringwald 
1342531c97eSMatthias Ringwald /**
1352531c97eSMatthias Ringwald  * @param psm (16)
1362531c97eSMatthias Ringwald  */
1372531c97eSMatthias Ringwald const hci_cmd_t l2cap_unregister_service_cmd = {
1382531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, L2CAP_UNREGISTER_SERVICE), "2"
1392531c97eSMatthias Ringwald };
1402531c97eSMatthias Ringwald 
1412531c97eSMatthias Ringwald /**
1422531c97eSMatthias Ringwald  * @param source_cid (16)
1432531c97eSMatthias Ringwald  */
1442531c97eSMatthias Ringwald const hci_cmd_t l2cap_accept_connection_cmd = {
1452531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, L2CAP_ACCEPT_CONNECTION), "2"
1462531c97eSMatthias Ringwald };
1472531c97eSMatthias Ringwald 
1482531c97eSMatthias Ringwald /**
1492531c97eSMatthias Ringwald  * @param source_cid (16)
1507ef6a7bbSMatthias Ringwald  * @param reason (deprecated)
1512531c97eSMatthias Ringwald  */
1522531c97eSMatthias Ringwald const hci_cmd_t l2cap_decline_connection_cmd = {
1532531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, L2CAP_DECLINE_CONNECTION), "21"
1542531c97eSMatthias Ringwald };
1552531c97eSMatthias Ringwald 
1562531c97eSMatthias Ringwald 
1572531c97eSMatthias Ringwald /**
1582531c97eSMatthias Ringwald  * @param service_record
1592531c97eSMatthias Ringwald  */
1602531c97eSMatthias Ringwald const hci_cmd_t sdp_register_service_record_cmd = {
1612531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, SDP_REGISTER_SERVICE_RECORD), "S"
1622531c97eSMatthias Ringwald };
1632531c97eSMatthias Ringwald 
1642531c97eSMatthias Ringwald /**
1652531c97eSMatthias Ringwald  * @param service_record_handle
1662531c97eSMatthias Ringwald  */
1672531c97eSMatthias Ringwald const hci_cmd_t sdp_unregister_service_record_cmd = {
1682531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, SDP_UNREGISTER_SERVICE_RECORD), "4"
1692531c97eSMatthias Ringwald };
1702531c97eSMatthias Ringwald 
1712531c97eSMatthias Ringwald /**
1722531c97eSMatthias Ringwald  * @param bd_addr
1732531c97eSMatthias Ringwald  * @param service_search_pattern
1742531c97eSMatthias Ringwald  */
1752531c97eSMatthias Ringwald const hci_cmd_t sdp_client_query_rfcomm_services_cmd = {
1762531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, SDP_CLIENT_QUERY_RFCOMM_SERVICES), "BS"
1772531c97eSMatthias Ringwald };
1782531c97eSMatthias Ringwald 
1792531c97eSMatthias Ringwald /**
1802531c97eSMatthias Ringwald  * @param bd_addr
1812531c97eSMatthias Ringwald  * @param service_search_pattern
1822531c97eSMatthias Ringwald  * @param attribute_ID_list
1832531c97eSMatthias Ringwald  */
1842531c97eSMatthias Ringwald const hci_cmd_t sdp_client_query_services_cmd = {
1852531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, SDP_CLIENT_QUERY_SERVICES), "BSS"
1862531c97eSMatthias Ringwald };
1872531c97eSMatthias Ringwald 
1882531c97eSMatthias Ringwald /**
1892531c97eSMatthias Ringwald  * @param bd_addr
1902531c97eSMatthias Ringwald  * @param server_channel
1912531c97eSMatthias Ringwald  */
1922531c97eSMatthias Ringwald const hci_cmd_t rfcomm_create_channel_cmd = {
1932531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, RFCOMM_CREATE_CHANNEL), "B1"
1942531c97eSMatthias Ringwald };
1952531c97eSMatthias Ringwald 
1962531c97eSMatthias Ringwald /**
1972531c97eSMatthias Ringwald  * @param bd_addr
1982531c97eSMatthias Ringwald  * @param server_channel
1992531c97eSMatthias Ringwald  * @param mtu
2002531c97eSMatthias Ringwald  * @param credits
2012531c97eSMatthias Ringwald  */
2022531c97eSMatthias Ringwald const hci_cmd_t rfcomm_create_channel_with_initial_credits_cmd = {
2032531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, RFCOMM_CREATE_CHANNEL_WITH_CREDITS), "B121"
2042531c97eSMatthias Ringwald };
2052531c97eSMatthias Ringwald 
2062531c97eSMatthias Ringwald /**
2072531c97eSMatthias Ringwald  * @param rfcomm_cid
2082531c97eSMatthias Ringwald  * @param credits
2092531c97eSMatthias Ringwald  */
2102531c97eSMatthias Ringwald const hci_cmd_t rfcomm_grants_credits_cmd = {
2112531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, RFCOMM_GRANT_CREDITS), "21"
2122531c97eSMatthias Ringwald };
2132531c97eSMatthias Ringwald 
2142531c97eSMatthias Ringwald /**
2152531c97eSMatthias Ringwald  * @param rfcomm_cid
2162531c97eSMatthias Ringwald  * @param reason
2172531c97eSMatthias Ringwald  */
2182531c97eSMatthias Ringwald const hci_cmd_t rfcomm_disconnect_cmd = {
2192531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, RFCOMM_DISCONNECT), "21"
2202531c97eSMatthias Ringwald };
2212531c97eSMatthias Ringwald 
2222531c97eSMatthias Ringwald /**
2232531c97eSMatthias Ringwald  * @param server_channel
2242531c97eSMatthias Ringwald  * @param mtu
2252531c97eSMatthias Ringwald  */
2262531c97eSMatthias Ringwald const hci_cmd_t rfcomm_register_service_cmd = {
2272531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, RFCOMM_REGISTER_SERVICE), "12"
2282531c97eSMatthias Ringwald };
2292531c97eSMatthias Ringwald 
2302531c97eSMatthias Ringwald /**
2312531c97eSMatthias Ringwald  * @param server_channel
2322531c97eSMatthias Ringwald  * @param mtu
2332531c97eSMatthias Ringwald  * @param initial_credits
2342531c97eSMatthias Ringwald  */
2352531c97eSMatthias Ringwald const hci_cmd_t rfcomm_register_service_with_initial_credits_cmd = {
2362531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, RFCOMM_REGISTER_SERVICE_WITH_CREDITS), "121"
2372531c97eSMatthias Ringwald };
2382531c97eSMatthias Ringwald 
2392531c97eSMatthias Ringwald /**
2402531c97eSMatthias Ringwald  * @param service_channel
2412531c97eSMatthias Ringwald  */
2422531c97eSMatthias Ringwald const hci_cmd_t rfcomm_unregister_service_cmd = {
2432531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, RFCOMM_UNREGISTER_SERVICE), "2"
2442531c97eSMatthias Ringwald };
2452531c97eSMatthias Ringwald 
2462531c97eSMatthias Ringwald /**
2472531c97eSMatthias Ringwald  * @param source_cid
2482531c97eSMatthias Ringwald  */
2492531c97eSMatthias Ringwald const hci_cmd_t rfcomm_accept_connection_cmd = {
2502531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, RFCOMM_ACCEPT_CONNECTION), "2"
2512531c97eSMatthias Ringwald };
2522531c97eSMatthias Ringwald 
2532531c97eSMatthias Ringwald 
2542531c97eSMatthias Ringwald /**
2552531c97eSMatthias Ringwald  * @param source_cid
2562531c97eSMatthias Ringwald  * @param reason
2572531c97eSMatthias Ringwald  */
2582531c97eSMatthias Ringwald const hci_cmd_t rfcomm_decline_connection_cmd = {
2592531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, RFCOMM_DECLINE_CONNECTION), "21"
2602531c97eSMatthias Ringwald };
2612531c97eSMatthias Ringwald 
2622531c97eSMatthias Ringwald // request persistent rfcomm channel number for named service
2632531c97eSMatthias Ringwald /**
2642531c97eSMatthias Ringwald  * @param named_service
2652531c97eSMatthias Ringwald  */
2662531c97eSMatthias Ringwald const hci_cmd_t rfcomm_persistent_channel_for_service_cmd = {
2672531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, RFCOMM_PERSISTENT_CHANNEL), "N"
2682531c97eSMatthias Ringwald };
2692531c97eSMatthias Ringwald 
2702531c97eSMatthias Ringwald /**
2712531c97eSMatthias Ringwald  * @param handle
2722531c97eSMatthias Ringwald  */
2732531c97eSMatthias Ringwald const hci_cmd_t gap_disconnect_cmd = {
2742531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, GAP_DISCONNECT), "H"
2752531c97eSMatthias Ringwald };
2762531c97eSMatthias Ringwald 
2772531c97eSMatthias Ringwald /**
2782531c97eSMatthias Ringwald  */
2792531c97eSMatthias Ringwald const hci_cmd_t gap_le_scan_start = {
2802531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, GAP_LE_SCAN_START), ""
2812531c97eSMatthias Ringwald };
2822531c97eSMatthias Ringwald 
2832531c97eSMatthias Ringwald /**
2842531c97eSMatthias Ringwald  */
2852531c97eSMatthias Ringwald const hci_cmd_t gap_le_scan_stop = {
2862531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, GAP_LE_SCAN_STOP), ""
2872531c97eSMatthias Ringwald };
2882531c97eSMatthias Ringwald 
2892531c97eSMatthias Ringwald /**
2902531c97eSMatthias Ringwald  * @param scan_type
2912531c97eSMatthias Ringwald  * @param scan_interval
2922531c97eSMatthias Ringwald  * @param scan_window
2932531c97eSMatthias Ringwald  */
2942531c97eSMatthias Ringwald const hci_cmd_t gap_le_set_scan_parameters = {
2952531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, GAP_LE_SET_SCAN_PARAMETERS), "122"
2962531c97eSMatthias Ringwald };
2972531c97eSMatthias Ringwald 
2982531c97eSMatthias Ringwald /**
2992531c97eSMatthias Ringwald  * @param peer_address_type
3002531c97eSMatthias Ringwald  * @param peer_address
3012531c97eSMatthias Ringwald  */
3022531c97eSMatthias Ringwald const hci_cmd_t gap_le_connect_cmd = {
3032531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, GAP_LE_CONNECT), "1B"
3042531c97eSMatthias Ringwald };
3052531c97eSMatthias Ringwald 
3062531c97eSMatthias Ringwald /**
3072531c97eSMatthias Ringwald  * @param peer_address_type
3082531c97eSMatthias Ringwald  * @param peer_address
3092531c97eSMatthias Ringwald  */
3102531c97eSMatthias Ringwald const hci_cmd_t gap_le_connect_cancel_cmd = {
3112531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, GAP_LE_CONNECT_CANCEL), ""
3122531c97eSMatthias Ringwald };
3132531c97eSMatthias Ringwald 
3142531c97eSMatthias Ringwald /**
3152531c97eSMatthias Ringwald  * @param handle
3162531c97eSMatthias Ringwald  */
3172531c97eSMatthias Ringwald const hci_cmd_t gatt_discover_primary_services_cmd = {
3182531c97eSMatthias Ringwald OPCODE(OGF_BTSTACK, GATT_DISCOVER_ALL_PRIMARY_SERVICES), "H"
3192531c97eSMatthias Ringwald };
3202531c97eSMatthias Ringwald 
3212531c97eSMatthias Ringwald /**
3222531c97eSMatthias Ringwald  * @param handle
3232531c97eSMatthias Ringwald  * @param uuid16
3242531c97eSMatthias Ringwald  */
3252531c97eSMatthias Ringwald const hci_cmd_t gatt_discover_primary_services_by_uuid16_cmd = {
3262531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16), "H2"
3272531c97eSMatthias Ringwald };
3282531c97eSMatthias Ringwald 
3292531c97eSMatthias Ringwald /**
3302531c97eSMatthias Ringwald  * @param handle
3312531c97eSMatthias Ringwald  * @param uuid128
3322531c97eSMatthias Ringwald  */
3332531c97eSMatthias Ringwald const hci_cmd_t gatt_discover_primary_services_by_uuid128_cmd = {
3342531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128), "HU"
3352531c97eSMatthias Ringwald };
3362531c97eSMatthias Ringwald 
3372531c97eSMatthias Ringwald /**
3382531c97eSMatthias Ringwald  * @param handle
3392531c97eSMatthias Ringwald  * @param service
3402531c97eSMatthias Ringwald  */
3412531c97eSMatthias Ringwald const hci_cmd_t gatt_find_included_services_for_service_cmd = {
3422531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE), "HX"
3432531c97eSMatthias Ringwald };
3442531c97eSMatthias Ringwald 
3452531c97eSMatthias Ringwald /**
3462531c97eSMatthias Ringwald  * @param handle
3472531c97eSMatthias Ringwald  * @param service
3482531c97eSMatthias Ringwald  */
3492531c97eSMatthias Ringwald const hci_cmd_t gatt_discover_characteristics_for_service_cmd = {
3502531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE), "HX"
3512531c97eSMatthias Ringwald };
3522531c97eSMatthias Ringwald 
3532531c97eSMatthias Ringwald /**
3542531c97eSMatthias Ringwald  * @param handle
3552531c97eSMatthias Ringwald  * @param service
3562531c97eSMatthias Ringwald  * @param uuid128
3572531c97eSMatthias Ringwald  */
3582531c97eSMatthias Ringwald const hci_cmd_t gatt_discover_characteristics_for_service_by_uuid128_cmd = {
3592531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128), "HXU"
3602531c97eSMatthias Ringwald };
3612531c97eSMatthias Ringwald 
3622531c97eSMatthias Ringwald /**
3632531c97eSMatthias Ringwald  * @param handle
3642531c97eSMatthias Ringwald  * @param characteristic
3652531c97eSMatthias Ringwald  */
3662531c97eSMatthias Ringwald const hci_cmd_t gatt_discover_characteristic_descriptors_cmd = {
3672531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS), "HY"
3682531c97eSMatthias Ringwald };
3692531c97eSMatthias Ringwald 
3702531c97eSMatthias Ringwald /**
3712531c97eSMatthias Ringwald  * @param handle
3722531c97eSMatthias Ringwald  * @param characteristic
3732531c97eSMatthias Ringwald  */
3742531c97eSMatthias Ringwald const hci_cmd_t gatt_read_value_of_characteristic_cmd = {
3752531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_READ_VALUE_OF_CHARACTERISTIC), "HY"
3762531c97eSMatthias Ringwald };
3772531c97eSMatthias Ringwald 
3782531c97eSMatthias Ringwald /**
3792531c97eSMatthias Ringwald  * @param handle
3802531c97eSMatthias Ringwald  * @param characteristic
3812531c97eSMatthias Ringwald  */
3822531c97eSMatthias Ringwald const hci_cmd_t gatt_read_long_value_of_characteristic_cmd = {
3832531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_READ_LONG_VALUE_OF_CHARACTERISTIC), "HY"
3842531c97eSMatthias Ringwald };
3852531c97eSMatthias Ringwald 
3862531c97eSMatthias Ringwald /**
3872531c97eSMatthias Ringwald  * @param handle
3882531c97eSMatthias Ringwald  * @param characteristic
3892531c97eSMatthias Ringwald  * @param data_length
3902531c97eSMatthias Ringwald  * @param data
3912531c97eSMatthias Ringwald  */
3922531c97eSMatthias Ringwald const hci_cmd_t gatt_write_value_of_characteristic_without_response_cmd = {
3932531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE), "HYLV"
3942531c97eSMatthias Ringwald };
3952531c97eSMatthias Ringwald 
3962531c97eSMatthias Ringwald /**
3972531c97eSMatthias Ringwald  * @param handle
3982531c97eSMatthias Ringwald  * @param characteristic
3992531c97eSMatthias Ringwald  * @param data_length
4002531c97eSMatthias Ringwald  * @param data
4012531c97eSMatthias Ringwald  */
4022531c97eSMatthias Ringwald const hci_cmd_t gatt_write_value_of_characteristic_cmd = {
4032531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_WRITE_VALUE_OF_CHARACTERISTIC), "HYLV"
4042531c97eSMatthias Ringwald };
4052531c97eSMatthias Ringwald 
4062531c97eSMatthias Ringwald /**
4072531c97eSMatthias Ringwald  * @param handle
4082531c97eSMatthias Ringwald  * @param characteristic
4092531c97eSMatthias Ringwald  * @param data_length
4102531c97eSMatthias Ringwald  * @param data
4112531c97eSMatthias Ringwald  */
4122531c97eSMatthias Ringwald const hci_cmd_t gatt_write_long_value_of_characteristic_cmd = {
4132531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC), "HYLV"
4142531c97eSMatthias Ringwald };
4152531c97eSMatthias Ringwald 
4162531c97eSMatthias Ringwald /**
4172531c97eSMatthias Ringwald  * @param handle
4182531c97eSMatthias Ringwald  * @param characteristic
4192531c97eSMatthias Ringwald  * @param data_length
4202531c97eSMatthias Ringwald  * @param data
4212531c97eSMatthias Ringwald  */
4222531c97eSMatthias Ringwald const hci_cmd_t gatt_reliable_write_long_value_of_characteristic_cmd = {
4232531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC), "HYLV"
4242531c97eSMatthias Ringwald };
4252531c97eSMatthias Ringwald 
4262531c97eSMatthias Ringwald /**
4272531c97eSMatthias Ringwald  * @param handle
4282531c97eSMatthias Ringwald  * @param descriptor
4292531c97eSMatthias Ringwald  */
4302531c97eSMatthias Ringwald const hci_cmd_t gatt_read_characteristic_descriptor_cmd = {
4312531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_READ_CHARACTERISTIC_DESCRIPTOR), "HZ"
4322531c97eSMatthias Ringwald };
4332531c97eSMatthias Ringwald 
4342531c97eSMatthias Ringwald /**
4352531c97eSMatthias Ringwald  * @param handle
4362531c97eSMatthias Ringwald  * @param descriptor
4372531c97eSMatthias Ringwald  */
4382531c97eSMatthias Ringwald const hci_cmd_t gatt_read_long_characteristic_descriptor_cmd = {
4392531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR), "HZ"
4402531c97eSMatthias Ringwald };
4412531c97eSMatthias Ringwald 
4422531c97eSMatthias Ringwald /**
4432531c97eSMatthias Ringwald  * @param handle
4442531c97eSMatthias Ringwald  * @param descriptor
4452531c97eSMatthias Ringwald  * @param data_length
4462531c97eSMatthias Ringwald  * @param data
4472531c97eSMatthias Ringwald  */
4482531c97eSMatthias Ringwald const hci_cmd_t gatt_write_characteristic_descriptor_cmd = {
4492531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_WRITE_CHARACTERISTIC_DESCRIPTOR), "HZLV"
4502531c97eSMatthias Ringwald };
4512531c97eSMatthias Ringwald 
4522531c97eSMatthias Ringwald /**
4532531c97eSMatthias Ringwald  * @param handle
4542531c97eSMatthias Ringwald  * @param descriptor
4552531c97eSMatthias Ringwald  * @param data_length
4562531c97eSMatthias Ringwald  * @param data
4572531c97eSMatthias Ringwald  */
4582531c97eSMatthias Ringwald const hci_cmd_t gatt_write_long_characteristic_descriptor_cmd = {
4592531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR), "HZLV"
4602531c97eSMatthias Ringwald };
4612531c97eSMatthias Ringwald 
4622531c97eSMatthias Ringwald /**
4632531c97eSMatthias Ringwald  * @param handle
4642531c97eSMatthias Ringwald  * @param characteristic
4652531c97eSMatthias Ringwald  * @param configuration
4662531c97eSMatthias Ringwald  */
4672531c97eSMatthias Ringwald const hci_cmd_t gatt_write_client_characteristic_configuration_cmd = {
4682531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION), "HY2"
4692531c97eSMatthias Ringwald };
4702531c97eSMatthias Ringwald 
4712531c97eSMatthias Ringwald /**
4722531c97eSMatthias Ringwald  * @param handle
4732531c97eSMatthias Ringwald  */
4742531c97eSMatthias Ringwald const hci_cmd_t gatt_get_mtu = {
4752531c97eSMatthias Ringwald     OPCODE(OGF_BTSTACK, GATT_GET_MTU), "H"
4762531c97eSMatthias Ringwald };
477*1edc4fc7SMatthias Ringwald 
478*1edc4fc7SMatthias Ringwald /**
479*1edc4fc7SMatthias Ringwald  * @brief Sets the requested authentication requirements, bonding yes/no, MITM yes/no, SC yes/no, keypress yes/no
480*1edc4fc7SMatthias Ringwald  * @param auth_req OR combination of SM_AUTHREQ_ flags
481*1edc4fc7SMatthias Ringwald  */
482*1edc4fc7SMatthias Ringwald const hci_cmd_t sm_set_authentication_requirements_cmd = {
483*1edc4fc7SMatthias Ringwald     OPCODE(OGF_BTSTACK, SM_SET_AUTHENTICATION_REQUIREMENTS), "1"
484*1edc4fc7SMatthias Ringwald };
485*1edc4fc7SMatthias Ringwald 
486*1edc4fc7SMatthias Ringwald /**
487*1edc4fc7SMatthias Ringwald  * @brief Sets the available IO Capabilities
488*1edc4fc7SMatthias Ringwald  * @param io_capabilities
489*1edc4fc7SMatthias Ringwald  */
490*1edc4fc7SMatthias Ringwald const hci_cmd_t sm_set_io_capabilities_cmd = {
491*1edc4fc7SMatthias Ringwald     OPCODE(OGF_BTSTACK, SM_SET_IO_CAPABILITIES), "1"
492*1edc4fc7SMatthias Ringwald };
493*1edc4fc7SMatthias Ringwald 
494*1edc4fc7SMatthias Ringwald /**
495*1edc4fc7SMatthias Ringwald  * @brief Decline bonding triggered by event before
496*1edc4fc7SMatthias Ringwald  * @param con_handle
497*1edc4fc7SMatthias Ringwald  */
498*1edc4fc7SMatthias Ringwald const hci_cmd_t sm_bonding_decline_cmd = {
499*1edc4fc7SMatthias Ringwald     OPCODE(OGF_BTSTACK, SM_BONDING_DECLINE), "H"
500*1edc4fc7SMatthias Ringwald };
501*1edc4fc7SMatthias Ringwald 
502*1edc4fc7SMatthias Ringwald /**
503*1edc4fc7SMatthias Ringwald  * @brief Confirm Just Works bonding
504*1edc4fc7SMatthias Ringwald  * @param con_handle
505*1edc4fc7SMatthias Ringwald  */
506*1edc4fc7SMatthias Ringwald const hci_cmd_t sm_just_works_confirm_cmd = {
507*1edc4fc7SMatthias Ringwald     OPCODE(OGF_BTSTACK, SM_JUST_WORKS_CONFIRM), "H"
508*1edc4fc7SMatthias Ringwald };
509*1edc4fc7SMatthias Ringwald 
510*1edc4fc7SMatthias Ringwald /**
511*1edc4fc7SMatthias Ringwald  * @brief Confirm value from SM_EVENT_NUMERIC_COMPARISON_REQUEST for Numeric Comparison bonding
512*1edc4fc7SMatthias Ringwald  * @param con_handle
513*1edc4fc7SMatthias Ringwald  */
514*1edc4fc7SMatthias Ringwald const hci_cmd_t sm_numeric_comparison_confirm_cmd = {
515*1edc4fc7SMatthias Ringwald     OPCODE(OGF_BTSTACK, SM_NUMERIC_COMPARISON_CONFIRM), "H"
516*1edc4fc7SMatthias Ringwald };
517*1edc4fc7SMatthias Ringwald 
518*1edc4fc7SMatthias Ringwald /**
519*1edc4fc7SMatthias Ringwald  * @brief Reports passkey input by user
520*1edc4fc7SMatthias Ringwald  * @param con_handle
521*1edc4fc7SMatthias Ringwald  * @param passkey in [0..999999]
522*1edc4fc7SMatthias Ringwald  */
523*1edc4fc7SMatthias Ringwald const hci_cmd_t sm_passkey_input_cmd = {
524*1edc4fc7SMatthias Ringwald     OPCODE(OGF_BTSTACK, SM_PASSKEY_INPUT), "H4"
525*1edc4fc7SMatthias Ringwald };
526