iPhone SDK v3.0.8.0 7配对失败

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
5 posts / 0 new
Last post
ViSt
Offline
Last seen:1 year 3 months ago
加入:2016-10-20 06:53
iPhone SDK v3.0.8.0 7配对失败

I have two versions of our FW in an old product. Version 1 running SDK v3.0.8.0 and version 2 running SDK v3.0.10.0.

When I try to pair with version 1 with an iPhone running iOS v13.3 the iPhone sends a pairing request with secure connections even though our FW is running BLE v4.0. This causes the FW to respond with pairing failed with reason invalid parameters.

It works well with older iPhones since they don't support secure connections and all androids since they won't set the secure connections flag when communicating with a device running such an old BLE version.

Is there a fix between the two SDK versions that could have fixed this? We still have thousands of units running the old FW so we hope to understand why the pairing fails in the old version.

We contacted apple support and got this response

The difference between a 5s and the newer devices is the newer devices support the BLE 4.2 Secure Connections. You indicated your device is using BLE 4.0 hardware.

This could be caused by a misconfiguration on the device side.

There is a typical issue on older firmware that gets exposed when trying to pair with a SC device.

The reason for having this issue would be if your peripheral is calculating the pairing key based on the assumption that some reserved bits (according to BLE Spec 4.0) in the pairing request would always be zero.

The newer iPhones are using the new LE Secure Connections pairing model, and the SC bit is set to 1 in the pairing request.

A peripheral which does not support SC can ignore this request and choose to use the legacy pairing model, but it cannot ignore the bits when creating the keys, and must use the data as received to calculate them.

Peripherals are supposed to use the pairing request exactly as received to calculate the keys otherwise the keys will be wrong when iOS sends a pairing request with these bits (in this case the SC bit) set to 1.

So, do check your firmware to make sure that any of the reserved (and unused) bits are not assumed to be zero, and are used as is when received from the iOS side.

Device:
PM_Dialog
Offline
Last seen:3 days 16 hours ago
Staff
加入:2018-02-08 11:03
Hi Viktor,

Hi Viktor,

Thanks for your question. We have taken your question offline and we are working on it internally. Once I have an answer for your issue, I will let you know.

Regards, PM_Dialog

PM_Dialog
Offline
Last seen:3 days 16 hours ago
Staff
加入:2018-02-08 11:03
Hi Viktor,

Hi Viktor,

Just got an answer from the Team. There are many improvements done in SDK3.0.10. Please refer to the release notes of SDK3.0.10 to get more information about the SDK3.0.10 improvements. I assume that the pairing issue does not exist with the SDK3.0.10 running (FW version 2).

Thanks, PM_Dialog

ViSt
Offline
Last seen:1 year 3 months ago
加入:2016-10-20 06:53
Only pairing related note in

Only pairing related note in the release notes for 3.0.10.0 is under rom patches for DA14580 which is the chip we are using
Security manager issue

Reserved bitschecked in Pairing PDU leads to PTS test TC_BV_04_C Failure.Patched Functions: smpc_send_pairing_req_ind(),smpc_check_pairing_feat(), smpc_pairing_cfm_handler(). smpc_pairing_cfm_handler()patch was updated to fix hard fault when SMPC_PAIRING_CFM is received after the passkey entry procedure has timed out.

But I don't get a hard fault. It stays alive but sends a pairing failed message.

PM_Dialog
Offline
Last seen:3 days 16 hours ago
Staff
加入:2018-02-08 11:03
Hi Victor,

Hi Victor,

We will take it offline and I will send you an email in your registered email address.

Thanks, PM_Dialog