This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TI-15.4-STACK-GATEWAY-LINUX-SDK: Why does the latest TI-15.4 gateway version go back?

Part Number: TI-15.4-STACK-GATEWAY-LINUX-SDK

I have noticed that the latest version of TI-15.4 stack gateway linux sdk is 3.30.01.02, but the version before is 4.40.00.03. Why does this version go back? Which is the recommended version for our customer?

BR,

Shuyang

  • Hi Shuyang,

    For customers using CC13x0 the recommended version is 3.30.01.02.

    For customers using CC13x2 or CC26x2 the recommended version is 4.40.00.03.

  • Hi Marie,

    Could you elaborate the difference of these 2 versions more specifically? I could not tell from the release notes.

    I'm support our customer on CC1310 and used 3.30.01.02 to verify the Turbo OAD, but met a problem as mentioned on E2E before:

    CCS/LAUNCHXL-CC1352R1: OAD Menu not visible on the Terminal - Sub-1 GHz forum - Sub-1 GHz - TI E2E support forums

    I tried with 4.40 and the issue was gone, it seems that the code is updated in 4.40, so I'm a little confused why 3.30.01.02 is recommended for CC1310.

    BR,

    Shuyang

  • Hi Shuyang,

    Yes, OAD is slightly different and not compatible between CC13x0 and CC13x2. That's why you need a different version of the Linux gateway SDK for each of them. 

    Hm, strange to hear that you're seeing a problem with Linux Gateway SDK 3.30.01.02. If you can post the details we can try to debug it together.

  • The problem is exactly as the E2E post described. The cmd prompt does not show up on the linux collector side with SDK3.30.01.02 and Ubuntu 20.04 x64, but it is fine in SDK4.40.00.03.

    I followed the post to compare the function getConsoleCmd() in csf_linux.c from the collector example in both SDKs and found some difference:

    In 3.30.01.02:

    char* getConsoleCmd(void)
    {
        static bool cmdComplete = false;
        static char cmd[256] = {0};
        static int ch;
        static uint8_t cmdIdx = 0;
    
        if(cmdComplete)
        {
            memset(cmd, 0, 256);
            cmdIdx = 0;
            cmdComplete = false;
        }
    
        /* read a character from the stdin stream without blocking */
        /*   returns EOF (-1) if no character is available */
        ch = getchar();
    
        if(ch != -1)
        {
             /* Discard non-ascii characters except new lines */
            if(ch == 0xa || (ch >= 0x20 && ch < 0x7F))
            {
                cmd[cmdIdx] = ch;
            }
    
            Board_Lcd_printf(DisplayLine_cmd, "cmd: %s", cmd);
            /* cmdIdx will wrap around for the 256Byte buffer */
            if(cmd[cmdIdx] == 0xa)
            {
                cmdComplete = true;
            }
            else
            {
                cmdIdx++;
            }
        }
    
        if(cmdComplete)
        {
            Board_Lcd_printf(DisplayLine_cmd, "CMD: %s", cmd);
            LOG_printf(LOG_APPSRV_MSG_CONTENT, "CMD: %s\n", cmd)

    and in 4.40.00.03:

    void getConsoleCmd(void)
    {
    static bool cmdComplete = false;
    static char cmd[256] = {0};
    static int ch;
    static uint8_t cmdIdx = 0;

    if(cmdComplete || feof(stdin) || ferror(stdin))
    {
    memset(cmd, 0, 256);
    cmdIdx = 0;
    cmdComplete = false;

    if (feof(stdin) || ferror(stdin))
    {
    clearerr(stdin);
    }
    }

    /* Block until new input is read from stdin */
    ch = getchar();

    /* Discard non-ascii characters except new lines. Note however special
    * charcaters like HOME, END, arrow keys, etc will still be read into the
    * buffer via its ASCII CSI sequence. Additional input handling will need
    * to be added later to parse and accept/reject those type of input values.
    */
    if(ch >= 0x20 && ch < 0x7F)
    {
    cmd[cmdIdx] = ch;
    cmdIdx < 254 ? ++cmdIdx : 254; // +1 for NULL storage
    }
    else if(ch == ASCII_DEL)
    {
    if (cmd[cmdIdx] == ASCII_NULL)
    {
    cmdIdx > 0 ? --cmdIdx : 0;
    }

    cmd[cmdIdx] = ASCII_NULL;
    }
    else if(ch == ASCII_LINEFEED)
    {
    cmdComplete = true;
    }

    Board_Lcd_printf(DisplayLine_cmd, "cmd: %s", cmd);

    if(cmdComplete)
    {
    LOG_printf(LOG_APPSRV_MSG_CONTENT, "cmd: %s\n", cmd);

    while(Csf_events & CSF_KEY_EVENT)
    {
    // Block if there is unprocessed input by the collector thread
    }
    processCommand(cmd);
    }
    }
    #endif // !defined(HEADLESS)
  • Hi Marie,

    I have verified that the demo in Linux SDK3.30.01.02 works fine with Ubuntu18.04 x64, but in 20.04 the cmd prompt in host_collector does not show up.

    Meanwhile, the SDK4.40.00.03 can work with Ubuntu20.04, and it seems to be improved in the way of implementing the getConsoleCmd() function. Would you help guide how to integrate the updated getConsoleCmd() into SDK3.30.01.02?

    Best regards,

    Shuyang

  • Hi Shuyang,

    I see. Sorry yes this is a known issue between Linux gateway SDK 3.xx and Ubuntu20.04.

  • Hi Marie,

    In SDK4.40 this issue was fixed, I tried to transplant the code for getChar() from SDK4.40 to SDK3.30, but the changes are a little more complicated than I expect. Simply replacing the code in getChar() failed to compile. I may need your team's help to fix it.

    BR,

    Shuyang