CIPSENDBUF Buffer Size

Jan Kijonka
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.

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

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.
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

Jan Kijonka
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.

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

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.
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

Who is online

Users browsing this forum: No registered users and 2 guests