RAK4631-LPWAN-Tracker

Hi,
I have donwloaded this from Github:

I have installed the source in Platform IO; changed the device EUI, the OTAA keys and the region to EU868 (on the lmh_init call).
It compile OK and uploads to the device OK.
IT attempts to join Chirpstack and this request reaches there:

------------------------------------------------------------
[
    {
        "uplinkMetaData": {
            "rxInfo": [
                {
                    "gatewayID": "3KYy//7ejfk=",
                    "time": "2021-05-24T09:35:22.447491Z",
                    "timeSinceGPSEpoch": "1305884141.447s",
                    "rssi": -29,
                    "loRaSNR": 10.5,
                    "channel": 2,
                    "rfChain": 1,
                    "board": 0,
                    "antenna": 0,
                    "location": {
                        "latitude": 52.90279,
                        "longitude": -2.7164,
                        "altitude": 112,
                        "source": "UNKNOWN",
                        "accuracy": 0
                    },
                    "fineTimestampType": "NONE",
                    "context": "6g5p7A==",
                    "uplinkID": "JIpTJxiIS1iR2pn5d22+Ug==",
                    "crcStatus": "CRC_OK"
                }
            ],
            "txInfo": {
                "frequency": 868500000,
                "modulation": "LORA",
                "loRaModulationInfo": {
                    "bandwidth": 125,
                    "spreadingFactor": 8,
                    "codeRate": "4/5",
                    "polarizationInversion": false
                }
            }
        },
        "phyPayload": {
            "mhdr": {
                "mType": "JoinRequest",
                "major": "LoRaWANR1"
            },
            "macPayload": {
                "joinEUI": "70b3d57ed00201e1",
                "devEUI": "ac1f09fffe04615e",
                "devNonce": 38102
            },
            "mic": "559c7777"
        }
    }
]
-------------------------------------------------------------

But the chirpstack does not reply - so the join doesn’t complete.
I expect I’m doing something stupid, but I can’t work out what.

Thanks
Alan

Sorry for reformatting your post, but it was difficult to read.

On Chirpstack, do you have created an application and do you have added the device?

This tutorial is not for WisBlock, but it shows the principle steps (on Chirpstack) you have to do to register the device in an LoRaWAN server application.

Hi,
thanks for replying
Yes, the device is already set up from previous tests I was doing.
I have just tried it again, but rather than looking at the LORAWAN packets I looked at the device data and discovered this (6 times):
[
{
“type”: “error”,
“payload”: {
“applicationID”: “2”,
“applicationName”: “app”,
“deviceName”: “Tracker-2”,
“devEUI”: “rB8J//4EYV4=”,
“type”: “OTAA”,
“error”: “join-server returned error: response error, code: MICFailed, description: invalid mic”,
“fCnt”: 0,
“tags”: {}
}
}

Apparently I have an invalid mic??? I have no idea what it means by this.

Thanks
Alan

Found the problem.
Finger trouble entering the OTAA key
Sorry for wasting your time

Thanks again
Alan

1 Like

hi, can you explain a bit on how you solve this problem? cause i’m facing the same problem currently

The original posters problem was that the DevEUI, AppEUI and/or AppKey was different on the device and in the device on the LoRaWAN server application.

The keys and EUI’s must be identical on both the device and the server, on both the node and the server these values are MSB.

What exactly is your problem, what LoRaWAN region are you using, what gateway, what LoRaWAN server?
If you have logs from the device, from the gateway and from the LoRaWAN server, that would be very helpful.

1 Like

I’m using Chirpstack server with risinghf gateway. I use eu868 as my region and when i register the device in the application, the live data send was error and the lorawan frame only join request.

this is what device data shown in the dashboard

applicationID:"2"
applicationName:"RAK-WIRELESS-SENSOR-DATA-TEST"
deviceName:"RAK-SENSOR3"
devEUI:"ac1f09fffe******"
type:"OTAA"
error:"join-server returned error: response error, code: MICFailed, description: invalid mic"
fCnt:0
tags:
publishedAt:"2022-08-16T07:54:11.045745670Z"

lorawan frame :

frequency:868300000
modulation:"LORA"
bandwidth:125
spreadingFactor:12
codeRate:"4/5"
polarizationInversion:false
gatewayID:"b827ebfffe******"
time:null
timeSinceGPSEpoch:null
rssi:-102
loRaSNR:9.5
channel:1
rfChain:1
board:0
antenna:0
latitude:5.354621604121515
longitude:100.30097007751466
altitude:10
source:"UNKNOWN"
accuracy:0
fineTimestampType:"NONE"
context:"4g0zrA=="
uplinkID:"79e1d7d3-0115-4baf-9788-f3532edd5001"
crcStatus:"CRC_OK"
mType:"JoinRequest"
major:"LoRaWANR1"
joinEUI:"be7a0000000005d6"
devEUI:"ac1f09fffe0037d0"
devNonce:27099
mic:"70ef75ca"

some of it cannot be copied.