https://github.com/braineo/airport-bssid
command line tool to connect to specific bssid for macOS
https://github.com/braineo/airport-bssid
bssid cli command-line macos wifi
Last synced: 9 months ago
JSON representation
command line tool to connect to specific bssid for macOS
- Host: GitHub
- URL: https://github.com/braineo/airport-bssid
- Owner: braineo
- License: gpl-3.0
- Created: 2018-01-07T13:55:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-20T15:03:02.000Z (over 3 years ago)
- Last Synced: 2025-09-12T14:16:26.334Z (9 months ago)
- Topics: bssid, cli, command-line, macos, wifi
- Language: Swift
- Homepage:
- Size: 51.8 KB
- Stars: 65
- Watchers: 5
- Forks: 9
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bssid command for macOS
Once upon a time, you can specify a BSSID to connect by doing `airport -A=ssid -BSSID=bssidname -password=password`, which is no longer supported.
this `bssid` provide a simple way to list BSSID and connect to one
## Usage
``` shell
# list BSSID given a SSID
bssid scan # this will list all visible BSSID
bssid scan # only show result of and
# connect to BSSID, will prompt for password
bssid connect
# For 10.15 or above users, get over by specifying SSID and channel number instead
bssid connect --ssid
bssid connect --ssid --channel
```
## Build
``` shell
# Building
make
# or
swift build
# Install
make install
# or symlink to wherever you like
ln -fs PATH_TO_LOCAL_REPOSITORY/.build/x86_64-apple-macosx/debug/bssid /usr/local/bin/
# for m1 user would be
ln -fs $(PWD)/.build/arm64-apple-macosx/debug/bssid /usr/local/bin/
```
## For people using macOS 10.15 or above
TL;DR
Ping me or send me PR if you know how to get `CoreWLAN` returning BSSID ;)
It looks like Apple's problem. Use SSID and channel number instead.
### What does not work**
#### Signing the app
Some suggests starting from 10.15, Apple seemed to change the policy on getting bssid that you need a developer account to sign the executable to get BSSID, otherwise you only get empty return.
``` shell
# If you have a developer account
codesign --entitlements bssid.entitlements -s 'Your identity' ./.build/x86_64-apple-macosx/debug/bssid
# Seems you can also sign and run locally
codesign --force --sign - --entitlements bssid.entitlements --timestamp=none ./.build/x86_64-apple-macosx/debug/bssid
```
#### Requesting location permission
Some users suggested requiring location information in order to get location but some reported it did not work
https://developer.apple.com/forums/thread/124189