helium / helium-packet-router Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Periodically send packet tracking info to S3
See PR#17
Tasks:
.deb
file based upon a successful rebar3 release
run
router
repo as placeholder: rebar3 as testnet rel
;router
repo; see Draft PRsystemd
config and launch scripts (required)/etc/init/
and /etc/rc?.d/
launch scriptsDockerfile
for testing within a pristine containerVagrantfile
for testing within a pristine VMmain
branch having successful make rel
main
branch having successful make rel
Future efforts:
OUTDATED sketch:
Debian packages can be generated via Makefile
, and here's a generic version that just needs to be confirmed against current man
pages and refined:
# Excerpt for Makefile to build .deb package
# FIXME: don't use var in this way. this is just to highlight it in this draft:
MAIN_THING=helium-packet-router
RELEASE=0.1.0
PACKAGE_BUILD=`date +%Y%m%d.%H%M%S`
REVISION=${RELEASE}-${PACKAGE_BUILD}
DEBIAN_PACKAGE_NAME=helium-packet-router
DESTDIR=/opt/hpr
RUNTIME_USER=nobody
package: package-bin package-cfg
# FIXME: change names of .sh scripts
release: ${MAIN_THING}
rm -rf release
mkdir -p release${DESTDIR}/{bin,var/{log,run}}
cp -p ${MAIN_THING}{,.ini,.sh} release${DESTDIR}/bin/
# FIXME: update to accommodate systemd
package-bin: release
mkdir -p release/DEBIAN
find release -type d | xargs chmod 755
sed "s/Version: 1.0-1/Version: ${REVISION}/" < deb-bin-control.txt | sed "s/Architecture: all/Architecture: `dpkg --print-architecture`/" > release/DEBIAN/control
svn info | egrep 'URL|Revision' | sed 's/^/ /' >> release/DEBIAN/control
echo "#! /bin/sh" > release/DEBIAN/postinst
echo 'chown -R `((id ${RUNTIME_USER} >/dev/null && echo ${RUNTIME_USER}:${RUNTIME_USER})|| echo nobody:nogroup)`' ${DESTDIR}/ >> release/DEBIAN/postinst
echo "ln -s ${DESTDIR}/bin/${MAIN_THING}.sh /etc/init.d/" >> release/DEBIAN/postinst
echo "ln -s ${DESTDIR}/bin/${MAIN_THING}.sh /etc/rc3.d/S40${MAIN_THING}" >> release/DEBIAN/postinst
echo "ln -s ${DESTDIR}/bin/${MAIN_THING}.sh /etc/rc1.d/K40${MAIN_THING}" >> release/DEBIAN/postinst
echo "echo To manually start, use:" >> release/DEBIAN/postinst
echo "echo su - ${RUNTIME_USER} ${DESTDIR}/bin/${MAIN_THING}.sh start" >> release/DEBIAN/postinst
echo "#! /bin/sh" > release/DEBIAN/prerm
echo "${DESTDIR}/bin/${MAIN_THING}.sh stop" >> release/DEBIAN/prerm
echo "${DESTDIR}/bin/${MAIN_THING}.sh unkind-stop" >> release/DEBIAN/prerm
echo "${DESTDIR}/bin/${MAIN_THING}.sh clean-logs" >> release/DEBIAN/prerm
echo "rm -f ${DESTDIR}/var/run/scoreboard.txt*" >> release/DEBIAN/prerm
echo "rm -f ${DESTDIR}/var/log/console.log.[A-Z]*" >> release/DEBIAN/prerm
echo "rm -f /etc/init.d/${MAIN_THING}.sh" >> release/DEBIAN/prerm
echo "rm -f /etc/rc?.d/*${MAIN_THING}" >> release/DEBIAN/prerm
chmod 755 release/DEBIAN/{postinst,prerm}
dpkg-deb --build release
mv release.deb ${DEBIAN_PACKAGE_NAME}-bin_${REVISION}_`arch`.deb
ls -lh *.deb
package-cfg: ${MAIN_THING}_${RELEASE}.ini
mkdir -p release-config/DEBIAN
mkdir -p release-config${DESTDIR}/bin/
find release-config -type d | xargs chmod 755
cp -p ${MAIN_THING}_${RELEASE}.ini release-config${DESTDIR}/bin/${MAIN_THING}.ini
sed "s/Version: 1.0-1/Version: ${REVISION}/" < deb-cfg-control.txt > release-config/DEBIAN/control
svn info | egrep 'URL|Revision' | sed 's/^/ /' >> release/DEBIAN/control
echo "#! /bin/sh" > release-config/DEBIAN/postinst
echo "${DESTDIR}/bin/${MAIN_THING}.sh reload-config" >> release-config/DEBIAN/postinst
chmod 755 release-config/DEBIAN/postinst
dpkg-deb --build release-config
mv release-config.deb ${DEBIAN_PACKAGE_NAME}-cfg-DEL_${REVISION}.deb
ls -lh *.deb
clean:
rm -rf release release-config *.deb
Chirpstack Application Server V4 supports multiple Regions through the use of multiple Gateway bridges.
All of these gateway bridges when deployed have different ports, Configurations only know about 1 endpoint, and should continue to do so.
How do we support different regions going to different endpoints without needing to specifically support it in the config service.
Logging sweep
HPR need to have an HTTP port opened to ingest data above and then send to S3. We should only allow keys from known OUIs
Helium gateways speak gRPC to Helium LoRaWAN Network Servers (LNS)
EDIT: unnecessary former tasks or accommodated through other means:
router
as gRPC (#30)Notes:
http2_client
for accommodating sending to Class C devices (downlink without an uplink initiating the request) will be implemented as a separate effortBuild an initial simple implementation of IoT Packet Verifier based upon #34
file_sink.rs
)Notes:
v1
yet)%%% hpr_routing_SUITE ==>
Failure/Error: ?assertEqual({25,1}, receive_gateway_limit_exceeded_test ( { 0 , 0 } ))
expected: {25,1}
got: {26,0}
line: 85```
```eunit --module hpr_max_copies```
I lost the example of the eunit test when I re-ran it and it succeeded.
Support routing of packets to roaming partners via HTTP.
Passive routing only will be supported, based on the function and implementation of roaming in Packet Purchaser.
We will need to add hotspot name in our uplinks & join accepts so that Chirpstack can display it in LoRaWAN frames & Events.
hpr_routing:deliver_packet/3
Create boiler-plate config for gRPC and protobufs for helium-packet-router
:
helium-packet-router
is more "gateway" than "router", various tweaks were made to this instance of the confighelium_router_bhvr
, of which its implementation in router
was recently updatedStateChannel
param as an envelope around Packet
helium_gateway_bhvr
due to rpc end points not needed heregateway-rs
may be useful metadata or for loggingPort relevant tests from packet-purchaser.
If packet is not deemed worthy by the LNS it should not be enter in the s3 bucket
The goal here is to only have to support one library for client/server.
Use hpr_packet_service:packet_down/2.
We need to know an approximate limit on how many "MIC brute forcing" we can do before seeing a significant slow down.
Here is the Router code that does the MIC calculation.
Hotspot send it's h3 index
Route can include "no go zones" where it does not want to get data from
If hotspot in zone packet is not forwarded
h3 index should be sent to Packet verifier adding an extra check
what do we do for data only?
The match spec can probably be made more efficient by using the key value in the matching tuple instead of checking the value in the guard, something like:
MS = [
{
{{NetID, '$2', '$3'}, '$4'},
[
{'andalso', {'=<', '$2', DevAddr}, {'=<', DevAddr, '$3'}}
],
['$4']
}
],
This allows ETS to take advantage of the key column.
Here is an example of client side grpc (more in the repo)
https://github.com/helium/sibyl/blob/master/config/grpc_client_gen.config
For ref the server side is here https://github.com/helium/router/blob/master/src/grpc/helium_router_service.erl
Hi, i was using Senet devices roaming on a data-only hotspot: it stopped working in June, confirmed by Helium staff here. any plans to enable roaming again? please advise if i should post elsewhere, thanks.
{
net_id=3,
dev_ranges=[{12, 20}, ..]
euis=[{appeui, deveui}, ...]
lns_address="lora.com|10.0.0.9"
protol="gwmp|http"
oui=1
}
IoT Packet Verifier will be our service inspecting LoRaWAN packets and associated metadata and will validate a Gateway’s stream of Uplinks in part by also inspecting Downlinks.
FileStore
and file_sink.rs
from poc5g code (Thank you, madninja!)router
billing functionalityv0
(rather than `v1)Next will be: MVP implemented in Rust; see #43
This is separate from the Payment System but related. One feeds the other and back again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.