I am running a script which is given below,
sudo  hexdump -v -e '1/1 "%02x\n"' /dev/ttyUSB0  | Many Pipes | gawk '{ print strftime(":: %s"), $0 }'
Here the data is being hex dumped with timestamp and its given below,
:: 1461680718 ::ED.DATA
:: 1461680718 ::ED.DATA
:: 1461680718 ::ED.DATA
:: 1461680718 ::ED.DATA
:: 1461680718 ::ED.DATA
:: 1461680718 ::ED.DATA
:: 1461680719 ::ED.DATA
As you can see the time doesn't change for all the packets. I think that is because I am dumping the data rather than doing read line. Is there any way to script and make sure I get different value for each packet (in seconds)