ignore packets we don't want to see for now
This commit is contained in:
14
src/mqtt.js
14
src/mqtt.js
@ -96,7 +96,7 @@ client.on("message", async (topic, message) => {
|
||||
}
|
||||
|
||||
const logKnownPacketTypes = false;
|
||||
const logUnknownPacketTypes = false;
|
||||
const logUnknownPacketTypes = true;
|
||||
const portnum = envelope.packet?.decoded?.portnum;
|
||||
|
||||
if(portnum === 3) {
|
||||
@ -299,7 +299,19 @@ client.on("message", async (topic, message) => {
|
||||
|
||||
else {
|
||||
if(logUnknownPacketTypes){
|
||||
|
||||
// ignore packets we don't want to see for now
|
||||
if(portnum === undefined // ignore failed to decrypt
|
||||
|| portnum === 1 // ignore TEXT_MESSAGE_APP
|
||||
|| portnum === 34 // ignore PAXCOUNTER_APP
|
||||
|| portnum === 65 // ignore STORE_FORWARD_APP
|
||||
|| portnum === 66 // ignore RANGE_TEST_APP
|
||||
){
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(portnum, envelope);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user