Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse the response SMS #43

Open
vadimkkkk opened this issue Apr 18, 2021 · 1 comment
Open

Parse the response SMS #43

vadimkkkk opened this issue Apr 18, 2021 · 1 comment

Comments

@vadimkkkk
Copy link

vadimkkkk commented Apr 18, 2021

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants