Running Basic Station on Conduit
Code base and documentation
- Basic Station Code
- Documentation
- MTCDT station.conf
- MTCAP station.conf
- MTCAP2 station.conf
- MTAC-003 EU868 station.conf
- MTAC-003 US915 station.conf
- MTCAP3 EU868 station.conf
- MTCAP3 US915 station.conf
- MTCAP3 AU915 station.conf
Hardware Requirements
To use basic station an MTCAP or MTCDT with MTAC-LORA-H mCard is required. The Basic Station does not support the MTAC-LORA-1.0 USB cards.
mPower 5.3 includes UI configuration and basic station packages
Connecting to TTN
TTN Basic Station Instructions for Conduit
Logging
The JSON station configuration file has options to enable logging files, level and rotation
https://doc.sm.tc/station/conf.html#logging-setup
Credentials
Select LNS or CUPS depending on server requirements. The LNS protocol will downlink the channel plan from a server. The CUPS protocol and redirect the station process to a network server end-point.
Connecting to TTN Community v3
https://nam1.cloud.thethings.network/console
https://eu1.cloud.thethings.network/console
https://au1.cloud.thethings.network/console
https://www.thethingsindustries.com/docs/gateways/lora-basics-station/cups/
https://thethingsindustries.com/docs/gateways/multitechconduit/lbs/
Certificate Information
https://www.thethingsindustries.com/docs/reference/root-certificates/
CUPS
https://nam1.cloud.thethings.network:443 https://eu1.cloud.thethings.network:443 https://au1.cloud.thethings.network:443
Use the following command to view the certificate used by the server.
openssl s_client -showcerts -servername eu1.cloud.thethings.industries -connect eu1.cloud.thethings.industries:443
-----BEGIN CERTIFICATE----- MIIEZTCCA02gAwIBAgIQQAF1BIMUpMghjISpDBbN3zANBgkqhkiG9w0BAQsFADA/ MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT DkRTVCBSb290IENBIFgzMB4XDTIwMTAwNzE5MjE0MFoXDTIxMDkyOTE5MjE0MFow MjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxCzAJBgNVBAMT AlIzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuwIVKMz2oJTTDxLs jVWSw/iC8ZmmekKIp10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o5ZYyOqA7s9p O5b85o3AM/OJ+CktFBQtfvBhcJVd9wvlwPsk+uyOy2HI7mNxKKgsBTt375teA2Tw UdHkhVNcsAKX1H7GNNLOEADksd86wuoXvg== -----END CERTIFICATE-----
Using CUPS requires creating two API keys for your gateway. The LNS lbs-lns-secret key will be sent to the gateway over the CUPS protocol. The CUPS key will authenticate the gateway when negotiating the CUPS connection.
URI
Set the URI field to point to a network, in this example a TTI private instance is used.
Connecting to TTN Community
Replace “nam1” with “au1”, “eu1” for the desired region.
wss://nam1.cloud.thethings.network:8887
Station Conf
The default station configuration can be used as the network will configure the channels based on the selected channel plan in the TTI configuration.
Server Certificate
TTN Community certificates
https://www.thethingsindustries.com/docs/reference/root-certificates/
Replace “nam1” with “au1” or “eu1” for the desired region.
openssl s_client -showcerts -servername nam1.cloud.thethings.network -connect nam1.cloud.thethings.network:8887
Use the second certificate output by the open ssl command
-----BEGIN CERTIFICATE----- MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw WhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg RW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK AoIBAQC7AhUozPaglNMPEuyNVZLD+ILxmaZ6QoinXSaqtSu5xUyxr45r+XXIo9cP R5QUVTVXjJ6oojkZ9YI8QqlObvU7wy7bjcCwXPNZOOftz2nwWgsbvsCUJCWH+jdx sxPnHKzhm+/b5DtFUkWWqcFTzjTIUu61ru2P3mBw4qVUq7ZtDpelQDRrK9O8Zutm NHz6a4uPVymZ+DAXXbpyb/uBxa3Shlg9F8fnCbvxK/eG3MHacV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Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv MldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX nLRbwHOoq7hHwg== -----END CERTIFICATE-----
Gateway Certificate
If a TLS client cert is required to connect to the server provide a certificate. Otherwise leave this field blank for connecting to TTN v3.
Gateway Key
The Gateway Key can be used to populate the authorization header field or be a TLS client key depending on connection method. The Gateway Key needs to be formatted correctly to be used. In The Things Industries v3 GUI, create an API Key with Link as Gateway permissions and copy the key to the text box preceded by “Authorization: ”
Creating the Gateway key for LNS
Authorization: NNSXS.XXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
TTN Community gateway key
Currently the TTN Community servers to not authenticate the gateway key. Any value can be set, the file needs have proper contents to allow parsing by the basic station daemon.
Authorization: NNSXS.XXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Click Save and Apply and the station will be started.
Troubleshooting
If there are issues and the station needs to be run manually, you can ssh into the gateway and issue these commands to see output. The station.conf logging feature can also be used to get messages to find any issue details.
$ /etc/init.d/lora-networks-server stop $ cd /var/run/lora/1 $ sudo ./station
Installation on MTCDT/MTCAP
Install the Basic Station from downloads.
$ sudo -s # wget http://www.multitech.net/downloads/lora-basic-station_2.0.3-r1.0_arm926ejste.ipk # opkg install lora-basic-station_2.0.3-r1.0_arm926ejste.ipk
The /opt/lora/station binary will be installed.
Basic Station to Packet Forwarder
This example python script shows how to send a channel configuration to the connection basic station gateway. It is useful for getting started and ensuring the gateway is functioning.
Basic Station Examples
TTI Configuration
The Things Industries provide private server instances that Basic Station can connect to. Visit TTI for details.
tc.uri
wss://<ORG>.<REGION>.cloud.thethings.industries:8887
wss://multitech.eu1.cloud.thethings.industries:8887
tc.key – Gateway Token
The tc.key file needs to be formatted correctly to be used and can be created with this command. In The Things Industries v3 GUI, create an API Key with Link as Gateway permissions and copy the key to the tc.key file.
echo -en "Authorization: NNSXS.XXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\n" > tc.key
tc.trust
Use the following command to view the certificate used by the server.
openssl s_client -showcerts -servername multitech.eu1.cloud.thethings.industries -connect multitech.eu1.cloud.thethings.industries:8887
-----BEGIN CERTIFICATE----- MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/ MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8 SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0 Z8h/pZq4UmEUEz9l6YKHy9v6Dlb2honzhT+Xhq+w3Brvaw2VFn3EK6BlspkENnWA a6xK8xuQSXgvopZPKiAlKQTGdMDQMc2PMTiVFrqoM7hD8bEfwzB/onkxEz0tNvjj /PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIDAQABo4IBfTCCAXkwEgYDVR0T AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG CCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv bTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k c3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/ wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6 KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg== -----END CERTIFICATE-----
Configuration files
- Adjust the station.conf file for the desired frequencies, see examples.Download station.confUse the routerid and euiprefix fields to assign the Gateway EUI.
See Basic Station Doc for EUI. - Configure tc.uri to point to the network server web socket port
ws://192.168.52.72:6090
- For secure web sockets use wss and provide tc.key or tc.trust and tc.crt files
wss://192.168.52.72:6090
Running the Basic Station
root@mtcdt:/opt/lora$ sudo ./station 2020-02-26 16:56:02.698 [SYS:WARN] Ignoring field: region 2020-02-26 16:56:02.700 [SYS:INFO] Logging : stderr (maxsize=10000000, rotate=3) 2020-02-26 16:56:02.700 [SYS:INFO] Station Ver : 2.0.3(mlinux/std) 2020-01-24 16:54:44 2020-02-26 16:56:02.700 [SYS:INFO] Package Ver : (null) 2020-02-26 16:56:02.701 [SYS:INFO] proto EUI : ::1 (station.conf) 2020-02-26 16:56:02.701 [SYS:INFO] prefix EUI : ::0 (station.conf) 2020-02-26 16:56:02.701 [SYS:INFO] Station EUI : ::1 2020-02-26 16:56:02.701 [SYS:INFO] Station home: ./ (builtin) 2020-02-26 16:56:02.701 [SYS:INFO] Station temp: /var/tmp/ (builtin) 2020-02-26 16:56:02.701 [SYS:WARN] Station in NO-CUPS mode 2020-02-26 16:56:02.903 [TCE:INFO] Starting TC engine 2020-02-26 16:56:02.908 [TCE:INFO] Connecting to INFOS: ws://192.168.52.72:6090 2020-02-26 16:56:02.912 [TCE:INFO] Infos: ::1 muxs-::0 ws://192.168.52.72:6092/router-::1 2020-02-26 16:56:02.912 [AIO:DEBU] [3] ws_close reason=1000 2020-02-26 16:56:02.913 [AIO:DEBU] [3] Server sent close: reason=1000 2020-02-26 16:56:02.913 [AIO:DEBU] [3] WS connection shutdown... 2020-02-26 16:56:02.916 [TCE:VERB] Connecting to MUXS... 2020-02-26 16:56:02.917 [TCE:VERB] Connected to MUXS. INFO: FPGA supported features: [TX filter] [Spectral Scan] [LBT] 2020-02-26 16:56:03.219 [S2E:WARN] Unknown field in router_config - ignored: bcning (0x1EE5E245) 2020-02-26 16:56:03.219 [S2E:WARN] Unknown field in router_config - ignored: config (0xF7A3E35F) 2020-02-26 16:56:03.219 [S2E:WARN] Unknown field in router_config - ignored: protocol (0xFD309030) 2020-02-26 16:56:03.220 [S2E:WARN] Unknown field in router_config - ignored: regionid (0xE6FFB211) 2020-02-26 16:56:03.220 [S2E:WARN] Unknown field in router_config - ignored: upchannels (0x7FCAA9EB) 2020-02-26 23:08:46.995 [RAL:WARN] Ignoring unsupported/unknown field: lbt_conf 2020-02-26 23:08:47.049 [RAL:INFO] Lora gateway library version: Version: 5.0.1-mts-1; 2020-02-26 23:08:47.049 [RAL:DEBU] SX1301 txlut table (2 entries) 2020-02-26 23:08:47.049 [RAL:VERB] SX1301 txlut 0: dig_gain=0 pa_gain=0 dac_gain=3 mix_gain=11 rf_power=-6 2020-02-26 23:08:47.049 [RAL:VERB] SX1301 txlut 1: dig_gain=0 pa_gain=0 dac_gain=3 mix_gain=13 rf_power=-3 2020-02-26 23:08:47.049 [RAL:VERB] SX1301 rxrfchain 0: enable=1 freq=868475000 rssi_offset=-162.000000 type=2 tx_enable=1 tx_notch_freq=0 2020-02-26 23:08:47.049 [RAL:VERB] SX1301 rxrfchain 1: enable=1 freq=869287500 rssi_offset=-162.000000 type=2 tx_enable=0 tx_notch_freq=0 2020-02-26 23:08:47.049 [RAL:VERB] SX1301 ifchain 0: enable=1 rf_chain=0 freq=-375000 bandwidth=0 datarate=0 sync_word=0/0 2020-02-26 23:08:47.050 [RAL:VERB] SX1301 ifchain 1: enable=1 rf_chain=0 freq=-175000 bandwidth=0 datarate=0 sync_word=0/0 2020-02-26 23:08:47.050 [RAL:VERB] SX1301 ifchain 2: enable=1 rf_chain=0 freq=25000 bandwidth=0 datarate=0 sync_word=0/0 2020-02-26 23:08:47.050 [RAL:VERB] SX1301 ifchain 3: enable=1 rf_chain=0 freq=375000 bandwidth=0 datarate=0 sync_word=0/0 2020-02-26 23:08:47.050 [RAL:VERB] SX1301 ifchain 4: enable=1 rf_chain=1 freq=-237500 bandwidth=0 datarate=0 sync_word=0/0 2020-02-26 23:08:47.050 [RAL:VERB] SX1301 ifchain 5: enable=1 rf_chain=1 freq=237500 bandwidth=0 datarate=0 sync_word=0/0 2020-02-26 23:08:47.050 [RAL:VERB] SX1301 ifchain 6: enable=0 rf_chain=1 freq=200000 bandwidth=0 datarate=0 sync_word=0/0 2020-02-26 23:08:47.050 [RAL:VERB] SX1301 ifchain 7: enable=0 rf_chain=1 freq=400000 bandwidth=0 datarate=0 sync_word=0/0 2020-02-26 23:08:47.050 [RAL:VERB] SX1301 ifchain 8: enable=0 rf_chain=0 freq=-200000 bandwidth=2 datarate=2 sync_word=0/0 2020-02-26 23:08:47.051 [RAL:VERB] SX1301 ifchain 9: enable=0 rf_chain=0 freq=300000 bandwidth=3 datarate=50000 sync_word=0/0 2020-02-26 23:08:47.051 [RAL:VERB] SX1301 LBT not enabled 2020-02-26 23:08:47.051 [RAL:INFO] Station device: /dev/spidev0.0 (PPS capture enabled) 2020-02-26 23:08:50.049 [S2E:INFO] Configuring for region: EU863 -- 863.0MHz..870.0MHz 2020-02-26 23:08:50.049 [S2E:VERB] DR0 SF12/BW125 2020-02-26 23:08:50.049 [S2E:VERB] DR1 SF11/BW125 2020-02-26 23:08:50.049 [S2E:VERB] DR2 SF10/BW125 2020-02-26 23:08:50.049 [S2E:VERB] DR3 SF9/BW125 2020-02-26 23:08:50.049 [S2E:VERB] DR4 SF8/BW125 2020-02-26 23:08:50.049 [S2E:VERB] DR5 SF7/BW125 2020-02-26 23:08:50.049 [S2E:VERB] DR6 SF7/BW250 2020-02-26 23:08:50.049 [S2E:VERB] DR7 FSK 2020-02-26 23:08:50.049 [S2E:VERB] DR8 undefined 2020-02-26 23:08:50.049 [S2E:VERB] DR9 undefined 2020-02-26 23:08:50.049 [S2E:VERB] DR10 undefined 2020-02-26 23:08:50.049 [S2E:VERB] DR11 undefined 2020-02-26 23:08:50.050 [S2E:VERB] DR12 undefined 2020-02-26 23:08:50.050 [S2E:VERB] DR13 undefined 2020-02-26 23:08:50.050 [S2E:VERB] DR14 undefined 2020-02-26 23:08:50.050 [S2E:VERB] DR15 undefined 2020-02-26 23:08:50.050 [S2E:VERB] TX power: 16.0 dBm EIRP 2020-02-26 23:08:50.050 [S2E:VERB] 27.0 dBm EIRP for 869.4MHz..869.65MHz 2020-02-26 23:08:50.050 [S2E:VERB] JoinEui list: 0 entries 2020-02-26 23:08:50.050 [S2E:VERB] NetID filter: FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF 2020-02-26 23:08:50.050 [S2E:VERB] Dev/test settings: nocca=0 nodc=0 nodwell=0