CIPSENDBUF Buffer Size
-
- Posts: 28
- Joined: Fri Jun 09, 2017 10:17 pm
CIPSENDBUF Buffer Size
Postby Jan Kijonka » Wed Jun 14, 2017 2:54 am
Hi,
I would like to transmit some measurement data of signals in real-time. The signals are sampled with a 1 ms sampling period. I would like to send 2048 Bytes (one data packet) every 500 ms. Has the ESP8266 a double buffer (2x 2048 Bytes) ? The idea is to fill one buffer countinuously (with 1 ms period) until it is full, then switch the buffers and countinuously fill the second buffer without any lost of samples. The prepared filled buffer should be signalized by some flag and it should be transmitted after reception of some data request from a router. The Modem should be in sleep mode between the 500 ms intervals to save the battery life.
Thank you for your suggestions of implementation.
I would like to transmit some measurement data of signals in real-time. The signals are sampled with a 1 ms sampling period. I would like to send 2048 Bytes (one data packet) every 500 ms. Has the ESP8266 a double buffer (2x 2048 Bytes) ? The idea is to fill one buffer countinuously (with 1 ms period) until it is full, then switch the buffers and countinuously fill the second buffer without any lost of samples. The prepared filled buffer should be signalized by some flag and it should be transmitted after reception of some data request from a router. The Modem should be in sleep mode between the 500 ms intervals to save the battery life.
Thank you for your suggestions of implementation.
Re: CIPSENDBUF Buffer Size
Postby pratik » Fri Jun 16, 2017 10:14 pm
You can do this with the AT commands. It is much more efficient to just send 1460 bytes at a time though.
Doesn't your host MCU have enough RAM to store 2048 bytes?
This is also possible to implement using nonOS or RTOS SDK for the ESP8266 or by adding custom AT commands.
Doesn't your host MCU have enough RAM to store 2048 bytes?
This is also possible to implement using nonOS or RTOS SDK for the ESP8266 or by adding custom AT commands.
-
- Posts: 28
- Joined: Fri Jun 09, 2017 10:17 pm
Re: CIPSENDBUF Buffer Size
Postby Jan Kijonka » Sat Jun 17, 2017 4:53 am
I can reserve up to 6 kB of data RAM on my host MCU for the buffers. Because the data transmittion via UART takes a quite long time, it would be better to have the EPS in a sleep mode during this proccess. Is it possible to send data into the ESP8266 during a sleep mode and start the Wi-Fi modem after the data packet is completed ? I would like to have the ESP in full active mode for the shortest time possible to save the battery life.
Re: CIPSENDBUF Buffer Size
Postby pratik » Thu Jul 06, 2017 10:07 pm
This will not make too much of a difference though. You can turn RF off after getting data but then the re-connection time is too much anyway. So you could just wake the ESP up and do the transaction and then go for deep sleep. Note that the idle power consumption of the radio is not too much, so UART time will not make a huge difference.
Who is online
Users browsing this forum: No registered users and 4 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.