Hi. I was writing a script to read/write to a serial port connection and I am having a lot of problems with it. The device is a terminal device (ie. cisco router) and I want to use this tcl script to issue commands and get back the output from those commands. I am connected at a baudrate of 115200. I read that if I'm using a fast connection speed, I should increase the buffer size.
So, I open the serial connection using "open com1: r+". Then I use the fconigure command like "fconfigure $conSock -mode 115200,n,8,1 -blocking 0 -buffering line -sysbuffer 100000". Thing is, when I issue a command on the device which has a lot of output and I issue a "gets", I get an error. I'm not 100% sure how to use the serial connection properly or if the options in my fconfigure are correct. If anyone could help me understand how the input.output to the device is buffered and actually works or point me towards a good document about information on this, it would be much appreciated.
Thanks in advance.
So, I open the serial connection using "open com1: r+". Then I use the fconigure command like "fconfigure $conSock -mode 115200,n,8,1 -blocking 0 -buffering line -sysbuffer 100000". Thing is, when I issue a command on the device which has a lot of output and I issue a "gets", I get an error. I'm not 100% sure how to use the serial connection properly or if the options in my fconfigure are correct. If anyone could help me understand how the input.output to the device is buffered and actually works or point me towards a good document about information on this, it would be much appreciated.
Thanks in advance.