Skip to content

Capture FULL contents being transmitted over-the-air? #1117

Answered by StevenCellist
K4KDR asked this question in Q&A
Discussion options

You must be logged in to vote

Easiest solution is to add the following in LoRaWAN.h e.g. at line 869:

    uint8_t k4kdrLen = 0;
    uint8_t k4kdrMsg[RADIOLIB_STATIC_ARRAY_SIZE] = { 0 };

And in LoRaWAN.cpp at line 1118:

  this->k4kdrLen = uplinkMsgLen - RADIOLIB_LORAWAN_FHDR_LEN_START_OFFS;
  memcpy(this->k4kdrMsg, &uplinkMsg[RADIOLIB_LORAWAN_FHDR_LEN_START_OFFS], this->k4kdrLen);

Then after an uplink you can retrieve it from your code:

  Serial.print("[LoRaWAN] Sending uplink packet ... ");
	int state = node.uplink(payload, payLen, fPort, isConfirmed);
	if(state == RADIOLIB_ERR_NONE) {
		Serial.println(F("success!"));
	} else {
		Serial.print(F("failed, code "));
		Serial.println(state);
	}
  uint8_t array[RADIOLIB_ST…

Replies: 12 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@StevenCellist
Comment options

Answer selected by K4KDR
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@jgromes
Comment options

@jgromes
Comment options

@K4KDR
Comment options

@jgromes
Comment options

@K4KDR
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@jgromes
Comment options

@MrSniffer
Comment options

@jgromes
Comment options

@MrSniffer
Comment options

@jgromes
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jgromes
Comment options

Comment options

You must be logged in to vote
1 reply
@jgromes
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants