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.

CC3235MODSF: How to use quote in password for connecting AP?

Part Number: CC3235MODSF

Hello,

Our product developed based on the at commands example. (SDK 5.20.00.06)

Parameter error occurs when using "(quote) in a password string whether the entire password string in quotes or not.

Is there any way to use quote inside password string?

["at+wlanconnect="AP_SSID",,wpa_wpa2,"pass"word",,,
ERROR: number of parameters,0

["at+wlanconnect="AP_SSID",,wpa_wpa2,pass"word,,,
ERROR: number of parameters,0

Thanks,

Calvin

  • Apparently, it is not supported by the at command.

    To fix this you can do the following:

    - Add "<SDK-ROOT>/source/ti/net/utils/str_mpl.c" to the at_commands example project (it will override the implementation in the atcmd library).

    - In the str_mpl.c update the StrMpl_getNumVals with the following code:

    uint32_t StrMpl_getNumVals(char *src, char intraDelim, char termDelim, char *excludeDelim)
    {    
        uint32_t i = 0;
        char *token = src;
        char *last;
        uint8_t exclude = 0;
    
        /* case of terminate delimiter or no terminate delimiter */
        if ((*src == termDelim) || ((last = strchr(src,termDelim)) == NULL))
        {
            return 0;
        }
        i++;
    
        while (token < last)
        {   
            if (excludeDelim != NULL)
            {
                if ((*token == excludeDelim[0]) && (exclude == 0))
                {
                    exclude = 1;
                }
                else if ((*token == excludeDelim[1]) && (exclude == 1))
                {
                    if(*(token+1) == intraDelim)
                    {
                        exclude = 0;
                    }
                }
            }
            if ((*token == intraDelim) && (exclude == 0))
            {
                i++;
            }
            token++;
        }
    
        return i;
    }

    - Build and run the at_commands example.

    This should enable you to send parameters such as "pass"word"

    BTW. I'm not sure what is [" that appears as prefix to the "at+" in your query - you shouldn't send this, the message should start with: at+wlanconnect=.

  • Hi Kobi,

    [" is just part of terminal log.

    Thank you for your solution. It's very helpful.

    Thanks,

    Calvin