I’m running into same issue while connecting to Chirpstack. It works fine with ThingsStack while using same code and updating global_conf.json to point to "server_address":"nam1.cloud.thethings.network"
=====================================
Welcome to RAK11300 LoRaWan!!!
Type: OTAA
Region: US915
=====================================
OTAA join failed!
Check your EUI's and Keys's!
Check if a Gateway is in range!
My setup:
-
WisGate Developer Base RAK7371
1.1 : Running udp-packet-forwarder using this repo : https://github.com/RAKWireless/basicstation
1.2 : cat docker-compose.ymlversion: '3.6'
networks:
loranet:
external: true
services:
udp-packet-forwarder:
build:
dockerfile: Dockerfile
context: '.'
image: us_udpforwarder:1.0
container_name: us_udpforwarder
hostname: us_udpforwarder
restart: always
logging:
options:
max-size: "10m"
max-file: "3"
privileged: true
environment:
MODEL: "RAK7371"
MODULE: "RAK5146"
CONCENTRATOR: "SX1303"
HAS_GPS: "0"
INTERFACE: "USB"
SERVER_HOST: "192.168.0.247"
SERVER_PORT: "1700"
RADIO_DEV: "/dev/ttyACM0"
GATEWAY_EUI_NIC: "usb0"
BAND: "us_902_928"
GPS_LATITUDE: "0.0"
GPS_LONGITUDE: "0.0"
networks:
loranet:
1.3: cat global_conf.json
{
"SX130x_conf": {
"com_type": "USB",
"com_path": "/dev/ttyACM0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0,
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf"
},
"radio_0": {
"enable": true,
"type": "SX1250",
"freq": 904300000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": true,
"tx_freq_min": 923000000,
"tx_freq_max": 928000000,
"tx_gain_lut":[
{"rf_power": 12, "pa_gain": 1, "pwr_idx": 6},
{"rf_power": 13, "pa_gain": 1, "pwr_idx": 7},
{"rf_power": 14, "pa_gain": 1, "pwr_idx": 8},
{"rf_power": 15, "pa_gain": 1, "pwr_idx": 9},
{"rf_power": 16, "pa_gain": 1, "pwr_idx": 10},
{"rf_power": 17, "pa_gain": 1, "pwr_idx": 11},
{"rf_power": 18, "pa_gain": 1, "pwr_idx": 12},
{"rf_power": 19, "pa_gain": 1, "pwr_idx": 13},
{"rf_power": 20, "pa_gain": 1, "pwr_idx": 14},
{"rf_power": 21, "pa_gain": 1, "pwr_idx": 15},
{"rf_power": 22, "pa_gain": 1, "pwr_idx": 16},
{"rf_power": 23, "pa_gain": 1, "pwr_idx": 17},
{"rf_power": 24, "pa_gain": 1, "pwr_idx": 18},
{"rf_power": 25, "pa_gain": 1, "pwr_idx": 19},
{"rf_power": 26, "pa_gain": 1, "pwr_idx": 21},
{"rf_power": 27, "pa_gain": 1, "pwr_idx": 22}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"freq": 905000000,
"rssi_offset": -215.4,
"rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
"tx_enable": false
},
"chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
"chan_multiSF_0": {"enable": true, "radio": 0, "if": -400000},
"chan_multiSF_1": {"enable": true, "radio": 0, "if": -200000},
"chan_multiSF_2": {"enable": true, "radio": 0, "if": 0},
"chan_multiSF_3": {"enable": true, "radio": 0, "if": 200000},
"chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000},
"chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000},
"chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000},
"chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000},
"chan_Lora_std": {"enable": true, "radio": 0, "if": 300000, "bandwidth": 500000, "spread_factor": 8,
"implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
"chan_FSK": {"enable": false, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000}
},
"gateway_conf": {
"server_address": "192.168.0.247",
"serv_port_up": 1700,
"serv_port_down": 1700,
"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,
"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false,
"gps_tty_path": "/dev/ttyAMA0",
"ref_latitude": 0.0,
"ref_longitude": 0.0,
"ref_altitude": 5000,
"beacon_period": 0,
"beacon_freq_hz": 923300000,
"beacon_freq_nb": 8,
"beacon_freq_step": 600000,
"beacon_datarate": 12,
"beacon_bw_hz": 500000,
"beacon_power": 27
},
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "/app/loragw_hal.log"
}
}
- Chirpstack using : https://github.com/chirpstack/chirpstack-docker
2.1: Update chirpstack-gateway-bridge.tomlcat configuration/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
# See https://www.chirpstack.io/gateway-bridge/install/config/ for a full
# configuration example and documentation.
[integration.mqtt.auth.generic]
servers=["tcp://mosquitto:1883"]
username=""
password=""
[integration.mqtt]
event_topic_template="us915_1/gateway/{{ .GatewayID }}/event/{{ .EventType }}"
state_topic_template="us915_1/gateway/{{ .GatewayID }}/state/{{ .StateType }}"
command_topic_template="us915_1/gateway/{{ .GatewayID }}/command/#"
- Used this updated code: LoRaWAN_OTAA_ABP
3.1 Updated line 20 with LORAMAC_REGION_US915
3.2 Update OTAA keys with data from Chirpstack after creating device.uint8_t nodeDeviceEUI[8] = {0xCE, 0x25, 0x44, 0x75, 0x12, 0x78, 0x66, 0x70};
uint8_t nodeAppEUI[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
uint8_t nodeAppKey[16] = {0xD4, 0x3F, 0x28, 0x4E, 0xD8, 0x52, 0x81, 0xB7, 0x31, 0x49, 0x32, 0x43, 0x38, 0x08, 0x26, 0xB3};