Hello,
I am trying to build single channel gateway out of
- nodemcu (ESP8266)
- Dragino LoRa Bee module ( XBee form factor module: http://www.dragino.com/products/lora/item/109-lora-bee.html )
pins’ description: http://wiki.dragino.com/index.php?title=Lora_BEE
- Jaap Braam’s Lua LoRaWAN Gateway ( GitHub - JaapBraam/LoRaWanGateway: A LoRaWan Gateway in LUA )
Connection to TTN works fine (gateway is “connected”).
Radio part is the problem
I have two different, verified nodes transmitting on 868.1 SF7 for tests.
When Lua gateway is configured for “ALL” spread factors it does not receive any packets.
statistics() shows zero received packets even when I am sure that the packets were “available” (they were successfully received by another single channel gateway).
When I change the Lua gateway to listen to “SF7” only it panics when a packet is received.
Configuration looks like this:
CONFIG.print()
Configuration
GW_HOSTNAME “jploragw03”
GW_NTP_SERVER “nl.pool.ntp.org”
GW_ROUTER “router.eu.thethings.network”
GW_PORT “1700”
GW_FREQ 868100000
GW_BW “BW125”
GW_SF “SF7”
GW_LAT “0.0”
GW_LON “0.0”
GW_ALT 0
GW_NSS 0
GW_DIO0 1
GW_DIO1 2
Statistics:
statistics()
Statistics
Uptime 0 days, 0 hours, 25 minutes, 56 seconds
Memory free 13552 bytes
Rx packets 0
Rx packets OK 0
Rx timeouts 0
Rx forwarded 0
Tx packets 0
Tx packets sent 0
Ack ratio 99.1% (359/362)
Now I transmit from one of my nodes (868.1 SF7, BW125) and Lua gateway panics and reboots:
PANIC: unprotected error in call to Lua API (?:0: attempt to get length of a nil value)
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 26844, room 16
tail 12
chksum 0x6c
ho 0 tail 12 room 4
load 0x3ffe8000, len 2192, room 12
tail 4
chksum 0xa3
load 0x3ffe8890, len 136, room 4
tail 4
chksum 0xa6
csum 0xa6
Œâ[03]ì[13]ƒgä›rƒûg|ì[0C]d[04]ldl [03]Œâ{“lÄl[1B]þ
NodeMCU custom build by frightanic.com
branch: master
commit: 22e1adc4b06c931797539b986c85e229e5942a5f
SSL: false
modules: bit,cjson,encoder,file,gpio,net,node,rtctime,sntp,spi,tmr,uart,wifi
build built on: 2017-04-18 19:36
powered by Lua 5.1.4 on SDK 2.0.0(656edbf)
got ip 192.168.40.38 255.255.255.0 192.168.40.1
Gateway ID 5CCF7FF42FD9947C
ntp synced using 213.154.229.24
2017-08-11 19:47:35 GMT
start singleSF detector on SF7
router ip: 52.169.76.203
ntp synced using 95.46.198.21
Now, I do not get any “Unknown radio” error messages any longer (since I uploaded and compiled the Lua scripts correctly) but still it looks like a problem with the nodeMCU ↔ LoRa Bee problem.
I checked my connections several times as good as I could with LoRa Bee description.
Maybe someone can help with those questions:
-
Is LoRa Bee compatible with the requirements of Lua scripts (the chip on the module is RF96)?
-
Is there a way to test the connection to the LoRa Bee module with a Lua code snippet? To verify that it works?
What module would you recommend instead of LoRa Bee (I would need something already assembled on a breakout board and with pins soldered :-))?
- What is “Ack ratio” in the statistics() output?