How to correctly display the recieved finger print template using at console?

Sorry for any errors,
I am trying to obtain fingerprint template from fingerprint sensor R307, i am using Serial1 to interface R307.
my data length of sensor is set to 256 bytes,
so i should get 2 frames of data with 11 bytes extra for each packet which will constitute <header, address,type,size,checksum>
thus i should get 534 bytes out which 512 bytes are filtered in “Show fingerprint template” example in ada fruit fingerprint library, which i think have some wrong algorithm.
So how to correctly store and display these packets , is my doubt???

Untitled_0.txt (3.58 KB)

debuglatest 256 256.txt (1.28 KB)

To make it easier to provide help please read Read this before posting a programming question and post your code here following the instructions

SOMETHING is wrong. Your output contains 1020 hex characters (510 bytes) but doesn't first show the "510 bytes read." or "Decoding packet..." messages that the sketch is supposed to display after reading the data.

I was worried about memory space so I moved two local data arrays into globals:

Sketch uses 6906 bytes (21%) of program storage space. Maximum is 32256 bytes.
Global variables use 1675 bytes (81%) of dynamic memory, leaving 373 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur.

I think you are crashing due to insufficient ram.

firstly i was performing it on UNO but then i switched to MEGA so , the memory available on mega should be enough to correctly display fingerprint template on console?

Running on a Mega should alleviate the memory worries. What does the output look like now?