Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pair and unpair devices

Pairing is done once per phone and desktop. Afterwards the two devices recognise each other by their keys and connect by themselves. Security model explains what pairing protects against.

Before you begin

  • Tetheron is installed on both devices and the daemon is running on the desktop: see Install Tetheron on Linux and Install Tetheron on Android.
  • Both devices are on the same network. If they are not, or they do not find each other, see Connect across networks.
  • On the phone, the pairing screen is Find your PC at the end of the set-up wizard. Later, tap Add PC on the home screen of the phone app to reach the same screen, which is then titled Add a PC.

Pair by QR code

The QR code carries the desktop’s addresses and a single-use secret, so there is no code to compare and the devices need not discover each other first.

  1. On the desktop, open the app and click Add device (the + button in the sidebar), then Show pairing QR…. With no device in the list, the Show pairing QR… button is in the middle of the window.

    The Pair by QR dialog shows the code. It is valid for five minutes. New code creates a fresh one, and the previous one stops working.

  2. On the phone, tap Scan QR and point the camera at the code. Allow the camera permission if Android asks.

  3. The phone shows Paired with and the desktop’s name. Tap Continue. The desktop closes the dialog and shows the same message.

  4. Complete the companion device step on the phone.

If the phone says The PC rejected the QR code (it may have expired), click New code on the desktop and scan again.

Pair by six-digit code

Both devices show a six-digit code that is derived from their keys. You compare the two and confirm on both. Either device can start.

  1. Start the pairing on one device:

    • On the phone, wait for the desktop to appear under Nearby PCs and tap Pair next to it.
    • On the desktop, open the app on the phone first, so that the desktop can see it. Select the phone in the sidebar, where its status is Available to pair, and click Pair on the Overview tab.
  2. Look at both screens. The phone shows the code under Pair with or wants to pair. The desktop shows it on the phone’s Overview tab, or in a dialog titled Pair with … ? when the phone started.

  3. If the two codes are the same, tap The codes match on the phone and click Codes match on the desktop. You have 60 seconds. The phone shows the time that is left.

  4. The phone shows Paired with and the desktop’s name. Tap Continue and complete the companion device step.

Warning

If the codes differ, choose Reject on both devices. Different codes mean that another device on the network is answering in place of yours. Try again with the QR code.

When the phone app is in the background, a pairing request from the desktop arrives as a notification, Pairing request from and the desktop’s name. Tap it to open the code.

Pair from the command line

To pair by QR code, print the code in the terminal and scan it with the phone. On a terminal with a light background, add --invert.

tether-cli qr

To pair by six-digit code:

  1. Open the app on the phone and list the devices that the daemon sees:

    tether-cli devices
    
  2. Request pairing. <device-id> is the phone’s id from the list. A prefix that matches only one device is enough.

    tether-cli pair <device-id>
    

    The command prints the six-digit code and asks you to confirm.

  3. Compare the code with the one on the phone. If they are the same, confirm in the terminal and tap The codes match on the phone.

When the phone started the pairing, confirm shows the code and asks you to confirm it. reject refuses a pairing in progress.

tether-cli confirm <device-id>
tether-cli reject <device-id>

Command-line tools lists every option.

Disconnect without unpairing

Disconnect closes the connection and keeps the pairing. Neither device reconnects until you ask for it.

  1. On the desktop, open the phone’s Overview tab and click Disconnect. On the phone, tap Disconnect on the PC’s card.

    The desktop shows Disconnected — press Connect to resume.

  2. To resume, click Connect on the desktop or tap Connect on the phone. Either device can resume, whichever one disconnected.

From the command line:

tether-cli disconnect <device-id>
tether-cli connect <device-id>

The hold is not stored. Restarting the daemon, the phone or the phone app’s background service ends it, and the devices connect again.

Unpair

Unpairing makes each device forget the other’s key. You can start on either device, and it tells the other one.

  • On the desktop: open the phone’s Overview tab, click Unpair and confirm in the Unpair … ? dialog.

  • On the phone: tap Unpair on the PC’s card on the home screen and confirm.

  • From the command line:

    tether-cli unpair <device-id>
    

If the other device was switched off or out of reach at that moment, it may still list the pairing. Unpair there as well. A phone in this state shows The PC no longer trusts this phone – unpair and pair again on the PC’s card.

Pair again

Pair again after you have unpaired, reinstalled the phone app, or deleted the desktop’s data directory.

  1. Check that neither device still lists the old pairing. Unpair on any device that does.
  2. Pair by QR code or by six-digit code as described above.

A reinstalled phone app has a new identity, so the desktop treats it as a new phone. Grants made over adb are lost with the old installation and must be applied again.

Pair more than one device

A phone can be paired with several desktops: tap Add PC on the phone for each one. A desktop can be paired with several phones, and each has its own entry in the sidebar.