Set Multicast Address according to documentation
Create multicast group
Add the device to the multicast group
Get the app key from the device
calculate MC_ROOT_KEY = aes128_encrypt(APP_KEY, 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
calculate MC_KE_KEY = aes128_encrypt(MC_ROOT_KEY, 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
define MC_KEY_E as 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00
calculate MC_KEY = aes128_encrypt(MC_KE_KEY, MC_KEY_E)
define multicast sw_group1 as 01 ff ff ff
calculate MC_APP_S_KEY = aes128_encrypt(MC_KEY, 0x01 | McAddr | pad16)
calculate MC_NWK_S_KEY = aes128_encrypt(MC_KEY, 0x02 | McAddr | pad16)
copy and fill MC_APP_S_KEY AND MC_NWK_S_KEY TO chirpstack
set data-rate=2, downlink freq=923200000
McGroupSetupReq payload = 02 00 ff ff ff 01 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 00 00 00 00 ff 00 00 00
Downlink McGroupSetupReq command on port 200
Example:
Multicast group - Mpsepang, CyberSouth - Promect
MC_ROOT_KEY = aes128_encrypt(7868501CFC8011EDB14A6A96EE89E3F0, 00000000000000000000000000000000) = ea0e892f4bf2339d50d7a2740856156f
MC_KE_KEY = aes128_encrypt(ea0e892f4bf2339d50d7a2740856156f, 00000000000000000000000000000000) = e917988564a62332fd63dbac6d5b2a23
MC_KEY_E = 0102030405060708090a0b0c0d0e0f00
MC_KEY = aes128_encrypt(e917988564a62332fd63dbac6d5b2a23,0102030405060708090a0b0c0d0e0f00) = ec8a16f48ad60a329e3a0228b0deffe3
MC_APP_S_KEY = aes128_encrypt(ec8a16f48ad60a329e3a0228b0deffe3, 01ffffff010000000000000000000000) = 44d3b0da4ac544357841262880879c34
MC_NWK_S_KEY = aes128_encrypt(ec8a16f48ad60a329e3a0228b0deffe3, 02ffffff010000000000000000000000) = 0afaa0fa93030576035e6625d1ac3d23
Aes128 encryption url: AES Encryption – Easily encrypt or decrypt strings or files (online-domain-tools.com)
APPKEY 8888888888
Example:
JKR Selangor - Multicast group - Loranet-test-swiott-appkey88888888
MC_ROOT_KEY = aes128_encrypt(88888888888888888888888888888888, 00000000000000000000000000000000) = c67d007ccdebf237f2ec493869514eb2
MC_KE_KEY = aes128_encrypt(c67d007ccdebf237f2ec493869514eb2, 00000000000000000000000000000000) = 88a26da8bc797dd5455f924c254c1167
MC_KEY_E = 0102030405060708090a0b0c0d0e0f00 (supplier bagi)
MC_KEY = aes128_encrypt(88a26da8bc797dd5455f924c254c1167,0102030405060708090a0b0c0d0e0f00) = 4834ade669792b506db9f5be87b91386
MC_APP_S_KEY = aes128_encrypt(4834ade669792b506db9f5be87b91386, 01ffffff010000000000000000000000) = 22bf7534c1a09e5404150b7f2a33d23a (set chirpstack)
MC_NWK_S_KEY = aes128_encrypt(4834ade669792b506db9f5be87b91386, 02ffffff010000000000000000000000) = 086d82b0ae568f454538e3c9ccf618e2 (set chirpstack)