蓝牙配网是不支持断电重连吗,还是我设置错误了,那这个配网只能一次性的?没搞懂,哪个大神看看,应该说配网信息应该是保存到flash,上电以后自动重连才是。
  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();