This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3235MODSF: How to receive larger data than 1460 bytes with at_commands example?

Part Number: CC3235MODSF

Hello,

I'm using "at_commands" example for developing a product. (simplelink_cc32xx_sdk_4_20_00_07)

While testing RX by TCP socket(CC3235 device <-> AP <-> Server(PC program)),

With high probability, the CC3235 module sends only 1460 bytes to main MCU even if server sends data larger than that.

With low probability, it sends all data to main MCU normally.

I sent "at+recv=0,0,5120" command to CC3235 module before receiving data.

Could you help me about this?

Thanks,

Calvin

  • Hi Calvin,

    I'm not sure I understand the problem. Is the problem that the CC3235 is not sending all the TCP data? Please confirm.

    Jesu

  • Hi Jesu,

    Very occasionally, the CC3235 send all of TCP data with the "OK\n\r" terminator to the main MCU,

    but most of the time, send only 1460 bytes with the "OK\n\r" terminator.

    I attached logs of the two cases. 

    rcv_logs.zip

    Thanks,

    Calvin

  • Hi Calvin,

    I'm still not sure what to look for here. 

    Could you provide steps to reproduce this? Maybe I will understand better this way.

    Jesu

  • Hi Jesu,

    The log is output from the main MCU, showing the at commands that the main MCU sends to the CC3235 module and the responses.

    In the "cc3235modsf_at_commands_rcvd-alldata.txt"(#1), the main MCU received all data 2768 bytes sent by a server from the CC3235,

    as you can see in the log of "+recv:0,0,2768".

    But in the "cc3235modsf_at_commands_rcvd-only1460.txt"(#2), the main MCU received just 1460 bytes from the CC3235,

    as you can see in the log of "+recv:0,0,1460". 

    Could you check the attached pcap log? I tried 4 times test and only succeed on the last try as the red box in below picture with #1 log.

    Other prior 3 times were same result with #2 log. Server tried to send 2768 bytes to the CC3235 but I'm not sure CC3235 received it all.

    2768bytes.zip

    Additionally,

    I found that it works when I increased the delay time 100ms to 500ms before sending "at+recv=0,0,5120" command to CC3235.

    The 2768 bytes data received very well. But, the problem occurred again if I change the sending data from server larger like 4900 bytes.

    In that case, I increased the delay time more but it's not working.

    Thanks,

    Calvin

  • Calvin,

    I'm having trouble understanding the main issue here. 

    The problem is sometimes when you send "at+recv=0,0,5120" to the CC3235 it only receives 1460 bytes?

    How are you sending commands to the CC3235?

    Jesu

  • Hi Jesu,

    Here's the answer to your question.

    The problem is sometimes when you send "at+recv=0,0,5120" to the CC3235 it only receives 1460 bytes?

    --> Yes

    How are you sending commands to the CC3235?

    --> The CC3235 and main MCU communicate via 2 wire UART.

    Additionally,

    I found 2 things need to be changed for receiving large data.

    1. I increased the definition value of ATCOMMANDS_EVENT_BUFFER_SIZE (1024)  to (1024*10) in at_commands.c

    2. I increased delay time to 10 seconds before sending "at+recv=0,0,5120" after sent the ""at+send=0,0,19,<HEL.R01></HEL.R01>" command to CC3235.

    (The server send data to CC3235 if it receive the <HEL.R01></HEL.R01> message from CC3235)

    I need more test but it seems to work fine currently with above changes and server's sending data 5120 bytes.

    --> I think the CC3235 needs some time to receive all data from server and put it to buffer.

    2 more questions,

    1. Do I have to use the delay time? It looks not graceful to set specific delay time.

    2. What is the maximum value of the length? :  AT+Recv = [sd],[format],[length]

    Thanks,

    Calvin

  • Hi,

    I found a solution.