bluetooth
This project is a WIP
Bluez C binding in Crystal
Installation
Add this to your application's shard.yml
:
dependencies:
bluetooth:
github: crystal-community/bluetooth
Usage
require "bluetooth"
local_device = Bluetooth::LocalDevice.new
remote_devices = local_device.scan
local_device.close
# remote_devices is a Hash(String, String) of address => name
p remote_devices
=> {
"00:11:22:33:FF:EE" => "Android Phone"
}
Development
Some relevant resources:
-
http://people.csail.mit.edu/albert/bluez-intro/c404.html
-
https://github.com/carsonmcdonald/bluez-experiments/blob/master/experiments/scantest.c
-
http://affix.sourceforge.net/affix-doc/x496.html
-
[ ] Bluetooth
- [x] Scan for remote devices.
- [ ] Connect to remote devices.
- [ ] Enumarate services.
- [ ] Handle different services like media, sounds, etc..
-
[ ] BLE
- [ ] Scan for remote devices.
- [ ] Connect to remote devices.
- [ ] Enumarate services.
- [ ] Send commands to remote services.
Contributing
- Fork it ( https://github.com/crystal-community/bluetooth/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- bararchy Bar Hofesh - creator, maintainer