{"id":23399582,"url":"https://github.com/lecodeurdudimanche/php-bluetooth","last_synced_at":"2025-04-11T18:04:40.533Z","repository":{"id":57013431,"uuid":"276944723","full_name":"LeCodeurDuDimanche/php-bluetooth","owner":"LeCodeurDuDimanche","description":"A package to manage bluetooth connexions on Linux using PHP, relying on the BlueZ stack","archived":false,"fork":false,"pushed_at":"2020-12-28T22:39:42.000Z","size":67,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T18:02:09.537Z","etag":null,"topics":["bluetooth","linux","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LeCodeurDuDimanche.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-03T16:35:48.000Z","updated_at":"2025-03-11T17:10:21.000Z","dependencies_parsed_at":"2022-08-21T13:40:56.077Z","dependency_job_id":null,"html_url":"https://github.com/LeCodeurDuDimanche/php-bluetooth","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeCodeurDuDimanche%2Fphp-bluetooth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeCodeurDuDimanche%2Fphp-bluetooth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeCodeurDuDimanche%2Fphp-bluetooth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeCodeurDuDimanche%2Fphp-bluetooth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeCodeurDuDimanche","download_url":"https://codeload.github.com/LeCodeurDuDimanche/php-bluetooth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248456373,"owners_count":21106602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bluetooth","linux","php"],"created_at":"2024-12-22T10:14:46.219Z","updated_at":"2025-04-11T18:04:40.492Z","avatar_url":"https://github.com/LeCodeurDuDimanche.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Bluetooth\n## A package to manage bluetooth connexions on Linux using PHP\nThis package relies on the Bluez stack, using the `bluetoothctl` tool.\n\n*This package is in early development stage*\n\n## Requirements\n\nThis library relies on the BlueZ stack, so you need to install `bluez` and `bluez-tools` packages. \\\nPHP version \u003e= 7.2\n\n## Installation\n\n```\n    composer require lecodeurdudimanche\\php-bluetooth\n```\n\n## Basic usage\n\nThe `Manager` class is the entry point of this library. \\\nTo launch the `Manager` and set the bluetooth adapter in a discoverable state and to accept paring :\n```php\n    use lecodeurdudimanche\\PHPBluetooth\\Manager;\n\n    $manager = new Manager($discoverable, $pairable);\n```\n\nNext you can manage the bluetooth connextion through the `Manager`, keep in mind that all commands (but not all methods) are asynchronous :\n```php\n    use lecodeurdudimanche\\PHPBluetooth\\Device;\n\n    $manager-\u003escanDevices(); //Initiate device scan\n    $manager-\u003esetPairable(false);\n    $manager-\u003epairDevice(new Device($mac));\n\n    $manager-\u003eupdateBluetoothInfo();\n    $data = $manager-\u003egetBluetoothInfo();\n\n    foreach($data-\u003egetAvailableDevices() as $device)\n    {\n        if (! $device-\u003epaired)\n            $manager-\u003eblockDevice($device);\n    }\n\n    // Other methods are available, see Manager class\n```\n\n## TODO\n     - Add detection of discoverable and pairable status at startup\n     - Add support to exclude unscanned paired devices from scanned devices list\n     - Add detection of trusted and blocked devices\n     - Add I/O exception handling\n\n## License\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flecodeurdudimanche%2Fphp-bluetooth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flecodeurdudimanche%2Fphp-bluetooth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flecodeurdudimanche%2Fphp-bluetooth/lists"}