Welcome to IoTForums.com Community
Register now to participate in discussions, ask questions and share your knowledge on internet of things and automation! Feel free to sign up today.
Register Now

Ameba Arduino: [RTL8722CSM] [RTL8722DM] BLE – WiFi Configuration Service


Just Hatched
Aug 16, 2021
  • AmebaD [RTL8722 CSM/DM] x 1
  • Android / iOS mobile phone


In this example, a WiFi configuration service is set up on the Ameba Bluetooth stack. A mobile phone with the configuration app connects to the Ameba device using BLE and configures the Ameba to connect to the correct WiFi access point.
Ensure that the Realtek WiFi configuration app is installed on your mobile phone, it is available at:
– Google Play Store:
Please, Log in or Register to view URLs content!

– Apple App Store:
Please, Log in or Register to view URLs content!

Open the example, “Files” -> “Examples” -> “AmebaBLE” -> “BLEWifiConfigService”.

Upload the code and press the reset button on Ameba once the upload is finished.
On your mobile phone, open the Realtek WiFiConfig app and tap the round button to scan for Ameba boards.

Select the correct Ameba board from the scan results. The app will connect to the Ameba board and ask the board to scan for WiFi networks and send the scan results back to the app using BLE.



If your phone is currently connected to a WiFi network, the app will ask for the WiFi password to connect the Ameba board to the same WiFi network. Tap “Select AP” to choose another WiFi network, or enter the password and tap continue to connect Ameba to the selected WiFi network.

After the Ameba board connects to the WiFi network, the following message will be shown. Tap “Try another AP” to connect to another WiFi network or tap “Confirm” to keep the current WiFi network and disconnect BLE from the Ameba board.

Code Reference
BLEWifiConfigService is used to create an instance of the WiFi configuration service to run on the Bluetooth device.
BLE.configAdvert()->setAdvType(configService.advData()) is used to set the correct advertisement data necessary for the phone app to find the Ameba Bluetooth device.

For More Resources
If you need additional technical documents or the source code for this project. Please visit the official websites and join the Facebook group and forum.
Ameba Official Website:
Please, Log in or Register to view URLs content!

Ameba Facebook Group:
Please, Log in or Register to view URLs content!

Ameba Forum:
Please, Log in or Register to view URLs content!

Log in

or Log in using