Connection Issues

Can't connect? Here's how to diagnose and fix connection problems.

Quick Diagnostics

Run these commands on your Mac:

bash
# Bridge, relay, local addresses and each phone's route
broski-link status

# Paired phones
broski-link devices

# Service, port and TLS checks
broski doctor --profile network

# Apply safe automatic fixes
broski doctor --fix

# Export diagnostics bundle
broski doctor --export

Connection States

The app shows the state of the link to each paired computer:

StateWhat It MeansUser Action
ConnectedLinked to your Mac, directly or through the relayNone needed
ConnectingEstablishing the encrypted linkWait a few seconds
AsleepYour Mac went to sleepWake it
OfflineYour Mac is not reachable by either routeCheck that the Mac is on and that broski-link is running
DisconnectedNo active linkOpen the computer in the app to reconnect

Cannot Connect to Your Mac

Symptom
The app shows "Offline" or "Disconnected"
1
Is the service running?
bash
broski status
broski-link status

# If the service is not installed
broski install
2
Is the bridge up?

broski-link status shows the bridge as up, starting, crashed or down. If it crashed, the reason is shown and broski-link restarts it.

bash
broski restart
broski logs --follow
3
Are you on the same network?

For the direct route, both devices must be on the same network. Otherwise the phone needs a relay (see Remote Access).

4
Is the firewall blocking connections?
bash
# macOS: Check firewall status
/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate

# Linux (UFW): Check firewall status
sudo ufw status
5
Is the phone still paired?

If the phone is not listed in broski-link devices, it was revoked or never finished pairing. Run broski-link pair and scan the new QR code.

Solutions by Cause

CauseSolution
Service not runningbroski install
Wrong network and no relayJoin the same WiFi as the Mac, or configure a relay
Firewall blockingAllow incoming connections for broski-link (default port 18275)
Phone was revoked or unpairedbroski-link pair
Stale connectionForce quit the app and reopen it

Port Already in Use

Error Message
Bridge port 18274 is already in use.

Port 18274 is the bridge's loopback listener (used by agent hooks). Phones never connect to it, so changing it does not affect pairing.

Diagnosis

bash
# Find what's using the port
lsof -nP -iTCP:18274 -sTCP:LISTEN

Solutions

Option 1: Kill the existing process
bash
# Get the PID from lsof output, then:
kill <PID>
Option 2: Suspended process (Ctrl+Z issue)

If you accidentally pressed Ctrl+Z instead of Ctrl+C:

bash
# List suspended jobs
jobs

# Bring to foreground and stop properly
fg
# Then press Ctrl+C
Option 3: Use a different port
bash
# Random free port
broski --port 0

# Specific port
broski --port 18276

Link Keepalive

Broski Link detects dead connections itself:

TimerValuePurpose
Ping15 secondsKeepalive in both directions
Dead connection45 secondsNo answer = the session detaches and the app reconnects
bash
# Follow logs for connectivity issues
broski logs --follow
tail -f ~/.broski/logs/link.log

Connection Keeps Dropping

CauseDiagnosisSolution
Network instabilityCheck WiFi signal strengthMove closer to router or use wired
WiFi switchingPhone auto-switching networksLock WiFi network in phone settings
Background app killingiOS/Android battery savingDisable battery optimization for Broski
Mac sleepingState shows AsleepKeep the Mac awake

Firewall Configuration

Only the direct route needs an inbound rule: broski-link listens on port 18275 by default (change it with lan_port in ~/.broski/link/config.json). The relay route needs outbound connections only.

macOS

GUI Method
  1. System Settings → Network → Firewall
  2. Click "Options..."
  3. Add the broski-link binary to allowed applications
  4. Or enable "Automatically allow built-in software"

Linux (UFW)

bash
# Allow the Broski Link port
sudo ufw allow 18275/tcp

# Check status
sudo ufw status

Linux (firewalld)

bash
# Allow the Broski Link port
sudo firewall-cmd --permanent --add-port=18275/tcp
sudo firewall-cmd --reload

# Check status
sudo firewall-cmd --list-ports

QR Code Scanning Issues

IssueSolution
Camera won't focusEnsure adequate lighting, clean camera lens
Code too smallMove closer or increase terminal font size
Expired QR errorA pairing QR expires after 10 minutes. Run broski-link pair again
Already usedA pairing QR works once. Run broski-link pair again
"Old Broski QR" messageThe code came from an older version. Update broski on your Mac and scan the new code
Partial scanHold phone steady for 2-3 seconds

If scanning fails, copy the broski://pair?... link that broski-link pair prints and use the paste button on the scan screen.

Still having issues?

Collect this debug info before contacting support:

bash
broski --version
broski-link status --json
broski doctor --export

Email: broskiappp@gmail.com