# Automating Bluetooth Profile switching thanks to Copilot Chat

DevFeed: [Automating Bluetooth Profile switching thanks to Copilot Chat](<https://devfeed.tech/articles/automating-bluetooth-profile-switching-thanks-to-copilot-chat-25675.md>)

Original publisher: [Read original article](<https://blog.sanskar10100.dev/automating-bluetooth-profile-switching-thanks-to-copilot-chat>)

Author: Sanskar Agrawal

Published: 2023-10-09T20:20:18Z

Content type: opinion

Language: en

Sources: [Sanskar's Stuff](<https://devfeed.tech/sources/sanskar-s-stuff.md>)

Topics: [Generative AI](<https://devfeed.tech/topics/generative-ai.md>), [generative-ai-tools](<https://devfeed.tech/topics/generative-ai-tools.md>), [GitHub Copilot](<https://devfeed.tech/topics/github-copilot.md>), [Bluetooth](<https://devfeed.tech/topics/bluetooth.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-tools](<https://devfeed.tech/tags/ai-tools.md>), [android](<https://devfeed.tech/tags/android.md>), [apps](<https://devfeed.tech/tags/apps.md>), [audio](<https://devfeed.tech/tags/audio.md>), [backend](<https://devfeed.tech/tags/backend.md>), [bluetooth](<https://devfeed.tech/tags/bluetooth.md>), [book](<https://devfeed.tech/tags/book.md>), [call](<https://devfeed.tech/tags/call.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [coding](<https://devfeed.tech/tags/coding.md>), [command](<https://devfeed.tech/tags/command.md>), [computer](<https://devfeed.tech/tags/computer.md>), [copilot](<https://devfeed.tech/tags/copilot.md>), [distro](<https://devfeed.tech/tags/distro.md>), [generative-ai](<https://devfeed.tech/tags/generative-ai.md>), [github-copilot](<https://devfeed.tech/tags/github-copilot.md>), [linux](<https://devfeed.tech/tags/linux.md>), [os](<https://devfeed.tech/tags/os.md>), [profile](<https://devfeed.tech/tags/profile.md>), [switching](<https://devfeed.tech/tags/switching.md>)

## AI overview

On Endeavour OS, a Bluetooth headset microphone was unavailable because the computer was not switching from A2DP, which provides higher-quality audio without mic support, to HFP/HSP, which supports calls with lower audio quality. The author used GitHub Copilot Chat to help write a script that toggles headset profiles, refining it through about 30 minutes of back-and-forth after providing console output. A KDE desktop icon, keyboard shortcut, and panel access made the script easier to run before and after calls. It serves as a temporary workaround; the author says Copilot did not produce the right commands on the first try and notes that terminal knowledge was needed.

## Source excerpt

A task I completed that I wouldn't have (or at least, not without putting several hours into it) without Generative AI: I use an Arch-based Linux distro called Endeavour OS. It's a great OS, but lately, I've been having this issue where my computer w...