skorokithakis / A6lib

An ESP8266/Arduino library for communicating with the A6 GSM module. ⛺
MIT License
127 stars 49 forks source link

Parse the response SMS #43

Open vadimkkkk opened 3 years ago

vadimkkkk commented 3 years ago

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 3 years ago

I'm afraid I haven't used this in years and don't remember, sorry!