Hello there,
Is there a way to detect a previously paired device?
我用的是scan_request trackerexample andble\应用程序\安全and I'm able to print out the address of the device that has sent the scan request. However, I want to check this address and know when a device that has been paired and is disconnected, sends a scan request.
Is there a way to verify if a device has been previously paired with?
当做,
Hamid
Keywords:
Device:
Hi Hamid,
Please check the ble_app_security example of the SDK. The example uses either an SPI Flash or an EEPROM to store the bonding data. Once the device has been paired, all the pairing/bonding information are stored in the non-volatile memory, so you could check there if a device has been previously paired.
谢谢,下午好
Yes, I can see that the example stores the data of the previously paired device. But, my question is how these data can be checked on the scan request where we only have the address of the scanner?
Hi Hamid,
Once you get the BD address of the peer device, you should check into the pairing information which is stored into the non-volatile memory. Could you please let me know what is your requirement here? Do you need to block scanning from the devices that are not paired?
谢谢,下午好
Hello there,
In order to increase the quality of service, we want to trigger an event once a paired user sends a scan request. In other words, we don't want to block scanning from other devices, we only need to be notified once a paired device has sent a scan request.
The following code is what I'm using for this purpose but I'm not sure if this is the right method. (especiallly for legacy pairing)
您认为这会涵盖所有配对情况吗(我们可能需要更改配对方法和安全级别,因此我希望此函数更通用)?
当做,
Hamid
Ok, now I'm able to search for the device but I have a new issue. How can I identify the scanner's address type?
Hi Hamid,
Do you mean how to take the BD address of the peer device? Please see app_get_address_type() API as it returns the type of the BD address.
谢谢,下午好
Yes, I want to know the address type of the scanner. As we discussed earlier we can have the address of the scanner in the scan_request_track. However, how should I determine the address type.
I've actually tried using this API but I'm stuck with the input parameter of the app_get_address_type() as I'm supposed to pass an address type to this function.
What should I put for this address type when I want to know to address?
Hi Hamid,
Apologies for the delay. What kind of BD address does the Central use? This depends on the Central BD Address.
谢谢,下午好