Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: services: wifi: Remove all wifis with same ssid in database #1899

Merged

Conversation

patrickelectric
Copy link
Member

@patrickelectric patrickelectric commented Jul 26, 2023

There is a case where the same network can be stored multiple times on the network service, this ensure that when the user remove the network, it'll remove all occurrence of the same network. We should move the service to use bssid over ssid to avoid such problems in the future;

Saved networks:
  networkid  ssid        bssid    flags
-----------  ----------  -------  ---------
          0  PATRICK_2G  any
          1  PatrickG    any      [CURRENT]
          2  PATRICK_2G  any

PS: I got in a point where the same network showed 7 times

# Here we get all networks that match the ssid
# and get a list where the biggest networkid comes first.
# If we remove the lowest numbers first, it'll change the highest values to -1
# TODO: We should move the entire wifi framestack to work with bssid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrickelectric patrickelectric merged commit 58094a5 into bluerobotics:master Jul 26, 2023
5 checks passed
@patrickelectric patrickelectric deleted the wifi-remove-all branch July 26, 2023 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants