PD.: in the comparing method, in the function if() the arrays are properly typed but the forum text editor erases the 'i' between brackets. password, active and packetBuffer
Because you failed to post the code correctly. Modify your post. Select the code. Select the icon with the # sign. Save the changes.
Why are you breaking out of the compare loop as soon as a match is found? You should assume that the passwords match, and set a flag to false and break out when a mis-match is found, not a match.
1,2,3,5 does not match 1,2,3,4, but you never compare 2 to 2, 3 to 3, or 5, to 4, because 1 matched 1.
char arrays are to hold characters. 1, 2, 3, and 4 are numbers, not characters. uint8_t would be a better choice for the array type(s). Or, perhaps what is really needed is '1', '2', '3', and '4' in the array.