Skip to content

Commit afc187b

Browse files
committed
first
0 parents  commit afc187b

File tree

189 files changed

+33661
-0
lines changed

Some content is hidden

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

189 files changed

+33661
-0
lines changed

Makefile

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
NAME=oc-lora-gw-pf-dev
2+
VERSION=0.02-dev
3+
MAINTAINER='Artur Balanuta'
4+
DEPS :=
5+
WORK_DIR=src
6+
BOARDS := RAK831 RHF0M301 Blowfish
7+
DESCRIPTION='Openchirp LoRa gateway Packet Forwarder'
8+
9+
POSTINSTALL_SCRIPT=deb/post-install.sh
10+
PREINSTALL_SCRIPT=deb/pre-install.sh
11+
POSTUNINSTALL_SCRIPT=deb/post-uninstall.sh
12+
13+
COMMON_FPM_ARGS=\
14+
--log error \
15+
--after-install $(POSTINSTALL_SCRIPT) \
16+
--before-install $(PREINSTALL_SCRIPT) \
17+
--after-remove $(POSTUNINSTALL_SCRIPT) \
18+
--name $(NAME) \
19+
--maintainer $(MAINTAINER) \
20+
--description $(DESCRIPTION) \
21+
--config-files=/opt/$(NAME)/ \
22+
--verbose
23+
24+
.PHONY: package
25+
26+
build: force
27+
28+
@echo "Compiling source"
29+
@cd lora_gateway; make clean; make
30+
@cd packet_forwarder; make clean; make
31+
32+
@mkdir -p bin
33+
@mkdir -p bin/tests
34+
@mkdir -p bin/utils
35+
36+
@cp packet_forwarder/lora_pkt_fwd/lora_pkt_fwd bin
37+
38+
@cp lora_gateway/libloragw/test_loragw_cal bin/tests
39+
@cp lora_gateway/libloragw/test_loragw_gps bin/tests
40+
@cp lora_gateway/libloragw/test_loragw_hal bin/tests
41+
@cp lora_gateway/libloragw/test_loragw_reg bin/tests
42+
@cp lora_gateway/libloragw/test_loragw_spi bin/tests
43+
44+
@cp lora_gateway/util_lbt_test/util_lbt_test bin/utils
45+
@cp lora_gateway/util_pkt_logger/util_pkt_logger bin/utils
46+
@cp lora_gateway/util_spectral_scan/util_spectral_scan bin/utils
47+
@cp lora_gateway/util_spi_stress/util_spi_stress bin/utils
48+
@cp lora_gateway/util_tx_continuous/util_tx_continuous bin/utils
49+
@cp lora_gateway/util_tx_test/util_tx_test bin/utils
50+
51+
@cp packet_forwarder/util_ack/util_ack bin/utils
52+
@cp packet_forwarder/util_sink/util_sink bin/utils
53+
@cp packet_forwarder/util_tx_test/util_tx_test bin/utils
54+
55+
@$(foreach board, $(BOARDS), \
56+
mkdir -p $(WORK_DIR)/$(board)/opt/$(NAME); \
57+
rm -r $(WORK_DIR)/$(board)/opt/$(NAME)/bin; \
58+
cp -r bin $(WORK_DIR)/$(board)/opt/$(NAME);)
59+
60+
@rm -r bin
61+
force:
62+
63+
package:
64+
@echo "\n"
65+
@$(foreach board, $(BOARDS), \
66+
echo Building $(NAME)-$(VERSION)-$(board); \
67+
fpm -s dir -t deb -C $(WORK_DIR)/$(board) --version $(VERSION)-$(board) $(COMMON_FPM_ARGS) $(foreach dep,$(DEPS),-d $(dep);); \
68+
echo "\n"; )
69+
mv $(NAME)_$(VERSION)-*.deb build/
70+

README

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# PIOUT
2+
3+
## Blowfish
4+
RESET_PIN 5 ? GPIO5(pin29)
5+
- GPS Reset line - run to GPIO6(pin31)
6+
- Built in SPI0 (pin24,21,19,23) to SX1301
7+
- GPS UART (UART0-pin8,10)
8+
- 1PPS is connected to the GPIO4-pin7
9+
10+
## RAK831
11+
RESET_PIN 17 (13)
12+
SPI0 (24, 21, 19, 23)
13+
RST_PIN 22
14+
15+
16+
## RHF0M301
17+
RESET_PIN 7

build/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!.gitignore

deb/post-install.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
NAME=oc-lora-gw-pf-dev
4+
5+
# eanble SPI interface
6+
raspi-config nonint do_spi 0
7+
8+
cp -f /opt/$NAME/service/$NAME.service /lib/systemd/system/$NAME.service
9+
10+
systemctl daemon-reload
11+
systemctl enable $NAME
12+
systemctl start $NAME

deb/post-uninstall.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
NAME=oc-lora-gw-pf-dev
4+
5+
systemctl stop $NAME
6+
systemctl disable $NAME
7+
systemctl daemon-reload
8+
9+
rm -f /lib/systemd/system/$NAME.service

deb/pre-install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#!/bin/bash

docs/Blowfish_Linklabs_Rev1_io.pdf

27.7 KB
Binary file not shown.

lora_gateway/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.o
2+
*.swp
3+
*.bak

lora_gateway/LICENSE

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Copyright (c) 2013, SEMTECH S.A.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
* Neither the name of the Semtech corporation nor the
12+
names of its contributors may be used to endorse or promote products
13+
derived from this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18+
DISCLAIMED. IN NO EVENT SHALL SEMTECH S.A. BE LIABLE FOR ANY
19+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25+
26+
27+
--- For the parson library used by the packet logger ---
28+
29+
Parson ( http://kgabis.github.com/parson/ )
30+
Copyright (c) 2012 Krzysztof Gabis
31+
32+
Permission is hereby granted, free of charge, to any person obtaining a copy
33+
of this software and associated documentation files (the "Software"), to deal
34+
in the Software without restriction, including without limitation the rights
35+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36+
copies of the Software, and to permit persons to whom the Software is
37+
furnished to do so, subject to the following conditions:
38+
39+
The above copyright notice and this permission notice shall be included in
40+
all copies or substantial portions of the Software.
41+
42+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44+
ITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
48+
THE SOFTWARE.
49+

lora_gateway/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
### Environment constants
2+
3+
ARCH ?=
4+
CROSS_COMPILE ?=
5+
export
6+
7+
### general build targets
8+
9+
all:
10+
$(MAKE) all -e -C libloragw
11+
$(MAKE) all -e -C util_pkt_logger
12+
$(MAKE) all -e -C util_spi_stress
13+
$(MAKE) all -e -C util_tx_test
14+
$(MAKE) all -e -C util_lbt_test
15+
$(MAKE) all -e -C util_tx_continuous
16+
$(MAKE) all -e -C util_spectral_scan
17+
18+
clean:
19+
$(MAKE) clean -e -C libloragw
20+
$(MAKE) clean -e -C util_pkt_logger
21+
$(MAKE) clean -e -C util_spi_stress
22+
$(MAKE) clean -e -C util_tx_test
23+
$(MAKE) clean -e -C util_lbt_test
24+
$(MAKE) clean -e -C util_tx_continuous
25+
$(MAKE) clean -e -C util_spectral_scan
26+
27+
### EOF

0 commit comments

Comments
 (0)