This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:lora:cpf_1.1.x:cpf_1.1.6:installation [2019/09/25 14:26] ghi |
wiki:lora:cpf_1.1.x:cpf_1.1.6:installation [2021/07/08 12:14] (current) ehe [gateway EUI] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Common Packet Forwarder: installation and configuration ====== | + | ====== CPF 1.1.6: Installation and configuration ====== |
===== How to install the Common Packet Forwarder? ===== | ===== How to install the Common Packet Forwarder? ===== | ||
- | - Choose the packet forwarder to install from the [[resources_ibts:resources#common_packet_forwarder|Wirnet iBTS resource page]] or [[resources_ifemto:resources#common_packet_forwarder|Wirnet iFemtoCell resource page]]. Choosing the latest version of the packet forwarder is recommended. | + | - Choose the packet forwarder to install from the [[wiki:resources:resources#packet_forwarder|Wirnet products resource page]]. Choosing the latest version of the packet forwarder is recommended. |
- Download the //"lorad"// and //"lorafwd"// ''.ipk'' packages files. | - Download the //"lorad"// and //"lorafwd"// ''.ipk'' packages files. | ||
- | - Install the ''.ipk'' files using the instructions of the [[wiki:sw_updates|software updates page]]. Packages can be installed simultaneously. | + | - Install the ''.ipk'' files using the instructions of the [[wiki:keros_custo:sw_updates|software updates page]]. Packages can be installed simultaneously. |
//The CPF installation on a Wirnet iBTS takes some time since the FPGA is updated during this process. Expect approximately 15 to 30 minutes, depending on the number of connected modems. // | //The CPF installation on a Wirnet iBTS takes some time since the FPGA is updated during this process. Expect approximately 15 to 30 minutes, depending on the number of connected modems. // | ||
Line 14: | Line 15: | ||
│ ├── default | │ ├── default | ||
│ │ ├── lorad # Overall lorad configuration | │ │ ├── lorad # Overall lorad configuration | ||
- | │ │ └── lorafwd # overall lorafwd configuration | + | │ │ └── lorafwd # Overall lorafwd configuration |
│ ├── init.d | │ ├── init.d | ||
│ │ ├── lorad # Script to start/stop lorad | │ │ ├── lorad # Script to start/stop lorad | ||
│ │ └── lorafwd # Script to start/stop lorafwd | │ │ └── lorafwd # Script to start/stop lorafwd | ||
+ | │ ├── logrotate.d | ||
+ | │ │ ├── lorad # Configuration file for lorad log rotation | ||
+ | │ │ └── lorafwd # Configuration file for lorafwd log rotation | ||
│ ├── monit.d | │ ├── monit.d | ||
- | │ │ ├── lorad # Configuration of the lorad monitoring | + | │ │ ├── lorad # Configuration of the lorad monitoring |
│ │ └── lorafwd # Configuration of the lorafwd monitoring | │ │ └── lorafwd # Configuration of the lorafwd monitoring | ||
+ | │ ├── profile.d | ||
+ | │ │ ├── lorad # Environment variables for lorad | ||
+ | │ │ └── lorafwd # Environment variables for lorafwd | ||
│ ├── rcK.d | │ ├── rcK.d | ||
│ │ ├── K50lorad # autostop of lorad | │ │ ├── K50lorad # autostop of lorad | ||
│ │ └── K51lorafwd # autostop of lorafwd | │ │ └── K51lorafwd # autostop of lorafwd | ||
│ ├── rcU.d | │ ├── rcU.d | ||
+ | │ │ ├── S40lorad-fpga | ||
│ │ ├── S50lorad # autostart of lorad | │ │ ├── S50lorad # autostart of lorad | ||
│ │ └── S51lorafwd # autostart of lorafwd | │ │ └── S51lorafwd # autostart of lorafwd | ||
+ | │ ├── rsyslog.d | ||
+ | │ │ ├── lorad # Configuration file for lorad log | ||
+ | │ │ └── lorafwd # Configuration file for lorafwd log | ||
│ └── sysupgrade.d | │ └── sysupgrade.d | ||
- | │ ├── lorad.conf | + | │ ├── lorad.conf |
│ └── lorafwd.conf | │ └── lorafwd.conf | ||
└── user | └── user | ||
├── etc | ├── etc | ||
│ ├── lorad | │ ├── lorad | ||
- | │ │ ├── AS923-JP_16CH.json # Frequency plan template | + | │ │ ├── ibts |
- | │ │ ├── AU915-AU_16CH.json # ... | + | │ │ │ ├── AS923-JP_16CH.json # Frequency plan template |
- | │ │ ├── EU868-FR_16CH.json # ... | + | │ │ │ ├── AU915-AU_64CH.json # ... |
- | │ │ ├── EU868-FR_2x8CH.json # ... | + | │ │ │ ├── EU868-FR_16CH.json # ... |
- | │ │ ├── IN865-IN_8CH.json # ... | + | │ │ │ ├── EU868-FR_2x8CH.json # ... |
+ | │ │ │ ├── IN865-IN_8CH.json # ... | ||
+ | │ │ │ ├── RU864-RU_16CH.json # ... | ||
+ | │ │ │ └── US915-US_64CH.json # ... | ||
│ │ ├── misc | │ │ ├── misc | ||
│ │ │ └── remote-api.json | │ │ │ └── remote-api.json | ||
- | │ │ ├── RU864-RU_16CH.json # ... | + | │ │ ├── wifc |
- | │ │ ├── US915-US_16CH.json # ... | + | │ │ │ ├── AS923-JP_8CH.json # Frequency plan template |
- | │ │ └── US915-US_64CH.json # ... | + | │ │ │ ├── AU915-AU_8CH.json # ... |
+ | │ │ │ ├── EU868-FR_8CH.json # ... | ||
+ | │ │ │ ├── IN865-IN_8CH.json # ... | ||
+ | │ │ │ ├── RU864-RU_8CH.json # ... | ||
+ | │ │ │ ├── RU864-RU_8CH_Legacy.json # ... | ||
+ | │ │ │ └── US915-US_8CH.json # ... | ||
+ | │ │ └── wiis | ||
+ | │ │ ├── AS923-JP_8CH.json # Frequency plan template | ||
+ | │ │ ├── AU915-AU_8CH.json # ... | ||
+ | │ │ ├── EU868-FR_8CH.json # ... | ||
+ | │ │ ├── IN865-IN_8CH.json # ... | ||
+ | │ │ ├── RU864-RU_8CH.json # ... | ||
+ | │ │ ├── RU864-RU_8CH_Legacy.json # ... | ||
+ | │ │ └── US915-US_8CH.json # ... | ||
│ └── lorafwd | │ └── lorafwd | ||
│ └── lorafwd.toml # LNS configuration | │ └── lorafwd.toml # LNS configuration | ||
├── sbin | ├── sbin | ||
- | │ ├── lorad # lorad binary | + | │ ├── lorad-ibts # lorad binary for iBTS |
- | │ ├── lorafwd # lorafwd binary | + | │ ├── lorad-wifc # lorad binary for iFemtoCell |
+ | │ ├── lorad-wiis # lorad binary for iStation | ||
+ | │ ├── lorafwd # lorafwd binary | ||
│ ├── lorafwdctl | │ ├── lorafwdctl | ||
│ └── loramodem # Only for Wirnet iBTS | │ └── loramodem # Only for Wirnet iBTS | ||
- | └── share | + | └── share |
- | └── lorad | + | └── lorad |
└── fpga_v61.bin # Only for Wirnet iBTS | └── fpga_v61.bin # Only for Wirnet iBTS | ||
</code> | </code> | ||
+ | |||
===== How to configure and monitor the packet forwarder? ===== | ===== How to configure and monitor the packet forwarder? ===== | ||
Line 62: | Line 92: | ||
==== lorad configuration ==== | ==== lorad configuration ==== | ||
+ | |||
The goal of the lorad configuration is to define the frequency plan that will be used to receive packets from the end-devices, to enable the LBT feature and configure the class B beacons. | The goal of the lorad configuration is to define the frequency plan that will be used to receive packets from the end-devices, to enable the LBT feature and configure the class B beacons. | ||
- | * A few frequency plan templates are pre-installed on the gateway (under ''/user/etc/lorad''): choose the one that suits the most your requirement. | + | * A few frequency plan templates are pre-installed on the gateway (under ''/user/etc/lorad/PLATFORM'' where //PLATFORM// equal to //ibts//, //wifc// or //wiis//): it is strongly recommended to copy the expected frequency plan templates in ''/user/etc/lorad/'' directory and create symlink ''/user/etc/lorad/lorad.json'' to this copied file. The goal is to keep templates unmodified. |
- | * Edit ''/etc/default/lorad'' and make sure that the ''CONFIGURATION_FILE'' field links to the template you previously chose. | + | * Edit ''/etc/default/lorad'' and make sure that the ''CONFIGURATION_FILE'' field links to the template you previously copied. |
- | * Edit the template you chose to adapt it to your needs. Since the hardware of Wirnet iBTS and Wirnet iFemtoCell gateways is different, the configuration on each gateway differs (although it is quite similar). | + | * Edit the template you copied to adapt it to your needs. Since the hardware of Wirnet iBTS and Wirnet iFemtoCell gateways is different, the configuration on each gateway differs (although it is quite similar). |
- | ++++ iBTS| | + | ++++ Wirnet iBTS| |
Wirnet iBTS gateways cannot listen to all LoRa frequencies simultaneously. Up to 16 frequencies can be handled at the same time per LoRa board. There can be up to 4 LoRa boards in an iBTS.\\ | Wirnet iBTS gateways cannot listen to all LoRa frequencies simultaneously. Up to 16 frequencies can be handled at the same time per LoRa board. There can be up to 4 LoRa boards in an iBTS.\\ | ||
Line 97: | Line 128: | ||
**Antennas configuration**\\ | **Antennas configuration**\\ | ||
- | The front-end board of each LoRa board integrates two duplicated TX and Rx paths (RF1 path and RF2 path). Each TX/RX path is connected to one SMB antenna port, referenced as RF1 and RF2 (Installation manual 1.5.4.4 Front-end boards). A look at the [[wiki:lora_features#lora_specific_hardware|]] may help to understand.\\ | + | The front-end board of each LoRa board integrates two duplicated TX and Rx paths (RF1 path and RF2 path). Each TX/RX path is connected to one SMB antenna port, referenced as RF1 and RF2 (Installation manual 1.5.4.4 Front-end boards). A look at the [[wiki:lora:features#lora_specific_hardware|]] may help to understand.\\ |
To understand every possible antenna configurations, read chapter 4.6.2.5 of the Installation manual. | To understand every possible antenna configurations, read chapter 4.6.2.5 of the Installation manual. | ||
Line 146: | Line 177: | ||
Each LoRaLoc module contains two SX1301. Each SX1301 can be configured to use 10 different frequencies. However, these channels need to be contained within a 3 MHz bandwidth. | Each LoRaLoc module contains two SX1301. Each SX1301 can be configured to use 10 different frequencies. However, these channels need to be contained within a 3 MHz bandwidth. | ||
- | * ''chip_enable'': Enable/Disable SX1301. | ||
* ''chip_center_freq'': Is used to define the center frequency of the SX1301. All 10 channels will be around this particular frequency (+/- 1.5 MHz). | * ''chip_center_freq'': Is used to define the center frequency of the SX1301. All 10 channels will be around this particular frequency (+/- 1.5 MHz). | ||
* ''chan_rx_freq'': Are used to define each channel's center frequency. In order to respect SX1301 bandwidth, maximum values are defined by ''chip_center_freq'' +/- 1.4 MHz. | * ''chan_rx_freq'': Are used to define each channel's center frequency. In order to respect SX1301 bandwidth, maximum values are defined by ''chip_center_freq'' +/- 1.4 MHz. | ||
- | * ''chip_rf_chain'': Defines which rf chain is used by the SX1301. See antenna configuration for more details. | + | * ''chip_rf_chain'': Defines which rf chain is used by the SX1301. See antenna configuration for more details. |
<code> | <code> | ||
"SX1301_conf":[ | "SX1301_conf":[ | ||
{ | { | ||
- | "chip_enable": true, | ||
- | "chip_center_freq": 866000000, | ||
"chip_rf_chain": 0, | "chip_rf_chain": 0, | ||
+ | "chip_center_freq": 866000000, | ||
"chan_multiSF_0": { "chan_rx_freq": 865500000, "spread_factor": "7-12" }, | "chan_multiSF_0": { "chan_rx_freq": 865500000, "spread_factor": "7-12" }, | ||
"chan_multiSF_1": { "chan_rx_freq": 865700000, "spread_factor": "7-12" }, | "chan_multiSF_1": { "chan_rx_freq": 865700000, "spread_factor": "7-12" }, | ||
Line 168: | Line 197: | ||
"chan_FSK" : { "chan_rx_freq": 866900000, "bandwidth": 125000, "bit_rate": 50000 } | "chan_FSK" : { "chan_rx_freq": 866900000, "bandwidth": 125000, "bit_rate": 50000 } | ||
},{ | },{ | ||
- | "chip_enable": true, | ||
- | "chip_center_freq": 868000000, | ||
"chip_rf_chain": 1, | "chip_rf_chain": 1, | ||
+ | "chip_center_freq": 868000000, | ||
"chan_multiSF_0": { "chan_rx_freq": 867500000, "spread_factor": "7-12" }, | "chan_multiSF_0": { "chan_rx_freq": 867500000, "spread_factor": "7-12" }, | ||
"chan_multiSF_1": { "chan_rx_freq": 867700000, "spread_factor": "7-12" }, | "chan_multiSF_1": { "chan_rx_freq": 867700000, "spread_factor": "7-12" }, | ||
Line 194: | Line 222: | ||
* ''enable'': Enable or disable LBT. | * ''enable'': Enable or disable LBT. | ||
* ''rssi_target'': The RSSI threshold to detect if channels are busy or not (dBm). | * ''rssi_target'': The RSSI threshold to detect if channels are busy or not (dBm). | ||
- | * ''rssi_shift'':** Do not change this value**, this is the value to be applied to RSSI to convert RSSI in dBm to register value. | ||
* ''chan_cfg'': | * ''chan_cfg'': | ||
* ''freq_hz'': The LBT channel frequency in Hz. These frequencies needs to be the same as the one in the ''SX1301_conf'' array. | * ''freq_hz'': The LBT channel frequency in Hz. These frequencies needs to be the same as the one in the ''SX1301_conf'' array. | ||
Line 204: | Line 231: | ||
"enable": true, | "enable": true, | ||
"rssi_target": -80, | "rssi_target": -80, | ||
- | "rssi_shift": 131, | ||
"chan_cfg":[ | "chan_cfg":[ | ||
{ "freq_hz": 922000000, "scan_time_us": 5000, "transmit_time_ms": 4000 }, | { "freq_hz": 922000000, "scan_time_us": 5000, "transmit_time_ms": 4000 }, | ||
{ "freq_hz": 922200000, "scan_time_us": 5000, "transmit_time_ms": 4000 }, | { "freq_hz": 922200000, "scan_time_us": 5000, "transmit_time_ms": 4000 }, | ||
- | { "freq_hz": 922400000, "scan_time_us": 128, "transmit_time_ms": 400 }, | + | { "freq_hz": 922400000, "scan_time_us": 5000, "transmit_time_ms": 400 }, |
- | { "freq_hz": 922600000, "scan_time_us": 128, "transmit_time_ms": 400 }, | + | { "freq_hz": 922600000, "scan_time_us": 5000, "transmit_time_ms": 400 }, |
- | { "freq_hz": 922800000, "scan_time_us": 128, "transmit_time_ms": 400 }, | + | { "freq_hz": 922800000, "scan_time_us": 5000, "transmit_time_ms": 400 }, |
- | { "freq_hz": 923000000, "scan_time_us": 128, "transmit_time_ms": 400 }, | + | { "freq_hz": 923000000, "scan_time_us": 5000, "transmit_time_ms": 400 }, |
- | { "freq_hz": 923200000, "scan_time_us": 128, "transmit_time_ms": 400 }, | + | { "freq_hz": 923200000, "scan_time_us": 5000, "transmit_time_ms": 400 }, |
- | { "freq_hz": 923400000, "scan_time_us": 128, "transmit_time_ms": 400 } | + | { "freq_hz": 923400000, "scan_time_us": 150008, "transmit_time_ms": 400 } |
] | ] | ||
}, | }, | ||
Line 220: | Line 246: | ||
++++ | ++++ | ||
- | ++++ Wirnet iFemtoCell| | + | ++++ Wirnet iFemtoCell and Wirnet iStation| |
- | The Wirnet iFemtoCell cannot listen to all LoRa frequencies simultaneously. Up to 8 frequencies can be handled at the same time by the demodulator (SX1301).\\ | + | <note important>Note that the class-B configuration does not apply to such gateways (Wirnet iFemtocell and Wirnet iStation) since they have no GPS.</note> |
+ | |||
+ | The Wirnet iFemtoCell and Wirnet iStation cannot listen to all LoRa frequencies simultaneously. Up to 8 frequencies can be handled at the same time by the demodulator (SX1301).\\ | ||
\\ | \\ | ||
- | To understand how the frequency configuration works, it is necessary to know that the Wirnet iFemtoCell hardware contains an RF front-ends connected to 2 SX1257 chips. A look at the [[wiki:lora_features#lora_specific_hardware|]] may help to understand. Each of these chips has a 0.8 MHz Bandwidth. Thus, all 8 channels must be contained within these two 0.8 MHz intervals.\\ | + | To understand how the frequency configuration works, it is necessary to know that the Wirnet iFemtoCell and Wirnet iStation hardware contain an RF front-ends connected to 2 SX1257 chips. A look at the [[wiki:lora:features#lora_specific_hardware|]] may help to understand. Each of these chips has a 0.8 MHz Bandwidth. Thus, all 8 channels must be contained within these two 0.8 MHz intervals.\\ |
\\ | \\ | ||
To properly configure the Rx channels, the center frequencies of the chips must be defined. | To properly configure the Rx channels, the center frequencies of the chips must be defined. | ||
Line 246: | Line 274: | ||
* ''antenna_gain'': Is used to define the gain of the antenna. If you use the default Kerlink antenna don't change it. This field has to be correctly filled, otherwise, the gateway will use more power to emits packets than what was initially planned by the LNS. | * ''antenna_gain'': Is used to define the gain of the antenna. If you use the default Kerlink antenna don't change it. This field has to be correctly filled, otherwise, the gateway will use more power to emits packets than what was initially planned by the LNS. | ||
* ''insertion_loss'': Is used to define the attenuation due to the cable between the gateway and the antenna. When there is no cable, the correct value is 0. | * ''insertion_loss'': Is used to define the attenuation due to the cable between the gateway and the antenna. When there is no cable, the correct value is 0. | ||
- | * ''enable'': Enable/disable SX1257. | + | * ''radio_n'' |
- | * ''freq'': Is used to define the center frequency of the SX1257. All channels will be around this particular frequency (+/- 0.4Mhz). | + | * ''enable'': Enable/disable SX1257. |
- | * ''tx_enable'': Enable/disable tx data on SX1257. | + | * ''freq'': Is used to define the center frequency of the SX1257. All channels will be around this particular frequency (+/- 0.4Mhz). |
+ | * ''tx_enable'': Enable/disable tx data on SX1257. | ||
<code> | <code> | ||
Line 256: | Line 285: | ||
"insertion_loss": 0, | "insertion_loss": 0, | ||
"insertion_loss_desc": "Insertion loss, in dBi", | "insertion_loss_desc": "Insertion loss, in dBi", | ||
- | "clksrc": 1, | ||
- | "clksrc_desc": "Radio #1 provides clock to concentrator", | ||
"radio_0": { | "radio_0": { | ||
"enable": true, | "enable": true, | ||
- | "type": "SX1257", | ||
"freq": 867500000, | "freq": 867500000, | ||
"tx_enable": true, | "tx_enable": true, | ||
"tx_freq_min": 863000000, | "tx_freq_min": 863000000, | ||
"tx_freq_max": 870000000, | "tx_freq_max": 870000000, | ||
- | "tx_notch_freq": 129000 | ||
}, | }, | ||
"radio_1": { | "radio_1": { | ||
"enable": true, | "enable": true, | ||
- | "type": "SX1257", | ||
"freq": 868500000, | "freq": 868500000, | ||
"tx_enable": false | "tx_enable": false | ||
Line 302: | Line 326: | ||
* ''enable'': Enable or disable LBT. | * ''enable'': Enable or disable LBT. | ||
* ''rssi_target'': The RSSI threshold to detect if the channel is busy or not (dBm). | * ''rssi_target'': The RSSI threshold to detect if the channel is busy or not (dBm). | ||
- | * ''sx127x_rssi_offset'': Offset RSSI seen by sx1257. Do not modify this field. | + | * ''chan_cfg'' |
- | * ''freq_hz'': The LBT channel frequency in Hz. These frequencies need to be the same as the one in the ''chan_multiSF_X'' JSON arrays. | + | * ''freq_hz'': The LBT channel frequency in Hz. These frequencies need to be the same as the one in the ''chan_multiSF_X'' JSON arrays. |
- | * ''scan_time_us'': The LBT channel scan time to be used (only two available values: 128µs or 5000µs). | + | * ''scan_time_us'': The LBT channel scan time to be used (only two available values: 128µs or 5000µs). |
<code> | <code> | ||
Line 311: | Line 335: | ||
"enable": true, | "enable": true, | ||
"rssi_target": -80, | "rssi_target": -80, | ||
- | "sx127x_rssi_offset": -9, | ||
"chan_cfg": [ | "chan_cfg": [ | ||
{ "freq_hz": 922000000, "scan_time_us": 5000 }, | { "freq_hz": 922000000, "scan_time_us": 5000 }, | ||
{ "freq_hz": 922200000, "scan_time_us": 5000 }, | { "freq_hz": 922200000, "scan_time_us": 5000 }, | ||
- | { "freq_hz": 922400000, "scan_time_us": 128 }, | + | { "freq_hz": 922400000, "scan_time_us": 5000 }, |
- | { "freq_hz": 922600000, "scan_time_us": 128 }, | + | { "freq_hz": 922600000, "scan_time_us": 5000 }, |
- | { "freq_hz": 922800000, "scan_time_us": 128 }, | + | { "freq_hz": 922800000, "scan_time_us": 5000 }, |
- | { "freq_hz": 923000000, "scan_time_us": 128 }, | + | { "freq_hz": 923000000, "scan_time_us": 5000 }, |
- | { "freq_hz": 923200000, "scan_time_us": 128 }, | + | { "freq_hz": 923200000, "scan_time_us": 5000 }, |
- | { "freq_hz": 923400000, "scan_time_us": 128 } | + | { "freq_hz": 923400000, "scan_time_us": 5000 } |
] | ] | ||
}, | }, | ||
Line 326: | Line 349: | ||
++++ | ++++ | ||
- | |||
- | |||
==== lorafwd configuration ==== | ==== lorafwd configuration ==== | ||
Line 348: | Line 369: | ||
* The monitoring behavior is handled by the ''/etc/monit.d/lorad'' and ''/etc/monit.d/lorafwd'' files. | * The monitoring behavior is handled by the ''/etc/monit.d/lorad'' and ''/etc/monit.d/lorafwd'' files. | ||
- | The daemons can be started/stopped/rebooted and monitored with ''monit''. See [[wiki:monitoring#monit_daemon|monit page]] for more details. | + | The daemons can be started/stopped/rebooted and monitored with ''monit''. See [[wiki:systeme_mana:monitoring#monit_daemon|monit page]] for more details. |
Both daemons are independent. If one is stopped/restarted, the other one does not need to be stopped/restarted. | Both daemons are independent. If one is stopped/restarted, the other one does not need to be stopped/restarted. | ||
Line 377: | Line 398: | ||
- | ==== gateway EUI ==== | ||
- | |||
- | Gateway EUI is used by LNS to identify from which gateway messages come from. | ||
- | |||
- | By default, EUI are generated this way: | ||
- | |||
- | * Wirnet iBTS : 7276FF002E<last 6 characters of the CPU serial number> | ||
- | * Wirnet iFemtoCell : 7276FF00<last 8 characters of the CPU board serial number> | ||
- | |||
- | When lorafwd starts, a file containing the default EUI is generated. | ||
- | |||
- | <code bash> | ||
- | cat /var/run/lora/gateway-id.toml | ||
- | gateway.id = 0x7276FF002E050789 | ||
- | </code> | ||
- | If a new EUI has been defined under ''/user/etc/lorafwd'', then, this new EUI is used by lorafwd. Otherwise, the default EUI is used. |