{"id":13648486,"url":"https://github.com/hybridgroup/rubyserial","last_synced_at":"2025-12-30T00:25:17.122Z","repository":{"id":56893662,"uuid":"20902422","full_name":"hybridgroup/rubyserial","owner":"hybridgroup","description":"FFI Ruby library for RS-232 serial port communication","archived":false,"fork":false,"pushed_at":"2019-09-08T03:33:09.000Z","size":318,"stargazers_count":156,"open_issues_count":12,"forks_count":29,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-20T19:42:10.807Z","etag":null,"topics":["ruby","serial-ports","serialport"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/rubyserial","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hybridgroup.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}},"created_at":"2014-06-16T22:09:19.000Z","updated_at":"2024-11-06T21:16:01.000Z","dependencies_parsed_at":"2022-08-20T16:10:53.288Z","dependency_job_id":null,"html_url":"https://github.com/hybridgroup/rubyserial","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Frubyserial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Frubyserial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Frubyserial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Frubyserial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hybridgroup","download_url":"https://codeload.github.com/hybridgroup/rubyserial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250232359,"owners_count":21396625,"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":["ruby","serial-ports","serialport"],"created_at":"2024-08-02T01:04:17.774Z","updated_at":"2025-12-30T00:25:17.081Z","avatar_url":"https://github.com/hybridgroup.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# rubyserial\n\nRubySerial is a simple Ruby gem for reading from and writing to serial ports.\n\nUnlike other Ruby serial port implementations, it supports all of the most popular Ruby implementations (MRI, JRuby, \u0026 Rubinius) on the most popular operating systems (OSX, Linux, \u0026 Windows). And it does not require any native compilation thanks to using RubyFFI [https://github.com/ffi/ffi](https://github.com/ffi/ffi).\n\nThe interface to RubySerial should be (mostly) compatible with other Ruby serialport gems, so you should be able to drop in the new gem, change the `require` and use it as a replacement. If not, please let us know so we can address any issues.\n\n[![Build Status](https://travis-ci.org/hybridgroup/rubyserial.svg)](https://travis-ci.org/hybridgroup/rubyserial)\n[![Build status](https://ci.appveyor.com/api/projects/status/946nlaqy4443vb99/branch/master?svg=true)](https://ci.appveyor.com/project/zankich/rubyserial/branch/master)\n[![Test Coverage](https://codeclimate.com/github/hybridgroup/rubyserial/badges/coverage.svg)](https://codeclimate.com/github/hybridgroup/rubyserial/coverage)\n\n## Installation\n\n    $ gem install rubyserial\n\n## Usage\n\n```ruby\nrequire 'rubyserial'\nserialport = Serial.new '/dev/ttyACM0' # Defaults to 9600 baud, 8 data bits, and no parity\nserialport = Serial.new '/dev/ttyACM0', 57600\nserialport = Serial.new '/dev/ttyACM0', 19200, 8, :even\n```\n\n## Methods\n\n**write(data : String) -\u003e Int**\n\nReturns the number of bytes written.\nEmits a `RubySerial::Error` on error.\n\n**read(length : Int) -\u003e String**\n\nReturns a string up to `length` long. It is not guaranteed to return the entire\nlength specified, and will return an empty string if no data is\navailable. Emits a `RubySerial::Error` on error.\n\n**getbyte -\u003e Fixnum or nil**\n\nReturns an 8 bit byte or nil if no data is available.\nEmits a `RubySerial::Error` on error.\n\n**RubySerial::Error**\n\nA wrapper error type that returns the underlying system error code and inherits from IOError.\n\n## Running the tests\n\nThe test suite is written using rspec, just use the `rspec` command.\n\n### Test dependencies\n\nTo run the tests on OS X and Linux, you must also have the `socat` utility program installed.\n\n#### Installing socat on OS X\n\n```\nbrew install socat\n```\n\n#### Installing socat on Linux\n\n```\nsudo apt-get install socat\n```\n\n#### Test on Windows\n\nTo run the tests on Windows requires com0com which can be downloaded from here:\n\nhttps://github.com/hybridgroup/rubyserial/raw/appveyor_deps/setup_com0com_W7_x64_signed.exe\n\n\n## License\n\nApache 2.0. See `LICENSE` for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhybridgroup%2Frubyserial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhybridgroup%2Frubyserial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhybridgroup%2Frubyserial/lists"}