{"id":27387182,"url":"https://github.com/bastengao/react-native-serial-port-api","last_synced_at":"2025-08-20T15:33:06.879Z","repository":{"id":36948507,"uuid":"231919997","full_name":"bastengao/react-native-serial-port-api","owner":"bastengao","description":"react-native serial port API","archived":false,"fork":false,"pushed_at":"2023-07-27T07:24:31.000Z","size":1304,"stargazers_count":30,"open_issues_count":27,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T18:11:08.459Z","etag":null,"topics":["android","react-native","serialport"],"latest_commit_sha":null,"homepage":"https://bastengao.com/react-native-serial-port-api/","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/bastengao.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}},"created_at":"2020-01-05T13:16:41.000Z","updated_at":"2024-12-06T02:17:23.000Z","dependencies_parsed_at":"2024-06-21T16:41:32.029Z","dependency_job_id":"1d947989-8914-49db-aa4e-e58ae48a111c","html_url":"https://github.com/bastengao/react-native-serial-port-api","commit_stats":{"total_commits":54,"total_committers":7,"mean_commits":7.714285714285714,"dds":0.2962962962962963,"last_synced_commit":"dd8e7823704cf159656c7f2937f8026d8464e798"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastengao%2Freact-native-serial-port-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastengao%2Freact-native-serial-port-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastengao%2Freact-native-serial-port-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastengao%2Freact-native-serial-port-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bastengao","download_url":"https://codeload.github.com/bastengao/react-native-serial-port-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688569,"owners_count":21145766,"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":["android","react-native","serialport"],"created_at":"2025-04-13T17:53:44.701Z","updated_at":"2025-04-13T17:53:45.335Z","avatar_url":"https://github.com/bastengao.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-serial-port-api\n\nOnly for android platform based on [Android-SerialPort-API](https://github.com/licheedev/Android-SerialPort-API).\n\n## Getting started\n\n`$ npm install react-native-serial-port-api --save`\n\n### (Optional) React Native \u003c 0.60\n\nRun this command if use React Native before version 0.60.\n\n`$ npx react-native link react-native-serial-port-api`\n\n[Autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) will works for 0.60 or above.\n\n## Usage\n\n```javascript\nimport SerialPortAPI from 'react-native-serial-port-api';\n\nasync function example() {\n  const serialPort = await SerialPortAPI.open(\"/dev/ttyS4\", { baudRate: 38400 });\n\n  // subscribe received data\n  const sub = serialPort.onReceived(buff =\u003e {\n    console.log(buff.toString('hex').toUpperCase());\n  })\n\n  // unsubscribe\n  // sub.remove();\n\n  // send data with hex format\n  await serialPort.send('00FF');\n\n  // close\n  serialPort.close();\n}\n```\n\nSee [documentation](https://bastengao.com/react-native-serial-port-api/) for details.\n\n## Development\n\nGenerate API docs.\n\n    npm install -g jsdoc\n    jsdoc src -r -R README.md -t node_modules/docdash -d ./docs/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbastengao%2Freact-native-serial-port-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbastengao%2Freact-native-serial-port-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbastengao%2Freact-native-serial-port-api/lists"}