User Tools

Site Tools


wiki:semtech

This is an old revision of the document!


cd ..SEMTECH company gives access to its LoRa libraries and tools across a Github.

 # cd ~/workdir/
 # git clone https://github.com/Lora-net/lora_gateway.git
 # git clone https://github.com/Lora-net/packet_forwarder.git
All the help you need is in the README file.

Configuration

The package configuration must be adapted to the platform.

- Patch the Github HAL v3.1.0 :

Patch the Github HAL v3.1.0 - loraMAC config - 27dBm capable gateways:

Download the following patch files to configure Lora-net/lora_gateway and Lora-net/packet_forwarder source code: kerlink_patch_hal_v3.1.0_27dbm.tar.gz

# tar -xzvf kerlink_patch_hal_v3.1.0_27dbm.tar.gz
# cd lora_gateway
# git reset --hard v3.1.0
# git apply Kerlink_lora_gateway_iot_station_27dbm_patch.patch
# cd ../packet_forwarder
# git reset --hard v2.1.0
# git apply Kerlink_packet_forwarder_iot_station_27dbm_patch.patch

For different configuration and debug activation, modify the file lora_gateway/libloragw/library.cfg and rebuild the HAL (lora_gateway directory) and test binaries (packet_forwarder directory)

Patch the Github HAL v3.1.0 - loraMAC config - 20dBm capable gateways:

Follow the instructions above with the following patch files:kerlink_patch_hal_v3.1.0_20dbm.tar.gz

- Patch the Github HAL v2.0.0 :

- Patch the Github HAL v1.6.0:

- Patch the Github HAL v1.5.0:

- Patch the Github HAL v1.4.0:

- Patch older versions:

Compilation

 # cd ~/lora_gateway/libloragw
 # make
/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi-gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_hal.c -o obj/loragw_hal.o -D LGW_PHY="\"native\"" -D DEBUG_HAL=0
/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi-gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_gps.c -o obj/loragw_gps.o -D DEBUG_GPS=0
/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi-gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_reg.c -o obj/loragw_reg.o -D DEBUG_REG=0
/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi-gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_spi.native.c -o obj/loragw_spi.o -D DEBUG_SPI=0
/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi-gcc -c -O2 -Wall -Wextra -Iinc -I. src/loragw_aux.c -o obj/loragw_aux.o -D DEBUG_AUX=0
/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi-ar rcs libloragw.a obj/loragw_hal.o obj/loragw_gps.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o
/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi-gcc -O2 -Wall -Wextra -std=c99 -Iinc -I. tst/test_loragw_spi.c obj/loragw_spi.o -o test_loragw_spi -lrt
/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi-gcc -O2 -Wall -Wextra -std=c99 -Iinc -I. tst/test_loragw_reg.c obj/loragw_reg.o obj/loragw_spi.o -o test_loragw_reg -lrt
/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi-gcc -O2 -Wall -Wextra -std=c99 -Iinc -I. tst/test_loragw_hal.c obj/loragw_hal.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o -o test_loragw_hal -lrt
/opt/toolchains/arm-2011.03-wirma2/bin/arm-none-linux-gnueabi-gcc -O2 -Wall -Wextra -std=c99 -Iinc -I. tst/test_loragw_gps.c obj/loragw_gps.o obj/loragw_hal.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o -o test_loragw_gps -lrt

Firmware V2.x: Test applications

USB installation

network installation

Use the Windows tool WinSCP or scp linux command to copy the dota file into /mnt/fsuser-1/dota/. Reboot the system with the reboot command. The LoRa Station will enter in update mode (several reboots will occur). The applicative binaries will be installed to mnt/fsuser-1/. The upgrade is over when the session Login is accessible (you can follow the upgrade with the debug probe).

Demo LoRa Packet forwarder: Ready-to-use package

You can have a quick overview of the full LoRa chain with the following binaries and LoRa Mote end-points: LoRaMote_demonstration_user_guide_v1.2.pdf

For firmware v2.x (LoRa 27dBm or previous hardware 20 dBm)
[1].LoRa Motes (end point)
Documentation, drivers and application software are available on semtech's web page: LoRaMote_End-device_Test_Application
The LoRa Mote user guide is available here: User_Guide_LoRaMote_STD.pdf

LoRa Motes configuration can be modified thanks to a PC application tool, connected via USB to the mote.
LoRa Motes are programmed with the binary LoRaMacApp.hex, which enables the DFU flashing mode. The LoRaMote firmware, and PC tools are available here : LoRaMacConfigSetup-v0.3.RC24.4.exe
This is the version currently in use in the LoRa Mote delivered by Kerlink.

Since 2015_08_10, a new version is available LoRaMoteConfigSetup-v1.0.exe

[2].LoRa IoT Station applicative software update (dota file)
Install the packet forwarder started automaticaly by the LoRa Station at boot time:

  1. Copy the file dota_demo_gps_loramote_hal_v3.1.0_station_iot_27dbm.tar.gz and the produsb.sh script (produsb.zip extract produst.zip, and use produsb.sh) in the root directory of a USB stick formated in FAT32 and USB 1.1 compatible. For previous hardware (LoRa 20dBm) : dota_demo_gps_loramote_hal_v3.1.0_station_iot_20dbm.tar.gz
  2. Plug the USB stick on the gateway USB slot.
  3. Wait for the reboot of the Station (can be watched with the debug probe). The upgrade is done when you can login to the shell.
  4. Check the file produsb.log is generated on the USB stick. Edit the file and check the upgrade is OK : “WirmaV2 0x080xxxxx updated” (command : cat /mnt/sda1/produsb.log).
  5. The LoRa modem and the binary gps_pkt_fwd are launched automatically by the embedded Knet Agent at startup (refer to the documentation).
  6. Previous installed softwares using the “manifest.xml” mechanism are removed during the installation, but are backuped in /mnt/fsuser-1/backup_<timestamp>.tar.gz. You can extract it if you want to use it again.

- Dota demo_gps_loramote HAL v3.0.1:

- Dota demo_gps_loramote HAL v2.0.0:

The command “ps ww” will show that /bin/sh /mnt/fsuser-1/demo_gps_loramote/gps-pkt-fwd.sh and ./gps_pkt_fwd are running.


Binary version can be checked:
launch manualy /mnt/fsuser-1/demo_gps_loramote/gps_pkt_fwd
and check the version Version: 2.0.0 and compilation options

[root@Wirgrid_0806xxxx demo_gps_loramote]# /mnt/fsuser-1/demo_gps_loramote/gps_p
kt_fwd
*** GPS Packet Forwarder for Lora Gateway ***
Version: 1.4.1
*** Lora concentrator HAL library version info ***
Version: 2.0.0; Options: native sx1301 sx1257 eu868 kerlink_868_27dbm lora_mac;

For firmware v1.x:

wiki/semtech.1444321618.txt.gz · Last modified: 2017/07/21 13:53 (external edit)