Hello,
How is AT+PING=<ip> implemented? I could not find the implementation on github.
Also, is the time reported by ping in microseconds? I would assume so.
Thank you
AT+PING Command
Re: AT+PING Command
Postby tilz0R » Sat Dec 26, 2015 9:12 pm
AT+PING command should return +PING=70 instead of +70, because this +70 is not "unique" string like "+PING" would be at start and that makes hard code response without polling mode.
If you do it in code like this:
1. send AT+PING..
2. Wait + sign and grab ms value
3. return from function according to "OK" or "ERROR"
then this can block your execution on target MCU because this can take time.
If you do like that:
1. send AT+PING..
2. Return from function
3. Do other job and periodically check response
4. If received string starts with "+PING", parse number and call user event function.
Hope you understand that.
If you do it in code like this:
1. send AT+PING..
2. Wait + sign and grab ms value
3. return from function according to "OK" or "ERROR"
then this can block your execution on target MCU because this can take time.
If you do like that:
1. send AT+PING..
2. Return from function
3. Do other job and periodically check response
4. If received string starts with "+PING", parse number and call user event function.
Hope you understand that.
Who is online
Users browsing this forum: No registered users and 2 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.