0xFF

New Member
Joined
Feb 10, 2020
Messages
1
Reaction score
0
Credits
0
Hello Forum,

Im over to work with a Commandline Application (from Texas Instruments) for a
embedded linux (e.g. ubuntu 16.4 LTS) on a ARM Devices, like
the Beaglebone Black - Board (alike to the Raspberry Pi).

This App got a Commandline Menu,
The Problem is, the timeslot to enter a command is very short, so a proper interaction
is not possible.
Cause Texas Instruments does not really got a solution for this problem - i will try to manipulate the Code
in a way, to enlarge the time slot to enter characters in the menu
by manipulating the init function of the Console in this way:


void initConsoleCmd(void) // INIT CONSOLE refer to *** attached Cod-File, Line 832 ***
{
struct termios term_attr;
/* set the terminal to raw mode */
tcgetattr(fileno(stdin), &term_attr);
term_attr.c_lflag &= ~(ECHO|ICANON);
term_attr.c_cc[VTIME] = 2;
//original.: 0
term_attr.c_cc[VMIN] = 2; //original.: 0
tcsetattr(fileno(stdin), TCSANOW, &term_attr);
}

... Now it was possible to Enter keys in the menu, but the application seems to halt in this stage,
still after entering 2 characters and pressing enter ... :-/

So the entered commond will be avaluated in this way ( refer the whole File in the appendix )


cmdBuff = getConsoleCmd(); // So Ok, here they take the entered Command, *** attached Cod-File, Line 529 ***

if(1 == ResetRspNeeded)
/*Onchip case*/
{
/* simulate the key stoke for fw update */
if((!cmdBuff) && (((1 == ResetRspRcvd) && (1 == ResetReqSent)) || 1 == ResetReqSendRetry))
{
cmdBuff = UpdateKeySim;
}
}
if(cmdBuff)
// Something in the Buffer .....
{
Csf_keys = cmdBuff[0];

if(Csf_keys == KEY_DEVICE_TYPE)
// And here the Evaluation of the entered command
{
// ..... and so on, refer to the attached code File , Line 545

So the Question is, what could I do to change this behaviour ?

I hope You can give me Please some suggestions ...
Kind Regards,
Dirk
 

Attachments

  • csf_linux.txt
    106 KB · Views: 860

Members online


Top