Git Product home page Git Product logo

blueutil's Introduction

HELP UKRAINE WIN THE WAR

dump dump/rubocop fspath fspath/rubocop fspath-mac fspath-xattr git_dump git_dump/rubocop image_optim image_optim/rubocop image_optim_pack image_optim_pack/rubocop image_optim_pack/livecheck image_optim_pack/docker-build image_optim_rails image_optim_rails/rubocop image_size image_size/rubocop in_threads in_threads/rubocop phamilie progress progress/rubocop restartable restartable/rubocop

blueutil's People

Contributors

azuwis avatar friedrichweise avatar raphaelkn avatar toy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blueutil's Issues

Wait for *multiple* devices to connect

@toy: thanks for this great tool and making it available to the community.

I know --wait-connect ID is EXPERIMENTAL, but would you consider enriching the feature with waiting for multiple devices to connect?

My workflow is the following: I can connect multiple Sony Dualshock game controllers to my Mac. Once any of them is connected, I am executing some script. I was hoping to pass device name to --wait-connect so it would be triggered by any controller connecting (they are all named "DUALSHOCK 4 Wireless Controller"). But it looks like current behavior is to resolve device name with first device ID found in the "recent" list. Meaning, only one of the controller will trigger the --wait-connect (first one in the list).

So, would it be possible, with an extra flag, to wait for any devices matching a given device name pattern?

`
blueutil -v
2.8.0

blueutil --recent
address: 1c-a0-b8-a5-4c-35, not connected, not favourite, paired, name: "DUALSHOCK 4 Wireless Controller", recent access date: 2021-03-25 08:15:07 +0000
address: 90-89-5f-0a-f2-0f, not connected, not favourite, paired, name: "DUALSHOCK 4 Wireless Controller", recent access date: 2021-03-25 08:14:47 +0000
address: 90-89-5f-f1-a5-ba, not connected, not favourite, paired, name: "DUALSHOCK 4 Wireless Controller", recent access date: 2021-02-24 20:30:59 +0000

blueutil --wait-connect "DUALSHOCK 4 Wireless Controller"
`
==> Will only be triggered when "1c-a0-b8-a5-4c-35" is connected, not the other ones.

`(null)` values crash blueutil when asking for JSON format

When running blueutil --paired, one of my devices (a keyboard I only use on occasion) shows itself as:

address: 00-1f-20-4d-4f-a9, not connected, not favourite, paired, name: "(null)", recent access date: (null)

That causes problems with the new JSON format:

$ blueutil --format json --paired

2019-08-24 23:21:57.329 blueutil[24636:830763] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff4cd5e2fd __exceptionPreprocess + 256
	1   libobjc.A.dylib                     0x00007fff7742fa17 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff4cd9d2f4 -[CFPrefsConfigurationFileSource initWithConfigurationPropertyList:containingPreferences:] + 0
	3   CoreFoundation                      0x00007fff4cc763eb -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 311
	4   CoreFoundation                      0x00007fff4ccb17ee +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
	5   blueutil                            0x00000001094dd64a list_devices_json + 967
	6   blueutil                            0x00000001094de4a6 main + 1904
	7   libdyld.dylib                       0x00007fff78bfd3d5 start + 1
	8   ???                                 0x0000000000000004 0x0 + 4
)
libc++abi.dylib: terminating with uncaught exception of type NSException
zsh: abort      blueutil --format json-pretty --paired

Unpairing the device removes the error.

Magic Mouse 2 doesn't connect

Hi Ivan, nice to meet you here :-)

after switching from Magic Mouse 1 to MM 2, my auto connect doesn't work anymore.
I'm using 2 Macbooks and usually my bluetooth mouse follows my cable keyboard. For that I'm doing

mac1: blueutil --disconnect <id> && blueutil -p 0 && sleep 10 && blueutil -p 1 # just to avoid reconnecting to same mac
mac2: blueutil --connect <id>

which worked fine in both directions even without holding mouse button down.
With magic mouse 2 the --connect doesn't do anything anymore (using Catalina 10.15.7, blueutil 2.8.0).
Device is listed as paired but not connected.
If I open bluetooth settings and hit the connect button next to the mouse, it connects.

Any idea?

one important option is missing - Unpair Paired Bluetooth Device

because I'm using Bluetooth wireless keyboard with 2 computers every time I want to connect to the other one, I have to repair the keyboard with the computer Bluetooth

so I have to unpair the device from OSX first and pair it again in order to reconnect it to OSX after using the keyboard in another computer

Add a "--power toggle" option

In order to utilize blueutil with keyboard tools like Better Touch Tools or similar, a command line option to toggle the power state would be helpful.
The toggle option should basically do the same as this applescript (which I have assigned to the "Fn-B" hotkey via BTT), just without the need for a script in the first place:

set blueutil to "/usr/local/bin/blueutil"
set powerStatus to do shell script blueutil & " --power"

if powerStatus is "1" then
	do shell script blueutil & " --power off"
else if powerStatus is "0" then
	do shell script blueutil & " --power on"
end if

[Request] List available devices

How about listing the devices within range of your Mac? Its always nice for debugging or even scripting...

e.g.: I thinking about locking my Mac every time my iPhone (over bluetooth) is not in range....

License

Hi @toy,

thanks for continuing the work of Frederik. :) I would like to use the compiled binary in my Alfred 3 workflow and was wondering if you'd have any problems with that.

Do you mind adding a license to this repository so that others and me can be sure that we are allowed to use and distribute the binary with our software (with attribution to this repository)?

Thanks and best regards
Tilman :)

'Failed to connect' error on recognized Apple Magic Trackpad 2

$ blueutil --inquiry
address: ec-2c-e2-ef-44-0f, not connected, not favourite, not paired, name: "Magic Trackpad 2", recent access date: (null)

$ blueutil --connect ec-2c-e2-ef-44-0f
Failed to connect "ec-2c-e2-ef-44-0f"

Any thoughts or suggestions?!

Setting Discoverable as Root Disables Discoverability for the System

The Problem

Using blueutil as a root user and setting discoverability causes the system to lose the ability to be discovered over Bluetooth.

Replicating the Issue

To replicate this bug (which I advise against replicating since I haven't been able to reverse it), run the following:

sudo blueutil -d 1

Attempted Debugging

I've tested a couple different configurations to double check that one device wasn't simply refusing to acknowledge my Mac. I'll list out a few things I tried:

  1. Opening the Bluetooth Preferences menu and checking if the Mac was discoverable on an iPhone, iPad, Linux laptop, and a Raspberry Pi.
  2. Setting the discoverability to 1 in blueutil as a regular user and checking on the same devices.
  3. Setting the discoverability to 1 in blueutil as a root user and checking on the same devices.

In an attempt to remedy this issue I have:

  • Restarted the Bluetooth module.
  • Restarted the machine.
  • Updated the machine to a new MacOS minor version.

I suppose a last ditch effort could be to reinstall MacOS, however, I'm a little loathe to do this since it's a bit of a minor issue.

I've also tested running the above command on another MacBook Pro with similar results occurring. I'll list the specs of the two laptops below, for some extra info (this could be a Catalina specific issue, maybe?)

  • Macbook Pro 16 (2019) MacOS 10.15.7
  • Macbook Pro 15 (2015) MacOS 10.15.6

On a side note, both systems above were able to use blueutil as a regular user (before encountering the bug) and set discoverability such that they were able to show up on other devices.

Extra Information

Things also get a little weirder if you check the discoverable values as a regular user and a root user. The two values don't seem to coincide? Eg: If discoverable is 0 for both root/a regular user and I set discoverable as root, the regular user will still see discoverable as zero. For a further example:

blueutil -d
> 0
sudo blueutil -d
> 0
sudo blueutil -d 1
sudo blueutil -d
> 1
blueutil -d
> 0

My guess is that something has been written to that shouldn't have been written to as root? Honestly, this is a little outside my expertise. I'm a bit of a layman when it comes to the inner-workings of MacOS. Any input on a solution to this would be much appreciated!

Compilation and proposals

I just compiled the code with Xcode 8.3.3 under Sierra without problems. It is mentioned that the project file is for Xcode 3.1 and that is recommended to update to newer settings. I did so and still there were not any problems. I copied the resulting binary "blueutil" into /usr/local/bin, which is in my PATH and have the command at my finger tips ... One proposal from my side: to prefix the options with a "-" which is normally the standard in Unix environments. Would look like
blueutil -s

Homebrew and blueutil

Hey,

I don't know if GitHub repo maintainers can give HTML classes to any of their Markdown text, but it's worth a try. I've made a contribution to Homebrew that allows project maintainers to give any HTML element on their page a class of "pkg_mgr_desc" and brew dscr FORMULA would scrape the site for that HTML and display its plain text representation on the Terminal. It's intended for project maintainers to describe their software without Homebrew having to keep its own, potentially outdated, descriptions of all the software it has formulae for.

They're considering adding it to core Homebrew, but it needs widespread adoption. Please consider wrapping your description in tags (or p tags or whatever, any tag works, it just has to have the class).

Here's the pull request for my command if you want: Homebrew/legacy-homebrew#23926

[Request] Configurable (or other than comma) device list field delimiter

It would be great to have delimiter other than comma in device list for easier parsing with utilities like awk.

For example, comma in second column (connected (slave, -56 dBm)) makes it not so easy to split the line with just comma as delimiter.
address: **-**-**-**-**-**, connected (slave, -56 dBm), not favourite, paired, name: "********", recent access date: 2019-02-25 03:09:43 +0000

Device ID name sometimes not found

When I use the -info command giving a device name that is returned from the --paired command I get back an error message "Device not found by name"; however if I give the address string then it is successful.

The device name does have a # character in it (device name is "Magic Mouse #1") and it seems that this is what causes the problem. If I access another device by name, "Magic Mouse 2" that works ok. So:

./blueutil --info "Magic Mouse #1" fails
./blueutil -- info "Magic Mouse 2" succeeds

not working with wiimote

I try to connect my wiimote via bluetooth, which worked fine before macos forced a bluetooth pin to connect, but the wiimotes don't have a bluetooth pin, and since dolphin could connect it (wasn't usable outside of dolphin), i imagined this could too, but appearently this can't connect to devices that simply don't have a bluetooth pin either, was wondering if this is a bug with the current version of this tool or if it has become literally impossible to connect bluetooth devices that don't have a bluetooth pin.

Conflicting usage information

Just wanted to give you a heads up that http://www.frederikseiffert.de/blueutil/ happens to have pretty outdated usage information (from a superficial scan of your commits it seems like it'd probably be around cc07347).

Not a big deal, though in my case it briefly made me think this utility was broken—luckily it's not though, thanks for making it! 👍

Inquiry failing

I currently have one MacBook Pro (13-inch, 2018) running Big Sur v11.1 and when I call blueutil --inquiry and attempt to find nearby devices it often fails and does not work consistently. On the other hand, I have a second MacBook Pro (13-inch, 2015) running Mojave v10.14.6 which does the exact same functions and always works each time. Is there any logical explanation for this? Maybe updates to the framework or could it just be an issue with my bluetooth hardware/software. If so, is there any way to reset the bluetooth module?

Edit: Seems as if when certain bluetooth devices are connected the inquiry fails. Otherwise it works.

The argument position of `--format` matters

Thank you again for the new format options. One thing that tripped me up is that --format needs to come before the other options. blueutil --format json --paired works but blueutil --paired --format json does not (it shows the default format).

Ideally, --format could be invoked in any position, but if that’s not possible help should mention it needs to come first.

please remove the discoverable

discoverable no longer works, so you can remove it! i don't know if Apple changed something with their bluetooth drivers or so.

Release Tarballs

Could you please issue release tarballs so it's easier for people to download a specific version of the source? It can also be checksummed/signed so there is no doubt it hasn't been modified

Explain keyboard shortcut creation

I guess many users want to use this package to create a keyboard shortcut for automatically switching bluetooth on and off.
Why not include the instructions for doing so in the readme (or somewhere else)?
Something like:

To create a keyboard shortcut that toggles bluetooth:

MacOS:
Install blueutil
Start Automator, and create a new Quick Action (Service).
Set "Service receives selected: to "no input" in "any application".
Add an action named "Run Shell Script". It's in the Utilities section of the Actions Library.
Insert this bash command into the text box:

/usr/local/bin/blueutil -p toggle

Test run it using the Run button (top right).
Save it, giving it a service name you can remember.
Go to System Preferences -> Keyboard, and go to the Shortcuts tab
Go to the Services section, and scroll down to General - you should find your service there. If you select the line, you can click "add shortcut" and give it a keyboard shortcut.

Linux:
[...]

Windows:
[...]

Workflow to reconnect a keyboard to another mac

Hey @toy
many thanks for this tool and for having it open source 👍

I'm often switching a keyboard from on mac to another. My current workflow that somehow works without using blueutil is to

  • on mac1, remove completely the keyboard in the BT preferences
  • on mac2, wait until the keyboard appears in the device list (turn BT on/off a couple of times)
  • on mac2, click on Connect

I'm looking for a way to simplify it and found your tool. However, it seems I have a similar issue to this one #38

I'm aware the removing/unmpairing completely the device does not seem to be possible as explained in #31

I try by using a simple disconnect as follows

on mac1

blueutil --info $my_keyboard
address: 11-22-33-44-55-66, connected (master, -47 dBm), not favourite, paired, name: "MyKeyboard", recent access date: 2021-02-12 08:51:45 +0000

blueutil --disconnect $my_keyboard

on mac2

blueutil --info $my_keyboard
address: 11-22-33-44-55-66, not connected, not favourite, paired, name: "MyKeyboard", recent access date: 2021-02-12 09:03:56 +0000

blueutil --connect $my_keyboard
blueutil --info $my_keyboard

address: 11-22-33-44-55-66, not connected, not favourite, not paired, name: "MyKeyboard", recent access date: 2021-02-12 09:07:16 +0000

blueutil --info $my_keyboard
address: 11-22-33-44-55-66, connected (master, -50 dBm), not favourite, not paired, name: "MyKeyboard", recent access date: 2021-02-12 09:07:46 +0000

blueutil --pair $my_keyboard

blueutil --info $my_keyboard
address: 11-22-33-44-55-66, not connected, not favourite, paired, name: "MyKeyboard", recent access date: 2021-02-12 09:08:31 +0000


blueutil --connect $my_keyboard
blueutil --info $my_keyboard
address: 11-22-33-44-55-66, not connected, not favourite, not paired, name: "MyKeyboard", recent access date: 2021-02-12 09:08:45 +0000

It basically seems it's impossible to pair or connect they keyboard on the mac2 unless I manually unpair un from mac1.

Are there any other commands to try to be able to switch a keyboard from one mac to another somewhat easily? Would you consider adding the unapair command that would use this api even if it needs a root access?

Any support for macOS 10.13.6?

I'm using High Sierra and brew install blueutil keeps throwing
Executable requires at least macOS 10.14, but is being run on macOS 10.13.6, and so is exiting.

Any solution would be much appreciated. Thanks in advance.

The new makefile doesn't work

On Sierra 10.12.3, if I type make while in the unzipped source directory, I get this:

cc -Wall -Wextra -Werror -framework IOBluetooth    blueutil.m   -o blueutil
blueutil.m:86:8: error: size argument in 'strncmp' call is a comparison [-Werror,-Wmemsize-comparison]
                        if (is_abbr_arg("help", argv[1])) {
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
blueutil.m:73:68: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                                       ~~~~~~~~~~~~^~~~
blueutil.m:86:8: note: did you mean to compare the result of 'strncmp' instead?
blueutil.m:73:33: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                ^
blueutil.m:86:8: note: explicitly cast the argument to size_t to silence this warning
blueutil.m:73:56: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                                       ^
blueutil.m:90:8: error: size argument in 'strncmp' call is a comparison [-Werror,-Wmemsize-comparison]
                        if (is_abbr_arg("version", argv[1])) {
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blueutil.m:73:68: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                                       ~~~~~~~~~~~~^~~~
blueutil.m:90:8: note: did you mean to compare the result of 'strncmp' instead?
blueutil.m:73:33: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                ^
blueutil.m:90:8: note: explicitly cast the argument to size_t to silence this warning
blueutil.m:73:56: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                                       ^
blueutil.m:94:8: error: size argument in 'strncmp' call is a comparison [-Werror,-Wmemsize-comparison]
                        if (is_abbr_arg("status", argv[1])) {
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blueutil.m:73:68: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                                       ~~~~~~~~~~~~^~~~
blueutil.m:94:8: note: did you mean to compare the result of 'strncmp' instead?
blueutil.m:73:33: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                ^
blueutil.m:94:8: note: explicitly cast the argument to size_t to silence this warning
blueutil.m:73:56: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                                       ^
blueutil.m:109:8: error: size argument in 'strncmp' call is a comparison [-Werror,-Wmemsize-comparison]
                        if (is_abbr_arg("power", argv[1])) {
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blueutil.m:73:68: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                                       ~~~~~~~~~~~~^~~~
blueutil.m:109:8: note: did you mean to compare the result of 'strncmp' instead?
blueutil.m:73:33: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                ^
blueutil.m:109:8: note: explicitly cast the argument to size_t to silence this warning
blueutil.m:73:56: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                                       ^
blueutil.m:112:15: error: size argument in 'strncmp' call is a comparison [-Werror,-Wmemsize-comparison]
                        } else if (is_abbr_arg("discoverable", argv[1])) {
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blueutil.m:73:68: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                                       ~~~~~~~~~~~~^~~~
blueutil.m:112:15: note: did you mean to compare the result of 'strncmp' instead?
blueutil.m:73:33: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                ^
blueutil.m:112:15: note: explicitly cast the argument to size_t to silence this warning
blueutil.m:73:56: note: expanded from macro 'is_abbr_arg'
#define is_abbr_arg(name, arg) (strncmp((name), (arg), strlen(arg) || 1) == 0)
                                                       ^
5 errors generated.
make: *** [blueutil] Error 1

I have Xcode 8.2.1 and the latest CommandLineTools installed.

[Request] Pair device

Hallo and thanks for that tool. All functionality are pretty!
After reading the code and Apple document, I found maybe a new functionality about pairing device would be added. IOBluetoothDevicePair could be helpful.
My admin locks bluetooth panel, but I need my trackpad....

Thank you.

MacPorts port / minimum OSX version

Hi,
I created a port for this for MacPorts and it works OK, however one issue is they support quite old versions of OSX and this fails to build there.

Do you know the minimum version of OSX that this will build under so I can update the port?

Thanks.

Unable to connect after using --disconnect

First, I'm on macOS Catalina 10.15.4

I issued a --disconnect command that successfully disconnected my Bluetooth headphones. I'm now unable to connect them back.

I have tried blueutil connect, unpairing and repairing the headphones, resetting the Bluetooth module and every time I try to connect the headphones they show as connected for a couple of seconds and then quickly disconnects.

How can I undo whatever blueutil --disconnect did? I can't use my headphones anymore.

EDIT: I was only able to pair them again after a reboot

MacOS Notarization

Hey @toy,

since MacOS Catalina (currently in beta), all applications have to be notarized by default. Otherwise, Gatekeeper won't allow to open the app. See:

Do you have a developer ID certificate? If yes, would it be possible for you to notarize the app, so it will run without any issues in future MacOS versions?

Thanks in advance!

Cheers
Tilman

Reference: tilmanginzel/alfred-bluetooth-workflow#9 (comment)

Tag a stable version

We're packaging this software in Homebrew, and it would help us out if you could tag a version number on this software, so we can get a tarball download w/ a stable checksum. Thanks!

How to update / uninstall ?

Hi,

I'd like to update Blueutil so it works on MacOS Catalina (64bits).
I guess I first have to uninstall the previous version ? Or is there an update process I can follow ?
Can you help me in this ? :)

Thank you !

Regards
Vincent

Consider CLI ability to perform HCI Controller Selection

For those of us with older hardware, it would be great to have the ability to turn off the internal Bluetooth and turn on an USB dongle that supports 4.0 or 5.0. Similar to the HCI Controller Selector in Bluetooth Explorer.

We can modify the startup to inventory the connected devices, stop the built-in controller, recognize the dongle and reconnect the devices.

Retrieve custom names of devices in addition to factory names

When pulling --info and --paired lists, the name property contains the default factory name of each device. Is there a way to pull the devices' custom names as well, if they exist?

I'm referring to the MacOS feature of renaming bluetooth devices: In the System Preferences » Bluetooth device list, you can right-click any connected device and rename it. Now the custom name will be displayed in the menubar's Bluetooth dropdown and the Bluetooth preferences, and will persist for all users until the device is removed/forgotten.

This is handy for changing default factory names to something easier to identify and to distinguish between multiple devices whose factory names are hard to tell apart (e.g., Kitchen Speaker and Bedroom Speaker instead of XX-Company-01 and XX-Company-02).

It would be useful to have access to these names when running the --info and --paired commands.

image

How to change the disconnect timeout of bluetooth keyboard

My bluetooth keyboard is disconnecting automatically after 5 minutes of inactivity on my MacBook air 2019. How can I extend the timer of 5 minutes for this device with blueutil.

I have already tried the following, but it doesn't work for me.

blueutil --wait-disconnect [my BT ID] 999999999999999

`blueutil -p 0` takes a long time

Using blueutil to turn the bluetooth power off takes a long time (several seconds). If memory serves, it used to be basically instantaneous. Turning bluetooth power on, however, is still basically instantaneous.

This is on High Sierra, with blueutil 2.2.0.

Compile to 64bit

I noticed Blueutil is compiled in 32bit which means it won't work on macOS Catalina. Would it be possible to release a 64bit build?

Bad CPU type when using Automator Run Shell Script

I have Macbook M1 2020 with Big Sur 11.1
I've installed HomeBrew and blueutil in order to create keyboard shortcut for BT switch on/off
Blueutil works fine through Terminal, but don't when creating Run Shell Script in Automator

Script is following

export PATH=/usr/local/bin:$PATH
bluetoothStatus=$(blueutil -p)
[[ $bluetoothStatus -eq 0 ]] && blueutil -p 1 || blueutil -p 0

On run i have mistake
The action “Run Shell Script” encountered an error: “-: line 1: /usr/local/bin/blueutil: Bad CPU type in executable
-: line 2: /usr/local/bin/blueutil: Bad CPU type in executable
-: line 2: /usr/local/bin/blueutil: Bad CPU type in executable”

Can you help me and find the way to create keyboard shortcut?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.