How to: Simulating keystroke inputs in shell to an app running in an embedded target

Posted by fzkl on Stack Overflow See other posts from Stack Overflow or by fzkl
Published on 2010-12-28T11:04:15Z Indexed on 2010/12/28 11:54 UTC
Read the original article Hit count: 272

I am writing an automation script that runs on an embedded linux target.

A part of the script involves running an app on the target and obtaining some data from the stdout. Stdout here is the ssh terminal connection I have to the target.

However, this data is available on the stdout only if certain keys are pressed and the key press has to be done on the keyboard connected to the embedded target and not on the host system from which I have ssh'd into the target. Is there any way to simulate this?

Edit: Elaborating on what I need -

I have an OpenGL app that I run on the embedded linux (works like regular linux) target. This displays some graphics on the embedded system's display device. Pressing f on the keyboard connected to the target outputs the fps data onto the ssh terminal from which I control the target.

Since I am automating the process of running this OpenGL app and obtaining the fps scores, I can't expect a keyboard to be connected to the target let alone expect a user to input a keystroke on the embedded target keyboard. How do I go about this?

Thanks.

© Stack Overflow or respective owner

Related posts about bash

Related posts about shell