Scan Response Structure

The scan request API populates the results of the Scan process in a structure. The structure is explained below.

typedef struct rsi_rsp_scan_s {

uint8_t scan_count[4];

uint8_t reserved[4];

rsi_scan_info_t scan_info[11];

} rsi_rsp_scan_t;

  • scan_count: Number of Access Points scanned.
  • scan_info: Information about scanned Access point in rsi_scan_info_t structure
  • rsi_scan_info_t: Structure for storing the individual scanned Access Points’ details.

typedef struct rsi_scan_info_s


uint8_t rf_channel;

uint8_t security_mode;

uint8_t rssi_val;

uint8_t network_type;

uint8_t ssid[34];

uint8_t bssid[6];

uint8_t reserved[2];


  • rf_channel: Access Point channel number
  • security_mode: Security mode (0: Open, 1: WPA-PSK, 2: WPA2-PSK, 3: WEP, 4: WPA-Enterprise, 5: WPA2-Enterprise)
  • rssi_val: RSSI value of Access Point
  • network_mode: Type of network (1: Infrastructure mode)
  • ssid: SSID of Access Point
  • bssid: MAC address of Access Point

DNS Query Response Structure

typedef struct rsi_rsp_dns_query_s {

uint8_t  ip_version[2];

uint8_t  ip_count[2];

union {

uint8_t ipv4_address[4];

uint8_t ipv6_address[16];


} rsi_rsp_dns_query_t;


  • ip_version: IP Version (4: IPv4, 6: IPv6). IPv6 is not supported currently.
  • ip_count: Number of IP addresses resolved for given domain name.
  • ip_address: IP address of given domain name. This field is union of IPv4 and IPv6 address (16 bytes in size).Number of bytes filled depends on IP version.

WLAN Get Response Structure

typedef struct rsi_rsp_wireless_info_s


uint16_t  wlan_state;

uint16_t  channel_number;

uint8_t  ssid[RSI_SSID_LEN];

uint8_t  mac_address[6];

uint8_t  sec_type;

uint8_t  psk[64];

uint8_t  ipv4_address[4];

uint8_t  ipv6_address[16];

uint8_t  reserved1[2];

uint8_t  reserved2[2];

} rsi_rsp_wireless_info_t;


Structure Fields Description
wlan_state In station mode :

Connected / Unconnected state

In AP mode :

No of stations connected information

channel_number In station mode :

Channel in which stion is associated

In AP mode:

Channel in which device is acting as AP

ssid In station mode:

SSID of AP associated to

In AP mode:

Device SSID

mac_address Mac address of the device
sec_type Security type
psk 64 bytes of PSK
ipv4_address Ipv4 address of the device
ipv6_address Ipv6 address of the device
reserved1 Reserved field
reserved2 Reserved field

Note: WLAN INFO is relevant in both station and AP mode

Stations info  structure format

typedef struct  rsi_go_sta_info_s


uint8_t   ip_version[2];

uint8_t   mac[6];



uint8_t   ipv4_address[4];

uint8_t   ipv6_address[16];



Structure Fields Description
ip_version IP version

4: IPv4

6: IPv6

mac Mac address of connected station




Union of IPv4 and IPv6 address of connected stations.

typedef struct rsi_rsp_stations_info_s


uint8_t  sta_count[2];

rsi_go_sta_info_t sta_info[RSI_MAX_STATIONS];


Structure Fields Description
sta_count Number of stations associated to AP
sta_info Array of associated stations information. Refer the above table for structure format


Note: STATIONS INFO is relevant in AP and GO mode

Sockets info  structure format

typedef struct rsi_sock_info_query_s


uint8_t  sock_id[2];

uint8_t  sock_type[2];

uint8_t  source_port[2];

uint8_t  dest_port[2];


uint8_t   ipv4_address[4];

uint8_t   ipv6_address[16];




Structure Fields Description
sock_id Socket descriptor
sock_type Socket type

0:TCP/SSL client

2:TCP/SSL server

4:Listening UDP

source_port Port number of socket in

the module

dest_port Destination port of remote peer


Union of IPv4 and IPv6 address. In case of IPv4 address , only 4 bytes are filled , remaining are zeroes


typedef struct rsi_rsp_sockets_info_s


uint8_t  num_open_socks[2];

rsi_sock_info_query_t   socket_info[10];

} rsi_rsp_sockets_info_t;


Structure Fields Description
num_open_socks Number of sockets opened
socket_info Each Socket information. Refer to above table for structure format