cancel
Showing results for 
Search instead for 
Did you mean: 

Device not responding to LL_FEATURE_REQ

HSAADI
Associate III

Hi,

My custom device with custom firmware don't respond to LL_FEATURE_REQ so the device disconnect.

The connectivity part of my project is very similar to the example BLE_p2p_server, the device start advertising and when I connect to it with the mobile app ST BLE TOOLBOX the connection fail, in wireshark I see the master device is sending LL_FEATURE_REQ but the device doesn't respond.

Can you please help me as I'm stuck for a week now?

I share with you the wireshark logs (remove the .csv extension)

MCU : STM32WB55

Stack: stm32wb5x_BLE_Stack_full_fw.bin v 1.13.1

Thanks by advance for the help.

18 REPLIES 18
Remy ISSALYS
ST Employee

Hello,

For the disconnection, the value 8 means Connection timeout and for return error of aci_gatt_update_char_value, the value 96 means Invalid handle. Maybe, you have a wrong configuration for the role, so the aci_gap_init isn't executed, check your configuration in ble_conf.h file.

Best Regards

HSAADI
Associate III

The issue with the appearance char is resolved, I don't see any other error, but the connection still fail, most of time with error 3E:

user> ble open peripheral

(BLE) Device Information Service (DIS) is added Successfully 000C

(BLE) Manufacturer Name Characteristic Added Successfully 000D

(BLE) Model Number String Characteristic Added Successfully 000F

(BLE) Serial Number String Characteristic Added Successfully 0011

(BLE) Firmware Revision String Characteristic Added Successfully 0013

(BLE) Software Revision String Characteristic Added Successfully 0015

BLE opened

OK

user> ble connect start

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

OK

user> (BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x801

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x802

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x803

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

Remy ISSALYS
ST Employee

Hello,

The reason 0x3E means Connection Failed to be Established so it's difficult to understand your issue.

Which version of Android or IOS are you using ? And which version of ST BLE Toolbox are you using ? Can you check that you have the latest version please ?

Can you try to perform BLE Air trace to understand the reason of the disconnection ?

Best Regards

HSAADI
Associate III

Hello,

I use:

  • HUAWEI P20 android 8.0.0
  • xiaomi MI A2 android 10

ST BLE ToolBox v 1.2.1, on the 2 phones, it's the last version as I know.

I attached the wireshark logs, remove the extension ".txt" added to be abble to upload the file.

In this test I tried multiple times the connection, as you can see the app logs below, the first 5 tries failed with reason 8 then switched to reason 0x3E, After the 3 first tests I reset the device.

I used for this test the Xiaomi phone.

(BLE) Successfully Start Low Power Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x802

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 8

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x803

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 8

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x804

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 8

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

Welcome to AOS

(BLE) Wireless Firmware version 1.13.0

(BLE) Wireless Firmware build 5

(BLE) FUS version 1.1.0

(BLE) SHCI_SUB_EVT_CODE_READY - WIRELESS_FW_RUNNING

(BLE) DBGMCU_GetRevisionID= 2001

0d,00:00:00.000255. (APP) Starting application thread

login:

login: ***

user> ble open peri

(BLE) Device Information Service (DIS) is added Successfully 000C

(BLE) Manufacturer Name Characteristic Added Successfully 000D

(BLE) Model Number String Characteristic Added Successfully 000F

(BLE) Serial Number String Characteristic Added Successfully 0011

(BLE) Firmware Revision String Characteristic Added Successfully 0013

(BLE) Software Revision String Characteristic Added Successfully 0015

BLE opened

OK

user> ble connect start

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

OK

user> (BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x801

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 8

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x802

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 8

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x803

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x804

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x805

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

HSAADI
Associate III

And rarely the device send the response of LL_FEATURE_REQ, I attach wireshark logs

HSAADI
Associate III

I attach also the logs of the first time that LL_FEATURE_REQ succeeded (remove the .txt extension)

thanks.

Remy ISSALYS
ST Employee

Hello,

Can you try with another smartphone with a newer version of Android like Android 12 ?

Best Regards

Hello, sorry for the late response due to summer vacations.

I don't have a phone with android 12, but I tried with Iphone 12 IOS 15.6.1 and the result is the same:

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xba

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xbb

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 8

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xbc

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xbd

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 8

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xbe

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xbf

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 8

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xc0

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xc1

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 8

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xc2

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xc3

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xc4

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 3e

(BLE) First index in 0 state

(BLE) Successfully Start Fast Advertising

(BLE) HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0xc5

(BLE)

** DISCONNECTION EVENT WITH CLIENT status 0 - Reason 8

0693W00000SunUsQAJ.png

HSAADI
Associate III

Resolved by setting CFG_BLE_LSE_SOURCE to 1 in app_conf.h

Do you have more explanation?