{"id":21326952,"url":"https://github.com/tkomde/electron-webbluetooth-auto","last_synced_at":"2025-10-28T16:04:22.750Z","repository":{"id":236165725,"uuid":"792054616","full_name":"tkomde/electron-webbluetooth-auto","owner":"tkomde","description":"Automatically connect BLE device with electron","archived":false,"fork":false,"pushed_at":"2024-04-28T09:59:16.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-24T12:24:15.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/tkomde.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-04-25T22:19:03.000Z","updated_at":"2024-04-28T09:59:19.000Z","dependencies_parsed_at":"2024-04-25T23:57:49.068Z","dependency_job_id":"a92677b1-778f-45fc-972f-d2d5089b3639","html_url":"https://github.com/tkomde/electron-webbluetooth-auto","commit_stats":null,"previous_names":["tkomde/electron-webbluetooth-auto"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tkomde/electron-webbluetooth-auto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2Felectron-webbluetooth-auto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2Felectron-webbluetooth-auto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2Felectron-webbluetooth-auto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2Felectron-webbluetooth-auto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkomde","download_url":"https://codeload.github.com/tkomde/electron-webbluetooth-auto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2Felectron-webbluetooth-auto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281467391,"owners_count":26506483,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-21T21:12:35.990Z","updated_at":"2025-10-28T16:04:22.711Z","avatar_url":"https://github.com/tkomde.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-webbluetooth-auto\n\n- Automatically connect BLE device at startup with electron.\n- Automatically reconnect BLE device with electron.\n\n## Run\n\n- npm i\n- npx electron .\n\n## How it works\n\n- In main process, call renderer scanAndConnect() function by executeJavaScript() with userGesture = true \n- Reconnection is done using a different approach because of the different behavior of each OS platform as follows\n  - In the case of Windows\n      - It is necessary to reconnect to a device instance that has already been obtained (even if another requestDevice() is made, it is not found).\n  - In case of Mac\n      - Devices that have been disconnected for a while are forgotten, so it is necessary to restart over again from requestDevice().\n\n## Link\n\n[Electron Documentation - webContents - select-bluetooth-device](https://electronjs.org/docs/api/web-contents#event-select-bluetooth-device)\n[Electron Documentation - webContents - executejavascriptcode-usergesture](https://electronjs.org/docs/api/web-contents#contentsexecutejavascriptcode-usergesture)\n[Web Bluetooth / Automatic Reconnect Sample](https://googlechrome.github.io/samples/web-bluetooth/automatic-reconnect.html)\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkomde%2Felectron-webbluetooth-auto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkomde%2Felectron-webbluetooth-auto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkomde%2Felectron-webbluetooth-auto/lists"}