weixin_39527292
weixin_39527292
2020-11-22 13:01

remove BSSID, speed up wifi connect

Tring to connect in STA mode with a fixed BSSID can be a problem if multiple Access points exist. Furthermore, leaving the connection persistent (i.e. stored in the SDK) may lead to connection delay if the stronger BSSID has changed. In this scenario the connection speed is reduced dramatically from roughly 20 seconds down to 2 or 3 seconds

该提问来源于开源项目:esprfid/esp-rfid

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39707201 weixin_39707201 5月前

    I think BSSID part should be optional, it is already there because of some other use cases, so let's not rush to any conclusion on this matter.

    点赞 评论 复制链接分享
  • weixin_39527292 weixin_39527292 5月前

    Agreed. Removing the BSSID could potentially open the door for WIFI hacking attempts and might not be a good solution for people who do want the ESP to connect to a fixed given AP. I'd suggest adding a checkbox in the WiFi Web Interface "lock to this AP" - if unchecked, then connect to the nearest AP - if checked, connect to any AP that matches SSID, PWD

    点赞 评论 复制链接分享
  • weixin_39707201 weixin_39707201 5月前

    Agreed. Removing the BSSID could potentially open the door for WIFI hacking attempts and might not be a good solution for people who do want the ESP to connect to a fixed given AP. I'd suggest adding a checkbox in the WiFi Web Interface "lock to this AP" - if unchecked, then connect to the nearest AP - if checked, connect to any AP that matches SSID, PWD

    Exactly, this was my thoughts as well.

    点赞 评论 复制链接分享
  • weixin_39527292 weixin_39527292 5月前

    So the solution could be that in connectSTA we check if we have a BSSID - if yes, then we keep downstream compatibility and connect to given BSSID. If not, connect to any AP. The WebIF would then just need to make sure that a BSSID is stored in the setup JSON if we want to lock to a given AP. If not, the BSSID coud be a series of 0's or something like that

    点赞 评论 复制链接分享
  • weixin_39527292 weixin_39527292 5月前

    Actually I have been thinking too complicated. The BSSID field in the setup WebIF is editable. If you select a Wifi network from the Wifi Scan, it is filled with the wifi's BSSID. If you type in just SSID and password, the BSSID field is empty. Initializing the bssid with zeroes before conversion in config.esp does the trick. So this would be downstream compatible and give you the option to either leave the bssid field blank or remove it after scan.

    点赞 评论 复制链接分享
  • weixin_39707201 weixin_39707201 5月前

    Again, nicely done. Thanks.

    点赞 评论 复制链接分享

相关推荐