I’m having trouble connecting a gatway of customer that is running semtech basicsation to our chirpstack installation.
I deployed my installation following Docker - ChirpStack open-source LoRaWAN® Network Server documentation and I’m able to log in via the web interface via https://chripstack.our-company.tld
. So the services are up and running.
But I’m having trouble connecting the gatway to my server. On the gateway this is the configuration:
{
/* If slave-X.conf present this acts as default settings */
"SX1301_conf": { /* Actual channel plan is controlled by server */
"lorawan_public": true, /* is default */
"clksrc": 1, /* radio_1 provides clock to concentrator */
/* path to the SPI device, un-comment if not specified on the command line e.g., RADIODEV=/dev/spidev0.0 */
"device": "/dev/ttyACM0",
/* freq/enable provided by LNS - only HW specific settings listed here */
"radio_0": {
"type": "SX1257",
"rssi_offset": -166.0,
"tx_enable": true,
"antenna_gain": 0
},
"radio_1": {
"type": "SX1257",
"rssi_offset": -166.0,
"tx_enable": false
}
/* chan_multiSF_X, chan_Lora_std, chan_FSK provided by LNS */
},
"station_conf": {
"routerid": "<redacted>,
"log_file": "stderr",
"log_level": "DEBUG", /* XDEBUG,DEBUG,VERBOSE,INFO,NOTICE,WARNING,ERROR,CRITICAL */
"log_size": 10000000,
"log_rotate": 3,
"CUPS_RESYNC_INTV": "1s"
}
}
I have created the different tc.*
files needed, tc.uri
looks like this:
wss://chripstack.our-company.tld:443
When I start the the basic station, this is what I get:
signed using : RSA with SHA-2562023-03-24 09:56:37.970 [TCE:INFO] Connecting to INFOS: wss://chirpstack.our-company.tld:443
2023-03-24 09:56:38.150 [AIO:ERRO] [3] WS upgrade failed with HTTP status code: 404
2023-03-24 09:56:38.150 [AIO:DEBU] [3] WS connection shutdown...
2023-03-24 09:56:38.150 [TCE:INFO] INFOS reconnect backoff 0s (retry 0)
In docker logs
of the chirpstack service I can see this error:
2023-03-24T09:44:47.891944Z INFO http{method="GET" uri=/router-info version=HTTP/1.1}: chirpstack::api: Finished processing request status="404" latency=133.532µs
An indeed, if I do curl 'wss://chirpstack.our-company.tld/router-info'
I get a 404 back.
My NGINX config looks like this:
upstream chirpstack-app {
server localhost:8080;
}
server {
listen 443 default_server ssl;
listen [::]:443 default_server ssl;
access_log /var/log/nginx/ssl_chirpstack-access.log;
error_log /var/log/nginx/ssl_chirpstack-error.log;
ssl_certificate /etc/letsencrypt/live/chirpstack.our-company.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/chirpstack.our-company.tld/privkey.pem;
location / {
proxy_cache off;
proxy_pass http://chirpstack-app;
include /etc/nginx/proxy_params;
proxy_read_timeout 3600;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
with /etc/nginx/proxy_params
:
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
So this should work. But I’m starting to think that I should use chirpstack in version 3. Based on this thread Chirpstack 4 NGINX Proxy No Events Or LoRAWAN Frames
In v4, they don’t use Websocket at /api anymore.
What am I doing wrong?
PS: Why am I getting this error An error occurred: Sorry, new users can only put 2 links in a post
? I had to put all hyperlinks in backticks. What is the point on limiting the number of hyperlinks?