Parse the response SMS
Opened this issue · 1 comments
vadimkkkk commented
Hello. Using this function
`sscanf(response.substring(respStart).c_str(), "+CMGR: "REC %s","%s",,"%s"\r\n", type, number, date);
sms.number = String(number);
sms.date = String(date);
// The rest is the message, extract it.
sms.message = response.substring(strlen(type) + strlen(number) + strlen(date) + 24, response.length() - 8);
`
I can't make out the answer
`
New message at index: 2
Command: AT+CMGR=2
1067 ms
+CMGR: "REC READ","+79833583606",,"2021/04/17,21:08:34+07"
Jdiekdnd djdkdkdo djdkkd
OK
number ==
date ==
message == djdkdkdo djdkkd
`
skorokithakis commented
I'm afraid I haven't used this in years and don't remember, sorry!