Hi, Thanks for replying. I was just typing… I’m indeed using TTN (and not TTI), thus via https://www.thethingsnetwork.org/ . And for configuration my gateways on the TTN side I use https://console.thethingsnetwork.org/gateways. These still use the V2 version of the stack, like you state at the end of the message
I also see your statement regarding upgrading to the TTN V3 stack, I’ll try that using the documentation at: The Things Network upgrade to V3
(and of course watch the opening keynote :))
I hope the documentation on TTN will also be updated soon (which I can understand takes a while on the community driven TTN)
Thanks! I’ll let you the results after taking some time for adapting to the changes.
Mmm I’m now in the ‘forest’ of documentation that should lead me to a working Gateway.
At Configuration and Update Server (CUPS) | The Things Stack for LoRaWAN, chapter " Configure CUPS to Send the LNS API Key" it is pointed out that I should use the command line interface of TTN V3 to “We need to configure CUPS in The Things Stack to transmit the LNS API key when a gateway connects…” Why is this not supported in the web interface? For ‘normal’ users it takes a lot of hassle to get things done in this way… Still want to be a happy user ofcourse, But the documentation in this form is way to difficult for average users who just want to add there gateway to the community network. If we want to build a community network, things should be simpler imho.
The export command does not exist in windows. Nor does the xxd command that is uses after the pipe.
So im trying in my mingw environment now… (for average users… not very doable).
I’m getting error: error:cmd/ttn-lw-cli/commands:unauthenticated (not authenticated with either API key or OAuth access token)
at this step.
So i tried “$ttn-lw-cli.exe login” (both in mingw as in windows cmd shell) to log in/get the oath token. my browser opened when running the command but it cant connect to the said url at localhost.
Thus I’m stuck at the moment.
In the ‘old’ situation (TTN) I could manage everything from the web UI of the TTN console. Which was much more user friendly.
One has to login before command
ttn-lw-cli gateways update $GTW_ID --lbs-lns-secret.value $SECRET"
I opened manually the browser with address on terminal since it didn’t arrive to open.
I got the json answer with lbs_lns_secret key_id f.
Had yet to finish, since have other things to do now.
Once you’ve got that, you’ll be able to use it to add the LNS key. Again, really sorry that this is still a CLI only command, we’re building this in to the console now.
Thanks @benolayinka for the tips, I’ve got my RG191 across from v2 to v3 (in AU) with basic station forwarding - the instructions above with CUPS were helpful for me. Its mostly working, although I note a few issues on device joins via this gateway using v3 stack which I did not have when I was using v2 - a little unreliable and takes my device a few attempts to join the network, so I need to troubleshoot this issue separately. But I don’t intend to go back to v2 given it will become read-only shortly.
Just a hint to those having issues with not having linux. I installed the windows binaries for the CLI support and then used GIT BASH shell to give me xxd etc. It worked well, hope this information helps someone else trying to get their gateway going with CUPS.
It’s possible to get it working only using LNS, which is easier if maybe a little less stable in the O(5 years) timeframe.
I followed the instructions in the Laird App Note here. There’s a bug in the instructions though, and then another bug which compounds it:
It says
For Unix based OS - “\r” must be added to end of key for proper line endings
but then gives the command Echo -e "Authorization: Bearer NNSXS.xxxxx\n">tc.key
Which is wrong. Do what it says, not what it did. The correct command is: echo -e "Authorization: Bearer NNSXS.xxxxx\r">tc.key
The second bug is that if you upload a key file with the same name it doesn’t seem to stick – rename it to tc2.key and upload it and it’ll be fine. And it’ll go to the configured band plan and not the one hardcoded on the device (important for RG191s sold into other countries prior to this hard-setting and country-specific versioning).
If you do this key file incorrectly there is an error in the log (bottom lines, turn on auto-updating) saying the key file is in the wrong format but it wasn’t updating the first time I uploaded everything (and in fact locked itself into online state but didn’t do anything). Rebooting helped.
For anyone else finding this forum post.
I’ve managed to get a Laird RG191 working on the TTNv3 using the semtech forwarder.
In my case I am using AU915 bandplan and the gateway won’t let me as it seems to stay forced in region “US” when manually configured. The trick is that you have to download the LoRa config (json file), modify the frequencies and then reupload the config. The web config will stil complain about the incorrect radio frequencies, but it does work.
Thanks John, that’s really interesting and useful. I still can’t get the config backup to work (I get a validation error) and I’ve never raised a ticket to find out why. Possibly it doesn’t like my LAN/Wifi config.
Out of interest why are you persisting with the Semtech forwarder? It’s definitely workable to get a RG191 US working on AU915 with the Basics Station on TTS CE (v3), and it auto-configures based on the TTS bandplan (despite the web restriction) which is nice.
@bwooce I’m only using the semtech forwarder as I was finding a lack of documentation how to get them working any other way.
Would be great if you have step by step docs on how to do it - I only have 5x RG191 gateways so don’t want to have to spend too much time getting them working. Most of my gateways are all MikroTik now
I’ve upgraded one of my gateways to firmware gatwick-laird-93.9.6.12 and following the instructions in the Laird App Note, taking note of the two bugs with the EOL and filename for the key, but having issues.
I’ve set the lns server to wss://au1.cloud.thethings.network:8887
For the LNS Server Certificate File I’m using isrgrootx1.pem, but have also tried cacert.pem and The-Things-Stack-cert_ca_minnimal_no-comment.pem.
My key file is named tc2.key and contains:
Authorization: Bearer NNSXS.MYAPIKEY{LF}
Where {LF} is a line feed (ASCII DECIMAL 10 or HEX 0A)
It’s not connecting to TTN v3 though.
The logging doesn’t show much - sighnature verification failed in weblcm and other than that reconnect backoffs getting bigger and bigger.
I fully agree that remote ones are safer left on the Semtech UDP forwarder, they will absolutely reboot and while recent upgrades didn’t zero out my config I have had it happen…
My WORKING settings are now;
LNS Server: wss://au1.cloud.thethings.network:8887
Server Certificate File: isrgrootx1.pem (from https://www.thethingsnetwork.org/docs/gateways/certificates/)
Key File: As per app note, with windows line ending (0x0D,0x0A)
Can also confirm that the upgrade from 93.7.2.10 → 93.9.6.12 will result in a factory reset, but is safe to do remotely provided the gateway is able to get settings via DHCP, or you are able to remotely access the default IP if DHCP is not available
Laird has put new firmware online (GA6, 93.9.6.12), and a manual for connecting to TTN v3.
I skipped the CUPS configuration part of the manual, and now the GW is connected to TTN (hurraay!)
And I made sure that the LNS key file (tc.key) contains ONE line only, and ends with CRLF using notepad++.
Disclaimer: I did not connect any LoraWAN devices yet.
Next step: try out CUPS… ehm maybe. It looks complicated, and the GW is already working.
Whats the ‘what’s in it for me’ for using CUPS?. What does it do with regards to “Make it easier …”?
In the short term, CUPS won’t improve your experience. CUPS allows remote reconfiguration, so the gateway first connects to a CUPS server, from which it retrieves an LNS address and credentials. In the future, this will allow you to point all of your gateways to a new network server remotely, just by updating the CUPS server.