Gateway TLG8411V1 User Manual V1.0.0
28
July 2020
var device = new Buffer(4);
for (var i=0; i<4; i++) {
device[i] = lorawan_packet[4-i];
}
var packet = lora_packet.fromWire(lorawan_packet);
var NwkSKey = new Buffer("2b7e151628aed2a6abf7158809cf4f3c",
'hex');
if(lora_packet.verifyMIC(packet, NwkSKey)){
var AppSKey = new Buffer("2b7e151628aed2a6abf7158809cf4f3c",
'hex');
var dec = lora_packet.decrypt(packet, AppSKey,
NwkSKey).toString('hex');
var msg = {
devaddr: device.toString('hex'),
data: dec,
fport: packet.getFPort(),
counter: packet.getFCnt(),
freq: raw.freq,
datr: raw.datr
};
debug_print(JSON.stringify(msg));
}
}
}
Содержание TLG8411V1
Страница 1: ...Gateway TLG8411V1 User Manual V1 0 0 July 2020 ...
Страница 36: ...Gateway TLG8411V1 User Manual V1 0 0 35 July 2020 Figure 4 2 Execution of Parsing LoRaWAN Packet in LoRaScript ...
Страница 52: ...Gateway TLG8411V1 User Manual V1 0 0 51 July 2020 8 Revisions 8 1 V1 0 0 First Release Version ...