Hi all,
I have been exploring the forums for some time and I notice a lot of similar posts, however none have yet to provide a solution.
I have used the LMIC library and altered it to be used in the espressif esp-idf V4.4, this was mostly in the HAL area with some minor changes required in other parts (such as removing PROGMEM) .
The problem is odd and I’m not sure how to approach it, I print all the value out before transmitting and the addresses appear to be fine.
I am getting the error MIC Mismatch, the same as described here.
Partial output from gateway here:
"payload": {
"m_hdr": {},
"mic": "fA5MzA==",
"join_request_payload": {
"join_eui": "E9B52C70414C5CA1",
"dev_eui": "7CDFA1414C5C5B5B",
"dev_nonce": "10AF"
}
},
"settings": {
"data_rate": {
"lora": {
"bandwidth": 125000,
"spreading_factor": 10
}
},
"coding_rate": "4/5",
"frequency": "916800000",
"timestamp": 4055932708
}
I am also getting a similar problem when using ABP.
I can see that the DevAddress is coming through fine yet it appears the AppSKey and NwkSKey might not be coming through (can’t determine from the gateway packets. Once again, these values get printed before sending and appear fine.
Output from an ABP packet on the gateway:
"data": {
"@type": "type.googleapis.com/ttn.lorawan.v3.UplinkMessage",
"raw_payload": "QKW9DSYAAAABSWVsbG8shcpiVGxkIYrH6WE=",
"payload": {
"m_hdr": {
"m_type": "UNCONFIRMED_UP"
},
"mic": "isfpYQ==",
"mac_payload": {
"f_hdr": {
"dev_addr": "260DBDA5",
"f_ctrl": {}
},
"f_port": 1,
"frm_payload": "SWVsbG8shcpiVGxkIQ=="
}
},
"settings": {
"data_rate": {
"lora": {
"bandwidth": 125000,
"spreading_factor": 7
}
},
"coding_rate": "4/5",
"frequency": "917000000",
"timestamp": 4209304516
},
Output from ABP device terminal:
Output from device terminal:
I (1846) lmic: Line 3007
I (1846) lmic: Line 3010
Address DVAADR: 260dbda5
Address NWKSKEY: 67-4d-b3-6d-63-9c-99-50-bb-d1-8e-9-ed-22-d7-66
Address APPSKEY: 44-93-b6-80-9a-8a-92-1d-b9-42-a-f3-e1-3c-2-c7
Settings
34308: engineUpdate, opmode=0x808
EV_TXSTARTI (1856) radio: Line 431
I (1856) radio: Line 384
I am using a Pygate 8 channel gateway which is setup on the TTN V3 Stack
Other details:
Using AU915 FSB2
MCU is esp32-s2
Had trouble using the default AES encryption that was in the LMIC library, used the advice given here to get it working.
I hope I’m not doubling up (theres so many similar posts!), but I’ve spent many hours searching these forums.
Any help is appreciated.
Cheers,
Dylan