Can not register network-server

Hi,
I am trying to use the active LoraWAN gateway registered in https://www.thethingsnetwork.org/(TTN networks) but Iam not able to register the existing gateway through Lora APP server api.I have info of the gateway like EUI and name of the gateway.

Subscribing to already existing gateway is better than building a new one or do you have any suggestion in building a new LoraWAN gateway.

I’m not able to register the existing gateway through Lora APP server

What exactly does not work?

Please read also and confirm that all the steps are returning the expected output: https://docs.loraserver.io/lora-gateway-bridge/install/debug/

1 Like

I run binary files for lora-app-server,loraserver,lora-gateway-bridge generated for windows from cmd prompt.

After running all of them,then I start the lora-app-server UI and try to create the server-profile ,but I am not able to choose network-server(I am connected to university Wifi).

My aim is to forward the packets to ttn gateway from my sensor node and then get the data from the gateway into the loraserver.Please let me know if I am wrong.

The issue is I am not able to create server-profile in app-server.

sensor node

This is the error message

Iam connected to university wifi,I want to use my laptop as localhost for network server

Please let me know if you need more info.

Error on localhost:8003 of loraserver

The network-server port must match the LoRa Server bind port:

--bind value                            ip:port to bind the api server (default: "0.0.0.0:8000") [$BIND]

Thus when you bind to 0.0.0.0:8000 and LoRa App Server and LoRa Server are running on the same host, you need to enter localhost:8000

Hi brocaar,
Thanks for the fast reply.
Tried using localhost:8000 in app server UI

Iam getting this error in lora app server after sometime

Check your LoRa Server logs + version. You did not apply the latest data-migrations, either because of an old LoRa Server version, --db-autmigrate is missing or because of an error. See also:

https://forum.loraserver.io/t/release-lora-server-0-22-0-lora-app-server-0-14-x-read-carefully/350

Thank you brocaar,

created the network-server

1 Like

Hi ,
I have registered remote gateway and able to configure Lorawan .Please let me know to send/receive the data from application setup and the sensor node.

Please read the documentation :slight_smile:

1 Like

Your documentation is the best documentation i’ve thus far found on this planet.

1 Like

Hi!

I’m having trouble when adding a new network server using the lora-app-server (version 0.17.1).
I’m using a Raspbian image generated with loraserver-pi-gen with the recommended changes to operate in the US915 frequency range.

I successfuly open the web interface at https://192.168.0.174:8080 in my local network, I use the admin credentials, and click the Network servers menu at the top bar. I enter some description and fill the Network-server server field with either localhost:8000 or 127.0.0.1:8000. Whenever I hit or the Submit button, I get the Error context deadline exceeded (code: 2) message, as shown next:

I know everything else is working because I’ve been able to use my gateway with the TTN application server. My end device is able to transmit and receive packets.

Has anyone face the same problem? I don’t seem to find enough information.

Also, when I kill the lora-app-server process that initiates when the Raspberry Pi 3 boots, I’m not able to relaunch it from the user pi. I try to log in with user appserver, the previous owner of the lora-app-server process, but I don’t know the password.

Moreover, no logs can be found in the respective /var/log directories. What could be a possible reason for the logs not being generated?

Best regards.

Could you check if the loraserver process is actually up and running? For Raspberry Pi this should be:

$ journalctl -f -n 100 -u loraserver

Check running processes:

$ px aux |grep lora

The journalctl command returns No journal files were found.

The ps command returns

appserv+ 790 1.3 1.5 805288 14808 ? Ssl 11:58 0:18 /usr/bin/lora-app-server gateway+ 791 0.0 0.5 795244 4820 ? Ssl 11:58 0:00 /usr/bin/lora-gateway-bridge root 828 0.0 0.3 5092 2976 ? Ss 11:58 0:00 bash /opt/semtech/packet_forwarder/lora_pkt_fwd/start.sh postgres 862 0.0 1.3 163520 12788 ? Ss 11:58 0:00 postgres: 9.6/main: loraserver_as loraserver_as ::1(44926) idle root 906 0.6 0.1 35828 1836 ? Sl 11:58 0:09 ./lora_pkt_fwd postgres 920 0.0 1.3 162940 12696 ? Ss 11:59 0:00 postgres: 9.6/main: loraserver_as loraserver_as ::1(44980) idle pi 1106 0.0 0.1 4276 1848 pts/0 S+ 12:22 0:00 grep --color=auto lora

loraserver doesn’t seem to be there.

When I try to launch loraserver, it returns FATA[0000] NetID parse error: lorawan: exactly 3 bytes are expected, however, in /etc/default/loraserver, the second line is NET_ID=010203. Shouldn’t this be correct?

If I enter the net-idand the band manually, I get ERRO[0000] ping database error, will retry in 2s: pq: password authentication failed for user "pi". It’s the same problem I have to relaunch any of the other components since I can’t log as other users because I don’t know their passwords.

I’ve got the same errors running with loraserver and postgres users using sudo -u loraserver ./loraserver --net-id 123456 --band US_902_928.

When starting loraserver from the command-line, please use the following commands to set the environment variables:

$ set -a
$ source /etc/default/loraserver
$ loraserver

Side note: I know this is not intuitive, and in the next release (which I’m currently preparing) this will be changed to loraserver --config /etc/loraserver/loraserver.toml. See also https://forum.loraserver.io/t/looking-for-feedback-on-configuration-files/729.

Nice! It went through.

I had to provide GW_SERVER_JWT_SECRET and then loraserver started successfuly.
Then, I went to the web interface and could add a network-server.
However, it does not show on the drop-down menu when I’m registering a gateway.
I’ll keep checking if I’m doing anything wrong.

Thanks a lot!

I will also check the feedback on configuration files.

UPDATE: My bad. I had to register a service profile first. Everything should work fine now.
Thanks again!

1 Like