I am trying to build single channel gateway out of
1) nodemcu (ESP8266)
2) 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
3) Jaap Braam's Lua LoRaWAN Gateway ( https://github.com/JaapBraam/LoRaWanGateway )
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:
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
ho 0 tail 12 room 4
load 0x3ffe8000, len 2192, room 12
load 0x3ffe8890, len 136, room 4
NodeMCU custom build by frightanic.com
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 126.96.36.199
2017-08-11 19:47:35 GMT
start singleSF detector on SF7
router ip: 188.8.131.52
ntp synced using 184.108.40.206
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:
1) Is LoRa Bee compatible with the requirements of Lua scripts (the chip on the module is RF96)?
2) 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 :-))?
3) What is "Ack ratio" in the statistics() output?