API Messages

Protocol

The WF200 uses a classic request/confirmation and indication protocol to communicate with the host, as shown below.

wf200-communication-png
WF200 communication mechanism

HOST to WF200

A message sent by the host is a request and is always answered back with a confirmation. The confirmation systematically informs the host of the status of the request.

WF200 to HOST

In addition to sending back confirmations, the WF200 is sending indication messages (e.g., packet received, connection established, and so on). The host is notified through an interrupt that information is available. Depending on the configuration register setting, the interrupt is issued on the standard GPIO (GPIO 29 WF200 Hardware Overview) or on the alternative interrupt WIRQ pin (pin 24).

Message Header Format

The message header is a 32-bit word starting every message sent or received by the WF200 using the API (not including register access). Below is a diagram to present the header content.

wf200-header-png
WF200 message header
  • Message length (16 bits): the size of the message including the header size.
  • Message info (16 bits): content below
    • MsgId (8 bits): message ID, see requests, confirmation or indications for the ID values.
    • MsgInfo (8 bits): content below
      • Reserved (1 bit)
      • IntId (2 bits): Interface affected by the message. For the FMAC driver, station interface is 0 and softAP is 1.
      • Reserved (3 bits)
      • SecLink (2 bits): Always 00 for non-encrypted messages. In secure link mode, the standard header is replaced by a specific one.

The structure used to describe the message header can be found in the firmware header file in sl_wfx_header_t.