Kerlink and Class-C Device - no transmitted values

Hi all,

I operate a kerlink wirnet with the LoRa gateway bridge installed directly on the gateway. Statistic data are received every 120s and are forwarded to the MQTT broker

On the Kerlink:

INFO[0734] gateway: received udp packet from gateway     addr="127.0.0.1:43080" protocol_version=2 type=PushData
INFO[0734] gateway: stat packet received                 addr="127.0.0.1:43080" mac=7276ff000b03084d
INFO[0734] backend: publishing packet                    qos=2 topic=gateway/7276ff000b03084d/stats
INFO[0734] gateway: sending udp packet to gateway        addr="127.0.0.1:43080" protocol_version=2 type=PushACK

On the Broker

gateway/7276ff000b03084d/stats {"mac":"7276ff000b03084d","time":"2018-03-19T12:12:32Z","rxPacketsReceived":1,"rxPacketsReceivedOK":0,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}

As far as I understood, this is the correct behavior. Now, I want to send a command (AQE=) to my Class-C Comtac Device:

From the Application to the LoRa App Server:

application/1/node/70b3d5fffe297207/tx {
      "reference": "actd1238888",                  
      "confirmed": true,                        
      "fPort": 10,                              
      "data": "AQE="                            
}

From the LoRa Server dedicated to the gateway:

gateway/7276ff000b03084d/tx {"token":25551,"txInfo":{"mac":"7276ff000b03084d","immediately":true,"frequency":869525000,"power":14,"dataRate":{"modulation":"LORA","spreadFactor":12,"bandwidth":125},"codeRate":"4/5","iPol":null,"board":0,"antenna":0},"phyPayload":"oCsMbgCARAAKKPvrsO19"}

As far as I see, the topic seems to be correct (refer to the stats above), doesn’t it?

Nevertheless, the LoRa Gateway Bridge does not react on this message … there is no log-entry at all on the LoRa Gateway Bridge (log level 5).

Any idea, why the LoRa Gateway Bridge does not react on this topic?

Are you using MQTT authentication / authorization? Is the LoRa Gateway Bridge authorized to subscribe to the .../tx topic?

Hi!

Thanks for your reply. It is a plain out-of-the-box mosquitto. I cross-checked by using mosquitto_sub and had no problem subscribing the topic.
Can I activate another debug level on the bridge?

Br
Michael

The info level should already show you the message.

I am facing simmiliar issue. But in my case lora-gateway-bridge is also acting and this is the log which is printed in console

INFO[0015] backend: packet received                      topic=gateway/b827ebfffecd5e00/tx
INFO[0015] gateway: sending udp packet to gateway        addr="127.0.0.1:58688" protocol_version=1 type=PullResp
INFO[0020] gateway: received udp packet from gateway     addr="127.0.0.1:41441" protocol_version=1 type=PullData
INFO[0020] gateway: sending udp packet to gateway        addr="127.0.0.1:41441" protocol_version=1 type=PullACK
INFO[0020] backend: packet received                      topic=gateway/b827ebfffecd5e00/tx
INFO[0020] gateway: sending udp packet to gateway        addr="127.0.0.1:41441" protocol_version=1 type=PullResp
INFO[0025] gateway: received udp packet from gateway     addr="127.0.0.1:58688" protocol_version=1 type=PullData
INFO[0025] gateway: sending udp packet to gateway        addr="127.0.0.1:58688" protocol_version=1 type=PullACK
INFO[0030] gateway: received udp packet from gateway     addr="127.0.0.1:41441" protocol_version=1 type=PullData
INFO[0030] gateway: sending udp packet to gateway        addr="127.0.0.1:41441" protocol_version=1 type=PullACK
INFO[0032] gateway: received udp packet from gateway     addr="127.0.0.1:42524" protocol_version=1 type=PushData
INFO[0032] gateway: stat packet received                 addr="127.0.0.1:42524" mac=b827ebfffecd5e00
INFO[0032] backend: publishing packet                    qos=0 topic=gateway/b827ebfffecd5e00/stats

But i am not able to recieve any message on Node. I am using class C node - “Semtech LoRa SX1278 RF Front-end Module DRF1278F - Dorji” and using IBM Lmic ttn Example code.
Can u suggest about what is going wrong? or which library should i use for my arduino based lora node. For recieving messages.

Hm, I am really stuck on this - I completely disabled the kerlink-internal firewall and I am still not seeing any tx-packets.

Now, I moved the lora gateway bridge directly to the mqtt-broker and connected the kerlink spf via udp to the new location of the bridge.

Well, the behaviour is unchanged:
The Kerlink correctly forwards all messages to the lgb and the lgb forwards it to the mqtt broker:

INFO[0000] starting LoRa Gateway Bridge                  docs="https://docs.loraserver.io/lora-gateway-bridge/" version=2.3.2
INFO[0000] backend: TLS config is empty                 
INFO[0000] backend: connecting to mqtt broker            server="tcp://127.0.0.1:1883"
INFO[0000] gateway: starting gateway udp listener        addr="0.0.0.0:1700"
INFO[0000] backend: connected to mqtt broker            

INFO[0003] gateway: received udp packet from gateway     addr="192.168.1.11:42765" protocol_version=2 type=PushData
INFO[0003] gateway: rxpk packet received                 addr="192.168.1.11:42765"     data="ADJGUkFEshgAWiIAAACyGABxQi3Wz/4=" mac=7276ff000b03084d
INFO[0003] gateway: sending udp packet to gateway        addr="192.168.1.11:42765" protocol_version=2 type=PushACK
INFO[0003] backend: publishing packet                    qos=2 topic=gateway/7276ff000b03084d/rx

But when I sent a request, the lgb does not react on tx-messages. To prove the correct behaviour, I started mosquitto_sub on the same host in parallel:

mosquitto_sub -h 192.168.1.8 -t \gateway/7276ff000b03084d/tx -v

And on mosquitto_sub, I see the tx-messages:

gateway/7276ff000b03084d/tx {"token":41405,"txInfo":{"mac":"7276ff000b03084d","immediately":true,"frequency":869525000,"power":14,"dataRate":{"modulation":"LORA","spreadFactor":12,"bandwidth":125},"codeRate":"4/5","iPol":null,"board":0,"antenna":0},"phyPayload":"oCsMbgCAUgAKySmOyfYU"}

So, why is the lgb not reacting on the topic gateway/7276ff000b03084d/tx? Any ideas?

Can u paste your config file here.?

The lora-gateway-bridge.toml is currently configured with the following paramters:

[general]
log_level = 5
[packet_forwarder]
udp_bind = "0.0.0.0:1700"
skip_crc_check = false
[backend.mqtt]
server="tcp://127.0.0.1:1883"
username=""
password=""
ca_cert=""
tls_cert=""
tls_key=""
uplink_topic_template="gateway/{{ .MAC }}/rx"
downlink_topic_template="gateway/{{ .MAC }}/tx"
stats_topic_template="gateway/{{ .MAC }}/stats"
ack_topic_template="gateway/{{ .MAC }}/ack" 
qos=2
clean_session=true
client_id=""

@him Your configuration looks right. Can u Try installing latest version of bridge again… It may help…

@him did you succeed with this?