User Tools

Site Tools


wiki:semtech

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:semtech [2015/07/21 17:28]
ghi
— (current)
Line 1: Line 1:
-SEMTECH company gives access to its LoRa libraries and tools across a [[https://​github.com/​Lora-net/​lora_gateway|Github]]. 
-<code sh> 
- # cd ~/workdir/ 
- # git clone https://​github.com/​Lora-net/​lora_gateway.git 
- # git clone https://​github.com/​Lora-net/​packet_forwarder.git 
-</​code>​ 
-All the help you need is in the README file. 
-===== Configuration ===== 
-The package configuration must be adapted to the platform. \\ 
  
-- Patch the Github HAL  v2.0.0 : 
- 
-**27dBm capable gateways**\\ 
-- Patch the Github HAL  **v2.0.0** - loraMAC config - 27dBm capable gateways:\\ 
-\\ 
-Download the following patch files to configure Lora-net/​lora_gateway and Lora-net/​packet_forwarder source code:​{{:​wiki:​kerlink_patch_hal_v2.0.0_loramac_27dbm.tar.gz|}} 
-<code sh> ​ 
-# tar -xzvf kerlink_patch_hal_v2.0.0_loramac_27dbm.tar.gz 
-# cd lora_gateway 
-# git reset --hard 45be5ff 
-# git apply lora_gateway_v2.0.0_kerlink_lora_iot_station_27dbm.patch 
-# cd ../​packet_forwarder 
-# git reset --hard v1.4.1 
-# git apply packet_forwarder_v1.4.1_kerlink_lora_iot_station_27dbm.patch 
-</​code>​ 
- 
-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) 
-\\ 
-\\ 
-**20dBm capable gateways**\\ 
-- With previous LoRa Station hardware revision (20dBm capable):\\ 
- 
-Follow the instructions above and only modify the value of CFG_BRD in libloragw/​library.cfg. (validated on HAL v2.0.0, not yet on v3.0.1). 
-<code sh> 
-#       ​kerlink_868 ​                    ​Kerlink LoRa 868MHz gateway 
-#       ​kerlink_868_27dbm ​  ​Kerlink LoRa 868MHz gateway with 27dBm capability 
-CFG_BRD=kerlink_868 
-</​code>​ 
-\\ 
-On your PC, into your development directory:​\\ 
-<code sh> ​ 
-cd lora_gateway 
-sed -i -e '/​CFG_BRD/​ s/​kerlink_868_27dbm/​kerlink_868/'​ libloragw/​library.cfg 
-</​code>​ 
- 
-++++- Patch the Github HAL  v1.6.0:| 
-Download the following patch files to configure Lora-net/​lora_gateway and Lora-net/​packet_forwarder source code:​{{:​wiki:​kerlink_patch_hal_v1.6.0.tar.gz|}} 
-<code sh> ​ 
-# tar -xzvf kerlink_patch_hal_v1.6.0.tar.gz 
-# cd lora_gateway 
-# git reset --hard v1.6.0 
-# git apply lora_gateway_v1.6.0_kerlink_lora_iot_868MHz.patch 
-# cd ../​packet_forwarder 
-# git reset --hard v1.4.1 
-# git apply packet_forwarder_v1.4.1_kerlink_lora_iot.patch 
-</​code>​ 
-++++ 
- 
-++++- Patch the Github HAL  v1.5.0:| 
- 
-Download the following patch files for Lora-net/​lora_gateway:​{{:​wiki:​kerlink_patch_hal_v1.5.0.tar.gz|}} 
-<code sh> ​ 
-# cd lora_gateway 
-# git reset --hard v1.5.0 
-# git apply kerlink_LoRaIoTStationV1_custo_HAL_v1.5.0_lora_gateway.patch ​ 
-# cd ../​packet_forwarder 
-# git reset --hard v1.3.0 
-# git apply kerlink_LoRaIoTStationV1_custo_HAL_v1.3.0_packet_forwarder.patch 
-</​code>​ 
-++++ 
- 
-++++- Patch the Github HAL v1.4.0:| 
- 
-Download the following patch files for Lora-net/​lora_gateway and Lora-net/​packet_forwarder:​ 
-{{:​wiki:​kerlink_patch_halv1.4.tar.gz|}} 
-<code sh> ​ 
-# cd lora_gateway 
-# git apply kerlink_LoRaIoTStationV1_custo_HALv1.4_lora_gateway.patch ​ 
-# cd ../​packet_forwarder 
-# git apply kerlink_LoRaIoTStationV1_custo_HALv1.4_packet_forwarder.patch 
-</​code>​ 
-++++ 
- 
-++++- Patch older versions:| 
- 
-Makefile update for Lora-net/​lora_gateway **v1.3.0**: ​ 
- 
-<​diff>​ 
-diff --git a/Makefile b/Makefile 
-index 5afee5d..ac97c2d 100644 
---- a/Makefile 
-+++ b/Makefile 
-@@ -1,6 +1,6 @@ 
- ### Environment constants ​ 
-  
--CROSS_COMPILE := 
-+CROSS_COMPILE :​=/​opt/​toolchains/​arm-2011.03-wirma2/​bin/​arm-none-linux-gnueabi- 
- ​export 
-  
- ### general build targets 
-@@ -19,4 +19,4 @@ clean: 
- ​ $(MAKE) clean -e -C util_spi_stress 
- ​ $(MAKE) clean -e -C util_tx_test 
-  
--### EOF 
-\ No newline at end of file 
-+### EOF 
-diff --git a/​libloragw/​Makefile b/​libloragw/​Makefile 
-index 9d5660b..2aed6fc 100644 
---- a/​libloragw/​Makefile 
-+++ b/​libloragw/​Makefile 
-@@ -14,7 +14,7 @@ CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I. 
- ### library.cfg configuration file processing 
-  
- ifeq ($(CFG_SPI),​native) 
--  CFG_SPI_MSG := Linux native SPI driver (/​dev/​spidev0.0) 
-+  CFG_SPI_MSG := Linux native SPI driver (/​dev/​spidev32766.0) 
-   ​CFG_SPI_OPT := CFG_SPI_NATIVE 
- else ifeq ($(CFG_SPI),​ftdi) 
-   ​CFG_SPI_MSG := FTDI SPI-over-USB bridge using libmpsse/​libftdi/​libusb 
-@@ -187,4 +187,4 @@ test_loragw_hal:​ tst/​test_loragw_hal.c libloragw.a 
- ​test_loragw_gps:​ tst/​test_loragw_gps.c libloragw.a 
- ​ $(CC) $(CFLAGS) -L. $< -o $@ $(LIBS) 
-  
--### EOF 
-\ No newline at end of file 
-+### EOF 
-diff --git a/​libloragw/​library.cfg b/​libloragw/​library.cfg 
-index 5751cb5..3630e4c 100644 
---- a/​libloragw/​library.cfg 
-+++ b/​libloragw/​library.cfg 
-@@ -2,10 +2,11 @@ 
-  
- ### SPI interface to the concentrator ### 
- # Accepted values: 
--#​ native Linux native SPI driver (/​dev/​spidev0.0) 
-+#​ native Linux native SPI driver (/​dev/​spidev32766.0) 
- #​ ftdi FTDI SPI-over-USB bridge using libmpsse/​libftdi/​libusb 
-  
--CFG_SPI= ftdi 
-+CFG_SPI= native 
-  
- ### Concentrator chip ### 
- # Accepted values: 
-diff --git a/​libloragw/​src/​loragw_spi.native.c b/​libloragw/​src/​loragw_spi.native.c 
-index 6a9b64d..96beaef 100644 
---- a/​libloragw/​src/​loragw_spi.native.c 
-+++ b/​libloragw/​src/​loragw_spi.native.c 
-@@ -53,7 +53,7 @@ Maintainer: Sylvain Miermont 
- #​define READ_ACCESS 0x00 
- #​define WRITE_ACCESS 0x80 
- #​define SPI_SPEED 8000000 
--#define SPI_DEV_PATH "/​dev/​spidev0.0"​ 
-+#define SPI_DEV_PATH "/​dev/​spidev32766.0"​ 
-  
- /* -------------------------------------------------------------------------- */ 
- /* --- PUBLIC FUNCTIONS DEFINITION ------------------------------------------ */ 
- 
-</​diff>​ 
- 
-Lora-net/​lora_gateway __before__ **v1.3.0** ​ 
-<​diff>​ 
-diff --git a/​libloragw/​Makefile b/​libloragw/​Makefile 
-index 2b91fa8..31a533b 100644 
---- a/​libloragw/​Makefile 
-+++ b/​libloragw/​Makefile 
-@@ -2,7 +2,7 @@ 
- ​include library.cfg 
-  
- # constant symbols 
--CROSS_COMPILE= 
-+CROSS_COMPILE=/​opt/​toolchains/​arm-2011.03-wirma2/​bin/​arm-none-linux-gnueabi- 
- ​CC=gcc 
- ​CFLAGS=-O2 -Wall -Wextra -Iinc -I. 
- ​C99FLAGS=-O2 -Wall -Wextra -std=c99 -Iinc -I. 
-diff --git a/​libloragw/​library.cfg b/​libloragw/​library.cfg 
-index 0e8c742..0787e91 100644 
---- a/​libloragw/​library.cfg 
-+++ b/​libloragw/​library.cfg 
-@@ -21,7 +21,7 @@ FLAG_GPS= -D DEBUG_GPS=0 
- # Pick one and comment the other(s) 
-  
- # FTDI SPI-over-USB bridge 
--LGW_PHY= ftdi 
-+#LGW_PHY= ftdi 
-  
- # Pcduino native SPI (Linux device in /dev) 
--#LGW_PHY= native 
-+LGW_PHY= native 
-diff --git a/​libloragw/​src/​loragw_spi.native.c b/​libloragw/​src/​loragw_spi.native.c 
-index cf8aa9d..6cde430 100644 
---- a/​libloragw/​src/​loragw_spi.native.c 
-+++ b/​libloragw/​src/​loragw_spi.native.c 
-@@ -53,7 +53,7 @@ Maintainer: Sylvain Miermont 
- #​define READ_ACCESS ​           0x00 
- #​define WRITE_ACCESS ​  0x80 
- #​define SPI_SPEED ​             8000000 
--#define SPI_DEV_PATH ​  "/​dev/​spidev0.0"​ 
-+#define SPI_DEV_PATH ​  "/​dev/​spidev32766.0"​ 
-  
- /* -------------------------------------------------------------------------- */ 
- /* --- PUBLIC FUNCTIONS DEFINITION ------------------------------------------ */ 
-</​diff>​ 
-++++ 
- 
-===== Compilation ===== 
-<code sh> 
- # 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 
-</​code>​ 
- 
-===== Firmware V2.x: Test applications ===== 
-Pre-compiled binaries are ready to install to the LoRa Stations, using the Kerlink "​dota"​ mechanism: 
-[[http://​wikikerlink.fr/​lora-station/​doku.php?​id=wiki:​station#​software_updates|software updates]] 
- 
-LoRa 27dBm dota file : {{:​wiki:​dota_test_hal_semtech_v2.0.0_loramac_27dbm_pktfwd_868mhz_wirgrid.tar.gz|}} 
- 
-LoRa 20dBm dota file : {{:​wiki:​dota_test_hal_semtech_v2.0.0_loramac_20dbm_pktfwd_868mhz_wirgrid.tar.gz|}} 
- 
- 
- 
-==== USB installation ==== 
-[[http://​wikikerlink.fr/​lora-station/​doku.php?​id=wiki:​station#​software_updates|software updates]] 
- 
-==== 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: 
-[[ftp://​wirgrid:​5Ta2n9s2w2@ftp.kerlinkm2mtechnologies.fr/​_kerlink/​LoRaMote_demonstration_user_guide_v1.2.pdf|LoRaMote_demonstration_user_guide_v1.2.pdf]] 
- 
-__**For firmware v2.x (LoRa 27dBm or previous hardware 20 dBm)**__ \\ 
-**LoRa Motes (end point)**\\ 
-LoRa Motes are programmed with the binary LoRaMacApp.hex available on semtech'​s web page: [[http://​iot.semtech.com/​resources/​LoRamac_test_app_page|LoRamac_test_app_page]] \\ 
-\\ 
-LoRa Motes configuration can be modified thanks to a PC application tool, connected via USB to the mote.\\ 
-[[http://​iot.semtech.com/​resources/​LoRamac_test_app_page/​files.xml?​action=download&​file=LoRaMacConfigSetup-v0.3.RC24.4.exe | LoRaMacConfigSetup-v0.3.RC24.4.exe]] \\ 
-\\ 
- 
-**LoRa IoT Station applicative software update (dota file)**\\ 
-Install the packet forwarder started automaticaly by the LoRa Station at boot time: 
-  - Copy the  file {{:​wiki:​dota_demo_gps_loramote_hal_v3.0.1_station_iot_27dbm.tar.gz|}} and the produsb.sh script ({{:​wiki:​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) : {{:​wiki:​dota_demo_gps_loramote_hal_v3.0.1_station_iot_20dbm.tar.gz|}} 
-  - Plug the USB stick on the gateway USB slot. 
-  - 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. 
-  - 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//​). 
-  - The LoRa modem and the binary gps_pkt_fwd are launched automatically by the embedded Knet Agent at startup (refer to the documentation). 
-  - 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 v2.0.0:| 
-{{:​wiki:​dota_demo_gps_loramote_hal_v2.0.0_station_iot_v2.1_27dbm.tar.gz|}} \\ 
-For previous hardware (LoRa 20dBm) : {{:​wiki:​dota_demo_gps_loramote_hal_v2.0.0_station_iot_v2.1_20dbm.tar.gz|}} 
- 
-++++ 
- 
-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 
-<​code>​ 
-[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; 
-</​code>​ 
- 
- 
-++++ For firmware v1.x: | 
- 
-Documentation 
-{{:​wiki:​loramote_demonstration_user_guide_v1.1.pdf|}} 
- 
-<note warning>​Major server upgrade on April the 17th, 2015. \\  
-UDP ports have changed too 1680 uplink and 1680 downlink (same port). \\  
-\\ 
-send this command : sed -i -e '​s/​178./​1680/'​ /​mnt/​fsuser-1/​demo_gps_loramote/​demo_global_conf.json 
-\\ 
-and reboot. 
-</​note>​ 
- 
-**Gateway binaries:** 
-  - Copy the {{:​wiki:​dota_demo_gps_loramote_hal_v1.5.0_station_iot_v1.1.tar.gz|}} file and the produsb.sh script ({{:​wiki:​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. 
-  - Plug the USB stick on the gateway USB slot. 
-  - 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. 
-  - 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//​). 
-  - The LoRa modem and the binary gps_pkt_fwd are launched automatically by the embedded Knet Agent at startup (refer to the documentation). 
-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. 
- 
- 
-**LoRaMote binary:** 
- 
-You can flash the following loraMote binary with a ST/link V2 JTAG probe. 
-  - Extract the archive {{:​wiki:​loramac-endpoint-fw-updater-iot.zip|}} 
-  - plug the JTAG cable to the Mote, and power the Mote with USB cable 
-  - Run the script LoRaMac-endpoint-fw-Updater-iot\LoRaMote\stlink-noadr-pgm_V3_specV2.bat 
-the Mote will send a packet every 30s, and you will see it on the Semtech server (documentation:​ loramote_demonstration_user_guide_v1.1.pdf above) ​ 
- 
- 
-<note important>​The Semtech server displays gateways that receive valid data from LoRa endpoints 
-If there is no LoRa traffic, the gateway won't be displayed </​note>​ 
- 
-<note important>​Demonstration applicative network connected softwares don't manage the dynamic network route modification. UDP sockets have to be closed and open again. Restart the applicative software if you switch the network route from ethernet to GPRS, or vice versa.</​note>​ 
- 
-<note important>​The Mote must be at least 5 meters away from the Station to ensure a correct connexion</​note>​ 
- 
-++++ 
wiki/semtech.1437492494.txt.gz · Last modified: 2017/07/21 13:53 (external edit)