User Tools

Site Tools


wiki:loraloc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:loraloc [2017/08/30 16:54]
mpe
— (current)
Line 1: Line 1:
-====== LoRa Modem management ====== 
  
-===== Packet forwarder ===== 
- 
-==== What is the packet forwarder ==== 
- 
-The packet forwarder is a program running on the host of a Lora gateway that forwards RF packets received by the gateway to a server through a IP/UDP link, and emits RF packets that are sent by the server.\\ 
- 
-Every X seconds the program display statistics on the RF packets received and sent, and the network datagrams received and sent. The program also send some statistics to the server in JSON format.\\ 
- 
-For a full packet forwarder description and the way it works, read the "​Semtech readme file" available in each packet forwarder [[wiki:​ressources#​semtech_packet_forwarder_v2|resource page]]. 
- 
-==== How to install the packet forwarder ? ==== 
- 
-You can download the packet forwarder package from the [[wiki:​ressources#​semtech_packet_forwarder_v2|resource page]]. \\  
-Follow the instructions of the [[wiki:​upgrade|update page]] to install it. Just replace the “.ipk” file of this example by your own. 
- 
- 
-<note important>​ 
-Make sure your FPGA firmware version is compatible with the packet forwarder you want to install. Refer to the resource page to know which packet forwarder is compatible whith which FPGA. 
-</​note>​ 
- 
-==== How to configure and use the packet forwarder ? ==== 
- 
-  * [[wiki:​loraloc_spf-4.0.0| iBTS Packet Forwarder v4.0.0 - instructions (June 2017)]] 
- 
- 
-  * [[wiki:​loraloc_spf-3.3.1| iBTS Packet Forwarder v3.3.1 and lower - instructions (Janurary 2017)]] 
- 
- 
-\\ 
-\\ 
-===== HALv2 (Loraloc / sx1301 array) ===== 
- 
-Downloadable sources tarball are available in dedicated [[wiki:​ressources#​semtech_hal_v2|resources]] page. 
- 
-The HAL (Harware Abstraction Layer) is a library aiming to use the LoRa RF hardware (transceiver,​ modem, FPGA, …). This is similar to a driver. 
- 
-The HAL provided by Kerlink is based on Semtech HAL **lora_gateway_v2** and modifed to work with Kerlink boards. 
- 
-The difference between HALv1 (used in Wirnet stations) and HALv2 (used in iBTS) comes from the architecture of the boards. \\ 
- 
- 
-==== HAL instructions ==== 
- 
-   * [[wiki:​loraloc_hal-4.0.1| iBTS HAL 4.0.1 - Instructions (August 2017) ]] 
- 
-   * [[wiki:​loraloc_hal-3.5.0| iBTS HAL 3.5.0 - Instructions (January 2017) ]] 
- 
-   * [[wiki:​loraloc_hal-3.3.0| iBTS HAL 3.3.0 - Instructions (2016) ]] 
- 
- 
-<ifauth @admin,​@klk>​ 
-===== Radio scanning ====== 
- 
-LOC modules (used to send/​receive LoRa RF) contain a chip (sx1239) used as a radio scanner. 
- 
-To use this radio scanner, the first step is to connect to the sx1239 through the ''​microcom''​ serial terminal. ​ 
- 
-The path of the sx1239 can be retreived in the ''/​tmp/​sys_startup_status.json''​ json file in the ''​acm_path''​ field. Depending on your gateway, there might be up to 4 paths. 
- 
-<code bash> 
-$ grep acm_path /​tmp/​sys_startup_status.json 
-"​acm_path":​ "/​dev/​slot/​2/​ttyACM",​ 
-"​acm_path":​ "/​dev/​slot/​3/​ttyACM",​ 
-</​code>​ 
- 
-Once the slot of a modem is identified, the serial port can be opened with the ''​microcom''​ command, with one of the previously displayed paths as parameter. To log the traces of the ''​microcom''​ command, a pipe to the ''​tee''​ command is used. 
- 
-<code bash> 
-$ microcom /​dev/​slot/​2/​ttyACM | tee /​tmp/​spectral_scan.log ​ 
-</​code>​ 
- 
-The command to start a spectrum scanning is ''​sx1239'',​ with the following parameters: ​ 
-  * scan mode : need to be fl 
-  * number of path : need to be 1 for Lora Dual modem 
-  * start frequency in Hertz 
-  * stop frequency in Hertz (a maximum bandwitdth of 15MHz between the start and stop frequencies can be used) 
-  * frequency step in Hertz (should be 62500) 
-  * frequency bandwith in Hertz (should be 62500) ​ 
-  * bitrate (should be 600) 
-  * loop number, set to 0 for an infinite scanning 
- 
-<code bash> 
-$ sx1239 fl 1 863000000 865000000 62500 62500 600 10 
-0:​0:​7C7C7B7B7B7C7C7A7B7B7A7B7B7B7B7B797B7A7A7B7A7A7A7A7A7A7B7C7B7B7B7B 
-0:​216:​7C7B7C7B7C7C7B7B7B7B7B7B7B7B7B7A747B7B7A7A7B7B7A7A7A7A7A7A7B7B7A7A 
-0:​216:​7B7C7B7B7B7B7B7B7B7B7B7B7B7A7B7B7A7A7A7A7A7A7A7A7A7A7A7B7A7B7B7B7B 
-0:​216:​7B7B7B7A7B7C7B7B7B7B7A7B7A7B7C7B757A7A7B7A7A7B7A7A7A7A7B7B7B7B7B7C 
-0:​216:​7B7B7B7C7C7B7C7A7B7B7B7B7B7C7A7B7A7B7B7A7B7A7A7A7A7A7A7A7A7A7B7A7B 
-0:​216:​7B7C7B7B7B7B7B7A7B7B7B7A7B7B7B7B777A7A7B7B7B7B7B7A7A7A7A7A7A7A7B7B 
-0:​216:​7B7B7B7B7B7B7C7B7B7B7A7B7B7C7B7B767A7A7A7B7A7A7A7A7A7B7A7B7A7C7B7B 
-0:​216:​7B7C7B7B7C7B7B7B7B7B7B7B7C7A7B7B767A7B7B7B7A7A7A7A7A7A7B7B7A7B7B7A 
-0:​216:​7C7C7B7C7B7B7C7B7B7C7B7B7A7B7B7B777A7A7B7A7A7A7B7B7A7B7B7B7A7B7B7B 
-0:​216:​7B7A7A7B7C7C7C7A7B7B7C7C7B7A7A7B797B7A7B7C7A7A7A7B7A7B7A7A7A7A7A7B 
- 
-#press ctrl+x to exit microcom 
-</​code>​ 
- 
-The spectrum data are returned line by line. Each line corresponds to a complete scan of the band. The format is ASCII and respects the following protocol: 
- 
-<​code>​ 
-[PATH] : [DURATION] : [DATA] [END] 
-</​code>​ 
- 
-Where : 
-  * [PATH] : radio path number : 0 or 1 (always 0 for Lora Dual modem) 
-  * [DURATION] : duration of the scan of the full band expressed in milli-seconds coded as a decimal 
-  * [DATA] : N x data coded as hexascii between 00 and FF, it expresses the opposite of the received power (-RSSI) 
-  * [END] : synchro character: \r\n (0x0D 0x0A) 
- 
-The following command is an example about how to convert the raw data contained in the ''​spectral_scan.log''​ file to decimal rssi values in dBm. (it requires gawk, therefore, it cannot be directly used on the iBTS) 
- 
-<code bash> 
-$ grep "​0:"​ spectral_scan.log | sed '​s/​^[\0-9]:​[0-9]*://​g'​ | sed '​s/​.\{2\}/&​ /g' | awk --non-decimal-data '​{for(i=1;​i<​=NF;​i++) $i=sprintf("​%d","​0x"​$i)}1'​ | sed '​s/​\([0-9]\+\)/​-\1/​g'​ 
--124 -124 -123 -123 -123 -124 -124 -122 -123 -123 -122 -123 -123 -123 -123 -123 -121 -123 -122 -122 -123 -122 -122 -122 -122 -122 -122 -123 -124 -123 -123 -123 -123 
--124 -123 -124 -123 -124 -124 -123 -123 -123 -123 -123 -123 -123 -123 -123 -122 -116 -123 -123 -122 -122 -123 -123 -122 -122 -122 -122 -122 -122 -123 -123 -122 -122 
--123 -124 -123 -123 -123 -123 -123 -123 -123 -123 -123 -123 -123 -122 -123 -123 -122 -122 -122 -122 -122 -122 -122 -122 -122 -122 -122 -123 -122 -123 -123 -123 -123 
--123 -123 -123 -122 -123 -124 -123 -123 -123 -123 -122 -123 -122 -123 -124 -123 -117 -122 -122 -123 -122 -122 -123 -122 -122 -122 -122 -123 -123 -123 -123 -123 -124 
--123 -123 -123 -124 -124 -123 -124 -122 -123 -123 -123 -123 -123 -124 -122 -123 -122 -123 -123 -122 -123 -122 -122 -122 -122 -122 -122 -122 -122 -122 -123 -122 -123 
--123 -124 -123 -123 -123 -123 -123 -122 -123 -123 -123 -122 -123 -123 -123 -123 -119 -122 -122 -123 -123 -123 -123 -123 -122 -122 -122 -122 -122 -122 -122 -123 -123 
--123 -123 -123 -123 -123 -123 -124 -123 -123 -123 -122 -123 -123 -124 -123 -123 -118 -122 -122 -122 -123 -122 -122 -122 -122 -122 -123 -122 -123 -122 -124 -123 -123 
--123 -124 -123 -123 -124 -123 -123 -123 -123 -123 -123 -123 -124 -122 -123 -123 -118 -122 -123 -123 -123 -122 -122 -122 -122 -122 -122 -123 -123 -122 -123 -123 -122 
--124 -124 -123 -124 -123 -123 -124 -123 -123 -124 -123 -123 -122 -123 -123 -123 -119 -122 -122 -123 -122 -122 -122 -123 -123 -122 -123 -123 -123 -122 -123 -123 -123 
--123 -122 -122 -123 -124 -124 -124 -122 -123 -123 -124 -124 -123 -122 -122 -123 -121 -123 -122 -123 -124 -122 -122 -122 -123 -122 -123 -122 -122 -122 -122 -122 -123 
-</​code>​ 
- 
- 
- 
-</​ifauth>​ 
wiki/loraloc.1504104851.txt.gz · Last modified: 2019/01/17 10:01 (external edit)