{"id":37419305,"url":"https://github.com/mageddo-projects/linux-bluetooth-connection-fix","last_synced_at":"2026-01-16T06:04:57.498Z","repository":{"id":129842300,"uuid":"608470179","full_name":"mageddo-projects/linux-bluetooth-connection-fix","owner":"mageddo-projects","description":"Tries  to connect bluetooth devices on Linux despite error `hci0: command 0x0c24 tx timeout`","archived":false,"fork":false,"pushed_at":"2025-12-02T21:14:25.000Z","size":84,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-05T20:52:50.213Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mageddo-projects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-02T04:34:40.000Z","updated_at":"2025-12-02T21:06:04.000Z","dependencies_parsed_at":"2023-05-09T19:33:00.788Z","dependency_job_id":null,"html_url":"https://github.com/mageddo-projects/linux-bluetooth-connection-fix","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mageddo-projects/linux-bluetooth-connection-fix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mageddo-projects%2Flinux-bluetooth-connection-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mageddo-projects%2Flinux-bluetooth-connection-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mageddo-projects%2Flinux-bluetooth-connection-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mageddo-projects%2Flinux-bluetooth-connection-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mageddo-projects","download_url":"https://codeload.github.com/mageddo-projects/linux-bluetooth-connection-fix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mageddo-projects%2Flinux-bluetooth-connection-fix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T06:04:57.417Z","updated_at":"2026-01-16T06:04:57.482Z","avatar_url":"https://github.com/mageddo-projects.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linux-bluetooth-connection-fix\nAutomated process to connect bluetooth devices on Linux despite the error `hci0: command \u003ccode\u003e tx timeout`. \nRelated errors\n\n```bash\nBluetooth: hci0: command 0x0c24 tx timeout\nBluetooth: hci0: command 0x0c52 tx timeout\nBluetooth: hci0: command 0x0c1a tx timeout\n```\n\n## Running it \n\nUsage\n\n```bash\n$ java -jar linux-bluetooth-connection-fix.jar \u003cdeviceId\u003e \u003ccontrollerId\u003e\n[main] INFO com.mageddo.linux.bluetoothfix.BluetoothConnector - found=false, code=0, out=null\n[main] WARN com.mageddo.linux.bluetoothfix.BluetoothConnector - systemctl will ask you for root password to restart bluetooth service ...\n[main] INFO com.mageddo.linux.bluetoothfix.BluetoothConnector - found=true, code=0, out=null\n[main] INFO com.mageddo.linux.bluetoothfix.BluetoothConnector - status=tried, occurrence=CONNECTED, time=10158\n[main] INFO com.mageddo.linux.bluetoothfix.BluetoothConnector - status=successfullyConnected!, device=ConReq(deviceId=94:CC:56:E5:72:85, controllerId=00:F0:83:56:F2:03), totalTime=10158\n```\n\nMore Details below:\n\n### Install Deps\n\nDownload the [latest release][1]\n\nInstall `bluetoothctl`\n```\n# sudo apt install bluez\n$ bluetoothctl --version\nbluetoothctl: 5.64\n```\n\n### Pair the Phone\nPair the phone as you commonly do, make sure to know what was the controller id used (see `Discover uour Controller ID`) \n\n### Discover your Controller ID aka Bluetooth Dongle ID\n\nDiscover your controller id, generally you will have only one, I have two, so you need to make sure to identify \nthe one you paired with your headphone with, if not sure, unpair and pair again. `00:F0:83:56:F2:03` is mine. \n\n```bash\nbluetoothctl list\nController 00:2A:7D:CA:71:0B bluetooth4_ [default]\nController 00:F0:83:56:F2:03 bluetooth5 \n```\n\n### Discover your Device ID / Phone ID\n\nDiscover your device ID, for example `94:CC:56:E5:72:85` is my headphone:\n```bash\n$ bluetoothctl\n$ select 00:F0:83:56:F2:03\n$ devices \nDevice 94:CC:56:E5:72:85 WH-1000XM4\n```\n\n\n## Requirements\n\n* Linux\n* JRE 11+\n\n## How it works\nAfter buy a new bluetooth usb dongle, I noticed it was very difficult to make it connect to my headphones, also\nnoticed if I restart the bluetooth service and try to connect sometimes it will work at some moment, so what I did \nwas jut automate this process. \n\nAbout the bluetooth issue root cause:\n\nI wasn't able to find a real fix for the bluetooth problem, looks like it doesn't exist yet,\nall people advise to buy a new hardware at the end, then I made this program as a workaround.\n\nRelated issues \n* https://bbs.archlinux.org/viewtopic.php?id=198718\n* https://bbs.archlinux.org/viewtopic.php?id=270693\n* https://bbs.archlinux.org/viewtopic.php?id=195886\u0026p=2\n* https://unix.stackexchange.com/questions/581974/alpine-linux-failed-to-start-discovery-org-bluez-error-inprogress\n\n## Compiling from source\n\n```bash\n$ ./gradlew build shadowJar\n```\n\n[1]: https://github.com/mageddo-projects/linux-bluetooth-connection-fix/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmageddo-projects%2Flinux-bluetooth-connection-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmageddo-projects%2Flinux-bluetooth-connection-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmageddo-projects%2Flinux-bluetooth-connection-fix/lists"}