Join OTAA denied (RN2483)

Hi,
I’m trying to use this lora server, but i have several question. I think that i have all things right configured, but i don’t know if it’s real right. In LoRa App i can see the gateway activity so i assume that it’s right configured. In the “frames received per day” i just see a number in total received but with value CRC i just see ‘0’.

On the other hand i have some doubt in how i can configure the RN2983 module. I see here https://www.loraserver.io/lora-app-server/use/devices/ that i just need to configure devuei,appeui and appkey, but i get denied after “mac join otaa” command. Why? How cn i check what is wrong? How can i make debug?

Other question is: Where can i define the struct of data send by RN2483 i how i can transmitt data?

Thanks and sorry for don’t understand some things…
Rúben

The first point would be to validate if your gateway actually receive the join-request. Please see:

The RN2493 / RN2903 device just sends raw bytes, hex encoded. E.g. mac tx uncnf 1 AABBCC where AABBCC is a string of HEX encoded bytes. How you transform your sensor data into this HEX string is up to your application implementation.

1 Like

Thanks @brocaar. Finally all things works. I have a question. How can i get decode data, i send 0x1009 and when i subscribe “application/#” i get this:

application/2/node/xxxxxxxxxxxx/rx {“applicationID”:“2”,“applicationName”:“SoilMoistureSensor”,“deviceName”:“SoilSensor”,“devEUI”:“xxxxxxxx”,“rxInfo”:[{“mac”:“xxxxxxxxxxx”,“rssi”:-45,“loRaSNR”:7.5,“name”:“Gateway”,“latitude”:xxxxxx,“longitude”:-xxxxxx,“altitude”:xxxx}],“txInfo”:{“frequency”:868300000,“dataRate”:{“modulation”:“LORA”,“bandwidth”:125,“spreadFactor”:12},“adr”:false,“codeRate”:“4/5”},“fCnt”:0,“fPort”:1,“data”:“EAk=”}

How can i get 0x1009 back from this message?
Thanks

https://forum.loraserver.io/t/receiving-decrypted-device-data-frmpayload/501

Hi @brocaar.
You tell in this topic that data is encode in base64. But when i decode “EAk=” i don’t get 0x1009

Hello @ruben_gr,

Try this page: http://tomeko.net/online_tools/base64.php?lang=en
If you put EAk= you will get back 0x1009. Probably there is a problem with your decoder.

Thanks @glederer007, now works…
I tested this https://www.base64decode.org/

Hi,
I’m trying to send data to node. In server i see that data is received
application/2/node/xxxxxxxxxx/tx {“reference”:“abcd1234”,“confirmed”:true,“fPort”:10,“object”:{“timestamp”:1522266426}}

i make a function to decode json to bytes:

function Encode(fPort, obj) {
return [obj.timestamp>>24 && 0xFF,obj.timestamp>>16 && 0xFF,obj.timestamp>>8 && 0xFF,obj.timestamp && 0xFF];
}

In gateway i received this:
JSON down: {“txpk”:{“imme”:false,“tmst”:1503151427,“freq”:868.3,“rfch”:0,“powe”:14,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“ipol”:true,“size”:17,“data”:“YL6L1galBAADVwcAAQg8KbQ=”,“brd”:0,“ant”:0}}

I can’t decode the timestamp. I have more data in gateway than i’ve sent, why?

Thanks.

Now after several times of mac join otaa, i can’t connect anymore. Gives me always “denied”. I verify server and don’t receive any join request. I think that packet forwarder have several message in tx queue. This can cause join otaa error?

[UPSTREAM]

Mar 28 22:14:07 raspberrypi sh[443]: # RF packets received by concentrator: 0
Mar 28 22:14:07 raspberrypi sh[443]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Mar 28 22:14:07 raspberrypi sh[443]: # RF packets forwarded: 0 (0 bytes)
Mar 28 22:14:07 raspberrypi sh[443]: # PUSH_DATA datagrams sent: 1 (113 bytes)
Mar 28 22:14:07 raspberrypi sh[443]: # PUSH_DATA acknowledged: 100.00%
Mar 28 22:14:07 raspberrypi sh[443]: ### [DOWNSTREAM] ###
Mar 28 22:14:07 raspberrypi sh[443]: # PULL_DATA sent: 3 (100.00% acknowledged)
Mar 28 22:14:07 raspberrypi sh[443]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Mar 28 22:14:07 raspberrypi sh[443]: # RF packets sent to concentrator: 0 (0 bytes)
Mar 28 22:14:07 raspberrypi sh[443]: # TX errors: 0
Mar 28 22:14:07 raspberrypi sh[443]: # TX rejected (collision packet): 0.00% (req:21, rej:0)
Mar 28 22:14:07 raspberrypi sh[443]: # TX rejected (collision beacon): 0.00% (req:21, rej:0)
Mar 28 22:14:07 raspberrypi sh[443]: # TX rejected (too late): 0.00% (req:21, rej:0)
Mar 28 22:14:07 raspberrypi sh[443]: # TX rejected (too early): 0.00% (req:21, rej:0)
Mar 28 22:14:07 raspberrypi sh[443]: # BEACON queued: 0
Mar 28 22:14:07 raspberrypi sh[443]: # BEACON sent so far: 0
Mar 28 22:14:07 raspberrypi sh[443]: # BEACON rejected: 0
Mar 28 22:14:07 raspberrypi sh[443]: ### [JIT] ###
Mar 28 22:14:07 raspberrypi sh[443]: # SX1301 time (PPS): 259598991

Thanks

Hi again,
Someone could help with this? I’m testing the RN2483, so i make several times join otaa and now i get everytime denied answer.
Could be related to make many times mac join otaa command? In gateway log i can´t see anything about device.
Thanks

Hi,
I don’t receive otaa request on gateway_bridge:
Apr 21 13:30:39 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:30:39+01:00” level=info msg=“gateway: received udp packet from gateway” addr=127.0.0.1:54785 protocol_version=2 type=PushData
Apr 21 13:30:39 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:30:39+01:00” level=info msg=“gateway: stat packet received” addr=127.0.0.1:54785 mac=aa555a0000000101
Apr 21 13:30:39 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:30:39+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=127.0.0.1:54785 protocol_version=2 type=PushACK
Apr 21 13:30:39 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:30:39+01:00” level=info msg=“backend: publishing packet” topic=“gateway/aa555a0000000101/stats”
Apr 21 13:30:45 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:30:45+01:00” level=info msg=“gateway: received udp packet from gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullData
Apr 21 13:30:45 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:30:45+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullACK
Apr 21 13:30:55 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:30:55+01:00” level=info msg=“gateway: received udp packet from gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullData
Apr 21 13:30:55 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:30:55+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullACK
Apr 21 13:31:05 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:05+01:00” level=info msg=“gateway: received udp packet from gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullData
Apr 21 13:31:05 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:05+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullACK
Apr 21 13:31:09 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:09+01:00” level=info msg=“gateway: received udp packet from gateway” addr=127.0.0.1:54785 protocol_version=2 type=PushData
Apr 21 13:31:09 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:09+01:00” level=info msg=“gateway: stat packet received” addr=127.0.0.1:54785 mac=aa555a0000000101
Apr 21 13:31:09 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:09+01:00” level=info msg=“backend: publishing packet” topic=“gateway/aa555a0000000101/stats”
Apr 21 13:31:09 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:09+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=127.0.0.1:54785 protocol_version=2 type=PushACK
Apr 21 13:31:15 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:15+01:00” level=info msg=“gateway: received udp packet from gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullData
Apr 21 13:31:15 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:15+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullACK
Apr 21 13:31:25 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:25+01:00” level=info msg=“gateway: received udp packet from gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullData
Apr 21 13:31:25 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:25+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullACK
Apr 21 13:31:35 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:35+01:00” level=info msg=“gateway: received udp packet from gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullData
Apr 21 13:31:35 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:35+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullACK
Apr 21 13:31:39 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:39+01:00” level=info msg=“gateway: received udp packet from gateway” addr=127.0.0.1:54785 protocol_version=2 type=PushData
Apr 21 13:31:39 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:39+01:00” level=info msg=“gateway: stat packet received” addr=127.0.0.1:54785 mac=aa555a0000000101
Apr 21 13:31:39 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:39+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=127.0.0.1:54785 protocol_version=2 type=PushACK
Apr 21 13:31:39 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:39+01:00” level=info msg=“backend: publishing packet” topic=“gateway/aa555a0000000101/stats”
Apr 21 13:31:45 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:45+01:00” level=info msg=“gateway: received udp packet from gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullData
Apr 21 13:31:45 raspberrypi lora-gateway-bridge[467]: time=“2018-04-21T13:31:45+01:00” level=info msg=“gateway: sending udp packet to gateway” addr=127.0.0.1:47394 protocol_version=2 type=PullACK

Why this could happening? My RN2483 just gives me denied answer.

Thanks