Bring Back The 3.5mm Jack: My Tales Of Using Xiaomi Airdots On Two Devices

Konrad Iturbe
2 min readJun 24, 2019

--

It happened. I upgraded from my beloved mid range phone to the brand new OnePlus 7. Let’s be honest here, unless you care about the camera or play games on your phone flagships are overrated these days. Mainly because THEY ARE GOING BACKWARDS! Look at the Samsung Note 4, waterproof, has a Micro SD slot, has a headphone jack, and a removable battery. What do we have now? $1000 pieces of junk with none of those, and cost 2x what the flagships used to cost 4 years ago. I can live without replaceable batteries (hence my choice for mid ranges, which usually have power efficient chips and large batteries), I can live without SD card slots (after all, new phones ship with 128GB of storage, be it mid range or flagship). But I cannot live with the death of the headphone jack.

I know Mac OS X probably has a better way to deal with this, and AirPods are superior, but I use Arch Linux and Android as daily driver which make AirPods not very suitable for my scenario.

Here is how a typical interaction works with devices that have 3.5mm jacks:

  • Plug headphones in
  • Press play

That’s it, want to use the headphones on other device? Just pause and unplug.

Here is how new headphones pair with a secondary device:

  • Get headphones out of case
  • Disconnect them from already-paired device
  • Connect them with new device
  • Check sink is set to headphone
  • Press play

Yes, on these headphones you cannot choose which device to connect it to, like all BT devices.

So I took matters to my own hands and developed the monstrosity you’re going to see below:

The Script:

archdots is a script which:

  • sends a command via KDEConnect to the phone to disconnect from the headphones (since my headphones automatically pair first with my phone this step is unfortunately necessary for me)
  • Scans for BT devices
  • Connects to the Redmi Airdots
  • Sets the output sink in PulseAudio API to the Redmi Airdots A2DP sink
  • Plays a sound to confirm the pairing

The Tasker Flow:

There is a tasker task which once it receives a notification from KDEConnect with the title “unpair” it disconnects from the headphones.

Step by step, it looks like:

  • Get headphones out of the box
  • Wait for them to pair to the phone
  • start archdots
  • Kick airdots from phone
  • Let it scan
  • Check connection
  • Done.

You can get archdots here, and the tasker script here

If anyone has a simpler solution to choosing which device to connect on airdots let me know.

--

--