This package is summarized golang beacon simulator with paypal/gatt package. It supports major two beacon as follow:
go get github.com/kkdai/beacon
- Eddystone:
go install github.com/kkdai/beacon/eddystone
- iBeacon:
go install github.com/kkdai/beacon/ibeacon
package main
import (
. "github.com/kkdai/beacon"
)
func main() {
ib := NewIBeacon("AA6062F098CA42118EC4193EB73CCEB6", "Gopher", -59)
ib.SetiBeaconVersion(1, 2)
ib.AddCountService()
ib.AddBatteryService()
ib.Advertise()
}
package main
import (
. "github.com/kkdai/beacon"
)
func main() {
ed := NewEddystoneURLBeacon("http://www.evanlin.com", -20)
ed.Advertise()
}
It is one of my project 52.
This package is licensed under MIT license. See LICENSE for details.