WizFi360 with SPI, sending CMD command like AT

I am using WizFi360 with SPI interface. I am reading the answers from WizFi360 correctly. But, when I am sending “AT” command, then I obtain the answer “ERROR”. I think, that I am sending incorect bytes. Can you explain, what means the information on the picture? How can I send AT command in bytes?

Now I am sending: 0x91 0x04 0x00 0x41 0x54 0x0d 0x0a

Hello @lentec

AT CMD Phase should be set in units of 4 bytes.

For example, when sending ‘AT’, the AT CMD Phase should be filled with ‘AT’ and the remaining 2 bytes should be filled with dummy data.

In this case, fill in the CMD Length byte with 4 bytes length information, which is the value of ‘AT’ + dummy data length 2 bytes.

The link below is a WizFi360 SPI example, so please refer to it.

I have found this:

WizFi360-SPI-to-Uart-in-Nucleo-master\Src\main.c, lines: 582-587

TX_len = len + 2;

if ( TX_len % 4 )
  TX_len = ((TX_len + 3)/4) << 2;

and it works on many AT instructions. So, the answer is: