exception for invalid data
read packet length and ID