question

vijayc avatar image
vijayc asked Spirent_Admin edited

Serial connection error: OnTerminalConnClosedWaitingForResponse

We are using a serial connection.  
  
Our connection is suddenly getting closed with the following response.  
"Declare event 'OnTerminalConnClosedWaitingForResponse'"  
Could you please let us know where we can alter the response time so that  
it will wait for some time.  
iTestsession profileterminal
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KumarS avatar image
KumarS answered Spirent_Admin edited

Most likely cause of this problem is flow control. iTest by default will write to your serial port as fast as it can. You may want to set this setting in your session profile so that iTest sends these characters slowly to the device:

![alt text][1] [1]: /storage/attachments/1296-serial.PNG

serial.PNG (43.0 KiB)
2 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

vijayc avatar image vijayc commented ·
Yes, it works now.I set the interval to be 15 ms. When iTest tries to write to the serial port as fast as it can, the transmit buffer gets full and it throws a flag. Please let me know if this assumption is accurate.
0 Likes 0 ·
KumarS avatar image KumarS vijayc commented ·

Yes - that is correct. Once that flag is set (I cannot remember the name of the UART bit), the driver on the iTest side may be written to treat that as an error and close the serial port.

0 Likes 0 ·
Spirent_Admin avatar image
Spirent_Admin answered
Please set the Idle channel Interval in Completion property settings for the particular step as shown in the screenshot. ![alt text][1] [1]: /storage/temp/3471-3372-serial_step.png

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KumarS avatar image
KumarS answered ericnute converted comment to answer

Paul is correct in saying that this should never happen on a serial port session. What this error is indicating is that iTest sees the "serial port" go down while trying to read response from the serial port. This should never happen. You should make sure that the serial port on your machine is working properly using HyperTerminal.

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

venkatb avatar image venkatb commented ·

After opening an iTest serial session profile, if I type the commands manually, then it works.

When I use the captured version of the same procedure, then it gets disconnected after "setenv serverip".

 

Ex:

open t1 project://my_project/session_profiles/foo_serial.ffsp

command t1 setenv serverip 172.32.3.227

command t1 print

close t1

 

I have a bootloader prompt '=>' for these commands.

 

This works with a different serial utility such as picocom.

0 Likes 0 ·
PaulD avatar image
PaulD answered ericnute converted comment to answer

I don't believe that this should ever happen on a serial port connection.  I wonder if there is something strange with your serial port configuration so that our code is getting an error trying to connect or to send to the serial port.  I'd start by using a vanilla terminal emulation program (hyperterm, putty, etc.) and see if that seems to be working correctly.  Then I'd suggest taking a look at the serial port properties to make sure they are set up correctly in iTest -- and consistent to what they are set up in your other terminal program.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.