BSSIDLock
Keep your computer on the Wi-Fi access point you choose, not the one it roams to.
Native apps for macOS and Windows. Free and open source.
Install ·
First run ·
Is it safe? ·
Build from source
When one network name (SSID) is served by several access points, as in mesh systems, offices or homes with extenders, your computer decides which one to join. It often picks a far, slow one, or keeps hopping between them. Neither macOS nor Windows lets you pin a connection to a specific access point (BSSID).
BSSIDLock does:
- See every access point on your network, with signal quality, band and channel.
- Lock to one access point, or star a few favorites and let BSSIDLock use the best one by your priority order.
- Name your access points (“Living room”, “Office”) instead of memorizing addresses.
- Stays locked. It checks every few seconds and switches back if the system roams away.
- Several networks, each with its own favorites. Office, home, a client site: BSSIDLock follows you to whichever one you join. On any other Wi-Fi it does nothing.
- Pause when you need to. Let the system choose for 15 minutes, an hour, or until you switch networks.
- Optional weak-signal fallback. Stay locked no matter what (the default), or let go when your chosen access point gets weaker than −70, −75 or −80 dBm. BSSIDLock then moves you to a stronger favorite, or lets the system choose, and comes back when the signal recovers.
- Lives in the menu bar (macOS) or notification area (Windows). Closing the window keeps it running there. One click switches the lock target, with signal strength in dBm for every access point.
- Tells you when the network changes. A notification appears when you join a different Wi-Fi network or switch access points, and says whether BSSIDLock or the system made the switch. Act on it right there: lock to the new access point, go back, or start managing a new network (buttons on macOS; click the notification on Windows).
- Keeps a history. The Activity log is saved on your computer, so you can see what happened yesterday too.
- Updates itself. It checks GitHub once a day and installs new versions in the background. You can turn this off.
- Light and dark mode on both platforms. Windows follows your system setting, or you can pick one.
- Start at login, quietly in the background.
Install
One command, no certificates, no security warnings. It installs for your user only; no administrator password is needed.
macOS (13 Ventura or later, Apple silicon or Intel). Paste into Terminal:
curl -fsSL https://raw.githubusercontent.com/b3hz4d/bssid-lock/main/install.sh | bash
Windows (10 version 1903+ or 11). Paste into PowerShell:
irm https://raw.githubusercontent.com/b3hz4d/bssid-lock/main/install.ps1 | iex
The installer downloads the latest release, checks it against the release’s SHA-256 checksums, installs it (to /Applications, or %LOCALAPPDATA%\Programs\BSSIDLock with a Start menu shortcut on Windows) and opens it. After that, BSSIDLock keeps itself up to date. Running the command again also updates it, and your settings are kept.
Other ways to install, and uninstalling
- Build it yourself on a Mac:
curl -fsSL https://raw.githubusercontent.com/b3hz4d/bssid-lock/main/install.sh | bash -s -- --source. This compiles the app from source on your Mac in under a minute, and needs Apple’s free Command Line Tools.
- Manual download: get
BSSIDLock-macOS.zip or BSSIDLock.exe from Releases. Files downloaded with a browser show an “unknown developer” warning the first time.
- macOS: open the app, then go to System Settings → Privacy & Security → Open Anyway.
- Windows: More info → Run anyway.
- A specific version: add
--version=1.2.0 on macOS (… | bash -s -- --version=1.2.0), or use & ([scriptblock]::Create((irm https://raw.githubusercontent.com/b3hz4d/bssid-lock/main/install.ps1))) -Version 1.2.0 on Windows. Turn off automatic updates in Settings if you want to stay on it. Versions are listed on the Releases page.
- Uninstall on macOS:
curl -fsSL https://raw.githubusercontent.com/b3hz4d/bssid-lock/main/install.sh | bash -s -- --uninstall
- Uninstall on Windows:
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/b3hz4d/bssid-lock/main/install.ps1))) -Uninstall
First run
- Allow location access. Both macOS and Windows treat access point addresses as location data and hide them from apps without location permission. BSSIDLock never reads, stores or sends your actual location.
- macOS: click Allow when asked. If you missed it, turn on BSSIDLock in System Settings → Privacy & Security → Location Services.
- Windows 11: turn on Location services and Let desktop apps access your location in Settings → Privacy & security → Location. BSSIDLock shows a button that takes you there.
- Choose your network. If you’re connected to it, BSSIDLock picks it up automatically. Otherwise choose it from the list. Add more networks later in Settings, or from the network menu in the main window; each one keeps its own favorites.
- Pick access points. All access points on your network are listed with their signal strength.
- Lock sticks to just that access point.
- ★ (favorite) marks the access points you’re happy to use. Set Lock to to Any favorite, and BSSIDLock accepts any of them and prefers the top of the list. Drag (macOS) or use ↑/↓ (Windows) to reorder.
- Rename gives an access point a friendly name. On macOS, right-click it; on Windows, press F2.
Leave BSSIDLock running. Closing the window keeps it working from the menu bar or notification area.
Is it safe?
Yes, and you can check that yourself:
Why there’s no “unknown developer” warning with the installer: macOS Gatekeeper and Windows SmartScreen only check files that a web browser marked as “downloaded from the internet”. Those checks exist to catch apps that aren’t signed with a paid code-signing certificate. Files fetched by curl or PowerShell, and apps you build yourself, don’t carry that mark. Windows Defender and macOS XProtect still scan the app as usual. Either way, you’re trusting this repository, so the installers are short and readable: install.sh and install.ps1. Read them first if you like, or build from source.
Build from source
git clone https://github.com/b3hz4d/bssid-lock.git
cd bssid-lock
macOS app. Needs the Xcode Command Line Tools (xcode-select --install):
./macos/build.sh # → macos/build/BSSIDLock.app (universal)
open macos/build/BSSIDLock.app
Windows app. Needs the .NET SDK 8 or later (10 recommended), and builds on Windows, macOS or Linux:
./windows/build.sh # macOS / Linux → windows/out/BSSIDLock.exe
.\windows\build.ps1 # Windows (PowerShell)
How it works
BSSIDLock listens for the system’s Wi-Fi change events: connected, roamed and disconnected. When you’re on your chosen network but not on an allowed access point, it asks the system to join the specific access point you picked:
- macOS: CoreWLAN. It watches
CWEventType.bssidDidChange and friends, then calls CWInterface.associate(to:password:) with the scanned network for that BSSID.
- Windows: Native Wi-Fi API. It registers with
WlanRegisterNotification, then calls WlanConnect with your saved Wi-Fi profile and a one-entry desired-BSSID list.
Speed and battery:
- It reacts within about 1.5 seconds of a roam, without constant polling. A light check every few seconds (10 by default) is only a safety net.
- If the access point was seen in a scan during the last 30 seconds, it switches right away without scanning again.
- If none of your choices is in range, it waits 60 seconds before trying again, so it doesn’t keep scanning and slowing your connection.
- With the weak-signal fallback on, it needs 5 dB more than the limit before moving back, so it doesn’t flip back and forth at the edge of range.
- The apps are small: about 1.2 MB on macOS (universal) and 150 KB on Windows.
Limitations
- The system may roam briefly before BSSIDLock moves you back, usually within a couple of seconds.
- Location permission is required on macOS and on Windows 11 24H2 and later. Without it, access points can’t be told apart.
- Windows needs the network saved. Connect to it normally once first. BSSIDLock reuses the saved profile and never asks for the password.
- Some Wi-Fi drivers ignore the access point request. Check the Activity log if switching doesn’t stick.
- Enterprise (802.1X/EAP) networks are untested.
Troubleshooting
| Symptom |
Fix |
| “Location access needed” |
Grant location access; see First run. On macOS you can also run tccutil reset Location io.github.b3hz4d.bssidlock and relaunch. |
| macOS: no permission prompt |
Open the app from Finder or with open, not by running the binary inside the bundle. |
| “Couldn’t switch” |
Check that the access point is in range. On macOS, save the Wi-Fi password in Settings. On Windows, make sure you’ve connected to the network once. |
| Status says “Idle on …” |
You’re on a network BSSIDLock doesn’t manage, so it leaves it alone. To manage it too, use Manage “…” too in the network menu, or add it in Settings. |
| Status says “Paused …” |
Press Resume, or wait: the pause ends by itself. |
| Windows: app “disappears” when closed |
It’s still running in the notification area (tray). Right-click its icon → Exit to quit. |
Project layout
install.sh / install.ps1 One-line installers for macOS / Windows
assets/ Shared icon (icon-1024.png) and the scripts that draw it / build the .ico
macos/ macOS app: SwiftUI sources, Info.plist, build.sh, notarize.sh
windows/ Windows app: WinForms on .NET Framework 4.8, build.sh / build.ps1
docs/SIGNING.md How releases get signed (for maintainers)
.github/workflows/ CI builds and the release pipeline
Roadmap
airport-bssid (fork) is a macOS command-line tool that joins a specific BSSID once.
- WifiInfoView is a Windows freeware Wi-Fi scanner that can connect to a chosen access point.
BSSIDLock adds a friendly GUI on both platforms and keeps the lock in place.
Contributing
Issues and pull requests are welcome. Both apps rebuild in seconds with the scripts above. Please describe your OS version and Wi-Fi hardware in bug reports; drivers matter here.
License
MIT
评论