# General Attribute Profile GATT is a service framework that uses the ATT to discover services, and to read and write characteristic values on a peer device. To perform Bluetooth Low Energy GATT server or client functions, you must first complete the steps in the following procedure. ## Set up device for Bluetooth Low Energy GATT functions **Prerequisites** - Enable SSH to access your host device. For instructions, see [Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#use-ssh). - Place the DUT and the remote device in the Bluetooth vicinity. **Procedure** 1. Run the SSH in command prompt using the following command: ssh root@ Copy to clipboard **Example** If the IP address of the device is `10.92.160.222`, run the following command: ssh root@10.92.160.222 Copy to clipboard 2. Connect to the SSH by entering the following password: oelinux123 Copy to clipboard 3. Open the Bluetooth test application by running the following command: btapp Copy to clipboard **Sample output** sh-5.1# btapp get_ap_interface :: get_ap_interface ***************** Menu ******************* gap_menu test_menu a2dp_sink_menu hfp_client_menu gattctest_menu gattstest_menu hogp_menu hfp_ag_menu a2dp_source_menu spp_client_menu spp_server_menu eslap_menu exit ****************************************** Copy to clipboard 4. Enable Bluetooth as follows: 1. Go to the **Gap Menu** by running the following command: gap_menu Copy to clipboard 2. Enable Bluetooth by running the following command: enable Copy to clipboard **Sample output** gap_menu ***************** Menu ******************* enable disable inquiry cancel_inquiry get_role_req eg. get_role_req 00:11:22:33:44:55 pair eg. pair 00:11:22:33:44:55 0(auto)/1(BREDR)/2(BLE) unpair eg. unpair 00:11:22:33:44:55 inquiry_list bonded_list get_state get_bt_name get_bt_address set_bt_name eg. set_bt_name MDM_Fluoride set_scan_mode eg. set_scan_mode 0 --0-BT_SCAN_MODE_NONE,1- BT_SCAN_MODE_CONNECTABLE,2-BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE set_afh eg. set_afh 112233445566778899f0 send_hci_cmd eg. send_hci_cmd 01,04,05,33,8b,9e,0a,00 - For Inquiry read_clock eg. read_clock 0(local)/1(acl connection) 00:11:22:33:44:55 main_menu switch_role_req eg. switch_role_req 00:11:22:33:44:55 0 or get_role_req 00:11:22:33:44:55 1 ****************************************** enable current State = 0, new state = 1 BT State is ON Copy to clipboard 3. Return to the **Main Menu** by running the following command: main_menu Copy to clipboard 5. Go to the GATT server or client menu, as required. - To go to the GATT server menu, run the following command: gattstest_menu Copy to clipboard **Sample output** main_menu ***************** Menu ******************* gap_menu test_menu a2dp_sink_menu hfp_client_menu gattctest_menu gattstest_menu hogp_menu hfp_ag_menu a2dp_source_menu spp_client_menu spp_server_menu eslap_menu exit ****************************************** gattstest_menu ***************** Menu ******************* gattstest_init_server (only for Init time) gattstest_addservers gattstest_addservices gattstest_init_advertiser initialzes advertiser gattstest_start_advertiser gattstest_readphy gattstest_set_preferred_phy gattstest_stop gattstest_disable gattstest_cancel_connection gattstest_unregister_server main_menu ****************************************** Copy to clipboard For GATT server functions, see [Perform Bluetooth Low Energy GATT server functions](https://docs.qualcomm.com/doc/80-70018-13/topic/perform_ble_gatt_server_functions.html#perform-ble-gatt-server-functions). - To go to the GATT client menu, run the following command: gattctest_menu Copy to clipboard **Sample output** main_menu ***************** Menu ******************* gap_menu test_menu a2dp_sink_menu hfp_client_menu gattctest_menu gattstest_menu hogp_menu hfp_ag_menu a2dp_source_menu spp_client_menu spp_server_menu eslap_menu exit ****************************************** gattctest_menu ***************** Menu ******************* gattctest_init (only for Init time) gattctest_scanset eg: scanType: 0-NO_SET,1-SCAN_MODE,2-CB_Type,3-RESULT_TYPE,4-PHY,5-LEGACY,6-REPORT_DELAY,7-NUM_RESPONSE gattctest_scanFilter eg: filterType: 0-NO_FILT,1-FILT_BD_ADDR,2-FILT_DEV_NAME,3-FILT_SRVC_UUID gattctest_scanFilter_manData gattctest_start_scan gattctest_stop_scan gattctest_batch_scan 0-FULL MODE 1- TRUNCATED MODE main_menu gattctest_conn_params eg: isAuto(0/1);phy (0-255 (0 bit:1M(1); 1bit:2M(2); 2bit:Coded(4); or any combination); isOppur(0/1)) gattctest_connect eg. gattctest_connect 00:11:22:33:44:55 0(Auto)/1(BREDR)/2(LE) gattctest_disconnect eg.gattctest_connect 00:11:22:33:44:55 gattctest_discsrvc discovering services gattctest_rdchar_uuid eg: reading char by uuid gattctest_readPhy gattctest_readrssi gattctest_reqMtu gattctest_refresh gattctest_setphy gattctest_getservices gattctest_reqconn_pri gattctest_getcharid gattctest_reliablewrite gattctest_getdescid gattctest_getsrvc gattctest_RdWrDesc gattctest_RdWrchar gattctest_conn_dev gattctest_register_notifications ****************************************** Copy to clipboard For GATT client functions, see [Perform Bluetooth Low Energy GATT client functions](https://docs.qualcomm.com/doc/80-70018-13/topic/perform_ble_gatt_client_functions.html#perform-ble-gatt-client-functions). **Next steps** - [Perform Bluetooth Low Energy GATT server functions](https://docs.qualcomm.com/doc/80-70018-13/topic/perform_ble_gatt_server_functions.html) You can perform Bluetooth Low Energy GATT server functions using the `gattstest_menu` options. - [Perform Bluetooth Low Energy GATT client functions](https://docs.qualcomm.com/doc/80-70018-13/topic/perform_ble_gatt_client_functions.html) You can perform Bluetooth Low Energy GATT client functions using the `gattctest_menu` options. - [GATT configuration parameters](https://docs.qualcomm.com/doc/80-70018-13/topic/gatt_config_params.html) To configure the GATT server and client functions, use the server, client, and scan parameters. Last Published: Apr 02, 2025 [Previous Topic Perform Bluetooth SPP client functions](https://docs.qualcomm.com/bundle/publicresource/80-70018-13/topics/perform_bluetooth_functions_in_spp_client.md) [Next Topic Perform Bluetooth Low Energy GATT server functions](https://docs.qualcomm.com/bundle/publicresource/80-70018-13/topics/perform_ble_gatt_server_functions.md)