in reply to Re: Timing issue while accessing serial port
in thread Timing issue while accessing serial port
Thanks a lot.
1) I have used HyperTerminal to check the command response behavior between PC and the device. And it is same as expected.
2) As per my understanding the are_match("rsp1", "rsp2") is used to check the "rsp1" or "rsp2" pattern in the incoming data from the serial port. I had taken the are_match("rsp1","rsp2") as it is from the example given in Win32::SerialPort documentation as standard syntex for using are_match, as i want only single pattern to be matched that is "CorrRsp" i thought i will use second parameter as "" (null), I did not use "\n" or "\r\n" because if "CorrRsp" is not received then the script will look for "\n" as the required pattern and once it gets "\n" it will come out of loop and i don't want that to happen. If i have misunderstood something regarding the are_match function please let me know.
3) I have not used lookclear because i want to print the data received before the pattern which is stored in $gotit. If i clear the buffer then i will not able to print the data. If i misunderstood something or if there is any other way to print the data received till the pattern is matched then please let me know.