Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Updated ruby bluetooth bindings based on ruby-bluetooth

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bluetooth_linux
Octocat-spinner-32 bluetooth_macosx
Octocat-spinner-32 bluetooth_win32
Octocat-spinner-32 examples
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
Octocat-spinner-32 extconf.rb
Octocat-spinner-32 macs
README.md

rubytooth

Updated ruby bluetooth bindings based on ruby-bluetooth
(https://rubyforge.org/projects/ruby-bluetooth/)

The above link will only run/compile with ruby 1.8.7. The source hasn't
been touched since mid-2006.

I have currently updated bluetooth_linux to run on 1.9.3. I updated the
headers in macosx and win32 but have not even tried to compile them
since I have neither a mac nor a win32 dev env.

Example:

bperry@bperry-rapid7:~/work/rubytooth$ ruby extconf.rb && make && cat
sample_program.rb && ruby sample_program.rb 
checking for main() in -lbluetooth... yes
creating Makefile
linking shared-object ruby_bluetooth.so


    require_relative "ruby_bluetooth"

    a = Bluetooth::Devices.scan
    a.each { |device|
      puts device.addr
      puts device.name
      p device
    }
    p a


F0:1C:13:55:0B:E7
LG-C800
#<Bluetooth::Device:0x00000001d123c8>
[#<Bluetooth::Device:0x00000001d123c8>]
bperry@bperry-rapid7:~/work/rubytooth$ 
Something went wrong with that request. Please try again.