Configure device network
Updated
Connect the R1 device to Wi-Fi through the companion Android app.
The R1 kit includes an Android app in the app folder for configuring device network access through Bluetooth Low Energy (BLE). The app provides a simple interface for connecting your R1 device to Wi-Fi.
This app is built using Agora's Bluetooth configuration library.
Info
Before configuring network access, ensure the following:
- Bluetooth and location services are enabled on your Android device.
- The R1 device is in discoverable mode.
- Your Android device is within 5 meters of the R1 device.
- Your Android device is connected to a 2.4 GHz Wi-Fi network with internet access. Network configuration fails without internet connectivity.
- For Android 12 and later, you have granted
BLUETOOTH_SCANandBLUETOOTH_CONNECTpermissions to the app.
Connect your device to Wi-Fi
- Grant the required permissions when prompted by the app.
- Verify your current Wi-Fi network information.
- Enter your Wi-Fi password.
- Scan for and select your target Bluetooth device.
- Click Connect to establish a connection with the device.
- After the connection succeeds, click Configure Network to send the Wi-Fi credentials to the device.
- After the network configuration completes, click Disconnect to end the Bluetooth connection.
Set up network access
-
Request permissions. When you first open the app, grant the required permissions:
- Tap Request Permissions. The app requests Bluetooth and location permissions needed for scanning and connecting to Bluetooth devices.
- Tap Allow in the system permission dialog.
-
Verify Wi-Fi permissions. Tap Check Wi-Fi Permissions. The app checks whether it has the necessary Wi-Fi permissions and displays the result.
-
Get Wi-Fi information. Tap Get Current Wi-Fi Information. The app retrieves and displays your current Wi-Fi network name (SSID) in a card below the button.
-
Enter Wi-Fi password. Enter your Wi-Fi network password in the password field. The device uses this password to connect to your Wi-Fi network.
-
Scan for Bluetooth devices:
- Tap Start Scan. The app scans for nearby Bluetooth devices. The button text changes to Stop Scanning during the scan.
- Scanned devices appear in the list below.
- Tap Stop Scanning to end the scan.
-
Connect to your device. Each device card in the list displays:
- Device name
- MAC address
- Signal strength (RSSI)
- Connect: Establishes a Bluetooth connection with the device
- Configure Network: Sends Wi-Fi credentials to the device
- Disconnect: Ends the Bluetooth connection
If network configuration fails, reconnect the device or restart the app.
Troubleshooting
If you encounter issues during network configuration, try the following solutions:
- Cannot scan for devices: Verify that Bluetooth and location services are enabled on your Android device.
- Connection fails: Rescan for the device or restart the R1 device.
- Network configuration fails: Verify that you entered the correct Wi-Fi password.
