Other Parts Discussed in Thread: CC3220S
Hi team,
My customer is using ATCMD library with cc3220mods and the device is controlled by host processor SDX55 through uart interface.
The cc3220 runs as AP and provides TCP socket for hand held device to connect. And the host then can send HTML webpages and pictures through the connected TCP socket to the client.
Here's some questions they got:
- Socket created in blocking mode or nonblocking mode, if they use:
- In blocking mode, they found sometimes the at+accept cmd does not work well, meaning that even a TCP client requests to connect, the system won’t return from it and make connection.
- In nonblocking mode, it wastes time and computing power on polling socket for connection request.
- They will go with blocking mode, but they want us provide suggestion for software flow to make socket-handling more reliable.
- When receiving data from hand held device, the host will sometimes get garbage data as I mentioned previously. It is probably related to pointers to wrong memory address, or minor bugs in host side. I have asked them to capture the UART waveform by logic analyzer. They can add filter to workaround but want root cause if possible.
- At+socket cmd, there’re two type of format, they found in binary format this cmd cannot send out carriage return or line feed (\r or \n). They need our support on this.
Here’s the example transmitted payload:
char str="HTTP/1.1 200 Ok\n
Server: mini_httpd/1.30 26Oct2018\r
Date: Sun, 06 Jan 1980 01:46:15 GMT
Content-Type: text/plain; charset=UTF-8
Content-Length: 1150
Last-Modified: Tue, 08 Sep 2020 00:32:57 GMT
Connection: close"; - At+send cmd, when sending out massive data, there’s chance that cc32 returns OK but it actually did not send it out. If the data is larger than atcmd buffer (1024B by default), they will divide it into multiple fragmentation and send them out. However some packets are likely missing and cc32 still returns OK.
Thanks!
Kind regards,
Jo