It is written using the [gatt](https://github.com/currantlabs/gatt) package fork by Currant Labs of the package from [Paypal](https://github.com/paypal). Thank you!
You need to have XCode installed to be able to compile code that uses the Gobot BLE adaptor on OSX. This is because the `gatt` package uses a CGo based implementation.
### Ubuntu
Everything should already just compile on most Linux systems.
When using BLE a "peripheral" aka "server" is something you connect to such a a pulse meter. A "central" aka "client" is what does the connecting, such as your computer or mobile phone.
You need to know the BLE ID of the peripheral you want to connect to. The Gobot BLE client adaptor also lets you connect to a peripheral by friendly name.
To run any of the Gobot BLE code you must use the `GODEBUG=cgocheck=0` flag in order to get around some of the issues in the CGo-based implementation.
For example:
GODEBUG=cgocheck=0 go run examples/minidrone.go 8b2f8032290143e18fc7c426619632e8
OSX uses its own Bluetooth ID system which is different from the IDs used on Linux. The code calls thru the XPC interfaces provided by OSX, so as a result does not need to run under sudo.
On Linux the BLE code will need to run as a root user account. The easiest way to accomplish this is probably to use `go build` to build your program, and then to run the requesting executable using `sudo`.