[SOLVED] RTT: [telnet] protocol: what does 0xff do?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] RTT: [telnet] protocol: what does 0xff do?

    I am playing with SEGGER RTT and it is pretty nice so far. I was testing its ability to do binary, which it handles very well until character 0xff. This appears to be an escape character of sorts. It outputs occasionally and sometimes consumes the next byte.

    What does it do?

    SEGGER_RTT_PutChar(0, 0xff);

    Cheers,
    Joe
  • Hi Joe,
    SEGGER_RTT_PutChar() writes the passed character into the corresponding buffer insider the SEGGER RTT Control Block.
    Looking into your device's memory at the location of the buffer, you should be able to see 0xFF at the expected position.

    Googling for an ASCII table reveals that 0xFF is the value for a "non-blocking space".

    Could you tell us how which tool you are using to display the data on host side?
    Could you provide us with a code snipped of the section where you are calling SEGGER_RTT_PutChar()?

    Best regards,
    Fabian
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/


    Or you can contact us via e-mail.
  • Fabian,

    Thank you kindly for your reply. It led me to double check my terminal, which was the issue. The Winsock was in telnet rather than raw mode.

    I was using RealTerm 2.0.0.70.
    sourceforge.net/projects/realterm/files/Realterm/2.0.0.70/

    telnet 127.0.0.1:19021

    Hex(space) Display mode.

    and the code was

    C Source Code

    1. char ch = 0;
    2. char ch_str[12];
    3. while (1) {
    4. sprintf(ch_str, "\n%03d:", ch);
    5. SEGGER_RTT_WriteString(0, ch_str);
    6. SEGGER_RTT_PutChar(0, ch++);
    7. vTaskDelay(5 / portTICK_RATE_MS);
    8. if (ch == 0) {
    9. vTaskDelay(100 / portTICK_RATE_MS);
    10. SEGGER_RTT_PutChar(0, 0x0a); // 0a
    11. SEGGER_RTT_PutChar(0, 0xff); // ff
    12. SEGGER_RTT_PutChar(0, 0xff); // 00
    13. SEGGER_RTT_PutChar(0, (buffer_index >> 8) & 0xff); // 01
    14. SEGGER_RTT_PutChar(0, buffer_index & 0xff); // nada
    15. vTaskDelay(100 / portTICK_RATE_MS);
    16. vTaskDelay(10 / portTICK_RATE_MS);
    17. SEGGER_RTT_WriteString(0, "\0xff\0xff\0xff\0xff\0x10");
    18. vTaskDelay(100 / portTICK_RATE_MS);
    19. vTaskDelay(10 / portTICK_RATE_MS);
    20. }
    Display All
    Cheers,
    Joe
  • Hi Joe,
    Good to hear that you are up and running again.

    We will consider this case as closed now.

    Best regards,
    Fabian
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/


    Or you can contact us via e-mail.