hurricanefrog commented on issue #382:
URL: https://github.com/apache/mynewt-nimble/issues/382#issuecomment-1919156057

   Funny, I experienced a similar problem with a quick sample app I did (just 
one read characteristic). The read callback would be called twice in quick 
succession.
   
   I printed the backtrace and got this:
   
   ```
   (my code..)
   
   0x400ec541: ble_gatts_val_access at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gatts.c:375
    (inlined by) ble_gatts_val_access at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gatts.c:340
   
   0x400ec5d5: ble_gatts_chr_val_access at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gatts.c:421
   
   0x400ef359: ble_att_svr_read at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att_svr.c:398
   
   0x400ef5fa: ble_att_svr_read_handle at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att_svr.c:473
   
   0x400efcf1: ble_att_svr_rx_read at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att_svr.c:1478
   
   0x400e9739: ble_att_rx at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att.c:511
   
   0x400e961b: ble_hs_hci_evt_acl_process at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:994
   
   0x400e8f04: ble_hs_process_rx_data_queue at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs.c:238
   ...
   
   (my code)...
   0x400ec541: ble_gatts_val_access at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gatts.c:375
    (inlined by) ble_gatts_val_access at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gatts.c:340
   
   0x400ec5d5: ble_gatts_chr_val_access at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gatts.c:421
   
   0x400ef359: ble_att_svr_read at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att_svr.c:398
   
   0x400ef5fa: ble_att_svr_read_handle at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att_svr.c:473
   
   0x400efd75: ble_att_svr_rx_read_blob at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att_svr.c:1528
   
   0x400e9739: ble_att_rx at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att.c:511
   
   0x400e961b: ble_hs_hci_evt_acl_process at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:994
   
   0x400e8f04: ble_hs_process_rx_data_queue at 
C:/VSCode/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs.c:238
   ```
   
   It *appears* to me that the nRF Connect app calls the read request twice, 
which appears at NumBLE as `BLE_ATT_OP_READ_REQ` and `BLE_ATT_OP_READ_BLOB_REQ`.
   
   If I use https://sensboston.github.io/BLEConsole/, I only get one read 
request.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to