Uploaded May 2019 | Updated September 2026, 2 weeks ago
If you like this video and want to support me, go this page for my donation Paypal or crypto addresses:
youtube.com/c/mobilefish/about
This is part 31 of the LoRa/LoRaWAN tutorial.
In this video series different topics will be explained which will help you to understand LoRa/LoRaWAN.
It is recommended to watch each video sequentially as I may refer to certain LoRa/LoRaWAN topics explained earlier.
In this tutorial I will demonstrate how to install and configure the open source LoRaWAN network server called LoRaServer.
The LoRa Server project provides open source components for building LoRaWAN networks.
The LoRa Server project consists of four major components: LoRa Gateway Bridge, LoRa Server, LoRa App Server and LoRa Geo Server.
All components are licensed under the MIT license and can be used for commercial purposes.
The LoRa Gateway Bridge abstracts the packet forwarder UDP protocol data into JSON and sends it to the LoRa Server over MQTT.
The LoRa Server is the LoRaWAN network server.
It de-duplicates and handles the received uplink frames from the gateway(s), handles the LoRaWAN mac layer and schedules the downlink data transmissions.
The LoRa App Server is the LoRaWAN Application Server and handles the join-requests, encryption of application payloads and offers a RESTful JSON API, gRPC API or MQTT for external services.
The LoRa App Server has a web interface to manage users, organisations, applications and devices.
It also allows you to see the received sensor data.
Many users are sending their sensor data to The Things Network.
Now you can create your own private LoRaWAN network by using the LoRa Server components.
More information about the LoRa Server project:
loraserver.io
All LoRa Server project code:
github.com/brocaar
LoRa Server forum:
forum.loraserver.io
The LoRa Server and the LoRa App Server each requires their own PostgreSQL database.
There are many configurations of these components possible, for example:
- All LoRa Server components and their dependencies can be installed on their own servers.
- All LoRa Server components and their dependencies can be installed on the gateway itself, which I will demonstrate in this video.
- All LoRa Server components and their dependencies can be installed on a single server instance.
- LoRa Gateway Bridge can be installed on the gateway itself, the other LoRa Server components and their dependencies can be installed on a single server instance.
How it works
The gateway has the Semtech packet forwarder installed.
The global_conf.json and local_conf.json files are used to configure the packet forwarder.
In the global_conf.json file the Lora Gateway Bridge server address and port 1700 are set.
The Lora Gateway Bridge abstracts the received packet forwarder UDP protocol data.
The data is converted into JSON and publishes it to a MQTT broker.
The lora-gateway-bridge.toml file is used to configure the Lora Gateway Bridge.
The Lora Server is the LoRaWAN network server and it has a PostgreSQL database to store the gateway data.
The loraserver.toml file is used to configure the Lora Server.
The Lora App Server is the LoRaWAN application server and it also has a PostgreSQL database to store the gateway data.
The lora-app-server.toml file is used to configure the Lora App Server.
I have created a manual how to install and configure the LoRa Gateway Bridge, LoRa Server, LoRa App Server and their dependencies on the RAK 831 Pilot Gateway.
mobilefish.com/developer/lorawan/lorawan_quickguide_loraserver_installation.html
The LoRa Gateway OS is an easy way to get started with LoRaWAN and the LoRa Server project.
LoRa Gateway OS are SD card images which contains out-of-the-box support for the Semtech packet forwarder, Lora Gateway Bridge, LoRa Server and LoRa App Server for certain concentrator shields.
More information: loraserver.io/lora-gateway-os/overview
There are also gateways on the market with the LoRa Server components already installed, such as the RAK WisKit.
This kit contains among other things:
- RAK2245 Pi HAT (LoRa concentrator module)
- Raspberry Pi 3B+
- WisNode (LoRa Node)
A tutorial about this can be found at:
hackster.io/fomi-T/simplest-lora-starter-kit-w-rak2245-rpi-ttn-loraserver-0ad993
An SD Card MAY wear out.
The lifetime of SD cards is limited by the number of writes.
It is recommended NOT to use cheap SD cards.
LoRa Server tries to minimise the number of database writes.
Check out all my other LoRa/LoRaWAN tutorial videos:
youtube.com/playlist?list=PLmL13yqb6OxdeOi97EvI8QeO8o-PqeQ0g
Subscribe to my YouTube channel:
youtube.com/channel/UCG5_CT_KjexxjbgNE4lVGkg?sub_confirmation=1
The presentation used in this video tutorial can be found at:
mobilefish.com/developer/lorawan/lorawan_quickguide_tutorial.html
#mobilefish #lora #lorawan
If you like this video and want to support me, go this page for my donation Paypal or crypto addresses:
youtube.com/c/mobilefish/about
This is part 31 of the LoRa/LoRaWAN tutorial.
In this video series different topics will be explained which will help you to understand LoRa/LoRaWAN.
It is recommended to watch each video sequentially as I may refer to certain LoRa/LoRaWAN topics explained earlier.
In this tutorial I will demonstrate how to install and configure the open source LoRaWAN network server called LoRaServer.
The LoRa Server project provides open source components for building LoRaWAN networks.
The LoRa Server project consists of four major components: LoRa Gateway Bridge, LoRa Server, LoRa App Server and LoRa Geo Server.
All components are licensed under the MIT license and can be used for commercial purposes.
The LoRa Gateway Bridge abstracts the packet forwarder UDP protocol data into JSON and sends it to the LoRa Server over MQTT.
The LoRa Server is the LoRaWAN network server.
It de-duplicates and handles the received uplink frames from the gateway(s), handles the LoRaWAN mac layer and schedules the downlink data transmissions.
The LoRa App Server is the LoRaWAN Application Server and handles the join-requests, encryption of application payloads and offers a RESTful JSON API, gRPC API or MQTT for external services.
The LoRa App Server has a web interface to manage users, organisations, applications and devices.
It also allows you to see the received sensor data.
Many users are sending their sensor data to The Things Network.
Now you can create your own private LoRaWAN network by using the LoRa Server components.
More information about the LoRa Server project:
loraserver.io
All LoRa Server project code:
github.com/brocaar
LoRa Server forum:
forum.loraserver.io
The LoRa Server and the LoRa App Server each requires their own PostgreSQL database.
There are many configurations of these components possible, for example:
- All LoRa Server components and their dependencies can be installed on their own servers.
- All LoRa Server components and their dependencies can be installed on the gateway itself, which I will demonstrate in this video.
- All LoRa Server components and their dependencies can be installed on a single server instance.
- LoRa Gateway Bridge can be installed on the gateway itself, the other LoRa Server components and their dependencies can be installed on a single server instance.
How it works
The gateway has the Semtech packet forwarder installed.
The global_conf.json and local_conf.json files are used to configure the packet forwarder.
In the global_conf.json file the Lora Gateway Bridge server address and port 1700 are set.
The Lora Gateway Bridge abstracts the received packet forwarder UDP protocol data.
The data is converted into JSON and publishes it to a MQTT broker.
The lora-gateway-bridge.toml file is used to configure the Lora Gateway Bridge.
The Lora Server is the LoRaWAN network server and it has a PostgreSQL database to store the gateway data.
The loraserver.toml file is used to configure the Lora Server.
The Lora App Server is the LoRaWAN application server and it also has a PostgreSQL database to store the gateway data.
The lora-app-server.toml file is used to configure the Lora App Server.
I have created a manual how to install and configure the LoRa Gateway Bridge, LoRa Server, LoRa App Server and their dependencies on the RAK 831 Pilot Gateway.
mobilefish.com/developer/lorawan/lorawan_quickguide_loraserver_installation.html
The LoRa Gateway OS is an easy way to get started with LoRaWAN and the LoRa Server project.
LoRa Gateway OS are SD card images which contains out-of-the-box support for the Semtech packet forwarder, Lora Gateway Bridge, LoRa Server and LoRa App Server for certain concentrator shields.
More information: loraserver.io/lora-gateway-os/overview
There are also gateways on the market with the LoRa Server components already installed, such as the RAK WisKit.
This kit contains among other things:
- RAK2245 Pi HAT (LoRa concentrator module)
- Raspberry Pi 3B+
- WisNode (LoRa Node)
A tutorial about this can be found at:
hackster.io/fomi-T/simplest-lora-starter-kit-w-rak2245-rpi-ttn-loraserver-0ad993
An SD Card MAY wear out.
The lifetime of SD cards is limited by the number of writes.
It is recommended NOT to use cheap SD cards.
LoRa Server tries to minimise the number of database writes.
Check out all my other LoRa/LoRaWAN tutorial videos:
youtube.com/playlist?list=PLmL13yqb6OxdeOi97EvI8QeO8o-PqeQ0g
Subscribe to my YouTube channel:
youtube.com/channel/UCG5_CT_KjexxjbgNE4lVGkg?sub_confirmation=1
The presentation used in this video tutorial can be found at:
mobilefish.com/developer/lorawan/lorawan_quickguide_tutorial.html
#mobilefish #lora #lorawan




![Create self signed certificates with Subject Alternative Names
This video explains how to create a self signed certificate with Subject Alternative Names (SAN).
A certificate with Subject Alternative Names is a single certificate supporting multiple Common Names (CN), for example:
- mobilefish.com
- sand.mobilefish.com
- baidu.com
- china.com
This means this single certificate can be used in multiple URLs:
- https://mobilefish.com
- https://sand.mobilefish.com
- https://baidu.com
- https://china.com
Chrome browsers will issue a warning if your SSL certificate does not specify Subject Alternative Names.
This video assumes that you have installed OpenSSL.
More information how to install and use OpenSSL:https://www.openssl.org
To check if your system has OpenSSL installed, type: openssl version -a
The procedure to create self signed certificates with Subject Alternative names is also documented at:
https://www.mobilefish.com/developer/apache/apache_quickguide_install_macos_sierra.html
Warning: Never use self signed certificates in production environments.
It is okay to use it in development or testing environments.
1. Create a 2048 bit Certificate Authority (CA) private key:
sudo openssl genrsa -out privkey.pem 2048
The CA private key is created: privkey.pem
2. Create a self signed CA certificate:
sudo openssl req -new -x509 -days 3650 -nodes -key privkey.pem -sha256 -out ca.pem
3. Create a 2048 bit Certificate Authority (CA) certificate:
Country Name (2 letter code) [AU]:NL
State or Province Name (full name) [Some-State]:Noord-Holland
Locality Name (eg, city) []:Zaandam
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Mobilefish.com CA
The CA certificate is created: ca.pem
4. Create a server configuration file (server.csr.cnf). Example:
https://www.mobilefish.com/download/openssl/sand.mobilefish.csr.cnf.txt
Download and modify the server configuration file according to your situation.
[dn]
C=NL
ST=Zaandam
L=Noord-Holland
O=End Point
OU=Research and development
emailAddress=rd@mobilefish.com
CN = sand.mobilefish.com
5. Create a server Certificate Signing Request (CSR) and server private key.
sudo openssl req -new -nodes -out server.csr -keyout server.key -config server.csr.cnf
The server CSR is created: server.csr
The server private key is created: server.key
6. Create a server extension file (server_v3.ext). Example:
https://www.mobilefish.com/download/openssl/sand.mobilefish_v3.ext.txt
Modify the server extension file according to your situation.
Add Subject Alternative Names:
[alt_names]
DNS.1 = sand.mobilefish.com
DNS.2 = proxy.mobilefish.com
In the sever configuration file (server.csr.cnf) I have used “CN = sand.mobilefish.com.
This common name must be mentioned as one of the Subject Alternative Names.
7. Create the server certificate:
sudo openssl x509 -req -in server.csr -CA ca.pem -CAkey privkey.pem -CAcreateserial -out server.crt -days 3650 -extfile server_v3.ext
The server certificate is created: server.crt
The serial number file is created: ca.srl
Each issued certificate must contain a unique serial number assigned by the CA.
It must be unique for each certificate given by a given CA.
OpenSSL keeps the used serial numbers on a file.
The server certificate (server.crt) and server private key (server.key) are the two files you need to install on your server (Apache web server, proxy server).
Always keep the private keys secure:
- CA private key (privkey.pem)
- Server private key (server.key)
Recap
We have created our own Certificate Authority (root certificate).
But this CA is not trusted by our system.
Next our CA has created a certificate with SAN.
Trusted CA’s such as Comodo and GoDaddy are trusted because their root certificates are already imported in our system.
In YouTube video “Geth supporting SSL using reverse proxy server” I will be using this self signed certificate to setup a reverse proxy server accessible by:
https://proxy.mobilefish.com.
Check out all my other Ethereum related tutorial videos:
https://goo.gl/eNJVXe
Subscribe to my YouTube channel:
https://goo.gl/61NFzK
The presentation used in this video tutorial can be found at:
http://www.mobilefish.com/developer/blockchain/blockchain_quickguide_ethereum_related_tutorials.html
#mobilefish #howto #ethereum Create self signed certificates with Subject Alternative Names](https://i.ytimg.com/vi/qoS4bLmstlk/mqdefault.jpg)
![LoRa/LoRaWAN tutorial 15: Data Rate, Chip Rate, Symbol Rate, Chip Duration and Symbol Duration
If you like this video and want to support me, go this page for my donation Paypal or crypto addresses:
https://www.youtube.com/c/mobilefish/about
This is part 15 of the LoRa/LoRaWAN tutorial.
In this video series different topics will be explained which will help you to understand LoRa/LoRaWAN.
It is recommended to watch each video sequentially as I may refer to certain LoRa/LoRaWAN topics explained earlier.
In this video I will explain how data rate, chip rate, symbol rate, chirp duration and symbol duration are calculated.
The unit of bandwidth (BW) is Hertz (Hz) which is the number of vibrations or wave cycles per second.
This bandwidth is interchangeably with chip rate:
BW = Rc = chip rate (chips/s) [1]
For example: BW=125 kHz
BW = Rc = 125000 chips/s
The Symbol Rate (Rs) is calculated as follow:
Rs (symbols/sec) = BW / 2^SF = Rc / 2^SF [1]
Bandwidth (BW) in Hz
Spreading Factor (SF): 7-12
For example: BW=125 kHz, SF=7
Rs = 125000 / 2^7 = 977 symbols/sec
The chip rate is always higher than the symbol rate: Rc is greater than Rs
To calculate the data rate (DR) or bit rate (Rb):
Rb (bits/sec) = SF x (BW / 2^SF) x (4(4+CR))
Bandwidth (BW) in Hz
Spreading Factor (SF): 7-12
Code Rate (CR): 1-4
For example: SF=7, CR=1
BW=125 kHz, Rb = 7 x (125000 / 2^7) x (4 / (4 + 1)) = 5.5 kbits/s
BW=250 kHz, Rb = 7 x (250000 / 2^7) x (4 / (4 + 1)) = 10.9 kbits/s
BW=500 kHz, Rb = 7 x (500000 / 2^7) x (4 / (4 + 1)) = 21.9 kbits/s
If you increase the bandwidth, the bit rate or data rate is increased.
For example: BW=125 kHz, CR=1
SF=7, Rb = 7 x (125000/2^7 ) x (4/(4+1)) = 5.5 kbits/s
SF=8, Rb = 8 x (125000/2^8 ) x (4/(4+1)) = 3.13 kbits/s
SF=9, Rb = 9 x (125000/2^9 ) x (4/(4+1)) = 1.76 kbits/s
SF=10, Rb = 10 x (125000/2^10) x (4/(4+1)) = 0.98 kbits/s
SF=11, Rb = 11 x (125000/2^11) x (4/(4+1)) = 0.54 kbits/s
SF=12, Rb = 12 x (125000/2^12) x (4/(4+1)) = 0.29 kbits/s
If you increase the Spreading Factor, the bit rate or data rate is decreased.
Because Rc = BW [1], the chip duration is calculated as follow:
Tc (sec) = 1 / BW
Bandwidth (BW) in Hz
For example: BW=125 kHz
Tc = 1 / 125000 = 8 µs
The symbol duration or sweep time is calculated as follow:
Ts(sec) = 2^SF / BW [1]
Bandwidth (BW) in Hz
Spreading Factor (SF): 7-12
For example: SF7
BW=125 kHz, Ts = 2^7 / 125000 = 1.024 ms
BW=250 kHz, Ts = 2^7 / 250000 = 512 µs
BW=500 kHz, Ts = 2^7 / 500000 = 256 µs
If the BW increases, the Symbol duration decreases.
For example: BW=125 kHz
SF=7, Ts = 2^7 / 125000 = 1.024 ms
SF=9, Ts = 2^9 / 125000 = 4.096 ms
SF=12, Ts = 2^12 / 125000 = 32.768 ms
If the SF increases, the Symbol duration increases.
An overview of symbol durations with respect to different Spreading Factors.
If the SF increases by one the symbol duration doubles.
If you increase the SF by 1:
The symbol duration or sweep time doubles compared to the previous SF.
It reduces the bit rate approximately by half compared to the previous SF.
The Time on Air (ToA) (=message transmission time) increases which means the distance increases.
To give you an idea what the Time on Air is for a 10 byte payload and BW=125kHz:
SF7, transmission time = 41 ms
SF12, transmission time = 991 ms
LoRa devices uses a higher spreading factor when the signal is weak or there is lot of interference.
Using a higher spreading factor means a longer Time on Air (ToA).
If an end device is further away from a gateway the signal get weaker and therefore needs a higher spreading factor.
Check out all my other LoRa/LoRaWAN tutorial videos:
https://www.youtube.com/playlist?list=PLmL13yqb6OxdeOi97EvI8QeO8o-PqeQ0g
Subscribe to my YouTube channel:
https://www.youtube.com/channel/UCG5_CT_KjexxjbgNE4lVGkg?sub_confirmation=1
The presentation used in this video tutorial can be found at:
https://www.mobilefish.com/developer/lorawan/lorawan_quickguide_tutorial.html
#mobilefish #lora #lorawan LoRa/LoRaWAN tutorial 15: Data Rate, Chip Rate, Symbol Rate, Chip Duration and Symbol Duration](https://i.ytimg.com/vi/r84GMLeiqg8/mqdefault.jpg)




