2021-11-18 2: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 5: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 3:30 AM
try to use below.
sprintf(cmd, "AT+QCGDEFCONT=/"IP/",/"v-internert/"\r\");
2021-11-18 4: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 5: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 6:46 AM
Thank you very much. I have understanded.