2021-11-18 02:33 AM
I am having a problem with this line. When i use sprintf to send command but in this command have "", so this line is error. I want to some advice and solution to this.
Thanks
Solved! Go to Solution.
2021-11-18 05:22 AM
Double quotes within strings need to be escaped. You need to add a backslash before them.
sprintf(cmd, "AT+QCGDEFCONT=\"IP\",\"v-internert\"\r\n");
2021-11-18 03:30 AM
try to use below.
sprintf(cmd, "AT+QCGDEFCONT=/"IP/",/"v-internert/"\r\");
2021-11-18 04:35 AM
Thank you very much, i have try this but it seem isn't correct too, this below is error code
2021-11-18 05:22 AM
Double quotes within strings need to be escaped. You need to add a backslash before them.
sprintf(cmd, "AT+QCGDEFCONT=\"IP\",\"v-internert\"\r\n");
2021-11-18 06:46 AM
Thank you very much. I have understanded.