Using TeraTerm with mbed

01 Jul 2011

Hi,

I try to setup TeraTerm to interact with mbed. I did everything according to the instruction from this link: http://mbed.org/cookbook/Interfacing-Using-RPC

I was using following setting: 8 bits, 1 stop bit, no parity (aka 9600-8-N-1) New-Line: Recive: LF, Transmit: CR+LF Terminal ID: VT100

Everything was fine. If I hit Enter key, the Teraterm will return all the available RPC command/object. But the problem is that I can not enter any command directly into TeraTerm screen, the only way I can send command to mbed is to right click mouse to pop up a "Clipboard confirmation" window, and I can enter a command there.

I want to enter command directly in TeraTerm screen to send to mbed, is there anyway? how should I configure to do that?

Thank you very much.

01 Jul 2011

Hi,

It seems you have it set up right if you can receive commands from the mbed. It took me a while to realise that commands you enter in via TeraTerm are not echoed back on the terminal. So you have to type it blind. Maybe you are making the same mistake?

01 Jul 2011

Hi,

To avoid typing blind, why not get mbed to echo what you send to it? I often use the following code in my test harnesses. It's crude but it works!

    char buf[120], *cp;

    printf("\x1B[2J");    //VT100 erase screen
    printf("\x1B[H");     //VT100 home
    printf("\Hello\n");
            
    while (1) {
        printf("> ");
        cp = buf;
        while ( (*cp++ = putchar(getchar())) != '\r') ;   //get a line of input
        *cp = '\0';                                       //terminate buffer
        printf("\n");
        //now process the input line

If you want TeraTerm to echo what you type, go to Setup Menu, Terminal and tick Local echo.

Finally, if you would like to be able to do line editing on your input, take a look at my program "Canonical Input Processing". http://mbed.org/users/paulg/programs/CanonicalInputProcessing/lq042x

Paul

06 Jul 2011

Thank you, Paul. I will give a try based on your suggestion.