-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update platformio/espressif32 to the latest 6.7.0 #3899
Conversation
Please use the same version for all esp32 targets and not necessarily the latest one. |
Cool. We'll do some testing and probably wait on another release before merging into a new alpha. |
There is some improvement in the final binary size.
rak11200:
|
@mskvortsov can you re-test pairing BLE from scratch? I was initially surprised to see that it worked on my T-Beam Supreme PR with a previously cached BLE auth. However I was subsequently disappointed today when I found that the immediate auth failure does in fact still occur for me on brand new pairings with the 6 digit pin. |
I tested for the Android app only, as the failure in the mentioned #2793 is for Android specifically. A re-test is passing right now as well:
The iOS app is unavailable in my region, so I can't test that. However, after building the macOS app, I'm also disappointed to see now that the authentication fails:
@thebentern Do you use the iPhone app to test? In any case, since there are still auth issues, the PR is no good. Maybe I'll try to investigate this deeply in the coming days (sorry, without any obligation). In the meantime, I can extract the LTO and newlib nano parts into a separate pull request if these changes are welcome at all. |
On the T-Beam Supreme I had failures in both iOS and Android. This was the case in that original issue as well, though I don't believe it was specifically reported |
The only thing that works stably for me is disabling BLE_SM_PAIR_AUTHREQ_SC. Far from ideal. Sniffing the packets exchanged between phone and device revealed nothing. The only difference between Android and iPhone I spotted was that the latter additionally tried to negotiate an MTU size of 512 before starting the pairing procedure which looked the same right until an auth rejection packet. Partial success was obtained by overwriting framework-arduinoespressif32's libbtbb.a and libphy.a with the ones from espressif/esp-phy-libs#release/v4.4. S3 connected to iPhone, C3 did not. Porting to IDF v5.1.2 changed nothing compared to v4.4.7: Android connects, but iPhone does not (to a C3 device, S3 requires more effort to port). The same for Nimble update. |
A hunch, but it almost seems like the issue is happening with the persistence of the pairing that is preventing it from succeeding on new pairings.
|
I'm not entirely sure what you mean, but at least setting CONFIG_BT_NIMBLE_MAX_BONDS to 0 has no effect. Adding some tracing to Nimble and comparing a successful trace against a failing one shows divergence at the very end of the auth procedure. BLE_HCI_EVCODE_ENCRYPT_CHG event is not fired ("ble_hs_event_rx_hci_ev 08" below).
And right after that ble_sm_pair_fail_tx effectively terminates the pairing:
nimble-arduino-1.4.1-trace.patch |
Enabling IRK distribution from both ends solved the issue for my setup, and now both android and apple apps connect successfully to both the esp32c3 and esp32s3 devices I have. So there is no need to disable BLE SC. Supposedly, BLE RPA was involved somehow. |
@thebentern Could you check whether the last fix works for you? |
Works perfectly now, @mskvortsov. Stellar work! That one had been stumping us for a while. This is a big deal to be able to move forward with the newer framework features. |
The issue #2793 of bluetooth pairing failure seems to be no longer present as has been tested on tlora_t3s3_v1. (Who knows what new issues the update might introduce.)