Quote:
Expectation:
Tag UID: 0B A5 56 D3
but I've got a random ID Tag instead
Random ID Tag:
D3 Tag UID: 0B A5 56 D
3 Tag UID: 0B A5 56
This is not random !
You start reading with what remains in buffer from previous reading. The random reading at beginning of line is the end of previous tag.
You need to understand that a
serial port is slow, and you may need to way for data to reach the computer.
You need to add an understanding of received data in your code to detect either a start or an end of tag.