diff --git a/examples/bluetooth/ble_compatibility_test/ble_compatibility_test_case.md b/examples/bluetooth/ble_compatibility_test/ble_compatibility_test_case.md new file mode 100644 index 000000000..b0d544c1a --- /dev/null +++ b/examples/bluetooth/ble_compatibility_test/ble_compatibility_test_case.md @@ -0,0 +1,182 @@ +# Test Case for BLE Smartphone Compatibility + +This document provides a test case for BLE smartphone compatibility and includes detailed procedures for various test items. + +## Preparation + +### What You Need + +* ESP device which needs to flash [this test program] (https://github.com/espressif/esp-idf/blob/master/examples/bluetooth/ble_compatibility_test/main/ble_compatibility_test.c) +* Smartphone with LightBlue® Explorer app + +### Initialization + +Prior to conducting tests, please initialize the smartphone and the ESP device as follows: + +* Set the device name as `BLE_COMP_TEST`. +* Set the maximum transmission unit (MTU) of the device to 33 bytes, to test the assembly and division of data packets. +* If the smartphone has been paired with the ESP device before, please delete the pairing in the Bluetooth setting as follows: `Bluetooth` -> `My Devices` -> `Find this device with "i" in a circle on the right` -> `Forget this device`. Then restart the Bluetooth service. +* Before flashing the test program onto the ESP device, make sure to erase the contents of the flash by executing the command `make erase_flash flash` in the Terminal. +* When the ESP device restarts, the pairing information will be erased automatically. After that, make sure that the pairing information in the Bluetooth setting of the smartphone is deleted. + +**Note:** + +* For tests marked with (*) further in the document, please bear in mind the following: + * Your phone performance may affect the results of these tests. If such a test fails, it does not mean the phone fails to meet the test requirements, but that you need to arrange targeted tests. + * Taking "Test for Connection Success Rate" as an example: if the test cannot be passed for 10 consecutive times, you need to record how many times the test was passed and then arrange targeted tests. +* For extended testing, please use the [examples] (https://github.com/espressif/esp-idf/tree/master/examples/bluetooth) provided by Espressif. + + +## Test for ADV Performance (*) + +### Search Device + +Refresh the scanning in LightBlue® Explorer to check if the device to be tested can be found quickly. Please repeat this action 10 times. + +### Test Results + +The test is passed, if you get the following results: + +* The device starts advertizing and outputs the log `(0) ***** advertising start successfully *****`. +* LightBlue® Explorer scans and successfully discovers ` BLE_COMP_TEST` each time. + +**Note:** + +* The device broadcasts on 3 channels, with an ADV interval of 40 ms. +* Check if the ADV packet can be received. +* Check if the Scan Response packet can be received. +* The device name is included in Scan Response packets only and cannot be found in ADV packets. + +## Test for Pairing Performance + +### Connect Device + +* Open the LightBlue® Explorer scan list and tap on the device name ` BLE_COMP_TEST` to establish connection. +* ESP device prints a passkey: `The passkey notify number: 123456`. +* A prompt on the smartphone appears asking if you want to pair. Tap on *Pair*, and then enter the passkey "123456". + +### Test Results + +The test is passed, if you get the following results: + +* If the connection is successful: + * Smartphone shows DATA beginning with `ADVERTISEMENT DATA` + * ESP device outputs the log: `ESP_GATTS_CONNECT_EVT` +* When the pairing is established, the device shows the following log in green: `(1) ***** pair status = success *****` + +## Test for Service Discovery Performance + +### Test Procedures + +In LightBlue® Explorer, check the contents of `GATT SERVICES & CHARACTERISTICS`. + +### Test Results + +The test is passed, if you get the following results: + +* Service that starts with ``000000ff`` appears at the bottom of your smartphone. +* This service contains 3 characteristics + * `Char_1_Short_WR` + * `Char_2_Long_WR` + * `Char_3_Short_Notify` + +## Test for Read and Encrypt + +### Test Procedures + +Read the value of `Char_1` in LightBlue, and tap on `READ AGAIN`. + +### Test Results + +* Encryption is successful, if your smartphone shows the value "11 22 33 44", and the ESP device prints the log: `(2) ***** read char_1 *****`. +* Encryption fails, if your smartphone shows a blank screen, and the ESP device outputs the error log in red: `GATT_INSUF_AUTHENTICATION: MITM Required`. + +## Test for Short Read and Write + +### Test Procedures + +* Navigate to the WRITE interface in LightBlue® Explorer, and write the value "88 99" to `Char_1`. +* Read `Char_1` and check if its value is consistent with the data you have written to it. + +### Test Results + +The test is passed, if you get the following results: + +* ESP device prints the log: `(3)***** short write success *****`. +* LightBlue® Explorer shows "88 99" below `READ AGAIN`. + +## Test for Long Read and Write + +### Test Procedures + +* Navigate to the WRITE interface in LightBlue® Explorer, and write the string `0x001122…FF001122…FF` of 256 bytes to `Char_2`. The data takes up 16 lines and looks as follows: + + ``` + 00112233445566778899AABBCCDDEEFF + 00112233445566778899AABBCCDDEEFF + … + 00112233445566778899AABBCCDDEEFF + 00112233445566778899AABBCCDDEEFF + ``` + +* Read `Char_2` and check if its value is consistent with the data you have written to it. + +### Test Results + +The test is passed, if you get the following results: + +* The device prints the log: ``ESP_GATTS_EXEC_WRITE_EVT, Length=256`` and ``(4) ***** long write success *****``. +* LightBlue® Explorer shows `(5) ***** read char_2 *****` below `READ AGAIN`. + +**Note:** + +The data to be written can be copied from a text file and pasted into LightBlue® Explorer. + +## Test for Short Notify + +### Test Procedures + +* Enter `Char_3` and tap on `SUBSCRIBE` to enable its Notify function. +* Your phone automatically receives Notify data from the device. + +### Test Results + +The test is passed, if you get the following results: + +* ESP device prints the log: `(6) ***** send notify AA BB *****`. +* "AA BB" appears on your smartphone. + +## Test for Connection Success Rate (*) + +### Test procedures + +* Break the connection +* Re-establish the connection +* Repeat 10 times + +### Test Results + +The test is passed, if you get the following results: + +* Your phone establishes the connection successfully, and the ESP device outputs the log: `(1) ***** pair status = success *****`. +* Your phone breaks the connection, and the device outputs the log: `ESP_GATTS_DISCONNECT_EVT`. +* Connection can be set up each time with no issues. + +## Test for Long Connection Stability + +The connection must be stable throughout the tests. + +**Note:** + +If the existing connection breaks: + +* LightBlue® Explorer prints `Disconnected`. +* ESP device outputs the log: ``ESP_GATTS_DISCONNECT_EVT, reason = (0) ***** advertising start successfully *****``. + +## Further Information + +* If you see any log entry in red, please record it for future reference or feedback it to our engineer. +* Tests to be added in the future: + * Multi-connection Test + * Automatic Re-connection Test + diff --git a/examples/bluetooth/ble_compatibility_test/esp_ble_compatibility_test_report.md b/examples/bluetooth/ble_compatibility_test/esp_ble_compatibility_test_report.md new file mode 100644 index 000000000..a8ed4efac --- /dev/null +++ b/examples/bluetooth/ble_compatibility_test/esp_ble_compatibility_test_report.md @@ -0,0 +1,905 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Test Report for ESP BLE Smartphone Compatibility
ESP32 Module:ESP-WROOM-32
Commit ID:7c29a39d6f9f2dfbefc49d34d34e9267afc7200d
Test Demo:https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/ble_compatibility_test
Phone BrandModelOS VersionTest APP & VersionTest ItemNote
ADVPairingService DiscoveryRead & EncryptShort Read & WriteLong Read & WriteShort NotifyConnection Success Rate (10 times)Long Connection Stability
Samsung (三星)Galaxy S9Android 8.0.0LightBlue V1.1.3*PassPassPassPassPassPassPass100%Pass"LightBlue" here is the abbreviation of "LightBlue® Explorer"
Galaxy Note 4 Android 6.0.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Galaxy S8+Android 8.0.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
S3 GT-I9300Android 4.3nRF Connect V4.10*PassPassPassPassPassPassPass100%PassIntallation of LightBlue failed, so nRF Connect was used alternatively.
S4 GT-I9502Android 8.0.0nRF Connect V4.10*PassPassPassPassPassPassPass100%PassIntallation of LightBlue failed, so nRF Connect was used alternatively.
S4 GT-I9500Android 4.3nRF Connect V4.10*PassPassPassPassPassPassPass100%PassIntallation of LightBlue failed, so nRF Connect was used alternatively.
Apple(苹果)iPhone 5S/A1518iOS 12.1LightBlue V2.7PassPassPassPassPassPassPass100%Pass
iPhone XiOS 12.1LightBlue V2.7PassPassPassPassPassPassPass100%Pass
iPhone SEiOS 10.2.1LightBlue V2.7PassPassPassPassPassPassPass100%Pass
iPhone 6s PlusiOS 12.1LightBlue V2.7PassPassPassPassPassPassPass100%Pass
iPhone 7iOS 12.0.1LightBlue V2.7PassPassPassPassPassPassPass100%Pass
iPhone 6iOS 10.3.1LightBlue V2.7PassPassPassPassPassPassPass100%Pass
iPod TouchiOS 12.0LightBlue V2.7PassPassPassPassPassPassPass100%Pass
HUAWEI(华为)Huawei nova 3eAndroid 8.0.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Huawei Honor Enjoy 7XAndroid 7.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Huawei Mate 10Android 8.0.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Huawei G9/P9 LiteAndroid 6.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Huawei novaAndroid 7.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Huawei Honor 4XAndroid 5.0.2LightBlue V1.1.3PassPassPassPassPassPassPass100%PassSometimes the app cannot break bluetooth connection, so you need to manually switch on and off the bluetooth.
OPPO(欧珀)OPPO A83Android 7.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
OPPO R9sAndroid 6.0.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Xiaomi(小米)Xiaomi Mi Max 2Android 7.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Xiaomi 5XAndroid 7.1.2LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Xiaomi Mi Note 2Android 7.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Xiaomi Redmi Note 4Android 6.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Xiaomi Mi 5Android 7.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
vivo(步步高)vivo Y85Android 8.1.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
vivo X7Android 5.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Lenovo & Motoria (联想)Lenovo S5Android 8.0.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Lenovo K5Android 8.0.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
ZTE & Nubia(中兴)Nubia Z17 MiniAndroid 6.0.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Gionee(金立)Gionee S11Android 7.11LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Gionee GN9004Android 4.3nRF Connect V4.10*PassPassPassPassPassPassPass100%PassIntallation of LightBlue failed, so nRF Connect was used alternatively.
Google(谷歌)LG Nexus 4*Android 5.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%PassBLE scan performance of this phone is poor.
Sony(索尼)Sony Xperia XZAndroid 8.0.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
HTC(宏达电)HTC U11Android 7.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
EssentialEssential PhoneAndroid 7.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Meizu(魅族)Meilan Note 3Android 5.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Meilan EAndroid 5.2.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Smartisan(锤子)Smartisan Nut Pro 2Android 7.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Sharp(夏普)Sharp AQUOS S3 mini Android 7.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Hisense(海信)HiSense Small Dolphin 2(海信小海豚 2)Android 7.1.2LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
360(奇虎)360 N6 LiteAndroid 7.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
360 N5Android 6.0.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Xiaolajiao(小辣椒)Red Chilli 4A(红辣椒 4A)Android 3.2.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Red Chilli Enjoy 6A(红辣椒畅玩 6A)Android 5.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Letv(乐视)LeTV LeEcoo Le S3Android 6.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
LeTV LeEoo Le1 (X600)Android 5.0.2LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Coolpad(酷派)Coolpad Cool 1 dualAndroid 6.0.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Doov(朵唯)Doov A15SAndroid 5.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
AGM(艾捷莫)AGM X1Android 5.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
CMCC(中国移动)CMCC N3Android 7.1.2LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
Meitu(美图)Meitu M8sAndroid 7.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
K-Touch(天语)K-Touch X11Android 6.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
YEPEN(誉品)YEPEN I7SAndroid 6.0LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass
MOTOZ2 PalyAndroid 7.1.1LightBlue V1.1.3PassPassPassPassPassPassPass100%Pass