Connecting to sensor using ESP32C3 and BLE5.0
Posted: Thu Jul 14, 2022 7:37 am
Hello,
I am currently trying to connect a sensor to ESP32C3 using BLE 5.0.
Following is the sequence of packets communicated between the sensor and the controller.
ADV_IND→SCAN_REQ→SCAN_RESP→CONNECT_IND→LL_FEATURE_REQ
After the LL_FEATURE_REQ packet, the slave i.e. the sensor does not respond with LL_FEATURE_RSP, which is the expected response. Instead it starts broadcasting again the ADV_IND packets.
I have tested the same sensor with ESP32 earlier and it works fine.
The difference in the LL_FEATURE_REQ packets of ESP32 and ESP32C3 is the feature set values supported by ESP32C3 according to the BLE 5.0 specifications for e.g. the LE 2M PHY, LE Coded PHY and the Channel Selection Algorithm #2.
Also, regarding the bluetooth settings both ESP32 and ESP32C3 are used in controller only mode.
Is it possible to disable the 'Channel Selection Algorithm #2' and use only 'Channel Selection Algorithm #1'? I guess the sensor does not support 'Channel Selection Algorithm #2'.
It would be really helpful if someone could give a direction as to how to debug this failure in connection as it is delaying our production.
Also, please let me know if you need any other information.
Thanks in advance.
I am currently trying to connect a sensor to ESP32C3 using BLE 5.0.
Following is the sequence of packets communicated between the sensor and the controller.
ADV_IND→SCAN_REQ→SCAN_RESP→CONNECT_IND→LL_FEATURE_REQ
After the LL_FEATURE_REQ packet, the slave i.e. the sensor does not respond with LL_FEATURE_RSP, which is the expected response. Instead it starts broadcasting again the ADV_IND packets.
I have tested the same sensor with ESP32 earlier and it works fine.
The difference in the LL_FEATURE_REQ packets of ESP32 and ESP32C3 is the feature set values supported by ESP32C3 according to the BLE 5.0 specifications for e.g. the LE 2M PHY, LE Coded PHY and the Channel Selection Algorithm #2.
Also, regarding the bluetooth settings both ESP32 and ESP32C3 are used in controller only mode.
Is it possible to disable the 'Channel Selection Algorithm #2' and use only 'Channel Selection Algorithm #1'? I guess the sensor does not support 'Channel Selection Algorithm #2'.
It would be really helpful if someone could give a direction as to how to debug this failure in connection as it is delaying our production.
Also, please let me know if you need any other information.
Thanks in advance.