https://github.com/woodruffw/ruby-msr
A ruby gem for the MSR206 and MSR505C
https://github.com/woodruffw/ruby-msr
msr ruby ruby-library rubygems
Last synced: about 2 months ago
JSON representation
A ruby gem for the MSR206 and MSR505C
- Host: GitHub
- URL: https://github.com/woodruffw/ruby-msr
- Owner: woodruffw
- License: mit
- Created: 2016-03-07T22:53:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T22:31:26.000Z (over 4 years ago)
- Last Synced: 2025-03-19T23:06:46.373Z (7 months ago)
- Topics: msr, ruby, ruby-library, rubygems
- Language: C
- Homepage: https://rubygems.org/gems/msr
- Size: 72.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
msr
===[](https://badge.fury.io/rb/msr)
A ruby gem for controlling magnetic stripe reader-writers (on UNIX/UNIX-likes).
Uses [libmsr](https://github.com/woodruffw/libmsr).
## Installation
```
$ gem install msr # make sure you have libmsr and ruby development headers
```## Example
Full documentation is
[available on RubyDoc](http://www.rubydoc.info/gems/msr/).```ruby
require 'msr'msr = MSR::MSR505C.new("/dev/ttyS0") # or your serial device
puts "OK" if msr.linked?
# control an LED on the reader
msr.led = :all # :green, :yellow, :red, :all, :none# get and set coercivity
msr.coercivity # => :high, :low
msr.coercivity = :high # :lowtracks = msr.raw_read # => MSR::Tracks
tracks.reverse!
msr.raw_write tracks
```## License
`ruby-msr` is licensed under the MIT License.
For the exact terms, see the [license](./LICENSE) file.