{"id":20651450,"url":"https://github.com/artem14133q/iobt","last_synced_at":"2026-04-20T00:36:30.026Z","repository":{"id":49442697,"uuid":"517682987","full_name":"artem14133q/iobt","owner":"artem14133q","description":"Library for manage bluetooth in MacOS system","archived":false,"fork":false,"pushed_at":"2023-07-04T21:59:33.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T10:26:19.277Z","etag":null,"topics":["bluetooth","clang","lib","macos","objective-c","shared-library","static-library"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artem14133q.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":"2022-07-25T13:45:28.000Z","updated_at":"2022-08-01T10:32:10.000Z","dependencies_parsed_at":"2024-11-16T17:27:40.031Z","dependency_job_id":"f3fa6040-5664-4e71-ab7b-cc18772729fe","html_url":"https://github.com/artem14133q/iobt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artem14133q%2Fiobt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artem14133q%2Fiobt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artem14133q%2Fiobt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artem14133q%2Fiobt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artem14133q","download_url":"https://codeload.github.com/artem14133q/iobt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242750779,"owners_count":20179256,"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","clang","lib","macos","objective-c","shared-library","static-library"],"created_at":"2024-11-16T17:27:31.753Z","updated_at":"2026-04-20T00:36:29.981Z","avatar_url":"https://github.com/artem14133q.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iobt\n[![CMake](https://github.com/artem14133q/iobt/actions/workflows/cmake.yml/badge.svg)](https://github.com/artem14133q/iobt/actions/workflows/cmake.yml)\n\nLibrary for manage bluetooth in MacOS system\n\n## Structs\n\n```objectivec\n// Contains some IOBluetoothDevice object parameters\n// Alias: IOBT_DEVICE\nstruct Device {\n    char * address;\n    char * name;\n    char * recentAccessDate;\n    enum ConnectionStatus connected;\n    int rssi;\n    bool favorite; \n    bool paired; \n};\n\n// List of devices\n// Alias: IOBT_DEVICES\nstruct DeviceArray {\n    int len;\n    struct Device * devices;\n};\n```\n\n## Connection statuses\n\n| Value | Name              |\n| ----- | ----------------- |\n| `1`   | **Not connected** |\n| `2`   | **Slave**         |\n| `3`   | **Master**        |\n\n\n## Usage\n\n1. Start scan device in range (seconds). If `timeout \u003c 1` when `timeout = 10` sec.\n```objectivec\nstruct DeviceArray search(int8_t timout);\n```\n\n2. Return array with paired devices.\n```objectivec\nstruct DeviceArray paired();\n```\n\n3. Return array with connected devices.\n```objectivec\nstruct DeviceArray connected();\n```\n\n4. Find device by `address`. If device not found, return fake device with current `address`.\n   If `strict` flag is `true` it exit with error when device not paired and not favorite.\n```objectivec\nstruct Device getDevice(const char * address, bool strict);\n```\n\n5. Close connection. If device not disconnected, return `false`.\n```objectivec\nbool closeConnection(const char * address);\n```\n\n6. Open connection. If device not connected, return false. If device not found it try to connect with current `address`.\n```objectivec\nbool openConnection(const char * address);\n```\n\n7. Pair devices. If device paired when return 0. If device error when return `value \u003e 0`.\n```objectivec\nint pair(const char * address, const char * pin);\n```\n\n8. Unpair devices. If device could not unpair, return `false`.\n```objectivec\nbool unpair(const char * address);\n```\n\n9. Return Bluetooth adapter power state.\n```objectivec\nbool power();\n```\n\n10. Power on/off (`true`/`false`) Bluetooth adapter. Return success flag.\n```objectivec\nbool setPower(bool enable);\n```\n\n## Building\n\n#### Dev tools\n\n* Apple clang\n* cmake\n* git\n\n#### Make\n\n```zsh\ngit clone git@github.com:artem14133q/iobt.git\ncd iobt\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release -G \"CodeBlocks - Unix Makefiles\" .. --build . --target all -- -j 1\n```\n\n`bin` directory will be generated in root project dir \n\n#### Folder structure\n\n```\n.\n└─ bin\n   │\n   ├─ iobt\n   │  ├─ headers\n   │  │  ├─ iobt.h\n   │  │  └─ iobtTypes.h\n   │  │\n   │  ├─ shared\n   │  │  ├─ libiobt.\u003cversion\u003e.dylib\n   │  │  ├─ libiobt.\u003cversion-major\u003e.dylib\n   │  │  └─ libiobt.dylib\n   │  │\n   │  └─ static\n   │     ├─ libiobt.\u003cversion\u003e.a\n   │     ├─ libiobt.\u003cversion-major\u003e.a\n   │     └─ libiobt.a\n   │  \n   └─ iobt.zip\n```\n\n## Contacts\n\n**Telegram:** \u003ca href=\"https://t.me/artem14133q\"\u003e@artem_du\u003c/a\u003e \u003cbr\u003e\n**Gmail:** \u003ca href=\"mailto:dubisoft1520@gmail.com\"\u003edubisoft1520@gmail.com\u003c/a\u003e\n\n## Contribute\n\n**Welcome**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartem14133q%2Fiobt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartem14133q%2Fiobt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartem14133q%2Fiobt/lists"}