Comments (7)
For Version 1.0 case (mac_version = 0 in config) you need:
ABP case:
- Device EUI (eui in config, Device EUI in Chirpstack)
- Device address (address in config, Device address in Chirpstack)
- NwkSEncKey (network_session_encription_key in config, Network session key in Chirpstack)
- AppSKey (application_session_key in config, Application session key in Chirpstack)
OTAA case:
- Device EUI (eui in config, Device EUI in Chirpstack)
- NwkKey (nwk_key in config, Application key in Chirpstack)
You can take a look here: https://github.com/iegomez/lds/blob/master/device.go#L46
Marshaller is all about application payload, it is not involved in ABP/OTAA processes.
Please feel free to ask futher questions (or just close the issue).
Hope this helps
from lds.
Thank you very much for your answer, I've been having a hard time with this for a few weeks now...
I have tried to set it on a single machine (all the servers on one machine, as chirpstack's starter guide suggests) so that I'm not supposed to face any configuration issues on the server-side theoretically, trying both OTAA and ABP (with your suggested parameters - and the other parameters with dummy values, because otherwise, it crashes), but I'm still facing the same issue:
- I am able to send a join request (it logs: join sent, and the message appears in mosquitto)
- I do not get any response from the servers...
Here is a screenshot of the logs:
Thank you very much for your help
PS: my App and Network servers seem to be working ok (they are actually communicating with each other regularly) - nothing is logged by any of the servers when I send the join request.
from lds.
I've recently a bunch of issues in the master
branch. Could you please retry with version from #16 pull request?
from lds.
I just tried with this pull request and the result is the same: the message appears on the mosquitto_sub command, but the network server and application server don't react (no response, no log)
from lds.
Could you please provide your configuration files for lds and chirpstack server components? I'll try to reproduce
from lds.
Sure,
For LDS (using ABP):
encoded_type = []
log_level = ""
[mqtt]
server = "localhost:1883"
user = ""
password = ""
downlink_topic = "gateway/abababababababab/event"
uplink_topic = "gateway/abababababababab/command"
[forwarder]
nserver = ""
nsport = ""
[band]
name = "US_902_928"
[device]
eui = "1111111111111111"
address = "22222222"
network_session_encription_key = "33333333333333333333333333333333"
serving_network_session_integrity_key = "00000000000000000000000000000001"
forwarding_network_session_integrity_key = "00000000000000000000000000000001"
application_session_key = "44444444444444444444444444444444"
marshaler = "json"
nwk_key = "00000000000000000000000000000001"
app_key = "00000000000000000000000000000001"
join_eui = "0000000000000001"
mac_version = 0
profile = "ABP"
joined = false
skip_fcnt_check = false
[gateway]
mac = "abababababababab"
bridge_version = ""
[data_rate]
bandwith = 125
spread_factor = 10
bit_rate = 0
[rx_info]
channel = 0
code_rate = ""
crc_status = 1
frequency = 916800000
lora_snr = 7.0
rf_chain = 1
rssi = -57
[raw_payload]
payload = ""
use_raw = false
script = "\n// Encode encodes the given object into an array of bytes.\n// - fPort contains the LoRaWAN fPort number\n// - obj is an object, e.g. {\"temperature\": 22.5}\n// The function must return an array of bytes, e.g. [225, 230, 255, 0]\nfunction Encode(fPort, obj) {\n\treturn [];\n}\n"
use_encoder = false
max_exec_time = 100
js_object = ""
fport = 0
[redis]
addr = ""
password = ""
db = 0
[window]
width = 1200
height = 1000
[provisioner]
hostname = ""
username = ""
password = ""
path = ""
Token = ""
For LDS (OTAA):
encoded_type = []
log_level = ""
[mqtt]
server = "localhost:1883"
user = ""
password = ""
downlink_topic = "gateway/abababababababab/event"
uplink_topic = "gateway/abababababababab/command"
[forwarder]
nserver = ""
nsport = ""
[band]
name = "US_902_928"
[device]
eui = "2222222222222222"
address = "00000001"
network_session_encription_key = "00000000000000000000000000000001"
serving_network_session_integrity_key = "00000000000000000000000000000001"
forwarding_network_session_integrity_key = "00000000000000000000000000000001"
application_session_key = "00000000000000000000000000000001"
marshaler = "json"
nwk_key = "00000000000000010000000000000001"
app_key = "00000000000000010000000000000001"
join_eui = "0000000000000002"
mac_version = 0
profile = "OTAA"
joined = false
skip_fcnt_check = false
[gateway]
mac = "abababababababab"
bridge_version = ""
[data_rate]
bandwith = 125
spread_factor = 7
bit_rate = 0
[rx_info]
channel = 0
code_rate = ""
crc_status = 0
frequency = 916800000
lora_snr = 7.0
rf_chain = 1
rssi = -57
[raw_payload]
payload = ""
use_raw = false
script = "\n// Encode encodes the given object into an array of bytes.\n// - fPort contains the LoRaWAN fPort number\n// - obj is an object, e.g. {\"temperature\": 22.5}\n// The function must return an array of bytes, e.g. [225, 230, 255, 0]\nfunction Encode(fPort, obj) {\n\treturn [];\n}\n"
use_encoder = false
max_exec_time = 100
js_object = ""
fport = 0
[redis]
addr = ""
password = ""
db = 0
[window]
width = 1200
height = 1000
[provisioner]
hostname = ""
username = ""
password = ""
path = ""
Token = ""
For the network server (it's the configuration file located in /etc/chirpstack-network-server/chirpstack-network-server-us-us915.toml with the updated password for postgres):
[postgresql]
dsn="postgres://chirpstack_ns:********@localhost/chirpstack_ns?sslmode=disable"
[redis]
url="redis://localhost:6379"
[network_server]
net_id="000000"
[network_server.band]
name="US915"
enabled_uplink_channels=[0, 1, 2, 3, 4, 5, 6, 7]
[network_server.network_settings.class_b]
ping_slot_dr=0
ping_slot_frequency=0
[network_server.api]
bind="0.0.0.0:8000"
[network_server.gateway.backend]
type="mqtt"
[network_server.gateway.backend.mqtt]
event_topic="gateway/+/event/+"
command_topic_template="gateway/{{ .GatewayID }}/command/{{ .CommandType }}"
server="tcp://localhost:1883"
username=""
password=""
[metrics]
timezone="Local"
[join_server]
[join_server.default]
server="http://localhost:8003"
Application Server (it's the configuration suggested in the "getting started" guide of chirpstack:
[general]
log_level=4
[postgresql]
dsn="postgres://chirpstack_as:********@localhost/chirpstack_as?sslmode=disable"
[application_server.external_api]
jwt_secret="verysecret"
Thank you very much for your help!
from lds.
Hi @4br3mm0rd
You have multiple issues with LDS config:
- Your uplink and downlink topics are confused, you better keep them to default
- If you do not use encoder (
use_encoder=false
andencoded_type=[]
), payload shouldn't be empty (payload=""
).
Try this config:
encoded_type = []
log_level = "debug"
[mqtt]
server = "localhost:1883"
user = ""
password = ""
# Uplink topic. %s will be replaced with the gateway mac.
uplink_topic="gateway/%s/event/up"
# Downlink topic. %s will be replaced with the gateway mac.
downlink_topic="gateway/%s/command/down"
[forwarder]
nserver = ""
nsport = ""
[band]
name = "US_902_928"
[device]
eui = "1111111111111111"
address = "22222222"
network_session_encription_key = "33333333333333333333333333333333"
serving_network_session_integrity_key = "00000000000000000000000000000001"
forwarding_network_session_integrity_key = "00000000000000000000000000000001"
application_session_key = "44444444444444444444444444444444"
marshaler = "json"
nwk_key = "00000000000000000000000000000001"
app_key = "00000000000000000000000000000001"
join_eui = "0000000000000001"
mac_version = 0
profile = "ABP"
joined = false
skip_fcnt_check = false
[gateway]
mac = "abababababababab"
bridge_version = ""
[data_rate]
bandwith = 125
spread_factor = 10
bit_rate = 0
[rx_info]
channel = 0
code_rate = ""
crc_status = 1
frequency = 916800000
lora_snr = 7.0
rf_chain = 1
rssi = -57
[raw_payload]
payload = "ff00"
use_raw = false
script = "\n// Encode encodes the given object into an array of bytes.\n// - fPort contains the LoRaWAN fPort number\n// - obj is an object, e.g. {\"temperature\": 22.5}\n// The function must return an array of bytes, e.g. [225, 230, 255, 0]\nfunction Encode(fPort, obj) {\n\treturn [\n obj[\"Flags\"],\n obj[\"Battery\"],\n obj[\"Light\"],\n ];\n}\n"
use_encoder = false
max_exec_time = 500
js_object = "{\n \"Flags\": 0,\n \"Battery\": 65,\n \"Light\": 54\n}"
fport = 2
[redis]
addr = ""
password = ""
db = 0
[window]
width = 1200
height = 1000
[provisioner]
hostname = ""
username = ""
password = ""
path = ""
Token = ""
from lds.
Related Issues (20)
- Communication through UDP Packet forwarder HOT 8
- device addr is equal to 0 in ABP HOT 2
- tmst parameter type issue with forwarder HOT 1
- GUI crash when scrolling output window HOT 8
- Re-join by UDP gives MAC Payload decrypt error HOT 4
- Port GUI to GIO UI HOT 5
- Use LDS as a Library / inside a script HOT 1
- Ubuntu 18.04 needs libgles2-mesa-dev HOT 1
- client crashes after connection to mqtt HOT 5
- Repo maintenance HOT 3
- floating point fbos not supported HOT 5
- I don't receive the encoded data HOT 4
- Error while running cli HOT 3
- Create an executable for windows HOT 2
- Cannot join device simulator to ChirpStack via OTAA HOT 3
- run make HOT 3
- Docker Env HOT 1
- i need some help for use this simulator. HOT 3
- Several segmentation faults HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lds.