This repository contains a Golang based example for interacting with the edge connect APIs.
- Broadcasts
- Get/Set Radio Modes
- Tau board support
- BLE Scanning
- Firmware Programming
- Radio Reset
A demo application is provided in examples/api
. This application can perform most API operations.
Install go if you don't have it. Get Go here
** Make sure to set $GOPATH
**
Clone the repo into $GOPATH/src/github.com/rigado
:
cd $GOPATH
mkdir -p src/github.com/rigado
cd src/github.com/rigado
git clone https://github.com/rigado/edgeconnect.git
Install dep if you don't have it.
On MacOS w/ Homebrew:
brew install dep
brew upgrade dep
On other platforms:
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
Then install dependencies by running:
dep ensure
In the edgeconnect/examples/api directory, run:
make clean && make
(defaults to amd64)
The binary can be built for either amd64
(default) or arm
architectures. Run make help
for available commands.
The binaries are located in the build folder.
cd examples/api
make arm
scp build/ecapi_arm <gateway_ip>:~
ssh <gateway_ip>
chmod +x ecapi_arm (may not be necessary)
sudo ./ecapi (options)