This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:loraloc [2017/07/07 16:26] dqu |
— (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 ==== | ||
- | |||
- | <note important> | ||
- | Since HAL v4.0.1 sources are no longer delivered. | ||
- | </note> | ||
- | |||
- | * [[wiki:loraloc_hal-3.5.0| iBTS HAL 3.5.0 - Instructions (Janurary 2017) ]] | ||
- | |||
- | |||
- | * [[wiki:loraloc_hal-3.3.0| iBTS HAL 3.3.0 - Instructions (2016) ]] | ||
- | |||
- | \\ \\ | ||
- | <ifauth @admin,@klk> | ||
- | ===== Radio scanning ===== | ||
- | The radio scanner can be addressed by a serial port from host CPU. The COM port can be retreived in the platform json description file /tmp/sys_startup_status.json, modem COM port is contained inside the field “module”.“acm_path”. The modem is identified by its physical location given in the field “module”.“position”.\\ | ||
- | |||
- | The command to enable an 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 | ||
- | * 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 | ||
- | |||
- | Example: | ||
- | <code bash> | ||
- | sx1239 fl 1 863000000 870000000 62500 62500 600 0\r | ||
- | </code> | ||
- | |||
- | |||
- | The spectrum data are returned line by line separated by a \r\n, each line correspond to a complete scan of the band. The format is ASCII and respects the following protocol: | ||
- | <code> | ||
- | [PATH] : [DURATION] : [DATA] [FIN] | ||
- | </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) | ||
- | * [FIN] : synchro character: \r\n (0x0D 0x0A) | ||
- | |||
- | Exemple | ||
- | <code> | ||
- | 0:915:7F7F807F80807F80807F7F7F7F7F7E7E777E7F7E7F7F807F7F7F7F80807F7F7F807F7F7F807F7F7F807F7F7F807F7F80807F7F7F7F807F807F7F7F7F807F7F7F7F807F7F7F7F7F7F7F7F7F7F80807F7F7F7F7F7F7F7F7F807F7F7F807F807F7F7F7F7F7F7F7F7F807F807F807F7F7F7F7E | ||
- | 0:915:7F7F8080807F7F7F7F807F7F7F7F7E7E777E7F7F7E7F7F7F807F7F807F807E807F7F7F7F7F7F7F7F7F807F7F7F7F7F80807F7F80807F807F80807F7F807F807F807F7F7F807F7F7F7F7F80807F7F7F7F7F807F7F7F80807F7F7F7F7F7F807F7F807F7F7F7F7F7F7F807F7F7F807F7F7F7F | ||
- | 0:915:7F807F807F7F80807F807F7F7F7F7F7E787E7E7F7F7F807F7F7F7F80808080807F7F7F7F8080807F8080807F808080807F80807F807F80807F7F7F8080807F7F807F7F80807F7F807F8080808080807F7F80807F80807F7F7F807F7F7F7F7E807F7F7F7F807F807F7F7F7F807F7F7F7F7F | ||
- | 0:915:7F7F807F807F7F7F7F7F7F7F807F7F7E777E7E7E7F7F7F7F7E7F7E807F8080807F7F7F7F807F7F7F80807F807F8080807F7F7F7F7F7F7F7F7F80807F7F7F7F7F807F7F80807F7F7F7F807F7F8080807F7F7F807F7F80807F7F80807F7F7F7F7F807F808080807F7F7F807F7F807F807F7E | ||
- | 0:915:7F807F7F807F807F7F8080807F7F7E7F777E7E7F7F7F7F80807F7F8080807F8080807F7F7F7E8080807F807F7F80807F7F807F7F807F8080807F7F7F80807F7F807F807F7F7F807F7F7F8080807F807F7F7F80807F7F7F7F7F7F807F7F7F7F807F7F7F7F7F7F80807F7F807F807F7F7F7F | ||
- | 0:915:7F7F807F7F7F7F7F7F7F7F7F7F7E7F7F777E7E7F7E7F7F7F807F7F7F807F808080808080807F7F7F80807F7F807F80807F7F7F7F807F807F7F8080807F7F807F807F7F7F7F7F7F7F807F7F7F807F807F80807F807F7F7F7F807F7F7F7F8080807F7F7F7F7F7F7F7F7F7F7F7F807F807F7F | ||
- | 0:915:7F7F7F7F807F807F80807F7F7F7F7E7E777E7E7E7F7F7F7F7F807F7F807F807F7F80808080807F80807F7F8080807F807F7F807F7F7F7F7F7F80807F7F807F7F7F7F807F807F7F7F807F7F7F80807F8080807F7F7F807F7F80807F7F7F807F807F7F7F7F80807F7F80807F7F807F7F7F7F | ||
- | </code> | ||
- | |||
- | To stop a scan, simply enter CTRL-C value. | ||
- | </ifauth> |