in reply to CRC and Serial Port
My example may not fit your data structure exactly (I make no pretense to my pack()ing skills ;o), but I think it's something along the lines of what you want.my ($stx,$status1,$status2,$data1,$data2,$etx,$crc) = unpack("CCCa5a5CC", $data_received);
broquaint
Update: as Albannach kindly pointed out the template should be a5 and not 5a.
|
|---|