# BLE testing guide ## Requirements You need two or more phone devices (iOS or Android 6+). Android 10+ is required for L2cap socket testing (not for this testing session). Activate the Bluetooth on your phones. ## Installation * Android: Install the latest build available here: https://yolo.berty.io/api/artifact-dl/gh_73300535?sign=68bb8ba26c519d486b2f0898434b6af2920f3a27 ![](https://hackmd.io/_uploads/SkGy0_Na_.png) * iOS: we pushed the new version `2.294.1 (5586)` on TestFlight, it will be available soon if not available yet. ## Normal usage 1) Start the Berty app. 2) **iOS only**: accept the Bluetooth permission request (temporary behaviour) <img src="https://hackmd.io/_uploads/BJDWDv4aO.png" alt="Preset" width="30%"/> 3) On the `Onboarding` screen, select Performance. <img src="https://hackmd.io/_uploads/Hy8H1vNau.png" alt="Preset" width="30%"/> 4) **Android only**: after the `Setup finished` screen, a popup should inform you why Berty needs the location permission. Click to `OK` and accept the system permission request. <img src="https://hackmd.io/_uploads/ryd6gD4au.png" alt="Permission explanation" width="30%"/> <img src="https://hackmd.io/_uploads/B1iMZPEad.png" alt="Permission request" width="30%"/> 5) Go to your profile (top right corner) and the Bluetooth screen. Toogle off the Android Nearby (Android) and Multipeer Connectivity (iOS). <img src="https://hackmd.io/_uploads/rkiyMPN6d.png" alt="Profile screen" width="30%"/> <img src="https://hackmd.io/_uploads/S1V1XwNaO.png" alt="Bluetooth screen" width="30%"/> <img src="https://hackmd.io/_uploads/S1FdDDV6O.png" alt="Bluetooth screen" width="30%"/> 6) Close the Berty app. 7) Disable mobile data and Wifi. * Android: drag down from the top screen <img src="https://hackmd.io/_uploads/ByrDXPNTu.png" alt="Android quick settings" width="30%"/> * iOS: drag up from the bottom screen <img src="https://hackmd.io/_uploads/SkFvQvVpu.png" alt="iOS quick settings" width="30%"/> 8) Start the Berty app. 9) Make a contact request: - if the second phone received it, BLE connection works. You can chat between devices over BLE. - if the second phone didn't receive it, you should wait more time that BLE drivers retry connections. You can also stop/start the Berty app and check if the contact request is correctly received. ## Other things to test ### Permission system * Disable mobile data and Wifi. * After the onboarding process, try to refuse one of: * the permission explanation popup * the system permission system * Check that the BLE driver didn't start * In the Bluetooth screen, try to enable/disable the Bluetooth driver when the permission is not granted: * if the permission can be requested again, you should see the same popup that in the onboarding * if the permission is blocked, you should be redirected in the app setting to granted manually the location permission ### Bluetooth setting screen * Disable mobile data and Wifi. * In the Bluetooth screen, try to enable/disable the Bluetooth driver. * Restart the Berty app. * Check that the BLE driver is enabled/disabled. ### libp2p transport switching * Enable mobile data, Wifi and Bluetooth in settings. * Start the Berty app. * Check that you can communicate with other devices. * Disable mobile data and Wifi. * Check that you can communicate with other devices over BLE. ### Multi drivers cohabitation * Disable mobile data. * Try to enable `Android Nearby` or `Multipeer Connectivity` in the Bluetooth screen. * Check if you can communicate with other devices (contact request, chat) without mobile data and Wifi.