This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
wiki:loraloc_hal-3.3.0 [2017/07/18 14:41] mpe old revision restored (2017/07/07 16:25) |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== iBTS Semtech HALV2 v3.3.0 - Instructions ====== | ||
| - | ===== Compilation ===== | ||
| - | |||
| - | To simplify deployment on board, Kerlink provides a script called **build_package.sh**. It must be modified to set correct the toolchain according to the platform used: Change the YOCTO_TOOLCHAIN_ENV variable at begin of this script.\\ | ||
| - | This tool script make all tools and prepare an OPKG package including them. | ||
| - | |||
| - | To compile it, please use following commands: | ||
| - | <code bash> | ||
| - | cd lora_gateway_v2 | ||
| - | source /opt/toolchains/loraV2/environment-setup-cortexa9hf-neon-poky-linux-gnueabi | ||
| - | make SPI_HOST=imx | ||
| - | </code> | ||
| - | |||
| - | \\ \\ | ||
| - | ===== Usage ===== | ||
| - | |||
| - | The main modification in tools since HALv1 is the '-d' argument. \\ | ||
| - | As this HAL is mainly designed to handle multiple RF chips, this optional argument allows to specify which spidevice to use. | ||
| - | |||
| - | Kerlink provides a automatic discovery script at startup to handle correctly plugged boards. | ||
| - | |||
| - | By default, if a WAN module is provided, loraloc modules are mapped from slot 2. | ||
| - | |||
| - | So to use tools with this Loraloc module, please specify on tool's command-line **-d /dev/slot/2/spidev0**. \\ | ||
| - | For example: | ||
| - | <code bash> | ||
| - | ./pkt_logger -d /dev/slot/2/spidev0 | ||
| - | </code> | ||
| - | |||
| - | \\ \\ | ||
| - | ===== Configuration ===== | ||
| - | |||
| - | Due to architecture, the configuration is quite more complex than HAL v1: | ||
| - | * **board** keyword means "Loraloc board" or "LoraLoc module" (one "board" by slot) | ||
| - | * each board includes 2 **chip** configs (i.e. sx1301 configs) | ||
| - | * each board includes 2 **rfchain** configs | ||
| - | |||
| - | \\ | ||
| - | ==== Chip config ==== | ||
| - | |||
| - | This configuration must include SX1301 channel config. \\ | ||
| - | These channels can be configured through "sx1301ar_conf_chan" function. \\ | ||
| - | Please note that this function takes as "channel number" the concatenation of chip number and channel. (see function description in sx1301ar_hal.h) | ||
| - | |||
| - | \\ | ||
| - | ==== RF Chain config ==== | ||
| - | |||
| - | This configuration is mainly used to correct RSSI and TX power values. \\ | ||
| - | Corresponding calibration values are set in Production by Kerlink and extracted during board startup in ///tmp/calib_loraloc.json// file. | ||
| - | |||
| - | Thanks to ad9361 transceiver chip. We are able to get +-0.25 dBm precision on real TX power. \\ | ||
| - | As a consequence, up to 32 power steps (tx_lut) are generated and calibrated in production. | ||
| - | |||
| - | \\ | ||
| - | ==== JSON Config ==== | ||
| - | |||
| - | The JSON configuration file has been improved to simplify software by using JSON tables. \\ | ||
| - | Indeed: | ||
| - | * The main Radio config object "SX1301_array_conf" is now a table to support multiple boards | ||
| - | * "rf_chain_conf" is also a 2-objects-sized table | ||
| - | * "SX1301_conf" is a 2-objects-sized table | ||
| - | * "tx_lut" is a variable table (up to 32 objects) | ||