question

jpotterf avatar image
jpotterf asked jpotterf edited

iTest - How do I a send the break character?

I have a DUT that requires a telnet BREAK to be sent to stop automatic booting. In linux telnet, I do this by Ctrl+] and "send brk" and it works fine. However, the telnet session in iTest doesn't seem to have a similar option.

Is it possible to send a break on a telnet session in iTest?

iTesttelnetbreak
10 |950

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

jpotterf avatar image
jpotterf answered jpotterf edited

The key here is that telnet has several in-band control commands that can be sent. Per RFC 854, there are two commands that I can potentially use to stop my autoboot process.

"Break (BRK)

This code is provided because it is a signal outside the USASCII set which is currently given local meaning within many systems. It is intended to indicate that the Break Key or the Attention Key was hit. Note, however, that this is intended to provide a 129th code for systems which require it, not as a synonym for the IP standard representation.

Interrupt Process (IP)

Suspend, interrupt, abort or terminate the process to which the NVT is connected. Also, part of the out-of-band signal for other protocols which use TELNET."

Neither of these can be executed as characters or data sent through the telnet session. iTest would have to provide explicit support for sending these commands, or convert some key sequence to the appropriate command.

Unfortunately, the suggestions thus far do not seem to have the desired effect.

10 |950

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

drakesh avatar image
drakesh answered drakesh edited

You can use Break action in a testcase and value as [char Ctrl-C] to break the automatic booting. Attached is the screenshot for your reference.

break.png

NOTE: For Break action in a testcase go to StepProperties -> Expand the SSH break Properties -> Completion -> Try with Completion criteria as AND or OR action. Its depends on device behaviour.

break1.png


break.png (6.0 KiB)
break1.png (18.6 KiB)
10 |950

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

Gerkman avatar image
Gerkman answered

Hi,

try to use command [char Ctrl-]]

It works fine with command [char Ctrl-C] to abort some running task or something like that.

It is possible that you will need to perform substitution for command field in step properties. In that case use \ (backslash) character to negate the ] (round bracket) character after the minus (see example [char Ctrl-\]] )

Hope this helps :)

Regards,
Ales

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.