Skip to content
Beacon Simulator: A simple beacon simulator (iBeacon/Eddystone) in Golang
Branch: master
Clone or download
Latest commit 5ffbd15 Nov 4, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
eddystone name change Sep 4, 2018
ibeacon name change Sep 4, 2018
.travis.yml Update .travis.yml Nov 4, 2018
README.md updated doc Aug 30, 2018
eddystone.go Change to ble Aug 30, 2018
ibeacon.go Change to ble Aug 30, 2018

README.md

Beacon Simulator: A simple beacon simulator (iBeacon/Eddystone) in Golang

GitHub license GoDoc Build Status

This package is summarized golang beacon simulator with paypal/gatt package. It supports major two beacon as follow:

Install library

go get github.com/kkdai/beacon

Install binary

  • Eddystone: go install github.com/kkdai/beacon/eddystone
  • iBeacon: go install github.com/kkdai/beacon/ibeacon

Simulator 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()
}

Simulator Eddystone

package main

import (
	. "github.com/kkdai/beacon"
)

func main() {
	ed := NewEddystoneURLBeacon("http://www.evanlin.com", -20)
	ed.Advertise()
}

Inspired by

Project52

It is one of my project 52.

License

This package is licensed under MIT license. See LICENSE for details.

You can’t perform that action at this time.