SX1301/SX1302/SX1308 LoRaWAN concentrator driver. For devices:
- Armbian Platform: HP0A, HP0C, LPS8v2.
- Raspberry Pi Platform: HP0D
- OpenWrt Platform: LG308, LG308N, LPS8, LPS8N, LIG16, DLOS8, DLOS8N.
- sudo apt install -y libsqlite3-dev
- sudo apt install -y libftdi1-dev
###Compile:
- Git Clone from: git clone https://github.com/dragino/dragino_fwd_src.git
- Enter into dragino_fwd_src/src, type command: ./hp0z-make-deb.sh c the option 'c' mean you will compile for HP0C the option 'd' mean you will compile for HP0D
- Wait until you get the *.deb package
- Run 'dpkg -i' for install
Reference Link: Armbian Compile Instruction
download the source: git clone https://github.com/dragino/dragino_fwd_src.git
make if with sx1301/sx1308
cd dragino_fwd_src/src
make clean
./hp0z-make-deb.sh r1
make if with sx1302
cd dragino_fwd_src/src
make clean
./hp0z-make-deb.sh r2
dpkg -i draginofwd-($board)_($version).deb
$board will be rasp301 or rasp302 $version will be xxxx-xx-xx , which is current date.
See OpenWrt compile instruction
file: fwd/src/pkt_serv.c remove element from dn_list when size biger than 16 remove element from dn_list when devaddr duplicated change the loop time of read_dir
file: fwd/src/mac-header-decode.c fix bug of macMsg elemen
file:fwd/inc/gwcfg.h change struct serv_net_s addr leng to 256
version:dragino-fwd-2.3 file:/fwd/src/pkt_serv.c 1.Fix typo for Class C downlink in ABP mode. 2.Fix FCNT initiate issue for Manually ABP Downlink.
Move all SX1302 src for different platform (hp0x series, pi series, lgxxx series.) to the same github hp0x use new station, lg0x series use old station
Fix MAX definition error in utilities and parson.h
add support sx1301 chips
- add cfg-301 cfg-302 cfg-308
- fix sx1301 chips error
- change compile option: if raspberry, build with sx1301 use option 'r1', build with sx1302 use 'r2'
- change gps time's log level to timesync in fwd.c
- add PATH env in postinst script
- remove i2c link in postinst script
- copy sx1302 include file loragw_i2c.h to loragw_i2c.h.rasp when using board hp0d or rasp
- add config option: td_enabled(ture/false), time_diff(+-number) strings format (3 chars).
- lbt function add
configure:
- lbt_tty_enabled : true/false
- lbt_tty_path : example /dev/ttyUSB4
- lbt_tty_baude(option) : default 9600
- lbt_rssi_target(option) : default -85
- lbt_scan_time_ms(option) : default 6ms
- lbt test utily: lbt_test_utily useage: lbt_test_utily /dev/ttyUSB4 923200000 This will be send AT command to ttyUSB4, 10 loops every 1ms run lbt_test_utily display how to useage.
usb module can only make 60ms scan loop.
- localtime zone
confiure:
- td_enabled : true/false if td_enabled, will be attach 3 characters to payload ( example: +08 / -08 )
- fix bug can't get counter time form concentor when use sx1302
- fix bug rssi and snr not equal when macdecode: change rssi_snr[18] to rssi_snr[32]
- add cfg-30? configure file to config path
- add time section for rxpkt when timer_ref by system (semtech_serv.c)
- fix bug of fport filter (65536 to 0)
- chan fwd VERSION to 2.1.0
- custom downlink add fport control
- chan fwd VERSION to 2.7.5
- basicstaion version upgrade to V2.0.6 (openwrt platform)
- fix sx1302 gps GRMC parser error
- log display of SF
- custom down option of bw
- fix bug: can't remove pkt on rxpkts link post sem to all service when pkt size more than 8 post sem after receive pkt?
- add sem lock when getrxpkt
- fix bug: ( stack over ) fwd/src/mac-header-decode.c change payloaden size 480 to 512
- change insert rxpkgs times, use cur_hal_time
- add MAX_RXPKTS_LIST_SIZE
1.station: timeline is not correct of downlink, because OS is not RT system, remove time conditon when EU8686.
- fix network state , fwd can pull ack set state to online.
- station add AS_923 Handle
- station add EU865 Handle
- for sx1301 station, disable lbt by default
- set I2C_DEVICE env for i2c device, if can't connet i2c device , ignore and use virtual data continue.
- gpst fix, (Quect L76)not support ubx, disable gps time.
- ghost thread which can receive package from udp port
- option set pull_interval on semtech protol pull
- customer download for opts option (mac command support)
- net status records in sqlite scheme (config with status_index)
- sqlite scheme optimize (fix: is locked message)
- add filter of fwd by nwkid (nwkid if prefix of devaddr)
- add config time_ref for gps, if true rxpkt time will reference from gps
- add pthread list for control pkt decode
- change rxpkt list for process simultan
- add struct 'serv_ct' pthread data
- configure pkt service as other service (local_conf.json)
- fix counter of packages (stats.c)
- 增加relay功能,网关可以将收到lora包通过接入的la66转发。 -- edit pkt_serv.c
GW as relay or has relay function add -- some config for relay ( GW.relay: 1. as_relay 2. has_relay 3. relay_tty_path 4. relay_tty_baude ) -- new file ( relay_serv.c )
1。更改init_sock时的回收bug,修改online/offline输出的频率。 2。增加delay 功能,当前网络状态如果是offline,将会在内存里缓存lora包(64个) 当网络转为online时,将缓存的包上发。
station 的问题: 1.时间漂移值过大 2. 会收到莫名的包导致下发失败(diid=0的包) 3. 下发abandon的问题 适当改动:1.修改station同步时间的阀值timesysnc.c: _MAX_DT 2. 跳过某些diid=0的包,因为这些是没有内容的包
在文件/var/tmp/station_status.log里输出station的online/offline状态 增加了stattion状态的持续输出和取消了fwd logread的颜色显示
found MIC not match ? 如果MIC不对称,继续解码。
添加fcnt_gap配置,配置这个参数可以调整fcnt的最大值.
pkt_service.c 发现一隐藏bug,接收到空包时解码导致出错。
修改mac-header-decode.c: Fctrl里的上发包fpending应为classB位符 semtech_serv.c: 打开beacon调试功能
修改pkt_serv.c semtech_serv.c里面关于macmsg处理的方法