The websocket route /router-info yields always 404

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?

Please note that ChirpStack itself does not implement a Basics Station endpoint. What you are looking for is Basics Station - ChirpStack open-source LoRaWAN® Network Server documentation.

Thanks for the link. I’m still confused, does that mean that I need to install the basic station on the gatway and on my chripstak as well?

Perhaps my problem is that I’m mixing up the names of the components.

I based my installation on the first picture of Architecture - ChirpStack open-source LoRaWAN® Network Server documentation

On my clients embedded system (that has the Lora Hardware), my client installed Semtech Basic station. Based on that picture it should connect to the ChirpStack Gateway Bridge via Websockets. But on the docker-compse.yml it says

chirpstack-gateway-bridge:
    image: chirpstack/chirpstack-gateway-bridge:4.0.6
    ...
    ports:
      - 1700:1700/udp

but that cannot be, you cannot run websockets on a UDP port, right? That’s where I am confused. So, do I need to install the Semtech basic station on both sides?

The Docker Compose example is for the Semtech UDP Packet Forwarder. You need to change it to make it work with the Basics Station, see also the GW Bridge configuration docs: Configuration - ChirpStack open-source LoRaWAN® Network Server documentation.

Basically the GW Bridge terminates the UDP or Basics Station protocol (based on how you have configured it), and forwards the GW data as MQTT to ChirpStack.