0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【macOSトラブルシュート】Automator アプリが Bluetooth 接続できない時に確認すべき設定

Posted at

0. はじめに

自分で作った blueutil 経由のオートメーションアプリがエラーを起こしていたのを解決しました。

環境

プロセッサ: 2.3 GHz クアッドコアIntel Core i5
maOS: Sequoia バージョン15.3.2(24D81)

1. エラーメッセージ

スクリーンショット 2025-04-15 17.06.52.jpg

自分で作ったのは WH-1000XM5 に Bluetooth 接続するアプリです。コマンドは

/usr/local/bin/blueutil --connect ac-80-0a-94-1a-14

純正の Automator と blueutil 1 があれば誰でもどんな Bluetooth 機器にも応用できます。

名前は /Applications/ConnectWH-1000XM5.app です。Automator からは実行できるにもかかわらずアプリ単体で実行することができませんでした。

アクション“シェルスクリプトを実行”でエラーが起きました: “”

2. 解決

質問の回答メッセージから解決策を思いついて解決できました。

autometorのシェルスクリプトで起動したい
https://teratail.com/questions/343599

設定アプリの許可設定が OS アップデートで複雑になったなあぐらいのことは覚えていたのですが、どこで何をセキュリティ許可すればいいのか分からなかったのです。

初めはプライバシーとセキュリティのブロック設定(野良アプリが弾かれる時のあれ)を見たり、フルディスクアクセスを見たりしていたのですが、最終的には設定から Bluetooth アクセスを許可することでアプリが動くようになりました。

3. Bluetooth のアクセスを許可

スクリーンショット 2025-04-15 17.08.11.jpg

Bluetooth のアクセスを見ると以前作ったオートメーションアプリにも許可を与えていました。

プラスボタンからアプリを追加してアクセス要件を満たすようにすると、アプリが実行できるようになりました。

Alfred で wh -> Enter と入力しただけでヘッドホンに接続されます。

n. おわりに

今回は自作のオートメーションアプリ ConnectWH-1000XM5.app のデバッグをしました。

複雑化した設定アプリで Bluetooth 設定を ON にすることで解決しました。

余談ですが、ヘッドホンは rentio でレンタルしたものなのでそろそろ返却して新しいのを代わりに買おうかと思っています。

  1. toy/blueutil: CLI for bluetooth on OSX: power, discoverable state, list, inquire devices, connect, info, … https://github.com/toy/blueutil

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?