Page 1 of 1

+IPD return wrong number of bytes

Posted: Mon Oct 03, 2022 7:24 am
by AndreyVinogradov
Hi!

I'm having a problem with +IPD command. It shows wrong number of bytes to read. My ESP32 chip connected to MCU with UART
I'm trying to download a file about 20-30kB size. When I do that I receive:
+IPD,<ID>,<N>,<ip addr>,<port>:<N + M data bytes>
+IPD,<ID>,<N>,<ip addr>,<port>:<N + L data bytes>
...
+IPD,<ID>,<K>,<ip addr>,<port>:<K data bytes>

i.e. I receive more bytes, than I expect to. Usually N is 2920 and M/L is about 1500..2000 (didn't counted)

Same +IPD works fine on ESP8266:
+IPD,<ID>,<1460>,<ip addr>,<port>:<1460 data bytes>
+IPD,<ID>,<1460>,<ip addr>,<port>:<1460 data bytes>
...
+IPD,<ID>,<N>,<ip addr>,<port>:<N data bytes>

I'm using latest ESP-AT firmware from https://github.com/espressif/esp-at.git, master branch, commit e2fe74c8bbc40b9e5ba6c47ecdf871eda9673b23

Re: +IPD return wrong number of bytes

Posted: Mon Oct 17, 2022 2:53 am
by esp-at
Could you please try with latest esp-at version, i fixed a possible similar issue on this commit: https://github.com/espressif/esp-at/com ... 42b7ed9928

if this issue still exists, please provide detailed logs from AT command port and AT log port.
thanks
~

Re: +IPD return wrong number of bytes

Posted: Fri Oct 21, 2022 1:27 pm
by AndreyVinogradov
Hi, I updated esp-at project with last changes (commit 409a018561105) including commit 73fcea9f17518

I also updated esp-idf version:
branch:release/v4.3
commit:844624ead2b204639f6cedaaf0f31902373022f8

problem is still there. ESP32-Pico-v3-02 send more bytes than it declares in +IPD.
Can you please, tell me, how can I enable detailed logs on AT log port?

Re: +IPD return wrong number of bytes

Posted: Fri Oct 21, 2022 1:57 pm
by AndreyVinogradov
UPD: just restarted ESP32 chip, and successfully uploaded 29379 bytes file. Nice, will continue testing with larger files.
I noticed that this time +IPD splits data on different size chunks: 2920, 2115, 1440 and 2840 bytes.

Re: +IPD return wrong number of bytes

Posted: Fri Oct 21, 2022 2:12 pm
by AndreyVinogradov
UPD: controller restart was not an issued. It was logs, that I enabled in my console. I duplicate data from Rx/Tx AT-UART port to other Debug-UART Tx port to listen AT-commands work. And somehow it affects the AT-UART work. I don't have any ideas right now, but that Debug logs only slowing down controller work and that's all.

Re: +IPD return wrong number of bytes

Posted: Mon Oct 24, 2022 3:37 am
by esp-at
1. in your version, esp-at should use [ESP-IDF: 588436db47da792736dade1c21fcbf2c879456a4](https://github.com/espressif/esp-at/blo ... DF_VERSION), other than 844624ead2b204639f6cedaaf0f31902373022f8.
It may bring in potential unknown issues if use unmatched ESP-IDF version.

2. For listening AT UART works, should duplicate TX/RX to other Debug-UART Rx port, other Tx port, i think.