]> granicus.if.org Git - esp-idf/commitdiff
component/bt: Fix Gatt table read_req bug and advertising channel 39 not available bug
authorIsland <island@espressif.com>
Tue, 24 Jan 2017 10:38:50 +0000 (18:38 +0800)
committerIsland <island@espressif.com>
Wed, 25 Jan 2017 03:18:26 +0000 (11:18 +0800)
components/bt/bluedroid/api/include/esp_gap_ble_api.h
components/bt/bluedroid/stack/gatt/gatt_db.c

index fa8eb2432e796717609c017f9698efb1ee17290e..64aff1fb1afadc71581f8e5c318600c23dbdbb9b 100644 (file)
@@ -95,7 +95,7 @@ typedef enum {
 typedef enum {
     ADV_CHNL_37     = 0x01,
     ADV_CHNL_38     = 0x02,
-    ADV_CHNL_39     = 0x03,
+    ADV_CHNL_39     = 0x04,
     ADV_CHNL_ALL    = 0x07,
 } esp_ble_adv_channel_t;
 
index a574b5d1edca94739c85cf8e4acfd6142bcb6dfd..03919d483c31d407a1957c5ab13df62718dbe16e 100644 (file)
@@ -1332,7 +1332,13 @@ static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
 
         gatt_sr_send_req_callback(conn_id,
                                   trans_id, GATTS_REQ_TYPE_READ, &sr_data);
-        return (tGATT_STATUS) GATT_PENDING;
+        
+        if (need_rsp) {
+            return (tGATT_STATUS) GATT_PENDING;
+        }
+        else{
+            return (tGATT_STATUS) GATT_STACK_RSP;
+        }
     } else {
         return (tGATT_STATUS) GATT_BUSY;    /* max pending command, application error */
     }