Jump to content

AirPod Connector


Recommended Posts

@Acidham Just like OpenUpdater, it’s meant to be as simple as possible.

  1. Add the script to your Workflow. Doesn’t matter where you put it; it’s wherever is convenient to you.
  2. Inside any script that requires blueutil, run /path/to/_sharedresources blueutil.
  3. Set the result of the previous command to the PATH environment variable.
  4. Call blueutil as usual.

In Bash you’d so something like (assuming _sharedresources and the script are in the same directory):

PATH="$(./_sharedresources 'blueutil')"
blueutil WHATEVER

In Ruby:

require 'open3'
ENV['PATH'] = Open3.capture2('./_sharedresources', 'blueutil').first
Open3.capture2('blueutil', WHATEVER)
Link to comment

I am on Catalina and no issues....

 

1. what is the output when you enter ...

blueutil -v

....in terminal?

2. What is log output of Alfred...open workflow and click on the bug on top right corner

Edited by Acidham
Link to comment

Same thing for me; nothing happens when I input the keyword. I downloaded the workflow and let the program download something. 

 

Here's my results:

1.

-----------------------------------------------------------------------

Last login: Mon Jul  6 15:12:53 on ttys000

user@MacBook-Pro ~ % blueutil -v

zsh: command not found: blueutil

user@MacBook-Pro ~ %

-----------------------------------------------------------------------

 

2.

-----------------------------------------------------------------------

[15:16:20.645] ERROR: AirPods Connector[Run Script] /Users/user/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/D0C9763C-E272-427B-8A49-1EAA4862E448:1: no such file or directory: /usr/local/bin/blueutil

Untitled_Artwork 2.jpg

 

 

 

Update: After installing blueutil on terminal, it's working as intended now.

 

P.S.: Thanks! 👍

Edited by epistaxis
Update
Link to comment
  • 7 months later...
  • 1 year later...
Posted (edited)

I assume your Bluetooth is enabled? 

 

Please run following command

system_profiler SPBluetoothDataType -json

 

It should look like:

 

{
  "SPBluetoothDataType" : [
    {
      "controller_properties" : {
        "controller_address" : "F8:FF:C2:50:D0:46",
        "controller_chipset" : "BCM_4364B3",
        "controller_discoverable" : "attrib_off",
        "controller_firmwareVersion" : "v75 c4195",
        "controller_productID" : "0x0001",
        "controller_state" : "attrib_on",
        "controller_supportedServices" : "0x382039 < HFP AVRCP A2DP HID Braille AACP GATT Serial >",
        "controller_transport" : "UART",
        "controller_vendorID" : "0x004C (Apple)"
      },
      "devices_list" : [
        {
          "Aci Mouse" : {
            "device_address" : "24:D0:DF:0A:F2:CF",
            "device_connected" : "Yes",
            "device_firmwareVersion" : "1.7.0",
            "device_minorType" : "Mouse",
            "device_productID" : "0x0269",
            "device_services" : "0x800020 < HID ACL >",
            "device_vendorID" : "0x004C"
          }
        },
        {
          "As AirPods Pro " : {
            "device_address" : "E4:90:FD:81:4C:7E",
            "device_firmwareVersion" : "4C165",
            "device_minorType" : "Headphones",
            "device_productID" : "0x200E",
            "device_serialNumber" : "GRHCGM9XLKKT",
            "device_vendorID" : "0x004C"
            }
        },...

 

Edited by Acidham
Link to comment
5 minutes ago, Acidham said:

I assume your Bluetooth is enabled? 

 

Please run following command

system_profiler SPBluetoothDataType -json

 

It should look like:

 

{
  "SPBluetoothDataType" : [
    {
      "controller_properties" : {
        "controller_address" : "F8:FF:C2:50:D0:46",
        "controller_chipset" : "BCM_4364B3",
        "controller_discoverable" : "attrib_off",
        "controller_firmwareVersion" : "v75 c4195",
        "controller_productID" : "0x0001",
        "controller_state" : "attrib_on",
        "controller_supportedServices" : "0x382039 < HFP AVRCP A2DP HID Braille AACP GATT Serial >",
        "controller_transport" : "UART",
        "controller_vendorID" : "0x004C (Apple)"
      },
      "devices_list" : [
        {
          "Aci Mouse" : {
            "device_address" : "24:D0:DF:0A:F2:CF",
            "device_connected" : "Yes",
            "device_firmwareVersion" : "1.7.0",
            "device_minorType" : "Mouse",
            "device_productID" : "0x0269",
            "device_services" : "0x800020 < HID ACL >",
            "device_vendorID" : "0x004C"
          }
        },
        {
          "AciPad" : {
            "device_address" : "28:EC:95:84:90:5D"
          }
        },...

 

Yes,

 

It looks like this: (1st is with airpods connected and 2nd without)

 

  "SPBluetoothDataType" : [

    {

      "controller_properties" : {

        "controller_address" : "8C:85:90:0E:03:F6",

        "controller_chipset" : "BCM_4350",

        "controller_discoverable" : "attrib_off",

        "controller_firmwareVersion" : "v134 c5628",

        "controller_productID" : "0x0001",

        "controller_state" : "attrib_on",

        "controller_supportedServices" : "0x382039 < HFP AVRCP A2DP HID Braille AACP GATT Serial >",

        "controller_transport" : "UART",

        "controller_vendorID" : "0x004C (Apple)"

      },

      "device_connected" : [

        {

          "name – AirPods Pro" : {

            "device_address" : "B8:81:FA:78:AA:25",

            "device_batteryLevelCase" : "23 %",

            "device_batteryLevelLeft" : "81 %",

            "device_firmwareVersion" : "4C165",

            "device_minorType" : "Headphones",

            "device_productID" : "0x200E",

            "device_serialNumber" : "GX9D94FQLKKT",

            "device_services" : "0x980019 < HFP AVRCP A2DP AACP GATT ACL >",

            "device_vendorID" : "0x004C"

          }

        }

      ],

      "device_not_connected" : [

        {

          "name iPhone" : {

            "device_address" : "A0:FB:C5:B7:C0:C4",

            "device_rssi" : "-38"

          }

        }

      ]

    }

  ]

(base) name-mbp:~ name$ system_profiler SPBluetoothDataType -json

{

  "SPBluetoothDataType" : [

    {

      "controller_properties" : {

        "controller_address" : "8C:85:90:0E:03:F6",

        "controller_chipset" : "BCM_4350",

        "controller_discoverable" : "attrib_off",

        "controller_firmwareVersion" : "v134 c5628",

        "controller_productID" : "0x0001",

        "controller_state" : "attrib_on",

        "controller_supportedServices" : "0x382039 < HFP AVRCP A2DP HID Braille AACP GATT Serial >",

        "controller_transport" : "UART",

        "controller_vendorID" : "0x004C (Apple)"

      },

      "device_not_connected" : [

        {

          "Name – AirPods Pro" : {

            "device_address" : "B8:81:FA:78:AA:25",

            "device_firmwareVersion" : "4C165",

            "device_minorType" : "Headphones",

            "device_productID" : "0x200E",

            "device_serialNumber" : "GX9D94FQLKKT",

            "device_vendorID" : "0x004C"

          }

        },

        {

          "Name iPhone" : {

            "device_address" : "A0:FB:C5:B7:C0:C4",

            "device_rssi" : "-38"

          }

        }

      ]

    }

  ]

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...