{"id":41185604,"url":"https://github.com/sputnikdev/bluetooth-gatt-parser","last_synced_at":"2026-01-22T20:16:09.281Z","repository":{"id":14364779,"uuid":"75906939","full_name":"sputnikdev/bluetooth-gatt-parser","owner":"sputnikdev","description":"Bluetooth GATT service and characteristic parser","archived":false,"fork":false,"pushed_at":"2023-04-25T05:54:36.000Z","size":478,"stargazers_count":74,"open_issues_count":7,"forks_count":35,"subscribers_count":9,"default_branch":"master","last_synced_at":"2023-10-29T09:08:41.325Z","etag":null,"topics":["ble","bluetooth","bluetoothsmart","characteristics","deserialize","device","gatt","lowenergy","parser","serialize"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sputnikdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-08T05:42:33.000Z","updated_at":"2023-09-14T06:48:22.000Z","dependencies_parsed_at":"2022-09-06T23:30:25.229Z","dependency_job_id":null,"html_url":"https://github.com/sputnikdev/bluetooth-gatt-parser","commit_stats":null,"previous_names":[],"tags_count":12,"template":null,"template_full_name":null,"purl":"pkg:github/sputnikdev/bluetooth-gatt-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sputnikdev%2Fbluetooth-gatt-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sputnikdev%2Fbluetooth-gatt-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sputnikdev%2Fbluetooth-gatt-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sputnikdev%2Fbluetooth-gatt-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sputnikdev","download_url":"https://codeload.github.com/sputnikdev/bluetooth-gatt-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sputnikdev%2Fbluetooth-gatt-parser/sbom","scorecard":{"id":842847,"data":{"date":"2025-08-11","repo":{"name":"github.com/sputnikdev/bluetooth-gatt-parser","commit":"82940cbc286ae3f75ebd4ee6b28d5e01d76bbc4c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"43 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-4jrv-ppp4-jm57","Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-mvr2-9pj6-7w5j","Warn: Project is vulnerable to: GHSA-2p3x-qw9c-25hh","Warn: Project is vulnerable to: GHSA-2q8x-2p7f-574v","Warn: Project is vulnerable to: GHSA-3ccq-5vw3-2p6x","Warn: Project is vulnerable to: GHSA-43gc-mjxg-gvrq","Warn: Project is vulnerable to: GHSA-4cch-wxpw-8p28","Warn: Project is vulnerable to: GHSA-4hrm-m67v-5cxr","Warn: Project is vulnerable to: GHSA-56p8-3fh9-4cvq","Warn: Project is vulnerable to: GHSA-59jw-jqf4-3wq3","Warn: Project is vulnerable to: GHSA-64xx-cq4q-mf44","Warn: Project is vulnerable to: GHSA-6w62-hx7r-mw68","Warn: Project is vulnerable to: GHSA-6wf9-jmg9-vxcc","Warn: Project is vulnerable to: GHSA-74cv-f58x-f9wf","Warn: Project is vulnerable to: GHSA-7chv-rrw6-w6fc","Warn: Project is vulnerable to: GHSA-7hwc-46rm-65jh","Warn: Project is vulnerable to: GHSA-8jrj-525p-826v","Warn: Project is vulnerable to: GHSA-cxfm-5m4g-x7xp","Warn: Project is vulnerable to: GHSA-f6hm-88x3-mfjv","Warn: Project is vulnerable to: GHSA-f8cc-g7j8-xxpm","Warn: Project is vulnerable to: GHSA-g5w6-mrj7-75h2","Warn: Project is vulnerable to: GHSA-h7v4-7xg3-hxcc","Warn: Project is vulnerable to: GHSA-hf23-9pf7-388p","Warn: Project is vulnerable to: GHSA-hfq9-hggm-c56q","Warn: Project is vulnerable to: GHSA-hph2-m3g5-xxv4","Warn: Project is vulnerable to: GHSA-hrcp-8f3q-4w2c","Warn: Project is vulnerable to: GHSA-hvv8-336g-rx3m","Warn: Project is vulnerable to: GHSA-hwpc-8xqv-jvj4","Warn: Project is vulnerable to: GHSA-j563-grx4-pjpv","Warn: Project is vulnerable to: GHSA-j9h8-phrw-h4fh","Warn: Project is vulnerable to: GHSA-jfvx-7wrx-43fh","Warn: Project is vulnerable to: GHSA-mw36-7c6c-q4q2","Warn: Project is vulnerable to: GHSA-p8pq-r894-fm8f","Warn: Project is vulnerable to: GHSA-qpfq-ph7r-qv6f","Warn: Project is vulnerable to: GHSA-qrx8-8545-4wg2","Warn: Project is vulnerable to: GHSA-rgh3-987h-wpmw","Warn: Project is vulnerable to: GHSA-rmr5-cpv2-vgjf","Warn: Project is vulnerable to: GHSA-xw4p-crpj-vjx2","Warn: Project is vulnerable to: GHSA-6phf-73q6-gh87","Warn: Project is vulnerable to: GHSA-p66x-2cv9-qq3v","Warn: Project is vulnerable to: GHSA-wxr5-93ph-8wr9"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T20:51:09.675Z","repository_id":14364779,"created_at":"2025-08-23T20:51:09.676Z","updated_at":"2025-08-23T20:51:09.676Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28670366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T19:36:09.361Z","status":"ssl_error","status_checked_at":"2026-01-22T19:36:05.567Z","response_time":144,"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":["ble","bluetooth","bluetoothsmart","characteristics","deserialize","device","gatt","lowenergy","parser","serialize"],"created_at":"2026-01-22T20:16:08.520Z","updated_at":"2026-01-22T20:16:09.276Z","avatar_url":"https://github.com/sputnikdev.png","language":"Java","readme":"[![Maven Central](https://img.shields.io/maven-central/v/org.sputnikdev/bluetooth-gatt-parser.svg)](https://mvnrepository.com/artifact/org.sputnikdev/bluetooth-gatt-parser)\n[![Build Status](https://travis-ci.org/sputnikdev/bluetooth-gatt-parser.svg?branch=master)](https://travis-ci.org/sputnikdev/bluetooth-gatt-parser)\n[![Coverage Status](https://coveralls.io/repos/github/sputnikdev/bluetooth-gatt-parser/badge.svg?branch=master)](https://coveralls.io/github/sputnikdev/bluetooth-gatt-parser?branch=master)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/42d4968bc4ae4474b2cda4d01f8e4d56)](https://www.codacy.com/app/vkolotov/bluetooth-gatt-parser?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=sputnikdev/bluetooth-gatt-parser\u0026amp;utm_campaign=Badge_Grade)\n[![Join the chat at https://gitter.im/sputnikdev/bluetooth-gatt-parser](https://badges.gitter.im/sputnikdev/bluetooth-gatt-parser.svg)](https://gitter.im/sputnikdev/bluetooth-gatt-parser?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n# bluetooth-gatt-parser\n\nA **simple** library/framework to work with Bluetooth Smart (BLE) GATT services and characteristics.\n\nHave a look at an example of parsing a standard characteristic ([Battery Level 0x2A19](https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.battery_level.xml)) value:\n```java\nBluetoothGattParserFactory.getDefault().parse(\"2A19\", new byte[] {51}).get(\"Level\").getInteger(null);\n```\nThis would print 51.\n\n**Features:**\n\n1. Supports 99% of the existing/standard [GATT services and characteristics specifications](https://www.bluetooth.com/specifications/gatt).\n2. Parse/read single and multi field characteristics into a user-friendly data format.\n3. Writing single and multi field characteristics.\n4. Validating input data whether it conforms to GATT specifications (format types and mandatory fields).\n5. Extensibility. User defined services and characteristics.\n6. Support for all defined [format types](https://www.bluetooth.com/specifications/assigned-numbers/format-types).\n\n**Start using the library by including a maven dependency in your project:**\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.sputnikdev\u003c/groupId\u003e\n  \u003cartifactId\u003ebluetooth-gatt-parser\u003c/artifactId\u003e\n  \u003cversion\u003eX.Y.Z\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nA more complex example of parsing multi-field characteristics ([Heart Rate service](https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.heart_rate.xml)):\n\n```java\n// Getting a default implementation which is capable of reading/writing the standard GATT services and characteristics\nBluetoothGattParser parser = BluetoothGattParserFactory.getDefault();\n\n// Reading Body Sensor Location (0x2A38) characteristic (sigle field)\nbyte[] data = new byte[] {1}; // 1 == Chest\nGattResponse response = parser.parse(\"2A38\", data);\nString sensorLocation = response.get(\"Body Sensor Location\").getInteger(null); // prints 1 (Chest)\n\n// Reading Heart Rate Measurement (0x2A37) characteristic (multi field)\nbyte[] data = new byte[] {20, 74, 13, 3};\nGattResponse response = parser.parse(\"2A37\", data);\nString heartRateValue = response.get(\"Heart Rate Measurement Value (uint8)\").getInteger(null); // prints 74\nString rrIntervalValue = response.get(\"RR-Interval\").getInteger(null); // prints 781\n\n// Writing Heart Rate Control Point (0x2A39) characteristic\nGattRequest request = parser.prepare(\"2A39\");\nrequest.setField(\"Heart Rate Control Point\", 1); // control value to be sent to a bluetooth device\nbyte[] data = parser.serialize(request);\n```\n\nSee more examples in the integration tests: [GenericCharacteristicParserIntegrationTest](src/test/java/org/bluetooth/gattparser/GenericCharacteristicParserIntegrationTest.java)\n\n---\n**Extending the library with user defined services and characteristics**\n\nThe gatt-parser library is designed to be able to add support for some new custom services/characteristics or to override an existing (\"approved\") [service and characteristic](https://www.bluetooth.com/specifications/gatt). This can be done by just providing a new GATT XML file which specifies your service and characteristic (have a look at the standard definition for the [Battery Level characteristic](src/main/resources/gatt/characteristic/org.bluetooth.characteristic.battery_level.xml)). The library will read your custom files and build internal rules/conditions for parsing and serialization of your custom characteristics. This means you don't have to write any code to parse/serialize simple or complex custom characteristics.\n\n_Loading XML GATT specification files (GATT-like specifications) from a folder:_\n\n```java\nBluetoothGattParser parser = BluetoothGattParserFactory.getDefault();\nFile extensionsFolderFile = new File(..);\ngattParser.loadExtensionsFromFolder(extensions);\n```\n\n**A custom parser can be added for a characteristic if you are not satisfied with the default one**\n\nSee the default one for a hint and a reference: [GenericCharacteristicParser](src/main/java/org/bluetooth/gattparser/GenericCharacteristicParser.java)\n```java\nBluetoothGattParser parser = BluetoothGattParserFactory.getDefault();\nCharacteristicParser customParser = new ...; // your own implementation\nparser.registerParser(CHARACTERISTIC_UUID, customParser);\n```\n\n---\n## Contribution\n\nYou are welcome to contribute to the project, the project environment is designed to make it easy by using:\n* Travis CI to release artifacts directly to the Maven Central repository.\n* Code style rules to support clarity and supportability. The results can be seen in the Codacy. \n* Code coverage reports in the Coveralls to maintain sustainability. 100% of code coverage with unittests is the target.\n\nThe build process is streamlined by using standard maven tools. \n\nTo build the project with maven:\n```bash\nmvn clean install\n```\n\nTo cut a new release and upload it to the Maven Central Repository:\n```bash\nmvn release:prepare -B\nmvn release:perform\n```\nTravis CI process will take care of everything, you will find a new artifact in the Maven Central repository when the release process finishes successfully.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsputnikdev%2Fbluetooth-gatt-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsputnikdev%2Fbluetooth-gatt-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsputnikdev%2Fbluetooth-gatt-parser/lists"}