I am trying to write a Bash script to receive a file of known number of Bytes (we are talking about 1MB) of binary data from a serial device connected to my embedded device.