Your code is completely wrong.
you binary AND an ascii val (48 or 49 if I remember correctly) with one bit in pos 5 (val is 16 and that produces TRUE for both zero or one ascii vslues). Xor is also questionable in this position.
pkt has eigther 48 or 49 (ie eighter b0110000 or b0110001)
what should the (b00010000 & b0110000) produce as output?
what should the (b00010001 & b0110000) produce as output?
I do not see how this code should work in arduino.
Try replacing the b00010000 in your code with b00000001 (or just 1 ;-))