Does anybody know what I’m doing wrong, I’m not getting the DeviceTimeAns from CS. It worked fine when I use US915 but now with EU868, including a different GW, I’m not getting the time-sync response.
Example packet: QEECYQMDFgAgAg0BDOv9bkR0ZTG81Ww=
Decoded:
Message Type = Data
PHYPayload = 404102610303160020020D010CEBFD6E44746531BCD56C
( PHYPayload = MHDR[1] | MACPayload[…] | MIC[4] )
MHDR = 40
MACPayload = 4102610303160020020D010CEBFD6E447465
MIC = 31BCD56C (from packet)
= 31BCD56C (expected, assuming 32 bits frame counter with MSB 0000)
( MACPayload = FHDR | FPort | FRMPayload )
FHDR = 4102610303160020020D
FPort = 01
FRMPayload = 0CEBFD6E447465 (from packet, encrypted)
= 991F09FFFFFFFF (decrypted)
( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] )
DevAddr = 03610241 (Big Endian)
FCtrl = 03
FCnt = 0016 (Big Endian)
FOpts = 20020D
Message Type = Unconfirmed Data Up
Direction = up
FCnt = 22 (from packet, 16 bits)
= 22 (32 bits, assuming MSB 0x0000)
FCtrl.ACK = false
FCtrl.ADR = false
The device joins successfully and sends about 3 regular uplinks and then the 4th uplink would have the “MOTE_MAC_DEVICE_TIME_REQ” attached in addition to some regular payload data.
Below is the config.json:
{
"SX1301_array_conf":[
{
"board_freq_band": "EU868",
"en_listen_before_talk": false,
"SX1301_conf":[
{
"chip_enable": true,
"chan_multiSF_0": {"chan_rx_freq": 868100000, "spread_factor": "7-12" },
"chan_multiSF_1": {"chan_rx_freq": 868300000, "spread_factor": "7-12" },
"chan_multiSF_2": {"chan_rx_freq": 868500000, "spread_factor": "7-12" },
"chan_multiSF_3": {"chan_rx_freq": 867100000, "spread_factor": "7-12" },
"chan_multiSF_4": {"chan_rx_freq": 867300000, "spread_factor": "7-12" },
"chan_multiSF_5": {"chan_rx_freq": 867500000, "spread_factor": "7-12" },
"chan_multiSF_6": {"chan_rx_freq": 867700000, "spread_factor": "7-12" },
"chan_multiSF_7": {"chan_rx_freq": 867900000, "spread_factor": "7-12" },
"chan_LoRa_std" : {"chan_rx_freq": 868300000, "bandwidth": 250000, "spread_factor": 8 },
"chan_FSK" : {"chan_rx_freq": 868700000, "bandwidth": 250000, "bit_rate": 100000 }
}],
"loramac_public":true
}],
"gateway_conf": {
"server_address": "127.0.0.1",
"serv_port_up": 1700,
"serv_port_down": 1700,
"//network": "Adjust the following parameters for your network",
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"//beacon": "Below are beaconing parameters",
"//period": "To enable beacon, change the beacon_period to 128",
"beacon_period": 0,
"beacon_freq_hz": 869525000,
"beacon_freq_nb": 0,
"beacon_freq_step": 0,
"//datarate": "From legacy Semtech, this is actually spreading factor",
"beacon_datarate": 9,
"beacon_bw_hz": 125000,
"//power": "Only for this freq, for other freqs, restrict to 14dBm",
"beacon_power": 27,
"beacon_infodesc": 0,
"//time": "To report utc timestamp in packet forwarder, change the following to 1",
"use_utc_timestamp": 0,
"//tmms": "To disable the GPS timestamp in packet forwarder, change the following to 0",
"use_gps_timestamp": 1
}
}
Below is the chirpstack-gateway-bridge.toml:
# This configuration provides a Semtech UDP packet-forwarder backend and
# integrates with a MQTT broker. Many options and defaults have been omitted
# for simplicity.
#
# See https://www.chirpstack.io/gateway-bridge/install/config/ for a full
# configuration example and documentation.
[general]
# debug=5, info=4, warning=3, error=2, fatal=1, panic=0
log_level=4
# Log to syslog.
#
# When set to true, log messages are being written to syslog.
log_to_syslog=true
# Gateway backend configuration.
[backend]
# Backend type.
type="semtech_udp"
# Semtech UDP packet-forwarder backend.
[backend.semtech_udp]
# ip:port to bind the UDP listener to
#
# Example: 0.0.0.0:1700 to listen on port 1700 for all network interfaces.
# This is the listener to which the packet-forwarder forwards its data
# so make sure the 'serv_port_up' and 'serv_port_down' from your
# packet-forwarder matches this port.
udp_bind = "0.0.0.0:1700"
# Integration configuration.
[integration]
# Payload marshaler.
#
# This defines how the MQTT payloads are encoded. Valid options are:
# * protobuf: Protobuf encoding
# * json: JSON encoding (easier for debugging, but less compact than 'protobuf')
marshaler="json"
# MQTT integration configuration.
[integration.mqtt]
# Event topic template.
event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}"
# Command topic template.
command_topic_template="gateway/{{ .GatewayID }}/command/#"
# MQTT authentication.
[integration.mqtt.auth]
# Type defines the MQTT authentication type to use.
#
# Set this to the name of one of the sections below.
type="generic"
# Generic MQTT authentication.
[integration.mqtt.auth.generic]
# MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
server="tcp://**.**.***.***:1883"
# Connect with the given username (optional)
username=""
# Connect with the given password (optional)
password=""
Device profile: