Skip to content

Commit 3981f55

Browse files
authored
Update documentation.
Many thanks to @jcampanell-cablelabs for collaborating on this.
1 parent 10e32f0 commit 3981f55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+701
-859
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
# binaries
55
dist/
66
build/
7+
docs/public/

.travis.yml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,36 @@ script:
1616
- make test
1717

1818
before_deploy:
19-
- rvm --default use system
20-
- sudo apt-get install -y python-pip ruby ruby-dev
21-
- sudo pip install -r requirements.txt
22-
- sudo gem install --no-ri --no-rdoc fpm
23-
- mkdocs build
19+
- >
20+
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
21+
export BEFORE_DEPLOY_RUN=1;
2422
25-
- GOOS=linux GOARCH=amd64 make package package-deb
26-
- GOOS=linux GOARCH=386 make package package-deb
27-
- GOOS=linux GOARCH=arm make package package-deb
28-
- GOOS=darwin GOARCH=amd64 make package
29-
- GOOS=windows BINEXT=.exe GOARCH=386 make package
30-
- GOOS=windows BINEXT=.exe GOARCH=amd64 make package
23+
rvm --default use system;
24+
wget https://github.com/spf13/hugo/releases/download/v0.20.7/hugo_0.20.7_Linux-64bit.deb;
25+
sudo dpkg -i hugo_0.20.7_Linux-64bit.deb;
26+
rm *.deb;
27+
sudo apt-get install -y ruby ruby-dev;
28+
sudo gem install --no-ri --no-rdoc fpm;
29+
make documentation;
30+
31+
GOOS=linux GOARCH=amd64 make package package-deb;
32+
GOOS=linux GOARCH=386 make package package-deb;
33+
GOOS=linux GOARCH=arm make package package-deb;
34+
GOOS=darwin GOARCH=amd64 make package;
35+
GOOS=windows BINEXT=.exe GOARCH=386 make package;
36+
GOOS=windows BINEXT=.exe GOARCH=amd64 make package;
37+
fi
3138
3239
deploy:
3340
- provider: s3
3441
skip_cleanup: true
3542
access_key_id: AKIAJRLX7TQLGT6NN7WQ
3643
secret_access_key:
3744
secure: OJZy+FZeI/S9wM/qqnTHAqjItI266K5tfIqx1+au1MC1QrXAV61NbTjKAo/xUGaKLOcTh1h1/KPTTdYZnQQa8e7QjA+1PF/89Ou7pIhMqWDKCNvFHUoUCTVCLf0f4dmKZcVTEZrobFct+ZhMq5mnzvuIvvf+TT4pfee1BUUpxbMWjA/HaMQIKfRxeb5tLyOnOkKg66Gd99trAY55r8SqPzkqcqvuOqeh7Ic2Uk+Uxlosf+9gRUIWHk7i4miiKvZQmPJfOOKTlvy3BStt1KGSycBt2mYkPAtAAScnobV8GHRcA0ZVI8Blp9W5/D18L43xAP+BRdBnoblr5GNnHGznlltYOskbTPuHzo8TVOl+8sct3uVwbrxg0rzJttAqkoMce7Xg4TLLe44gsp38YOyS4D2NzvEJZMvwoq1uCdR72JOANP5fxOxLnBO2weHy1K1F3SlXXaTJpQZ6lg2j/eaZO3V9tFFbqqHB4PdwQrZ9tjvuA2Dm6NNtQIMPeD8hq6Rq/6/4sXLi7+V8Sbl9f5W+FFfqKTFUl4WH1QPu/bFwC04UL1LDX9kO30Wg9Rlgc18S5HeMivofF1NVDnY+V8SV8lHVyHXASwSRl/OrMvRf21u5+wJf6U8E1s1cK/wYdIOSm6Rbot+6UK9M3ev8VALerqAr6uTVbCmm6Bqmlc+79jw=
38-
bucket: docs.loraserver.io
39-
local-dir: site
40-
upload-dir: lora-gateway-bridge
41-
acl: public_read
45+
bucket: builds.loraserver.io
46+
local-dir: dist/docs
47+
upload-dir: docs
48+
acl: private
4249
region: eu-west-1
4350
on:
4451
repo: brocaar/lora-gateway-bridge

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ clean:
1313
@echo "Cleaning up workspace"
1414
@rm -rf build
1515
@rm -rf dist/tar/$(VERSION)
16+
@rm -rf docs/public
1617

1718
test:
1819
@echo "Running tests"
@@ -22,6 +23,12 @@ test:
2223
@go vet $(PKGS)
2324
@go test -cover -v $(PKGS)
2425

26+
documentation:
27+
@echo "Building documentation"
28+
@mkdir -p dist/docs
29+
@cd docs && hugo
30+
@cd docs/public/ && tar -pczf ../../dist/docs/lora-gateway-bridge.tar.gz .
31+
2532
package: clean build
2633
@echo "Creating package for $(GOOS) $(GOARCH)"
2734
@mkdir -p dist/tar/$(VERSION)

docs/config.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
baseURL = "https://docs.loraserver.io/lora-gateway-bridge/"
2+
languageCode = "en-us"
3+
title = "LoRa Gateway Bridge documentation"
4+
googleAnalytics = "UA-3512995-9"
5+
6+
[[menu.main]]
7+
pre = "<i class='fa fa-hand-o-right'></i>"
8+
name = "Overview"
9+
identifier = "overview"
10+
url = "/overview/"
11+
weight = 1
12+
13+
[[menu.main]]
14+
pre = "<i class='fa fa-download'></i>"
15+
name = "Install"
16+
identifier = "install"
17+
url = "/install/"
18+
weight = 2
19+
20+
[[menu.main]]
21+
pre = "<i class='fa fa-user'></i>"
22+
name = "Use"
23+
identifier = "use"
24+
url = "/use/"
25+
weight = 3
26+
27+
[[menu.main]]
28+
pre = "<i class='fa fa-github'></i>"
29+
name = "Community & support"
30+
identifier = "community"
31+
url = "/community/"
32+
weight = 4
33+
34+
[params]
35+
version = "2.1.4"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Contribute
3+
menu:
4+
main:
5+
parent: community
6+
weight: 2
7+
---
8+
9+
## Contribute
10+
11+
There are a couple of ways to get involved:
12+
13+
* Join the discussions and share your feedback at [https://gitter.io/loraserver/lora-gateway-bridge](https://gitter.io/loraserver/lora-gateway-bridge)
14+
* Report bugs or make feature-requests by opening an issue at [https://github.com/brocaar/lora-gateway-bridge/issues](https://github.com/brocaar/lora-gateway-bridge/issues)
15+
* Fix issues or improve documentation by creating pull-requests
16+
17+
When you would like to add new features, please discuss the feature first
18+
by creating an issue describing your feature, how you're planning to implement
19+
it, what the usecase is etc...

docs/frequently-asked-questions.md renamed to docs/content/community/faq.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
# Frequently asked questions
1+
---
2+
title: FAQ
3+
menu:
4+
main:
5+
parent: community
6+
weight: 4
7+
---
28

3-
## Packet-loss (packet_forwarder)
9+
## Frequently asked questions
10+
11+
### Packet-loss (packet_forwarder)
412

513
There are many issues that can cause packet-loss (data is not received or
614
transmitted by the gateway). Here are some hints:
@@ -19,12 +27,12 @@ transmitted by the gateway). Here are some hints:
1927
packet_forwarder have a queue of size 1 which gets overwritten on each
2028
packet to be transmitted.
2129

22-
### `ERROR: Packet REJECTED, unsupported frequency - [FREQUENCY] (min:0,max:0)`
30+
##### `ERROR: Packet REJECTED, unsupported frequency - [FREQUENCY] (min:0,max:0)`
2331

2432
Make sure the `tx_freq_min` and `tx_freq_max` are present in your
2533
configuration.
2634

27-
### `src/jitqueue.c:343:jit_enqueue(): ERROR: Packet (type=0) REJECTED, collision with packet already programmed at 423844236 (423843356)`
35+
##### `src/jitqueue.c:343:jit_enqueue(): ERROR: Packet (type=0) REJECTED, collision with packet already programmed at 423844236 (423843356)`
2836

2937
This error occurs when there is a collision between two packets being
3038
scheduled by the packet_forwarder. Please note that a collision does not only
@@ -35,13 +43,13 @@ scheduled for transmission, can be > 100ms). This documented behaviour and can
3543
be found in the [readme.md](https://github.com/Lora-net/packet_forwarder/blob/master/lora_pkt_fwd/readme.md)
3644
of the packet_forwarder documentation (5.3. TX scheduling).
3745

38-
### `WARNING: [gps] GPS out of sync, keeping previous time reference`
46+
##### `WARNING: [gps] GPS out of sync, keeping previous time reference`
3947

4048
To be investigated
4149

42-
## lora-gateway-bridge errors
50+
### lora-gateway-bridge errors
4351

44-
### `gateway: could not handle packet: gateway: invalid protocol version`
52+
##### `gateway: could not handle packet: gateway: invalid protocol version`
4553

46-
packet_forwarder v3.0.0+ introduced a new protocol version. Please check
47-
[Compatibility](index.md#compatibility).
54+
packet_forwarder v3.0.0+ introduced a new protocol version. Please install
55+
the latest LoRa Gateway Bridge version (which supports both protocol versions).

docs/content/community/source.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: Source
3+
menu:
4+
main:
5+
parent: community
6+
weight: 3
7+
---
8+
9+
## LoRa Gateway Bridge source
10+
11+
Source-code can be found at [https://github.com/brocaar/lora-gateway-bridge](https://github.com/brocaar/lora-gateway-bridge).
12+
13+
### Building
14+
15+
#### With Docker
16+
17+
The easiest way to get started is by using the provided
18+
[docker-compose](https://docs.docker.com/compose/) environment. To start a bash
19+
shell within the docker-compose environment, execute the following command from
20+
the root of this project:
21+
22+
```bash
23+
docker-compose run --rm gatewaybridge bash
24+
```
25+
26+
#### Without Docker
27+
28+
It is possible to build LoRa App Server without Docker. However this requires
29+
to install a couple of dependencies (depending your platform, there might be
30+
pre-compiled packages available):
31+
32+
##### Go
33+
34+
Make sure you have [Go](https://golang.org/) installed (1.7+) and that the LoRa
35+
App Server repository has been cloned to
36+
`$GOPATH/src/github.com/brocaar/lora-app-server`.
37+
38+
##### Development utilities
39+
40+
Finally, install some utilities used for development by executing the
41+
following commands:
42+
43+
```bash
44+
go get github.com/golang/lint/golint
45+
go get github.com/kisielk/errcheck
46+
```
47+
48+
#### Example commands
49+
50+
A few example commands that you can run:
51+
52+
```bash
53+
# run the tests
54+
make test
55+
56+
# compile
57+
make build
58+
59+
# cross-compile for Linux ARM
60+
GOOS=linux GOARCH=arm make build
61+
62+
# cross-compile for Windows AMD64
63+
GOOS=windows BINEXT=.exe GOARCH=amd64 make build
64+
65+
# build the .tar.gz file
66+
make package
67+
68+
# build the .tar.gz file for Linux ARM
69+
GOOS=linux GOARCH=arm make package
70+
71+
# build the .tar.gz file for Windows AMD64
72+
GOOS=windows BINEXT=.exe GOARCH=amd64 make package
73+
```

docs/content/community/support.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Support
3+
menu:
4+
main:
5+
parent: community
6+
weight: 1
7+
---
8+
9+
## Support
10+
11+
### Bugs
12+
13+
Did you find a bug? Please check first if this issue has already been reported.
14+
If not, please create an issue at:
15+
[https://github.com/brocaar/lora-gateway-bridge/issues](https://github.com/brocaar/lora-gateway-bridge/issues).
16+
17+
### Questions
18+
19+
For questions please refer to the LoRa App Server Gitter channel:
20+
[https://gitter.im/loraserver/lora-gateway-bridge](https://gitter.im/loraserver/lora-gateway-bridge).

docs/content/install/config.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Configuration
3+
menu:
4+
main:
5+
parent: install
6+
weight: 5
7+
---
8+
9+
## Configuration
10+
11+
### Gateway
12+
13+
Modify the [packet-forwarder](https://github.com/lora-net/packet_forwarder)
14+
of your gateway so that it will send its data to the LoRa Gateway Bridge.
15+
You will need to change the following configuration keys:
16+
17+
* `server_address` to the IP address / hostname of the LoRa Gateway Bridge
18+
* `serv_port_up` to `1700` (the default port that LoRa Gateway Bridge is using)
19+
* `serv_port_down` to `1700` (same)
20+
21+
### LoRa Gateway Bridge
22+
23+
To list all configuration options, start `lora-gateway-bridge` with the
24+
`--help` flag. This will display:
25+
26+
```
27+
GLOBAL OPTIONS:
28+
--udp-bind value ip:port to bind the UDP listener to (default: "0.0.0.0:1700") [$UDP_BIND]
29+
--mqtt-server value mqtt server (e.g. scheme://host:port where scheme is tcp, ssl or ws) (default: "tcp://127.0.0.1:1883") [$MQTT_SERVER]
30+
--mqtt-username value mqtt server username (optional) [$MQTT_USERNAME]
31+
--mqtt-password value mqtt server password (optional) [$MQTT_PASSWORD]
32+
--skip-crc-check skip the CRC status-check of received packets [$SKIP_CRC_CHECK]
33+
--log-level value debug=5, info=4, warning=3, error=2, fatal=1, panic=0 (default: 4) [$LOG_LEVEL]
34+
--help, -h show help
35+
--version, -v print the version
36+
```
37+
38+
Both cli arguments and environment-variables can be used to pass configuration
39+
options.

0 commit comments

Comments
 (0)