# BLEWifiConfig issue

**URL:** <https://forum.amebaiot.com/t/blewificonfig-issue/1593>\
**Category:** BT\
**Tags:** rtl872xd, evb-bw16\
**Created:** [December 12, 2022, 1:49am UTC](https://forum.amebaiot.com/t/blewificonfig-issue/1593 "2022-12-12T01:49:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kal](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@kal](https://forum.amebaiot.com/u/kal)\
**Post date:** [December 12, 2022, 1:49am UTC](https://forum.amebaiot.com/t/blewificonfig-issue/1593/1 "2022-12-12T01:49:02Z")

</div>

hello ，im using Bluetooth wifi config code

```auto
void setup() {
    Serial.begin(115200);

    BLE.init();
    BLE.configServer(1);
    configService.addService();
    configService.begin();

    // Wifi config service requires a specific advertisement format to be recognised by the app
    // The advertisement needs the local BT address, which can only be obtained after starting peripheral mode
    // Thus, we stop advertising to update the advert data, wait for advertising to stop, then restart advertising with new data
    BLE.beginPeripheral();
    BLE.configAdvert()->stopAdv();
    BLE.configAdvert()->setAdvData(configService.advData());
    BLE.configAdvert()->updateAdvertParams();
    delay(100);
    BLE.configAdvert()->startAdv();

}

```

it can config wifi ok but restart bw16 cant auto connect wifi ，please let me know how to do that thanks。

---

<div class="post-metadata">

**Author:** ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)\
**Post date:** [December 12, 2022, 7:14am UTC](https://forum.amebaiot.com/t/blewificonfig-issue/1593/2 "2022-12-12T07:14:39Z")

</div>

Hi @kal

WiFi network automatic save to flash and automatic reconnect from flash is a feature that is not present in the Arduino SDK. If you need this feature, you can consider using [GitHub Standard SDK](https://github.com/ambiot/ambd_sdk/), which includes WiFi save and auto reconnect, as well as BLE WiFi Config.
