Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added instructions for balena.io deployment #69

Open
wants to merge 112 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
4e3c7fe
Added instructions for balena.io deployment
Jun 12, 2020
cb2ed21
Update README with balena instructions
mpous Jul 13, 2020
f18d671
Update README.md
mpous Jul 13, 2020
16b2d0e
Update README with US TC_URI example
mpous Jul 16, 2020
cf7cf2c
Update multi-regions TC_URI
mpous Jul 16, 2020
4c627bd
Update multi-region TC_URI
mpous Jul 16, 2020
874553a
Update SPI SPEED
mpous Jul 27, 2020
d232fd2
Updated SPI SPEED
mpous Jul 27, 2020
cc7e0cd
Fix SPI speed to 2Mhz
jmarcelino Aug 25, 2020
f4ed9ba
Merge pull request #2 from jmarcelino/spi_fix
Aug 25, 2020
6aa1917
Corecell build
mpous Sep 18, 2020
6c604c3
More changes corecell
mpous Sep 18, 2020
c3e6d96
the corecell way
mpous Sep 21, 2020
4d8c4c1
Corecell last changes
mpous Sep 21, 2020
3436e0d
Corecell last changes
mpous Sep 21, 2020
dba36b1
Corecell last changes
mpous Sep 21, 2020
f511eca
Add support for both RAK2245 and RAK2287 via env vars
rahul-thakoor Sep 22, 2020
836fcea
README and balena.yml update
mpous Sep 22, 2020
3f24b3e
Update README.md
mpous Sep 22, 2020
44f6122
Update README.md
mpous Sep 22, 2020
c2d680f
Update README.md
mpous Sep 22, 2020
8a438d4
Update README.md
mpous Sep 22, 2020
856329e
Update README.md
mpous Sep 22, 2020
a46c952
Update balena.yml
mpous Sep 22, 2020
77cfd66
Use separate start scripts
rahul-thakoor Sep 22, 2020
56d3ef8
Merge branch 'rak2287' of https://github.com/balenalabs/basicstation …
rahul-thakoor Sep 22, 2020
27098a5
Delete README-balena.md
mpous Sep 22, 2020
0125001
Merge pull request #5 from balenalabs/rak2287
Sep 22, 2020
b525b55
Update balena.yml
mpous Sep 23, 2020
3f5d2f7
Update README.md
mpous Sep 23, 2020
62a925d
Creating corecell armv7hf
mpous Nov 3, 2020
353721a
adding default arch on rpi
mpous Nov 3, 2020
466b7ee
Merge pull request #6 from balenalabs/rak2287
Nov 3, 2020
92cc811
Add contract balena.yml
mpous Nov 25, 2020
d3db57f
Add contract balena.yml
mpous Nov 25, 2020
6cbcc2e
Merge pull request #7 from balenalabs/balenaHub
Nov 25, 2020
7264a3f
Modify contract balena.yml
mpous Nov 25, 2020
214bdef
Merge pull request #8 from balenalabs/balenaHub
Nov 25, 2020
5c701cf
Add logo.png
mpous Nov 25, 2020
ac8a8bd
Update balena.yml
mpous Dec 16, 2020
0738365
Update balena.yml
mpous Dec 16, 2020
9217cf5
Update balena.yml
mpous Dec 16, 2020
5e73589
Suppport TC_KEY variable
jmarcelino Jan 14, 2021
cb1d57a
Merge pull request #9 from jmarcelino/master
Jan 14, 2021
04dc147
Update README.md
mpous Jan 18, 2021
dde8757
Update balena.yml
mpous Feb 1, 2021
fe17f2c
Reset color after warning to not mess up shell
tiefpunkt Feb 1, 2021
3d66301
There are no defaults on the MODEL variable, it has to be set
tiefpunkt Feb 1, 2021
2641ad3
Merge pull request #11 from tiefpunkt/tiny_fixes_01
mpous Feb 2, 2021
5b20b3f
Introducing iC880a model compatibility
mpous Feb 2, 2021
e6bcfaa
Fix start.sh
jmarcelino Feb 3, 2021
4dd5d5e
Merge pull request #13 from jmarcelino/jmfix
mpous Feb 3, 2021
36ac979
Update TC_TRUST uri
rony-vargas Feb 4, 2021
9480f79
Merge pull request #14 from rony-vargas/tc_trust-fix
mpous Feb 5, 2021
1bdcb27
Update concentrators
mpous Feb 17, 2021
cca54a0
Fix GW EUI, TTN requires it to be lowercase
xoseperez Feb 23, 2021
cad7307
Force basic station service to run even if previous lock file present…
xoseperez Feb 23, 2021
6aa8f44
GW_RESET_PIN and GW_RESET_GPIO variables working for RAK2287 concentr…
xoseperez Feb 23, 2021
20e2805
Fixed regression in TTNv2 certificate request. New TTN_STACK_VERSION …
xoseperez Feb 23, 2021
73ba804
Update README.md
xoseperez Feb 23, 2021
dd9b610
Added TTN_REGION variable. Refactor common parts
xoseperez Feb 24, 2021
5c1a058
Do not idle if service stop, so the container will reboot
xoseperez Mar 7, 2021
fc108c1
Merge pull request #16 from xoseperez/master
mpous Mar 10, 2021
76de94b
V2 to V3 changes
mpous Mar 11, 2021
9ab96dc
Merge pull request #17 from balenalabs/patch_model
mpous Mar 11, 2021
84e9776
Update balena.yml
mpous Mar 12, 2021
3a52735
Update balena.yml
mpous Mar 12, 2021
7da9e3e
Add SPI_SPEED device env. variable remove hardcoded spi device in the…
Mar 30, 2021
148a543
Add a delay for the reset operation for sx1301
Mar 30, 2021
ad228c9
Merge pull request #22 from abhatikar/master
mpous Apr 2, 2021
a21b9f5
Update balena.yml
mpous May 13, 2021
28c8f07
Update balena.yml
mpous May 13, 2021
e382253
Update balena.yml
mpous May 13, 2021
960545f
Update balena.yml
mpous May 13, 2021
e5bd11f
Update balena.yml
mpous May 13, 2021
2a9841f
Update balena.yml
mpous May 20, 2021
a51605c
Remove trailing unmatched bracket
xoseperez May 25, 2021
ff50b52
Merge pull request #25 from xoseperez/master
mpous May 25, 2021
098affd
Update balena.yml
mpous May 28, 2021
bf4c30b
Update README.md
mpous May 28, 2021
96c9fb1
Update balena.yml
mpous Jun 1, 2021
8ace76a
Update README.md
mpous Jun 10, 2021
1c969b1
Added code to sanitize TC_TRUST variable
xoseperez Jun 15, 2021
7cfb250
Merge pull request #27 from xoseperez/master
mpous Jun 16, 2021
182d009
Update README.md
mpous Jun 24, 2021
1cbfd15
Update start_common.sh
mpous Jun 24, 2021
7c62c9f
Change default LNS server to TTS Community Edition (v3)
xoseperez Jun 25, 2021
d10e509
Fix sanitizing TC_TRUST
xoseperez Jun 25, 2021
e19182a
Merge pull request #28 from xoseperez/master
mpous Jun 30, 2021
29962f3
Update README.md
mpous Jun 30, 2021
560f6e4
Update README.md
mpous Jun 30, 2021
05eab28
Fix typo
tedenda Aug 17, 2021
5df322c
Merge pull request #35 from tedenda/tedenda-patch-1
mpous Aug 24, 2021
e697d62
Corrected POWER_EN_PIN typo.
Oct 16, 2021
7dc9d9d
Merge pull request #41 from ketilmo/master
mpous Oct 16, 2021
c93aeed
Merge branch 'lorabasics:master' into master
mpous Oct 16, 2021
e1771b5
Test longer logos
mpous Nov 15, 2021
d7e91ed
Test longer logos!
mpous Nov 15, 2021
ce3f2d8
Update balena.yml
mpous Nov 16, 2021
73ba859
Delete balenacloud.png
mpous Nov 16, 2021
ff7813d
Update README.md
mpous Dec 16, 2021
582b954
Update mbedTLS dependency to version 2.7.5. Related to lorabasics#142
mpous Jan 13, 2022
54dbf22
Merge pull request #46 from mpous/mbedtls-pr
mpous Jan 13, 2022
f557250
adding Pi Zero without Ethernet mac address support
mpous Jan 21, 2022
94ebc89
Update docker-compose.yml
mpous Jan 21, 2022
98d9e35
Merge pull request #47 from mpous/pizero-w
mpous Jan 21, 2022
d54fa2f
Setting label io.balena.features.balena-api to ensure BALENA_API_KEY …
hferentschik Jan 26, 2022
04a95fe
Merge pull request #48 from hferentschik/apikey
mpous Jan 28, 2022
d450b5d
Update README.md
mpous Mar 4, 2024
33fe02d
Merge pull request #54 from mpous/mpous-patch-1
mpous Mar 4, 2024
348cd2d
Update README.md
mpous Dec 27, 2024
68e11f4
Merge pull request #56 from mpous/mpous-patch-1
mpous Dec 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# IDE
.vscode

deps/.DS_Store
.DS_Store
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ RUN sudo apt-get install --no-install-recommends -yq \
RUN pip3 install aiohttp websockets



27 changes: 27 additions & 0 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM balenalib/%%BALENA_MACHINE_NAME%%-debian:buster-build as builder
# Install build tools and remove layer cache afterwards


# Switch to working directory for our app
WORKDIR /usr/src/app

# Copy all the source code in.
COPY . .

# Compile our source code
RUN make platform=rpi variant=std arch=%%BALENA_ARCH%%
RUN make platform=corecell variant=std arch=%%BALENA_ARCH%%


FROM balenalib/%%BALENA_MACHINE_NAME%%-debian:buster

RUN install_packages jq

WORKDIR /usr/src/app

COPY --from=builder /usr/src/app/ ./

COPY start* ./

# Launch our binary on container startup.
CMD ["bash", "start.sh"]
290 changes: 167 additions & 123 deletions README.md

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions balena.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: The Things Stack Gateway
type: sw.application
description: >-
Deploys the The Things Stack LoRaWAN gateway with Basics Station
Packet Forward protocol on SX1301 or SX1302 LoRa concentrators.
joinable: false
post-provisioning: >-
## Usage instructions

Fork this fleet and deploy the project on a balenaCloud application. Once the project released on a device, you'll need to get the EUI of the device and create a gateway on The Things Stack (V3).

For detailed instructions on how to use configure your LoRaWAN gteway check out the [readme here](https://github.com/balenalabs/basicstation).
assets:
repository:
type: blob.asset
data:
url: 'https://github.com/balenalabs/basicstation'
logo:
type: blob.asset
data:
url: >-
https://raw.githubusercontent.com/balenalabs/basicstation/master/logo.png
data:
applicationEnvironmentVariables:
- GW_GPS: false
- GW_RESET_PIN: 11
- GW_RESET_GPIO: 17
- MODEL: SX1301
- TTN_STACK_VERSION: 3
- TTN_REGION: eu1
- GW_ID: 0
- GW_KEY: 0
- TC_KEY: 0
defaultDeviceType: raspberrypi3
supportedDeviceTypes:
- raspberrypi3
- raspberrypi3-64
- raspberrypi4-64
- fincm3
3 changes: 2 additions & 1 deletion deps/lgw/v5.0.1-kerlink.patch
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ index c01ed1c..0e2b64c 100644
@@ -54,7 +54,7 @@ Maintainer: Sylvain Miermont
#define READ_ACCESS 0x00
#define WRITE_ACCESS 0x80
#define SPI_SPEED 8000000
-#define SPI_SPEED 8000000
+#define SPI_SPEED (getenv("SPI_SPEED")==NULL ? 8000000 : getenv("SPI_SPEED"))
-#define SPI_DEV_PATH "/dev/spidev0.0"
+#define SPI_DEV_PATH (getenv("LORAGW_SPI")==NULL ? "/dev/spidev0.0" : getenv("LORAGW_SPI"))
//#define SPI_DEV_PATH "/dev/spidev32766.0"
Expand Down
3 changes: 2 additions & 1 deletion deps/lgw/v5.0.1-linux.patch
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ index c01ed1c..0e2b64c 100644
@@ -54,7 +54,7 @@ Maintainer: Sylvain Miermont
#define READ_ACCESS 0x00
#define WRITE_ACCESS 0x80
#define SPI_SPEED 8000000
-#define SPI_SPEED 8000000
+#define SPI_SPEED (getenv("SPI_SPEED")==NULL ? 2000000 : getenv("SPI_SPEED"))
-#define SPI_DEV_PATH "/dev/spidev0.0"
+#define SPI_DEV_PATH (getenv("LORAGW_SPI")==NULL ? "/dev/spidev0.0" : getenv("LORAGW_SPI"))
//#define SPI_DEV_PATH "/dev/spidev32766.0"
Expand Down
3 changes: 2 additions & 1 deletion deps/lgw/v5.0.1-rpi.patch
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ index c01ed1c..0e2b64c 100644
@@ -54,7 +54,7 @@ Maintainer: Sylvain Miermont
#define READ_ACCESS 0x00
#define WRITE_ACCESS 0x80
#define SPI_SPEED 8000000
-#define SPI_SPEED 8000000
+#define SPI_SPEED (getenv("SPI_SPEED")==NULL ? 2000000 : getenv("SPI_SPEED"))
-#define SPI_DEV_PATH "/dev/spidev0.0"
+#define SPI_DEV_PATH (getenv("LORAGW_SPI")==NULL ? "/dev/spidev0.0" : getenv("LORAGW_SPI"))
//#define SPI_DEV_PATH "/dev/spidev32766.0"
Expand Down
Loading