WLAN Commands

The following sections document RS9116 WiSeConnect commands, parameters, responses and availability. For error codes returned by commands, see https://docs.silabs.com/rs9116-wiseconnect/latest/wifibt-wc-sapi-reference/error-codes

Index

Group AT Command API Description
Configuration & Setup
rsi_apconf Configure AP Mode
rsi_buf_alloc Set Rx/Tx/Global buffer ratio
rsi_cfgenable Enable Auto-Join / Auto-Create
rsi_cfgget Read Stored Configuration Parameters
rsi_cfgsave Store Configuration Parameters
rsi_store_server_ip_port Store Server IP and Port Parameters
rsi_config WLAN Configuration
rsi_filter_bcast Set Broadcast Filter threshold
rsi_init Initialise PHY and Radio
rsi_mac Query MAC Address
rsi_opermode Operating Mode
rsi_reset Soft Reset
rsi_setmac Set MAC Address
rsi_trigger_auto_config Trigger Auto Configuration
rsi_usercfg Store User Configuration Parameters
Firmware Update
rsi_fwupok Wireless Firmware Update
rsi_fwversion Query Firmware Version
rsi_httpota Update firmware via HTTP
rsi_otaf Update firmware via TCP
Networking Protocols and Data Transfer
rsi_ftp FTP Client
rsi_cls Close Socket
rsi_credentials Set HTTP server credentials
rsi_ctcp Query TCP Server Socket Status
rsi_dnsget DNS Resolution
rsi_dnsserver DNS Server
rsi_dnsupdate DNS Update
rsi_jsoncreate Write Dynamic Webpage
rsi_http_abort Abort HTTP GET/POST
rsi_httpget HTTP Get
rsi_httppost HTTP Post
rsi_http_post_data HTTP Post Data
rsi_httpput HTTP Put
rsi_ipconf Set IP Parameters
rsi_mdns mDNS/DNS-SD Client
rsi_mqtt MQTT Client
rsi_multicast_filter Multicast Filter
rsi_multicast Join/Leave Multicast Group
rsi_nwparams Query Network Parameters
rsi_ping ICMP Ping
rsi_read Read Data
rsi_snd Send Data
rsi_sntp SNTP Client
rsi_socket_config Socket Configuration Parameters
rsi_tcp Open a Socket
rsi_trans_mode_params Transparent Serial passthrough mod
rsi_webpage Write Static Webpage
Peripherals & Time
rsi_get_rtc_time Get RTC time
rsi_get_ram_dump Get RAM Dump
rsi_hfc UART Hardware flow Control
rsi_host_rtc_time Set RTC time
Powersave
rsi_pwmode Power Mode
rsi_sleeptimer Set Sleep Timer
rsi_wmm_config WMM Powersave
Radio Configuration
rsi_antenna Select Antenna
rsi_band Radio Band
rsi_calib_write Write Calibration Data
rsi_feat_frame Set Feature Frame (radio parameters)
rsi_freq_offset Frequency Offset Correction
rsi_gain_table Configure Gain Table
rsi_setregion Set Regulatory domain for Client Mode
rsi_setregion_ap Set Regulatory Domain for AP Mode
Security
rsi_authmode WEP Authentication Mode
rsi_cert_index Set Certificate with Index
rsi_cert Set TLS Certificate
rsi_eap EAP Configuration
rsi_wepkey Set WEP Keys
rsi_wps_method WPS Pin Method
Test & PER
rsi_bytes_sent_count Query Socket Transmit byte count
rsi_clearfiles Erase All Webpages
rsi_debug Configure UART Debug Prints
rsi_erasefile Erase Static Webpage
rsi_erasejson Erase Dynamic Webpage
rsi_get_wlan_stats Get WLAN Statistics
rsi_per PER Mode Transmit Test
rsi_per_stats Query PER Statistics
rsi_urlrsp Webpage Passthrough
Wi-Fi Connection
rsi_bgscan Background Scan
rsi_disassoc Wi-Fi Disassociate
rsi_ht_caps High-throughput Capabilities
rsi_join Wi-Fi Join
rsi_psk Wi-Fi Preshared Key
rsi_rejoin Wi-Fi Rejoin
rsi_roam_params Roam Parameters
rsi_scan Wi-Fi Scan
rsi_timeout Set WLAN Connection Timeouts

.

AT Command API (Asynchronous Responses) Description
RSI_CLIENT_STATION_CONNECTED Client Connection Change Notifications (AP mode)
RSI_STATE-X AP Connection Change Notifications (Client mode)
RSI_IPCONF IP Change Notification
RSI_CLOSE Remote Socket Close Notification
RSI_READ Receive data on socket Notification
RSI_LTCP_CONNECT TCP Socket Established Notification

Note!


rsi_opermode :: Operating Mode

Description

This is the first AT command that needs to be sent from the Host after receiving the card ready frame from the module. This command configures the module in different functional modes.

Command Format

Note that all parameters are shown on a new line to make the command format easier to read.

at+rsi_opermode=<oper_mode>,
                <feature_bit_map>,
                <tcp_ip_feature_bit_map>,
                <custom_feature_bit_map>,
                <ext_custom_feature_bit_map>,
                <bt_feature_bit_map>,
                <ext_tcp_ip_feature_bit_map>,
                <ble_feature_bit_map>,
                <ble_coustom_ext_feature_bit_map>,
                <config_feature_bit_map>

Some arguments for the rsi_opermode command are only enabled when conditions according to the following table are met.

The argument ... is enabled when ...
<ext_custom_feature_bit_map> custom_feature_bitmap[31] = 1
<ext_tcp_ip_feature_bit_map> tcp_ip_feature_bit_map[31] = 1
<bt_feature_bit_map> custom_feature_bit_map[31] = 1 , ext_custom_feature_bit_map[31] = 1
<ble_feature_bit_map> custom_feature_bitmap[31] = 1 , ext_custom_feature_bit_map[31] = 1 , bt_feature_bit_map[31] = 1
<ble_custom_ext_feature_bit_map> ble_feature_bit_map[31] = 1
<config_feature_bit_map> tcp_ip_feature_bit_map[31] = 1 , ext_tcp_ip_feature_bit_map[31] = 1

Parameters

oper_mode

  oper_mode = ((wifi_oper_mode) | (coex_mode << 16))

where ...

wifi_oper_mode Meaning Description
0 Wi-Fi Client Mode The module works as a normal client that can connect to an Access Point with different security modes other than enterprise security.
2 Enterprise Security Client Mode The module works as a client that can connect to an Access Point with WPA/WPA2-Enterprise security.
6 Access Point mode In this mode, the module acts as an Access Point, depending on the inputs supplied for the command 'Configure AP Mode'. In Access Point mode, a Maximum of 16 clients can connect based on the bits set in custom feature bit map selection in opermode. Enable DHCP server by tcp_ip_feature_bit_map.
8 PER Mode. This mode is used for calculating packet error rate and mostly used during RF certification tests.
9 Concurrent mode This mode is used to run module in concurrent mode. In concurrent mode, host can connect to a AP and can create AP simultaneously.

Note!

Opermode WiFi-Direct(1) mode is not supported.


Note!

When operating in Concurrent Mode:

  1. The AP mode MAC address is identical to the station mode MAC address, except the last bit of the last byte of the AP mode MAC address is set to 1 .
  2. Maximum of 4 Station devices can be connected to Concurrent AP.
  3. In TCP/IP non-bypass mode, Broadcast / Multicast packet goes to first created interface (e.g. if Station mode connects first, the broadcast / multicast packet goes to the network that belongs to station mode).
  4. Aggregation is not supported.
  5. The Station and AP interfaces must be configured to the same channel.

coex_mode Description
0 WLAN
5 WLAN + Bluetooth
9 WLAN + Dual Mode
13 WLAN + BLE

Note!

  1. Co-ex modes are supported only in 384K memory configuration.
  2. For WLAN Co-ex mode, AP mode scan is not allowed.

If Co-ex mode is enabled in opermode command, then BT / BLE protocol will start and give corresponding card ready in parallel with opermode command response (which will be handled by corresponding application). BT card ready frame is described in the RS9116W BT Classic AT Command Programming Reference Manual and BLE card ready frame is described in the RS9116W BLE AT Command Programming Reference Manual


Other Parameters

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021 , 0x0025 , 0xFF73 , 0x002C , 0xFF6E , 0xFF6F , 0xFF70 , 0xFFC5 .

Example 1

When only oper_mode is given in Command Format

Command

at+rsi_opermode=0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6F 0x70 0x65 0x72 0x6D 0x6F 0x64 0x65 0x3D 0x30 0x0D 0x0A

Response

OK

0x4F 0x4B 0x0D 0x0A

Example 2

When other parameters along with mode_val is given in opermode Command Format This command configures the device into Wi-Fi client mode with HTTP server enabled in Open security mode.

at+rsi_opermode=0,1,2,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6F 0x70 0x65 0x72 0x6D 0x6F 0x64 0x65 0x3D 0x30 0x2C 0x31 0x2C 0x32 0x2C 0x30 0x0D 0x0A

[ Go to top ]


rsi_band :: Radio Band

Description

This command configures the radio band. This command has to be issued after opermode command.

at+rsi_band=<band_value>

Parameters

The valid values for the parameter for this command are as follows:

band_value (1 byte)

band_value Functionality
0 2.4 GHz
1 5 GHz
2 Dual band (2.4 GHz and 5 GHz)

Note!

  1. Dual band is supported in station mode
  2. 802.11J is only supported in 5 GHz

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0005, 0x0021, 0x0025, 0x002C, 0x003c .

Availability

This command is available in all operating modes.

Example

Command

at+rsi_band=0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x62 0x61 0x6E 0x64 0x3D 0x30 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_config :: WLAN Configuration

Description

This command configures WLAN parameters. This command must be issued after init command.

Command Format

at+rsi_config=<config_type>,<config_val>

Parameters

config_type (2 bytes)

config_value (2 bytes)

Note! Only RTS_THRESHOLD config type is supported.

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0063, 0x0064 .

Availability

This command is available in all operating modes.

Example

Command

at+rsi_config=1,256
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x63 0x6F 0x6E 0x66 0x69 0x67 0x3D 0x31 0x2C 0x32 0x35 0x36 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_setmac :: Set MAC Address

Description

This command sets the MAC address of module. This command must be issued before the rsi_band command.

Command Format

at+rsi_setmac=<mac_address>

Parameters

mac_address (6 bytes)


Note! In concurrent mode, given MAC is applied to station mode and AP mode MAC address last byte will differ from station mode MAC. AP mode MAC address last byte will be one plus the station mode MAC address last byte given by host.


Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025, 0x002C .

Availability

This command is available in all operating modes.

Example

Command

at+rsi_setmac=001122334455
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x73 0x65 0x74 0x6D 0x61 0x63 0x3D 0x30 0x30 0x31 0x31 0x32 0x32 0x33 0x33 0x34 0x34 0x35 0x35 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_init :: Initialize PHY and Radio

Description

This command programs Baseband and RF components of the module and returns the MAC address of module to the host. This command must be issued after band command.

Command Format

at+rsi_init

Parameters

None.

Response

For Non-concurrent Mode

Result Code Description
OK <MAC_Address> MAC address of the module. In concurrent mode, two MAC addresses are returned, MAC_Address1 is the station MAC address and MAC_Address2 is the created AP MAC address. MAC address is returned in 6-bytes in hex format.
ERROR <Error code> Failure.

For Concurrent Mode

| Result Code | Description | | OK <MAC_Address1><MAC_Address2>| Successful execution of command. MAC_Address1 is the station MAC Address and MAC_Address2 is of the AP created in the module.| | ERROR <Error code> | Failure. |

Possible error codes are 0x0021, 0x0025, 0x002C, 0x0002 .

Availability

This command is available in all operating modes

Example 1 - Client or AP mode

Command

at+rsi_init
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x69 0x6E 0x69 0x74 0x0D 0x0A

Response

OK <MAC_Address>

0x4F 0x4B 0x80 0xC9 0x55 0x34 0xF0 0x10 0x0D 0x0A

Example 2 - Concurrent mode

at+rsi_init
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x69 0x6E 0x69 0x74 0x0D 0x0A

Response

OK <MAC_Address1><MAC_Address2>

0x4F 0x4B 0x80 0xC9 0x55 0x34 0xF0 0x10 0x80 0xC9 0x55 0x34 0xF0 0x11 0x0D 0x0A

[ Go to top ]


rsi_gain_table :: Configure Gain Table

Description

This command overwrites the default region based gain tables (present in firmware) with user-defined region based gain tables. The 2.4 GHz and 5 GHz gain tables can be loaded consecutively by changing the band. This command should be issued immediately after the init command. Customer can load the two gain tables (i.e., 2.4GHz-20Mhz, 5GHz-20Mhz) one after other by changing band.


Note! Internally, firmware maintains two tables : Worldwide table and Region-based table. Worldwide table is populated by firmware with Max power values that chip can transmit that meets target specifications like EVM. Region-based table has default gain value set.

  1. When certifying with user antenna, Region must be set to Worldwide and sweep the power from 0 to 21 dBm. Arrive at max power level that is passing certification especially band-edge.
  2. These FCC/ETSI/TELEC/KCC Max power level should be loaded in end-to-end mode via WLAN User Gain table. This must be called done every boot-up since this information is not saved inside flash. Region based user gain table sent by application is copied onto Region based table .SoC uses this table in FCC/ETSI/TELEC/KCC to limit power and not to violate allowed limits.

For Worldwide region, the firmware uses Worldwide table for Tx. For other regions (FCC/ETSI/TELEC/KCC), the firmware uses min value out of Worldwide & Region based table for Tx. Also, there will be part to part variation across chips and offsets are estimated during manufacturing flow which will be applied as correction factor during normal mode of operation. This frame must be used by customers who has done FCC/ETSI/TELEC/KCC certification with their own antenna. All other customers should not use this. Inappropriate use of this frame may result in violation of FCC/ETSI/TELEC/KCC or any certifications, and Silicon Labs is not liable for that.


Command Format

at+rsi_gain_table=<band_value>,<bandwidth>,<payload_length>,<payload>

Parameters

band_value (1-byte) | band_value | Frequency Band | |--------|---------------| | 1 | 2.4 GHz | | 2 | 5 GHz |

bandwidth (1-byte) | Mode | Bandwidth | |--------|---------------| | 0 | 20 MHz | | 1 | Reserved.

payload_length (2-bytes)

payload (n-bytes, see table)

<TABLE NAME>[] =
{
  <NUMBER OF REGIONS>,
  <REGION NAME 1>,
  <CHANNEL CODE 2G>,
  <CHANNEL NUMBER 1>,   <2 * MAX POWER 11b RATE>, <2 * MAX POWER 11g RATE>, <2 * MAX POWER 11n RATE>,
  <CHANNEL NUMBER 2>,   <2 * MAX POWER 11b RATE>, <2 * MAX POWER 11g RATE>, <2 * MAX POWER 11n RATE>,
     ...
  <CHANNEL NUMBER m-1>, <2 * MAX POWER 11b RATE>, <2 * MAX POWER 11g RATE>, <2 * MAX POWER 11n RATE>,
  <CHANNEL NUMBER m>,   <2 * MAX POWER 11b RATE>, <2 * MAX POWER 11g RATE>, <2 * MAX POWER 11n RATE>,

  <REGION NAME 2>,
  <CHANNEL_CODE_2G>,
  <CHANNEL NUMBER 1>,   <2 * MAX POWER 11b RATE>, <2 * MAX POWER 11g RATE>, <2 * MAX POWER 11n RATE>,
  <CHANNEL NUMBER 2>,   <2 * MAX POWER 11b RATE>, <2 * MAX POWER 11g RATE>, <2 * MAX POWER 11n RATE>,
     ...
  <CHANNEL NUMBER m-1>, <2 * MAX POWER 11b RATE>, <2 * MAX POWER 11g RATE>, <2 * MAX POWER 11n RATE>,
  <CHANNEL NUMBER m>,   <2 * MAX POWER 11b RATE>, <2 * MAX POWER 11g RATE>, <2 * MAX POWER 11n RATE>,
     ...
};

Gain table Format for 5 GHz band

<TABLE NAME>[] =
{
  <NUMBER OF REGIONS>,
  <REGION NAME 1>,
  <CHANNEL CODE 5G>,
  <CHANNEL NUMBER IN BAND 1 IF ANY> / <BAND NUMBER 1>, <MAX POWER 11a RATE>, <MAX POWER 11n RATE>,
  <CHANNEL NUMBER IN BAND 2 IF ANY> / <BAND NUMBER 2>, <MAX POWER 11a RATE>, <MAX POWER 11n RATE>,
  <CHANNEL NUMBER IN BAND 3 IF ANY> / <BAND NUMBER 3>, <MAX POWER 11a RATE>, <MAX POWER 11n RATE>,
  <CHANNEL NUMBER IN BAND 4 IF ANY> / <BAND NUMBER 4>, <MAX POWER 11a RATE>, <MAX POWER 11n RATE>
     ...
  <REGION NAME 2>,
  <CHANNEL CODE 5G>,
  <CHANNEL NUMBER IN BAND 1 IF ANY> / <BAND NUMBER 1>, <MAX POWER 11a RATE>, <MAX POWER 11n RATE>,
  <CHANNEL NUMBER IN BAND 2 IF ANY> / <BAND NUMBER 2>, <MAX POWER 11a RATE>, <MAX POWER 11n RATE>,
  <CHANNEL NUMBER IN BAND 3 IF ANY> / <BAND NUMBER 3>, <MAX POWER 11a RATE>, <MAX POWER 11n RATE>,
  <CHANNEL NUMBER IN BAND 4 IF ANY> / <BAND NUMBER 4>, <MAX POWER 11a RATE>, <MAX POWER 11n RATE>
     ...
   };

<REGION NAME #>

Substitute the <REGION NAME #> corresponding to the desired region.

REGION NAME # Region
0 FCC
1 ETSI
2 TELEC
4 KCC

<CHANNEL CODE 2G>

An 8-bit value encoded as follows:

<CHANNEL CODE 5G>

An 8-bit value encoded as number of rows in a region 5 GHz band.


Note!


Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x003E .

Availability

This command is available in WLAN operating modes.

Example

Command

at+rsi_gain_table=1,0,67,<payload>

Note!

  1. For <payload_len> parameter, the user must provide actual length of the payload. If the gain table length is 70 and if the user enters 128 then an error ( 0x003E ) is returned.
  2. To calculate the value of <payload_len> , add the number of bytes in the <payload> excluding spaces and commas. parameter.
  3. Payload examples are provided in the following sub-section.

Response

OK
0x4F 0x4B 0x0D 0x0A

Payload Examples

This is a payload example for:

{      3,                 // Number of Regions
     FCC,                 // Region Name
      13,                 // Number of channels
       1, 34, 20, 20,     // rate, 11b, 11g, 11n
       2, 34, 28, 28,
       3, 34, 32, 32,
       4, 34, 36, 36,
       5, 34, 38, 38,
       6, 34, 40, 40,
       7, 34, 38, 38,
       8, 34, 36, 36,
       9, 34, 32, 32,
      10, 34, 32, 32,
      11, 34, 24, 24,
      12, 34, 16, 24,
      13, 34, 12, 12,
   TELEC,                 // Region Name
      17,                 // Number of channels
     255, 20, 16, 16,     // rate, 11b, 11g, 11n
     KCC,                 // Region Name
      17,                 // Number of channels
     255, 26, 20, 20,     // rate, 11b, 11g, 11n
}

This is a payload example for:

{
       2,          // Number of Regions
     FCC,          // Region Name
       6,          // Number of rows in 5 GHz region
       1, 9, 10,   // band 1
       2, 8, 9,    // band 2
     100, 4, 4,    // band 3
       3, 6, 8,    // band 3
     149, 3, 3,    // band 4
       4, 6, 7,    // band 4
   TELEC,          // Region Name
       4,          // Number of rows in 5 GHz region
       1, 9, 10,   // band 1
       2, 8, 10,   // band 2
       3, 6, 8,    // band 3
       4, 6, 7,    // band 4
}

Example 2

Customers using Certified MARS antenna should use the following gain table.

This is a payload example for:

{
       3,                // Number of Regions
     FCC,                // Region Name
      13,                // Number of channels
       1, 28,  32, 30,   // rate, 11b, 11g, 11n
       2, 28,  32, 30,
       3, 28,  32, 30,
       4, 30,  28, 34,
       5, 30,  28, 34,
       6, 30,  28, 34,
       7, 30,  28, 34,
       8, 30,  28, 34,
       9, 28,  30, 30,
       10, 28, 30, 30,
       11, 28, 30, 30,
       12, 28, 30, 30,
       13, 28, 30, 30,
    TELEC,               // Region Name
       17,               // Number of channels
      255, 20, 16, 16,   // rate, 11b, 11g, 11n
      KCC,               // Region Name
       17,               // Number of channels
      255, 26, 20, 20,   // rate, 11b, 11g, 11n
};

This is a payload example for:

{
        2,          // Number of Regions
      FCC,          // Region Name
        6,          // Number of rows
        1, 12, 12,  // band 1
        2, 11, 11,  // band 2
      100, 10, 12,  // band 3
        3, 13, 13,  // band 3
      140, 10, 11,  // band 4
        4, 13, 13,  // band 4
    TELEC,          // Region name
        4,          // Number of rows in 5GHz region
        1, 9, 10,   // band 1
        2, 8, 10,   // band 2
        3, 6, 8,    // band 3
        4, 6, 7,    // band 4
}

[ Go to top ]


rsi_per :: PER Mode/Transmit Test

Description

This command configures the PER (Packet Error Rate) Mode in RS9116-WiSeConnect. This command should be issued after rsi_init command.

Command Format

at+rsi_per=<per_mode_enable>,<power>,<rate>,<length>,<mode>,<channel>,<rate_flags>,<aggr_enable>,<no_of_pkts>,<delay>

Parameters

per_mode_enable (2 bytes)

power (2 bytes)


Note! To configure the maximum power level for a particular frequency band, set <power> = 127 .


rate (4 bytes)

<rate> Selected Data Rate (Mbps)
0 1*
2 2*
4 5.5*
6 11*
139 6
143 9
138 12
142 18
137 24
141 36
136 48
140 54
256 MCS0
257 MCS1
258 MCS2
259 MCS3
260 MCS4
261 MCS5
262 MCS6
263 MCS7

Note!


length (2 bytes)

mode (2 bytes)

Mode Transmit Mode
0 Burst Mode
1 Continuous Mode
2 CW Mode (unmodulated) in DC mode
3 CW Mode (unmodulated) with a single tone at: center frequency - 2.5 MHz
4 CW Mode (unmodulated) with a single tone at: center frequency + 5 MHz

Note!

Burst Mode

The instrument outputs a waveform of the specified number of cycles or packets (burst count) when a trigger is received. After the specified number of cycles or packets have been output, the instrument stops and waits for the next trigger.

Continuous Mode

The instrument outputs an unmodulated waveform continuously.

Continuous Wave Mode (Non-Modulation) in DC Mode:

The instrument outputs a spectrum only at the center frequency of the channel. A basic signal with no modulation is that of a sine wave and is usually referred to as a continuous wave (CW) signal. A basic signal source produces sine waves. Ideally, the sine wave is perfect. In the frequency domain, it is viewed as a single line at some specified frequency.

Continuous Wave Mode (Non-Modulation) in Single Tone Mode (Center frequency -2.5 MHz):

The instrument outputs a spectrum that is generated at -2.5 MHz from the center frequency of the channel selected. Some amount of carrier leakage will be seen at Center Frequency.

For example, for 2412 MHz the output will be seen at 2409.5 MHz

Continuous Wave Mode (Non-Modulation) in Single Tone Mode (Center frequency +5 MHz):

The instrument outputs a spectrum that is generated at 5MHz from the center frequency of the channel selected. Some amount of carrier leakage will be seen at Center Frequency.

For example, for 2412 MHz the output will be seen at 2417 MHz.



Note!


channel (2 bytes)

Channel Number (2.4 GHz) Center frequency in MHz for 20MHz channel width
1 2412
2 2417
3 2422
4 2427
5 2432
6 2437
7 2442
8 2447
9 2452
10 2457
11 2462
12 2467
13 2472
14 2484
Channel Number (5 GHz) Center frequency in MHz for 20MHz channel width
36 5180
40 5200
44 5220
48 5240
52 5260
56 5280
60 5300
64 5320
100 5500
104 5520
108 5540
112 5560
116 5580
120 5600
124 5620
128 5640
132 5660
136 5680
140 5700
144 5720
149 5745
153 5765
157 5785
161 5805
165 5825
Channel Number (4.9GHz) Center frequency in MHz for 20MHz channel width
184 4920
188 4940
192 4960
196 4980
8 5040
12 5060
16 5080

rate_flags (2 bytes)

Fields Short GI Greenfield Channel Width Reserved Immediate Transfer Reserved
Bits 0 1 2-4 5 6 7-15

aggr_enable (2 bytes)

no_of_pkts (2 bytes)

delay (4 bytes)


Note! Only per_mode_enable , power , rate , length , mode , channel , rate_flags fields are valid. Remaining fields are not supported.


Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x000A, 0x0021, 0x0025, 0x002C, 0x0033 .

Availability

This command is available when the module is configured in operating mode 8 .

Example

To start transmitting

at+rsi_per=1,18,139,30,0,1,0,0,0,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x70 0x65 0x72 0x3D 0x31 0x2C 0x31 0x38 0x2C 0x31 0x33 0x39 0x2C 0x33 0x30 0x2C 0x30 0x2C 0x31 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x0D 0x0A

To stop transmitting

at+rsi_per=0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x70 0x65 0x72 0x3D 0x30 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_freq_offset :: Frequency Offset Correction

Command Description

This command is used during the RF calibration process and requires PER mode transmissions to be initiated prior. This command sends freq_offset (deviation) as observed on the signal analyzer against the expected channel frequency. This command is relevant in PER mode.

Command Format

at+rsi_freq_offset=<freq_offset_in_khz>

Parameters

freq_offset_in_khz

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Availability

This command is available when the module is configured in Operating Mode 8 .

Example

To send frequency offset as 10 ppm:

Command

at+rsi_freq_offset=10

Response

OK

[ Go to top ]


rsi_calib_write :: Write Calibration Data

Description

This API is used during the RF calibration process and requires PER mode transmissions to be initiated prior. This API will command the firmware to update the existing Flash/EFuse calibration data with the xo ctune (given or picked from hardware register) and gain offset values. This command is relevant in PER mode.

The rsi_freq_offset command needs to be called before this command when xo ctune value from hardware register is to be used.

Command Format

at+rsi_calib_write=<target>,<flags>,<gain_offset>,<xo_ctune>

Parameters

target (1 byte)

flags (1 byte)

gain_offset (1 byte)

xo_ctune (1 byte)

Response

Value Description
0 Success
Non Zero Value Failure

Example

The gain offset can be calculated with the following equation.

gain_offset = observed_power_level + cable_loss - configured_power_level

where ...

To write the gain offset as -2 dBm into flash/efuse, use the following command.

at+rsi_calib_write=1,1,-2

To write the xo_ctune value available in the hardware register to flash/efuse (after frequency calibration is performed), use the following command.

at+rsi_calib_write=1,2,0

To write a user configured xo_ctune value to flash/efuse (without performing the frequency calibration process), use the following command. Note that xo_ctune is in the range [0..255].

at+rsi_calib_write=1,2,0,<xo_ctune>

Note! To recalibrate the gain offset after it has been burnt to flash, the gain offset must be reset first, followed by the standard calibration flow. Recalibration is not possible if the EFuse is being used instead of flash. To reset the gain offset, use rsi_calib_write = 1,1,0 .


Response

OK

[ Go to top ]


rsi_apconf :: Configure AP Mode

Description

This command is used to set the configuration information for AP mode. This command must be issued after the rsi_init command.

Command Format

at+rsi_apconf = <channel_no>,<ssid>,<security_type>,<encrypt_type>,<psk>,<beacon_interval>,<dtim_period>,<sta support>,<ap_keepalive_type>,<ap_keepalive_period>

Parameters

channel_no (2 bytes)

Channel Number (2.4GHz) Center frequency in MHz for 20MHz channel width
1 2412
2 2417
3 2422
4 2427
5 2432
6 2437
7 2442
8 2447
9 2452
10 2457
11 2462
12 2467 *
13 2472 *
14 2484 *

Note! Operation in channels 12/13/14 requires configuration of the correct regulatory region using the set_region command.


Channel Number (5GHz) Center Frequency in MHz for 20MHz channel width
36 5180
40 5200
44 5220
48 5240
144 5720
149 5745
153 5765
157 5785
161 5805
165 5825

Note! DFS channels are not supported in AP mode.


ssid (34 bytes)


Note!

  1. To support a comma , in the SSID, enclose the SSID in double quotes e.g. “MY, NETWORK”
  2. Double quotes " in the SSID are not supported.
  3. The maximum length of the SSID is 32 bytes; the remaining 2 bytes are reserved for NULL termination and internal alignment.

security_type (1 byte)

security_type Security Type
0 Open
1 WPA
2 WPA2

encrypt_type (1 byte)

Mode Encryption
0 Open
1 TKIP
2 CCMP

psk (64 bytes)

beacon_interval (2 bytes)

dtim_period (2 bytes)

ap_keepalive_type (1 byte)

ap_keepalive_period (1 byte)

max_sta_support (2 bytes)


Note! RS9116W supports for connecting 16 clients to the created AP by setting custom_feature_bit_map 13:16] and extended_custom_feature_bit_map 15] by using the equation mentioned below:

Number of stations = (Stations Obtained by setting BIT[13-16] + 1 ) * 2

For example, if the host wants 16 clients support in AP, then set following bits: BIT[13] , BIT[14] and BIT[15] (leave BIT[16] as 0 ) in custom feature bitmap and BIT[15] in extended custom feature bitmap, then the number of stations will become (7+1) * 2 = 16 . If configuring more than 16 stations, it will throw an error. If the extended custom feature bitmap is not set, then it can configure a maximum of 8 stations. This is Backward Compatibility. Also, if configuring more than 8 stations, it will throw an error


Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025, 0x002C, 0x0026, 0x004C, 0x0028, 0x001A, 0x000A, 0x001D

Availability

This command is available when the module is configured in Operating Mode 6.

Example 1

Configured AP with:

Command

at+rsi_apconf=11,ap_ssid,0,0,0,100,3,3
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x61 0x70 0x63 0x6F 0x6E 0x66 0x3D 0x31 0x31 0x2C 0x72 0x65 0x64 0x70 0x69 0x6E 0x65 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x2C 0x31 0x30 0x30 0x2C 0x33 0x2C 0x33 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

Example 2

Configured AP with:

Command

at+rsi_apconf=0,MY_SSID,2,2,12345678,100,3,3
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x61 0x70 0x63 0x6F 0x6E 0x66 0x3D 0x30 0x2C 0x4D 0x59 0x5F 0x53 0x53 0x49 0x44 0x2C 0x32 0x2C 0x32 0x2C 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x2C 0x31 0x30 0x30 0x2C 0x33 0x2C 0x33 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0A 0x00 0x0D 0x0A

[ Go to top ]


rsi_wps_method :: WPS PIN Method

Description

This command configures the WPS PIN method to be used in RS9116-WiSeConnect.This command should be issued before join command.

Command Format

at+rsi_wps_method=<wps_method>,<generate_pin>,<wps_pin>

Parameters

wps_method (2 bytes)

generate_pin (2 bytes)

wps_pin (8 bytes)

Response

Response contains a wps_pin payload only if PIN method is selected. In case of PUSH method response does not contains any payload.

wps_pin : The WPS PIN will be used by the module to connect with WPS AP.

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025, 0x002C, 0x0037, 0x0038 .

Availability

This command is available when the module is configured in Operating Mode 0 and 6.

Example 1

When PIN of length 8 is given:

Command

at+rsi_wps_method=1,0,12345678
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x77 0x70 0x73 0x5F 0x6D 0x65 0x74 0x68 0x6F 0x64 0x3D 0x31 0x2C 0x30 0x2C 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x0D 0x0A

Response

OK 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x4F 0x4B 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x0D 0x0A

Example 2

When PIN of length less than 8 is given:

Command

at+rsi_wps_method=1,1,1234
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x77 0x70 0x73 0x5F 0x6D 0x65 0x74 0x68 0x6F 0x64 0x3D 0x31 0x2C 0x30 0x2C 0x31 0x32 0x33 0x34 0x0D 0x0A

[ Go to top ]


rsi_scan :: Wi-Fi Scan

Description

This command scans for Access Points and gives the scan results to the host. The scan results are sorted in decreasing order of signal strength (RSSI value). The scanned access point with highest signal strength will be the first in the list. This command has to be issued after init (#rsi_init---initialize-phy-and-radio) command and before join (#rsi_join---wifi-join) command.

Command Format

There are two command format options available:

  1. Scanning multiple channels
  2. Scanning a specific channel
at+rsi_scan=<channel>,<ssid>,<channel_bit_map_2_4>,<channel_bit_map_5>

at+rsi_scan=<channel>,<ssid>,<scan_feature_bitmap>

Parameters

Channel (4 byte)


Note!


Channel Number (2.4 GHz) chan_num
All channels 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14

Note! Scanning in 12, 13, 14 channels is allowed based on the region selected in Set Region command.


Channel Number (5 GHz) chan_num
All channels 0
36 36
40 40
44 44
48 48
149 149
153 153
157 157
161 161
165 165
DFS Channel Number (5 GHz) chan_num
52 52
56 56
60 60
64 64
100 100
104 104
108 108
112 112
116 116
120 120
124 124
128 128
132 132
136 136
140 140
144 144
Channel Number (4.9 GHz) chan_num
All channels 0
184 184
188 188
192 192
196 196
8 8
12 12
16 16

ssid (34 byte)


Note!

  1. To support a comma , in the SSID, enclose the SSID in double quotes e.g. “MY, NETWORK”
  2. Double quotes " in the SSID are not supported.
  3. The maximum length of the SSID is 32 bytes; the remaining 2 bytes are reserved for NULL termination and internal alignment.

scan_feature_bitmap (1 byte)

channel_bit_map_2_4 (2 bytes)

channel_bit_map_5 (4 bytes)


Note! For 11J, channel bit map need to give in channel_bit_map_5 .


Channel Number 2.4 GHz channel_bit_map_2_4
1 0
2 1
3 2
4 3
5 4
6 5
7 6
8 7
9 8
10 9
11 10
12 11
13 12
14 13
Channel Number (5 GHz) channel_bit_map_5
36 0
40 1
44 2
48 3
149 20
153 21
157 22
161 23
165 24
DFS Channel Number (5 GHz) channel_bit_map_5
52 4
56 5
60 6
64 7
100 8
104 9
108 10
112 11
116 12
120 13
124 14
128 15
132 16
136 17
140 18
144 19
Channel Number (4.9 GHz) channel_bit_map_5
8 0
12 1
16 2
184 3
188 4
192 5
196 6
Result Code Description
OK <scan_count>\ <rf_channel><security_mode><rssi_val><u_network_type> ... up to the number of scanned nodes Success
ERROR <Error code> Failure

where ...

scan_count (4 bytes)

padding(4 bytes)

rf_channel (1 byte)

security_mode (1 byte)

Mode Functionality
0 Open
1 WPA
2 WPA2
3 WEP
4 WPA Enterprise
5 WPA2 Enterprise
7 WPA3

rssi_val (1 byte)

u_network_type(1 byte)

ssid (34 bytes)

bssid (6 bytes)

reserved (2 bytes)

Availability

This command is available when the module is configured in Operating Mode 0, 2, 6.

Examples

To scan all the networks in all channels

Command

at+rsi_scan=0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x73 0x63 0x61 0x6E 0x3D 0x30 0x0D 0x0A

To scan a specific network "Test_AP" in a specific channel 6

Command

at+rsi_scan=6,Test_AP
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x73 0x63 0x61 0x3D 0x36 0x2C 0x54 0x65 0x73 0x74 0x5F 0x41 0x50 0x0D 0x0A

Response If two networks are found with the SSID "ap_ssid_net1" and "ap_ssid_net2" in channels 6 and 10, with measured RSSI of -20dBm and -14dBm respectively, the return value is:

OK <scan_count=2> <padding> <rf_channel=0x0A> <security_mode=0x02> <rssi_val=14> <u_network_type=0x01> <ssid =ap_ssid_net2> <bssid=0x00 0x23 0xA7 0x1F 0x1F 0x15> <reserved ><rf_channel=0x06> <security_mode=0x00> <rssi_val=20> <u_network_type=0x01> <ssid=ap_ssid_net1> <bssid=0x00 0x23 0xA7 0x1F 0x1F 0x14> <reserved>

0x4F 0x4B 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0A 0x02 0x0D 0x01 0x52 0x65 0x64 0x70 0x69 0x6E 0x65 0x5F 0x6E 0x74 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x23 0xA7 0x1F 0x1F 0x15 0x00 0x00 0x06 0x00 0x14 0x01 0x52 0x65 0x64 0x70 0x69 0x6E 0x65 0x5F 0x6E 0x74 0x31 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x23 0xA7 0x1F 0x1F 0x14 0x00 0x00 0x0D 0x0A

[ Go to top ]


rsi_join :: Wi-Fi Join

Description

This command is used for following:

  1. Associate to an access point (operating mode = 0 or 2)
  2. Create an Access Point (operating mode 6)
  3. To enable WPS PUSH method in Access point mode

Command Format

at+rsi_join=<ssid>,<data_rate>,<power_level>,<security_mode>,<join_feature_bitmap>,<listen_interval>,<vap_id>,<join_bssid>

Parameters

ssid (34 bytes)


Note!

  1. To support a comma , in the SSID, enclose the SSID in double quotes e.g. “MY, NETWORK”
  2. Double quotes " in the SSID are not supported.
  3. The maximum length of the SSID is 32 bytes; the remaining 2 bytes are reserved for NULL termination and internal alignment.

data_rate (1 byte)

Data Rate (Mbps) data_rate
Auto-rate 0
1 1
2 2
5.5 3
11 4
6 5
9 6
12 7
18 8
24 9
36 10
48 11
54 12
MCS0 13
MCS1 14
MCS2 15
MCS3 16
MCS4 17
MCS5 18
MCS6 19
MCS7 20

power_level (1 byte)

Mode Functionality
0 Low power (7 +/- 1) dBm
1 Medium power (10 +/- 1) dBm
2 High power (18 +/- 2) dBm
Mode Functionality
0 Low power (5 +/- 1) dBm
1 Medium power (7 +/- 1) dBm
2 High power (12 +/- 2) dBm

security_mode (1 byte)

Mode Functionality
0 Connect only to AP in open mode
1 Connect to AP in WPA mode
2 Connect to AP in WPA2 mode
3 Connect to AP in WEP open mode
4 Connect to AP in EAP WPA mode
5 Connect to AP in EAP WPA2 mode
6 Connect to AP in either WPA/WPA2 mode (Mixed mode → It gives priority to WPA2 configured AP)
7 Connect to AP in WPA3 mode

Note!


join_feature_bitmap (1 byte)

join_feature_bit_map Functionality Bit set to 0 Bit set to 1 Note and Info
join_feature_bit_map[0] b/g only mode in station mode Disable Enable
join_feature_bit_map[1] listen interval from join command Disable Enable
join_feature_bit_map[2] quick join feature Disable Enable This configuration from application will enables UMAC, to starts Authentication process with join command. This will skip the unicast probing process.
join_feature_bit_map[3] CCXV2 Disable Enable
join_feature_bit_map[4] AP based on BSSID Disable Enable
join_feature_bit_map[5] Management Frame Protection Capable only(802.11W) Disable Enable
join_feature_bit_map[6] Management Frame Protection required(802.11W) BIT[5] and BIT[6] valid when 11W (BIT[13] in ext custom feature bitmap) enabled, if both bits are not set it will disable PMF.
join_feature_bit_map[7] listen interval from powersave command Disable Enable

Note!

  1. BIT[5] and BIT[6] of join_feature_bit_map must be set for enabling WPA3 security.

listen_interval (4 bytes)


Note! To ensure data for module is buffered for sufficient time in access point,

  1. Listen interval in association request is incremented by 6 if user configured interval is greater than 11.
  2. If user configured listen interval less than or equal to 11, by default module will send listen interval 16 in association request. But during powersave module goes to sleep for user defined listen interval only

vap_id (1 byte)

join_bssid (6 bytes)


Note!

  1. vap_id will be considered only in concurrent mode.
  2. In concurrent mode, if connected station network is same as default dhcp server network then dhcp server will not start but join command for AP creation will give success message to host.
  3. For join with BSSID don’t use spaces or colons between MAC address in join command.

Example

To join particular AP in security mode,

Command

at+rsi_join=SILABS_AP,0,2,2
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6A 0x6F 0x69 0x6E 0x3D 0x4E 0x41 0x4E 0x20 0x48 0x6F 0x6D 0x65 0x2C 0x30 0x2C 0x32 0x2C 0x32 0x0D 0x0A

Response

OK
0x4F 0x4B 0x43 0x0D 0x0A

[ Go to top ]


rsi_timeout :: Set WLAN Timeouts

Description

This command is used to set various WLAN timeouts including authentication, association request timeouts, active scan time per channel and WLAN keepalive interval.

Command Format

at+rsi_timeout=<timeout_bitmap>,<timeout_value>

timeout_bitmap (4 bytes)

timeout_bitmap Functionality
timeout_bitmap[0] Sets timeout for association and authentication request. timeout_value is timeout value in milliseconds (default 300ms).
timeout_bitmap[1] Sets each channel active scan time in ms (default 100ms)
timeout_bitmap[2] Sets the WLAN keep alive time in seconds (default value is 30 s)

Note! For setting WLAN keepalive timeout need to give time out command before init. If timeout is given as 0 , keep alive functionality will be disabled.


Example

Set authentication and association request timeout to 1.5 seconds.

Command

at+rsi_timeout=1,1500
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x74 0x69 0x6D 0x65 0x6F 0x75 0x74 0x3D 0x31 0x2C 0x31 0x35 0x30 0x30 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_rejoin_params :: Wi-Fi Rejoin

Description

The module automatically tries to rejoin if its existing network connection is lost. During the rejoin process, if the host sends any command to the module, the module will not accept it and will return an error with the error code 0x37 . The module aborts the rejoin after a fixed number of re-tries (maximum number of retries for rejoin is 20 by default). If this happens, an asynchronous message is sent to the Host with an error code 25. User can configure the rejoin parameters using rejoin command.


Note! When rejoin fails, module will close all prior opened TCP/IP sockets.


Command Format

at+rsi_rejoin_params=<rsi_max_try>,<rsi_scan_interval>,<rsi_beacon_missed_count >,<rsi_first_time_retry_enabled>

Parameters

rsi_max_try (4 bytes)

rsi_scan_interval (4 bytes)

rsi_beacon_missed_count (4 bytes)

rsi_first_time_retry_enable (4 bytes)

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0025, 0x002C .

Asynchronous responses from module:

The following message indicates that module is in rejoin process. So, it is unable to process requested command.

ERROR<Error code=37>
0x45 0x52 0x52 0x4F 0x52 0x25 0x00 0x0D 0x0A

Following message to indicate rejoin failure to host.

ERROR<Error code=25>
0x45 0x52 0x52 0x4F 0x52 0x19 0x00 0x0D 0x0A

Availability

This command is available when the module is configured in Operating Mode 0, 2.

[ Go to top ]


rsi_wmm_config :: WMM PS

Description

This command is used to enable WMM Powersave configurations. This command should be issued before join command and before powersave command.

Command Format

at+rsi_wmm_config=<wmm_ps_enable>,<wmm_ps_type>,<wmm_ps_wakeup_interval>,<wmm_ps_uapsd_bitmap>

Parameters

wmm_ps_enable (2 bytes)

wmm_ps_type (2 bytes)

wmm_ps_wakeup_interval (4 bytes)

wmm_ps_uapsd_bitmap (1 byte)

wmm_ps_uapsd_bitmap Functionality
wmm_ps_uapsd_bitmap[0] Access category: voice
wmm_ps_uapsd_bitmap[1] Access category: video
wmm_ps_uapsd_bitmap[2] Access category: background
wmm_ps_uapsd_bitmap[3] Access category: Best effort U-APSD
wmm_ps_uapsd_bitmap[4:7] All set to 0 . Don't care bits.

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025, 0x002C .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

Command

at+rsi_wmm_config=1,1,0,10
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x77 0x6D 0x6D 0x5F 0x70 0x73 0x3D 0x31 0x2C 0x31 0x2C 0x30 0x2C 0x31 0x30 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_sleeptimer :: Set Sleep Timer

Description

This command configures the sleep timer of the module to go into sleep during powersave operation. The command can be issued any time in case of powersave mode 9. If this command is not issued, then by default module takes 3 seconds as sleep timer.

Command Format

at+rsi_sleeptimer=<time_value>

Parameters

time_value (2 bytes)

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0025, 0x002C .

Availability

This command is available when the module is configured in Operating Mode 0, 2.

[ Go to top ]


rsi_pwmode :: Power Mode

Description

This command configures the powersave mode of the module. Powersave is disabled by default. The command can be issued any time after the #join command in case of powersave mode 1, 2 and 3.

And after #init command before join command in case of powersave mode 8 and 9.


Note!

  1. RS9116-WiSeConnect doesn't support powersave modes while operating in AP or group owner mode.
  2. Powersave modes 2 and 8 are not supported in USB interface.
  3. In SPI interface when ULP mode is enabled, after wakeup from sleep, host must initialize SPI interface of the module.
  4. To use num_of_dtim_skip feature, listen interval should be disable in join command, listen_interval_dtim param in at+rsi_pwmode command should be 1 (DTIM alligned).

Command Format

at+rsi_pwmode=<power_value>,<ulp_mode_enable>,<listen_interval_dtim>,<psp_type>,<monitor_interval>,<num_of_dtim_skip>,<listen_interval>

Parameters

power_value (1 byte)

Mode Functionality
0 Powersave Mode 0 (Disable)
1 Powersave Mode 1
2 Powersave Mode 2
3 Powersave Mode 3
8 Powersave Mode 8
9 Powersave Mode 9

ulp_mode_enable (1 byte)

Mode Functionality Validity
0 Low Power Mode. power_value = 2 , 3 , 8 , 9
1 Ultra low power mode with RAM retention. power_value = 2 , 3 , 8 , 9
2 Ultra low power mode without RAM retention. power_value = 8 , 9

listen_interval_dtim (1 byte)

psp_type (1 byte)


Note!

  1. When Fast PSP is enabled, module will disable powersave for monitor_interval of time for each data packet received or sent.
  2. UAPSD powersave is valid only if wmm is enabled through at+rsi_wmm_config command

monitor_interval (2 bytes)

num_of_dtim_skip (1 byte)

listen_interval (2 bytes)


Note! To change the listen_interval dynamically, disable and then re-enable powersave with a new listen_interval .


Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025, 0x002C, 0xFFF8, 0x0015, 0x0026, 0x0052

Availability

This command is available when the module is configured in Operating Mode 0,5,9,13 Module can configure Coex modes are 1,5,9,12,13.

Powersave Operation

The behavior of the module differs according to the powersave mode configured. The following terminology is used in the below section in order to describe the functionality.

Protocol Non Connected State Connected State
WLAN This mode is significant when module is not connected with any AP. In non-connected state, powersave modes supported are 8 and 9. This mode is significant when module is in associated state with AP. In connected state, Powersave modes supported are 2 and 3.
BT Classic This mode is significant when module is in Idle (standby) state. This mode is significant when module is in Connected sniff mode, Discoverable mode (ISCAN) and Connectable mode (PSCAN)
BLE This mode is significant when module is in Idle (standby) state. This mode is significant when module is in Advertising state, scan state or connected state.

Note!

  1. In case of WLAN, wake up period will be calculated based on DTIM interval.
  2. In case of BT-Classic, wake up period will be calculated based on inquiry scan interval in discoverable mode, page scan interval in connectable mode and sniff interval in connected mode.
  3. In case of BLE, wake up period will be calculated based on advertise interval in advertising state, scan interval in scanning state and connection interval in connected state.
  4. If incase BT/BLE wakeup period is less than the WLAN wakeup period, the module will wake up and serves BT/BLE and goes back to the sleep again.

Powersave: Mode 0

In this mode, module is active and powersave is disabled. It can be configured any time, while powersave is enabled with powersave mode 2 or powersave mode 8.

Powersave: Mode 1

Once the module is configured in powersave mode 1, it wakes up periodically based upon the DTIM interval configured in the connected AP. In power mode 1, only the RF part of the module is in power save while SoC continues to work normally. This command has to be given only when the module is in the connected state (with the AP).

After configuring the module to powersave mode 1, the host can issue subsequent commands. In powersave mode 1, the module can receive data from the host at any point in time, but it can send/receive the data to/from the remote terminal (like a remote socket), only when it wakes up at DTIM interval.

Figure: Powersave: Mode 1

Powersave: Mode 2

Once the module is configured in powersave mode 2, it can be woken up either by the host or periodically during its sleep-wake-up cycle based upon the DTIM interval. Power mode 2 uses GPIO based handshake.

In ULP mode, feature_bit_map[4] has to be set in opermode command.

In this mode, when the host wants to send data to the module, it sends a wakeup request to the module by asserting ULP_GPIO_5 high in the case of LP or UULP_GPIO_2 in case of ULP (which make the module wake up from powersave). After wakeup, if the module is ready for data transfer, it sends a wakeup indication to the host by asserting the UULP_GPIO_3 or UULP_GPIO_0 .

The host is required to wait until the module gives the wakeup indication, before sending any data to the module. After completion of data, the host can give sleep permission to the module by de-asserting ULP_GPIO_5 in the case of LP or UULP_GPIO_2 in the case of ULP. After recognizing sleep permission from the host, the module confirms the host by de-asserting UULP_GPIO_3 or UULP_GPIO_0 and goes back to its sleep-wakeup cycle.

The module can send a received packet or response to the host at any point in time. No handshake is required on the receive path.

Figure: Powersave: Mode 2

Powersave: Mode 3

Powersave Mode 3 uses a Message-based handshake. In Powersave Mode 3, both radio and SoC of RS9116- WiSeConnect are in powersave.

This mode is significant when the module is connected to the AP. Module wakes up periodically every DTIM and sends a wakeup message ("WKP") to the host. The module cannot be woken up asynchronously.

Every time module intends to go to sleep it sends a sleep request message ("SLP") to the host and expects the host to send the ACK message ("ACK"). Host either sends an acknowledgment message ("ACK") or any other pending message. But once ACK is sent, the host should not send any other message until the next wakeup message from the module is received.

The module will not go into complete power save state if ACK is not received from the host for the sent sleep message ("SLP"). The module can send a received packet or response to the host at any point in time. No handshake is required on the receive path.

Powersave message Source
WKP from Module
SLP from Module
ACK from Host

Figure: Powersave Mode 3

Powersave: Mode 8

Powersave mode 8 uses GPIO based handshake. This command must be issued after the #init command. In Powersave Mode 8 both RF and SoC of RS9116-WiSeConnect are in complete powersave mode. This mode is significant when the module is not connected with any AP.

In ULP mode, feature_bit_map[4] has to be set in opermode command. In the case of LP (when ulp_mode_enable is 0 ) host can wake up the module from power save by asserting ULP_GPIO_5 . In the case of ULP (when ulp_mode_enable is 1 or 2 ) host can wake up the module from power save by asserting UULP_GPIO_2 .

When ulp_mode_enable is set to 0 or 1 , once the module gets a wake-up request from the host, DUT wakes up and indicates it is awake by asserting UULP_GPIO_3 or UULP_GPIO_0 based on the Wakeup indication GPIO selection in opermode command. The host is required to wait until the module gives the wakeup indication, before sending any next command to the module. After completion of command/data, the host can give sleep permission to the module by de-asserting ULP_GPIO_5 in the case of LP or UULP_GPIO_2 in the case of ULP. After recognizing sleep permission from the host, the module confirms the host by de-asserting UULP_GPIO_3 or UULP_GPIO_0 and goes back to its sleep-wakeup cycle.

The module can send a received packet or response to the host at any point in time. No handshake is required on the receive path.

When ulp_mode_enable is set to 2 , after the module wakes up from sleep, the host needs to start giving commands from the beginning(opermode) as the module's state is not retained.

Figure: Powersave Mode 8


Note! By default UULP_GPIO_3 is used for wakeup indication to host. If config_feature_bit_map[0] = 1 then UULP_GPIO_0 is used for wakeup indication to host.


Powersave: Mode 9

Powersave Mode 9 uses a Message-based handshake. In this mode, the entire module, including the radio, enters powersave mode. This mode is significant when the module is not connected with any AP.

After receiving a powersave mode 9 command, the module sends SLP (Sleep) request to the host and waits for an ACK from the host. After the ACK (Acknowledgement) is received, the module goes to sleep. The sleep timer starts when powersave command is received. It can be configured by the host using the at+rsi_sleeptimer command. If the host does not set any sleep time, the timer is configured for 3 seconds by default. Upon wakeup, the module sends a wakeup message to the host and expects the host to send an ack before it goes into the next sleep cycle. The host either sends an ACK or a message. However, once an ACK is sent, no other packet should be sent before receiving the next wakeup message.

Powersave message Source
WKP (WAKE UP) from Module
SLP from Module
ACK from Host

When ulp_mode_enable is set to 2 , after waking up from sleep, the module sends the wakeup from sleep message (WKP FRM SLEEP) to the host when RAM retention is not enabled. After receiving the message, the host needs to start giving commands from the beginning (opermode) as the module's state is not retained.

Powersave message Source
WKP FRM SLEEP from Module

Note! Sleep Timer starts when SLP request is sent to the host. Sleep time varies based on the ACK sent by the host. If the ACK sent by the host is delayed, Module will be in sleep state for the remaining time.

Figure: Powersave Mode 9

[ Go to top ]


rsi_psk :: Wi-Fi Pre-shared Key

Description

The command is used to set the PSK (Pre shared key) to join to WPA/WPA2-PSK enabled APs. Using this command user can also pass the PMK (PAIRWISE MASTER KEY) as a parameter and can also generate PMK by providing PSK and SSID of connecting AP.

User can directly give PMK from host to reduce the connection time. This command should be issued after init and before join command, if module needs to connect to an secure Access point. This command can be ignored if the AP is in Open mode.

Command Format

Standard PSK Format

at+rsi_psk=<psk_type>,<psk_or_pmk>,<ap_ssid>

Length-based PSK Format enables a comma in the PSK

at+rsi_psk=<psk_type>,<length_of_psk>,<psk_or_pmk>,<ap_ssid>

Parameters

psk_type (1 byte)

length_of_psk (1 byte)

psk_or_pmk (64 bytes)


ap_ssid (34 bytes)

Response

Response contains following payload only if psk_type = 3 or 5 . In case of psk_type = 1 or 2 , response does not contain any payload.

Result Code Description
OK Success. If TYPE value is 1 or 2
OK Success. If TYPE value is 3 or 5
ERROR <Error code> Failure

Pair wise master key of 32-bytes is given to host if psk_type is 3 or 5.

Possible error codes for this command are 0x0021, 0x0025, 0x0026, 0x0028, 0x002C, 0x0039, 0x003a, 0x003b .

Availability

This command is available in operating mode 0.

Example 1

To join a WPA2-PSK security enabled network with key "12345ABCDE", the command is

Command

at+rsi_psk=1,12345ABCDE
0x61 0x740x2B0x720x730x690x5F 0x70 0x73 0x6B 0x3D 0x31 0x2c 0x31 0x32 0x33 0x34 0x35 0x41 0x42 0x43 0x44 0x45 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

Example 2

To join a WPA2-PSK security enable network with pairwise_master_key "ABCDEFABCDEFABCDEF12345678901234ABCDEFABCDEFABCDEF12345678901234",the command is:

Command

at+rsi_psk=2,ABCDEFABCDEFABCDEF12345678901234ABCDEFABCDEFABCDEF12345678901234

Response

OK
0x4F 0x4B 0x0D 0x0A

Example 3

To generate pairwise_master_key for the pre_shared_key = 12345678 and SSID MY_NETWORK_NAME , the command is

Command

at+rsi_psk=3,12345678,MY_NETWORK_NAME

Response

OK <pairwise_master_key>
0x4F 0x4B <32bytes of pairwise_master_key> 0x0D 0x0A

[ Go to top ]


rsi_wepkey :: Set WEP Keys

Description

This command configures the WEP key in the module to connect to an AP with WEP security. This command should be issued before join.

Command Format

at+rsi_wepkey=<index>,<key1>,<key2>,<key3>,<key4>

Parameters

index (2 bytes)

keyX

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025, 0x002C, 0x002D

Availability

This command is available when the module is configured in Operating Mode 0.

Example

Provide 4 WEP keys:

Command

at+rsi_wepkey=0,ABCDE12345,ABCDE12346,ABCDE12347, ABCDE12348

Provide one WEP key:

Command

at+rsi_wepkey=0,ABCDE12345,0,0,0

at+rsi_wepkey=2,0,0,ABCDE12345,0

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_authmode :: WEP Authentication Mode

Description

This command configures the authentication mode for WEP in the module, if the AP is in WEP security mode.

Command Format

at+rsi_authmode=<auth_mode>

Parameters

auth_mode

Response

Result Code Description
OK Success
ERROR <Error code> Failure,

Possible error codes are 0x0021, 0x0025, 0x002C, 0xFFF8, 0x002D

Availability

This command is available when the module is configured in Operating Mode 0

Example

Command

at+rsi_authmode=0
0x61 0x74 0x2B0x72 0x73 0x69 0x5F 0x61 0x75 0x74 0x68 0x6D 0x6F 0x64 0x65 0x3D 0x30 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_eap :: EAP Configuration

Description

This command is used to configure the EAP parameters for connecting to an Enterprise Security enabled Access Point. The supported EAP types are EAP-TLS , EAP-TTLS , EAP-PEAP , EAP-FAST and EAP-LEAP . EAP-GTC is not supported for EAP-FAST. This command can be sent any time after rsi_init and rsi_join in enterprise security mode.

Command Format

at+rsi_eap =<eap_method>,<inner_method>,<user_identity>,<password>,<okc>,<private_key_password>

Parameters

eap_method (32 bytes)

inner_method (32 bytes)

user_identity (64 bytes)

password (128 bytes)

okc (4 bytes)

private_key_password (82 bytes)

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025, 0x002C

Availability

This command is available when the module is configured in Operating Mode 2.

Example

Command

at+rsi_eap=PEAP,MSCHAPV2,user1,12345678,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x65 0x61 0x70 0x3D 0x50 0x45 0x41 0x50 0x2C 0x4D 0x53 0x43 0x48 0x41 0x50 0x56 0x32 0x2C 0x75 0x73 0x65 0x72 0x31 0x2C 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x2C 0x30 0x0D 0x0A

See the AT Command Example reference for additional examples.

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_cert :: Set TLS Certificate

Description

This command is used to load/erase SSL/TLS (certificate and private keys) and enterprise security (EAP-TLS or EAP-FAST) certificates. Certificates should be loaded before using SSL/EAP. This command should be sent before join command for enterprise security mode and before socket creation for SSL sockets. Certificates will be loaded in non-volatile memory of the module, so that loading certificate is required to be done only once.


Note!


Command Format

at+rsi_cert =<cert_type>,<total_len>,<key_pwd>,<certificate>

Parameters

cert_type (1 byte)

cert_type Type of certificate
1 EAP client certificate
2 FAST PAC file
3 SSL Client Certificate
4 SSL Client Private Key
5 SSL CA Certificate
6 SSL Server Certificate
7 SSL Server Private Key
17 EAP private key
33 EAP public key
49 EAP CA certificate

total_len (2 bytes)


Note!

key_pwd(128 bytes)

certificate

at+rsi_cert=<cert_type>,0,0,0

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0015, 0x0021, 0x0025, 0x0026, 0x002C

Availability

This command is available when the module is configured in Operating Mode 0,2

Example

The following example shows the procedure for loading certificates using Python on a PC. Requirements: Python 2.7.10 and pyserial

It may not be possible to issue this command in Hyper-terminal because the content of a certificate file needs to be supplied as one of the inputs of the command. This can be done by other means, such as using a Python script.

  1. Loading or erasing the certificates should be performed only after the opermode command has been issued.
  2. Before loading the certificate, certificates should be erase the certificate.
  3. To load the certificate, run the python script load_certificate.py available in the WiSeConnect SDK utilities folder

Command

at+rsi_cert=1,0,0,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x63 0x65 0x72 0x74 0x3D 0x31 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_cert_index :: Set Certificate With Index

Description

This command is used to load/erase SSL (certificate and private keys). Certificates should be loaded before using TLS. This command should be sent before socket creation for TLS sockets. Certificates will be loaded in non-volatile memory of the module, so that loading certificate is required to be done only once.


Note!


Command Format

at+rsi_cert_index =<cert_type>,<total_len>,<cert_index>,<key_pwd>,<certificate>

Parameters

cert_type (1 byte) | cert_type | Type of certificate | |------------------|----------------------| | 1 | EAP Client certificate | | 2 | FAST PAC file | | 3 | SSL Client Certificate | | 4 | SSL Client Private Key | | 5 | SSL CA Certificate | | 6 | SSL Server Certificate | | 7 | SSL Server Private Key | | 17 | EAP private key | | 33 | EAP public key | | 49 | EAP CA certificate |

total_len (2 bytes)


Note!


cert_index (1 byte)

key_pwd (127 bytes)

certificate

at+rsi_cert_index=<cert_type>,0<cert_index>,0,0.

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0015, 0x0021, 0x0025, 0x0026, 0x002C, 0x005D, 0x005E, 0x005F .

Availability

This command is available when the module is configured in Operating Mode 0, 2.

Example

The following example shows the procedure for loading certificates using Python on a PC. Requirements: Python 2.7.10 and pyserial

It may not be possible to issue this command in Hyper-terminal because the content of a certificate file needs to be supplied as one of the inputs of the command. This can be done by other means, such as using a Python script.

  1. Loading or erasing the certificates should be performed only after the opermode command has been issued.
  2. Before loading the certificate, certificates should be erase the certificate.
  3. To load the certificate, run the python script load_certificate.py available in the WiSeConnect SDK utilities folder

After successful certificate loading,scripts give 'OK' as response.

For erasing certificate with index 0:

Command

at+rsi_cert_index=1,0,0,0,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x63 0x65 0x72 0x74 x5F 0x69 0x6E 0x78 0x3D 0x31 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_disassoc :: Wi-Fi Disassociate

Description

This command is issued to request the module to disassociate (disconnect) from an Access Point. The Host can then issue a fresh set of #init, #scan and #join commands to connect to a different Access Point or the same Access Point with a different set of connection parameters. This command can also be used to stop the module from continuing an on-going rejoin operation. Additionally, this command is used when the module is in AP mode, to remove clients from its list of connected nodes.

Command Format

at+rsi_disassoc=<mode_flag>,<client_mac_addr>

Parameters

mode_flag (2 bytes)

Mode Functionality
0 Module is in client mode. The second parameter mac_addr is ignored when mode is 0.
1 Module is in AP mode.

client_mac_addr (6 bytes)

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0006, 0x0013, 0x0021, 0x002C, 0x0015 .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.


Note! After issuing disconnect command, any powersave enabled by that time will be disabled. User can reissue the powersave command after initializing the module again.


Example 1

Module is in client mode and is connected to an AP. It wants to formally disconnect from the AP.

Command

at+rsi_disassoc=0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x64 0x69 0x73 0x61 0x73 0x73 0x6F 0x63 0x3D 0x30 0x0D 0x0A

Example 2

Module is in AP mode and 3 clients are connected to it. One of the clients, with MAC 0x01 0x02 0x03 0x040 0x05 0x06, needs to be disconnected by the AP.

Command

at+rsi_disassoc=1,010203040506
0x61 0x740x2B0x720x730x690x5F 0x64 0x69 0x73 0x61 0x73 0x73 0x6F 0x63 0x3D 0x31 0x2C 0x30 0x31 0x30 0x32 0x30 0x33 0x30 0x34 0x30 0x35 0x30 0x36 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_ipconf :: Set IP Parameters

Description

This command configures the IP address, subnet mask and default gateway for the module.

Command Format

at+rsi_ipconf=<dhcp_mode>,<ip_addr>,<netmask>,<gateway>,<hostname>,<vap_id>,<fqdn_flag>

Parameters

dhcp_mode (1 byte)


Note!


ip_addr (4 bytes)

netmask (4 bytes)

gateway (4 bytes)

hostname (31 bytes)

vap_id (1 byte)

fqdn_flag (4 bytes)

Response

Result Code Description
OK <MAC_Address><IP_Address><Subnet_Mask><Gateway> Success
ERROR <Error code> Failure

where ...

Possible error codes are 0x0021, 0x0025, 0x002C, 0xFFFC, 0xFF74, 0xFF9C, 0xFF9D .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example 1

To configure in manual mode, with

Command

at+rsi_ipconf=0,192.168.1.3,255.255.255.0,192.168.1.1
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x69 0x70 0x63
0x6F 0x6E 0x66 0x3D 0x30 0x2C 0x31 0x39 0x32 0x2E
0x31 0x36 0x38 0x2E 0x31 0x2E 0x33 0x2C 0x32 0x35
0x35 0x2E 0x32 0x35 0x35 0x2E 0x32 0x35 0x35 0x2E
0x30 0x2C 0x31 0x39 0x32 0x2E 0x31 0x36 0x38 0x2E
0x31 0x2E 0x31 0x0D 0x0A

Response

OK <MAC_Address><IP_Address><Subnet_Mask><Gateway>
0x4F 0x4B 0x01 0x02 0x03 0x04 0x05 0x06 0xC0 0xA8 0x01 0x03 0xFF 0xFF 0xFF 0x00 0xC0 0xA8 0x01 0x01 0x0D0x0A

Example 2

To configure the IP in DHCP enabled mode.

Command

at+rsi_ipconf=1,0,0,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x69 0x70 0x63 0x6F 0x6E 0x66 0x3D 0x31 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x0D 0x0A

Response

OK <MAC_Address><IP_Address><Subnet_Mask><Gateway>
0x4F 0x4B 0x01 0x02 0x03 0x04 0x05 0x06 0xC0 0xA8 0x01 0x03 0xFF0xFF0xFF0x000xC00xA80x010x01 0x0D 0x0A

Example 3

To configure the IP in DHCP enabled mode with hostname.

Command

at+rsi_ipconf=3,dhcp_client
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x69 0x70 0x63 0x6F 0x6E 0x66 0x3D 0x31 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x0D 0x0A

Response

OK <MAC_Address><IP_Address><Subnet_Mask><Gateway>
0x4F 0x4B 0x01 0x02 0x03 0x04 0x05 0x06 0xC0 0xA8 0x01 0x03 0xFF0xFF0xFF0x000xC00xA80x01 0x01 0x0D 0x0A

[ Go to top ]


RSI_IPCONF :: IP Change Notification

Description

This notification is received when module gets a different IP compared to modules old IP address, after DHCP renewal. Module indicates this IP change to host by an asynchronous frame.

Notification Format

AT+RSI_IPCONF<mac_addr><ip_addr><netmask><gateway>

where ...

mac_addr (6 bytes)

netmask (4 bytes)

gateway (4 bytes)

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

Command

at+rsi_ipconf<macAddr><ip_addr><netmask><gateway>
0x41 0x54 0x2B 0x52 0x53 0x49 0x5F 0x49 0x50 0x43 0x4F 0x4E 0x46 0x3D 0x01 0x02 0x03 0x04 0x05 0x06 0xC0 0xA8 0x01 0x03 0xFF 0xFF 0xFF 0x00 0xC0 0xA8 0x01 0x01 0x0D 0x0A

[ Go to top ]


rsi_tcp :: Open a Socket

Description

This command is used to establish either a client or server socket.


Note!

Case 7 is valid only when BIT(27) is not set in tcp_ip_feature_bit_map (module will use TLS certificates from FLASH).

If BIT(27) (TLS certificate on to the RAM feature) is set in tcp_ip_feature_bit_map, module only supports either TLS server socket or TLS Client socket.


Command Format

UDP Client (IPv4)

at+rsi_udp=<dest_ip_addr>,<dest_port>,<local_port>,<tos>,<socket_bitmap>,<vap_id>

UDP Server (IPv4)

at+rsi_ludp=<local_port>,<tos>,<socket_bitmap>,<vap_id>

TCP/TLS/Web Client (IPv4)

at+rsi_tcp=<dest_ip_addr>,<dest_port>,<local_port>,<tos>,<tls_ws_enable>,<tls_ciphers_bitmap>,<webs_resource_name>, <webs_host_name>,<tcp_retry_count>,<socket_bitmap>,<rx_window_size>,<tcp_keepalive_timeout>,<vap_id>,<cert_index>

TCP/TLS/Web Server (IPv4)

at+rsi_ltcp=<local_port>,<max_count>,<tos>,<tls_ws_enable>,<tls_ciphers_bitmap>,<tcp_retry_count>,<socket_bitmap>,<rx_window_size>,<tcp_keepalive_timeout>,<vap_id>,<cert_index>

Note! When using TCP sockets, it is recommended to set ext_tcp_ip_feature_bit_map[16] when configuring the operating mode using the command: rsi_opermode .


Parameters

dest_ip_addr

dest_ip_addr (4 bytes)

local_port (2 bytes)

dest_port (2 bytes)

max_count (2 bytes)


Note! Module supports maximum two TLS sockets, so max_count should be less than or equal to 2 when a listening TCP server (LTCP) is used. If max_count is 2 then host can create only one TLS based LTCP socket with two clients support. This field max_count can be ignored if the socket type is other than 2 (TCP server).


tos (4 bytes)

TOS Value Description
0 Best Effort
1 Priority
2 Immediate
3 Flash-mainly used for voice signaling
4 Flash Override
5 Critical - mainly used for voice RTP (Real-time Tranlocal_port Protocol)
6 Internet
7 Network

tls_ws_enable (1 byte)


Note! To support TLS sockets with multiple TLS Versions, set ext_custom_feature_bitmap[14] = 1


tls_ciphers_bitmap (4 bytes)

Bit Position Value Name
BIT[1] 2 TLS_RSA_WITH_AES_256_CBC_SHA256
BIT[2] 4 TLS_RSA_WITH_AES_128_CBC_SHA256
BIT[3] 8 TLS_RSA_WITH_AES_256_CBC_SHA
BIT[4] 16 TLS_RSA_WITH_AES_128_CBC_SHA
BIT[5] 32 TLS_RSA_WITH_AES_128_CCM_8
BIT[6] 64 TLS_RSA_WITH_AES_256_CCM_8
Bit Position Macro Set to 0 Set to 1
BIT[ 0] BIT_TLS_RSA_WITH_AES_256_CBC_SHA256 Disable Enable
BIT[ 1] BIT_TLS_RSA_WITH_AES_128_CBC_SHA256 Disable Enable
BIT[ 2] BIT_TLS_RSA_WITH_AES_256_CBC_SHA Disable Enable
BIT[ 3] BIT_TLS_RSA_WITH_AES_128_CBC_SHA Disable Enable
BIT[ 4] BIT_TLS_RSA_WITH_AES_128_CCM_8 Disable Enable
BIT[ 5] BIT_TLS_RSA_WITH_AES_256_CCM_8 Disable Enable
BIT[ 6] Reserved
BIT[ 7] Reserved
BIT[ 8] BIT_TLS_DHE_RSA_WITH_AES_12_8_GCM_SHA256 Disable Enable
BIT[ 9] BIT_TLS_DHE_RSA_WITH_AES_25_6_GCM_SHA384 Disable Enable
BIT[10] BIT_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 Disable Enable
BIT[11] BIT_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 Disable Enable
BIT[12] Reserved
BIT[13] Reserved
BIT[14] BIT_TLS_DHE_RSA_WITH_AES_25_6_CBC_SHA256 Disable Enable
BIT[15] BIT_TLS_DHE_RSA_WITH_AES_12_8_CBC_SHA256 Disable Enable
BIT[16] BIT_TLS_DHE_RSA_WITH_AES_25_6_CBC_SHA Disable Enable
BIT[17] BIT_TLS_DHE_RSA_WITH_AES_12_8_CBC_SHA Disable Enable
BIT[18] BIT_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 Disable Enable
BIT[19] BIT_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 Disable Enable
BIT[20] BIT_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA Disable Enable
BIT[21] BIT_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA Disable Enable
BIT[22] BIT_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 Disable Enable
BIT[23] BIT_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 Disable Enable
BIT[24] BIT_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA Disable Enable
BIT[25] BIT_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA Disable Enable
BIT[26] BIT_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA Disable Enable
BIT[27] BIT_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA Disable Enable
BIT[28] Reserved
BIT[29] Reserved
BIT[30] Reserved
BIT[31] SSL_NEW_CIPHERS Disable Enable

Note! The RS9116 does not include hardware support for GCM based ciphers. Use of these ciphers may impact performance since related crypto operations are performed by software.


Curve Id Description
15 secp160k1
16 secp160r1
17 secp160r2
18 secp192k1
19 secp192r1
20 secp224k1
21 secp224r1
22 secp256k1
23 secp256r1
24 secp384r1
25 secp521r1
26 brainpoolP256r1
27 brainpoolP384r1
28 brainpoolP512r1

webs_resource_name (51 bytes)

webs_host_name (51 bytes)

tcp_retry_count (1 byte)

socket_bitmap (1 byte)

socket_bitmap Functionality Description
socket_bitmap[0] Synchronous data read Module sends data to host only after receiving data read request from host.
socket_bitmap[1] TCP socket To open a listening TCP socket and to accept client connection, host need to provide accept command.
socket_bitmap[2] TCP ACK indication When this bit is enabled module gives an TCP ACK indication (Frame type 0xAB) to host after receiving TCP ACK from remote peer.Host has to send next data packet to module only after receiving this TCP ACK indication
socket_bitmap[3] If this bit is set module handles small sized received packets effectively. Recommended to set for the sockets which receive small size packets
socket_bitmap[4] TCP RX window size When this bit is enabled, module opens socket with RX window size based on the value provided in rx_window_size field
socket_bitmap[5] Enable certificate indexing When socket_bitmap[5] = 1 , certificate configured with cert_index is used, otherwise defaults certificate(s) are used.

rx_window_size (1 byte)

tcp_keepalive_timeout (2 bytes)

vap_id

cert_index (1 byte)


Note! Index-based certificate loading is valid only for storing certificates on to ram or flash but not both at a time.


Response

TCP/SSL/Web socket over IPv4

Result Code Description
OK <ip_version> <socket_type> <socket_descriptor> <local_port> <dest_port> <local_ip_addr> <dest_ip_addr> <mss> <window_size> Success.
ERROR <Error code> Failure

TCP/SSL server socket over IPv4 / LUDP socket over IPv4

Result Code Description
OK <ip_version> <socket_type> <socket_descriptor> <local_port> <ip_addr> Success.
ERROR <Error code> Failure

where ...

Possible error codes are 0xBB46, 0xBB22, 0xBB23, 0xBB33, 0xBB34, 0xBB35, 0xBB36, 0xBB45, 0xBB46, 0x0015, 0x0021, 0x0025, 0x002C, 0xFF74, 0xBBD3, 0xBBD2, 0xBBD1, 0xFF80

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example 1

Open TCP socket over IPv4

Command

at+rsi_tcp=192.168.0.2,34000,1234,0,0,0,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x74 0x63 0x70 0x3D 0x31 0x39 0x32 0x2E 0x31 0x36 0x38 0x2E 0x30 0x2E 0x32 0x2C 0x33 0x34 0x30 0x30 0x30 0x2C 0x31 0x32 0x33 0x34 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x0D 0x0A

Response

OK <ip_version =0x04 0x00><socket_type =0x0000><socket_descriptor =0x0001><local_port=0x4d2><dest_port = 0x84D0><local_ip_addr= 0xC0 0xA8 0x00 0x04 0x00(12 times)><dest_ip_addr= 0xC0 0xA8 0x00 0x02 0x00(12 times)><mss =0x8C 0x05><window_size =0x00 0x00 0xFF 0xFF>

0x4F 0x4B 0x04 0x00 0x00 0x00 0x01 0x00 0xD2 0x04 0xD0 0x84 0xC0 0xA8 0x00 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xC0 0xA8 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x8C 0x05 0xFF 0xFF 0x00 0x00 0x0D 0x0A

Example 2

Open High performance TCP socket over IPv4

Command

at+rsi_tcp=192.168.0.2,8000,1236,0,128,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x74 0x63 0x70 0x3D 0x31 0x39 0x32 0x2E 0x31 0x36 0x38 0x2E 0x30 0x2E 0x32 0x2C 0x38 0x30 0x30 0x30 0x2C 0x31 0x32 0x33 0x36 0x2C 0x30 0x2C 0x31 0x32 0x38 0x2C 0x30 0x0D 0x0A

Response

OK <ip_version =0x04 0x00><socket_type =0x0000><socket_descriptor =0x0001><local_port=0x4d2><dest_port = 0x1F40><local_ip_addr= 0xC0 0xA8 0x00 0x02 0x00(12 times)> <dest_ip_addr= 0xC0 0xA8 0x00 0x04 0x00(12 times)><mss=0x8C 0x05><window_size =0x00 0x00 0xFF 0xFF>

0x4F 0x4B 0x04 0x00 0x00 0x00 0x01 0x00 0xD4 0x04 0x40 0x1F 0xC0 0xA8 0x00 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xC0 0xA8 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x8C 0x05 0xFF 0xFF 0x00 0x00 0x0D 0x0A

Example 3

Open Web socket over IPv4

Command

at+rsi_tcp=174.129.224.73,80,1234,0,2,0,echo.websocket.org
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x74 0x63 0x70 0x3D 0x31 0x37 0x34 0x2E 0x31 0x32 0x39 0x2E 0x32 0x32 0x34 0x2E 0x37 0x33 0x2C 0x38 0x30 0x2C 0x35 0x30 0x30 0x30 0x2C 0x30 0x2C 0x32 0x2C0x30 0x2C 0x2C 0x65 0x63 0x68 0x6F 0x2E 0x77 0x65 0x62 0x73 0x6F 0x63 0x6B 0x65 0x74 0x2E 0x6F 0x72 0x67 0x3C 0x43 0x52 0x3E 0x3C 0x4C 0x46 0x3E

Response

OK <ip_version =0x04 0x00><socket_type =0x0000><socket_descriptor =0x0001><local_port
=0x4d2><ipv4_addr= 0xC0 0xA8 0x28 0x12 0x00(12 times)> <mss =0xB4 0x05><window_size =0x00 0x00 0x01 0x0>

0x4F 0x4B 0x04 0x00 0x00 0x00 0x01 0x00 0xd2 0x04 0xC0 0xA8 0x28 0x12 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xB4 0x05 0x00 0x00 0x01 0x00 0x0D 0x0A

Example 4

Open LTCP socket over IPv4

Command

at+rsi_ltcp=5001,5,0,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6C 0x74 0x63 0x70 0x3D 0x35 0x30 0x30 0x31 0x2C 0x35 0x2C 0x30 0x2C 0x30 0x0D 0x0A

Response

OK <ip_version><socket_type><socket_handle><Lport><local_ip_addr>

OK <ip_version=0x040x00><socket_type=0x0002><socket_descriptor=0x0001><local_port=0x1389><ip_addr = 0xC0 0xA8 0x01 0x6B 0x00(28 times)>

0x4F 0x4B 0x04 0x00 0x02 0x00 0x01 0x00 0x89 0x13 0x00 0x00 0xC0 0xA8 0x01 0x6B 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0D 0x0A

Example 5

Open UDP socket over IPv4:

Command

at+rsi_udp=192.168.1.104,5001,5001,0,0,0,0,0,0

0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x75 0x64 0x70 0x3D 0x31 0x39 0x32 0x2E 0x31 0x36 0x38 0x2E 0x31 0x2E 0x31 0x30 0x34 0x2C 0x35 0x30 0x30 0x31 0x2C 0x35 0x30 0x30 0x31 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x2C 0x30 0x0D 0x0A

Response

OK <ip_version=0x04 0x00><socket_type=0x0001><socket_descriptor =0x0001><local_port=0x1389><ip_addr= 0xC0 0xA8 0x01 0x66 0x00(28 times) >

0x4F 0x4B 0x04 0x00 0x01 0x00 0x01 0x00 0x89 0x13 0x89 0x13 0xC0 0xA8 0x01 0x66 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xC0 0xA8 0x01 0x68 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0D 0x0A

Example 6

Open LUDP socket over IPv4

Command

at+rsi_ludp=5001
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6C 0x75 0x64 0x70 0x3D 0x35 0x30 0x30 0x31 0x0D 0x0A

Response

OK <ip_version =0x04 0x00><socket_type=0x0004><socket_descriptor=0x0001><local_port=0x4d2><ip_addr= 0xC0 0xA8 0x28 0x12 0x00(28 times)>

0x4F 0x4B 0x04 0x00 0x04 0x00 0x01 0x00 0x89 0x13 0x00 0x00 0xC0 0xA8 0x01 0x6B 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0D 0x0A

[ Go to top ]


RSI_LTCP_CONNECT :: TCP Socket Connection Notification

Description

If a server TCP socket is opened in the module, the socket remains in listening state until the time the remote terminal opens and binds a corresponding client TCP socket. Once the socket binding is done, the module sends an asynchronous notification message to the Host to indicate that its server socket is now connected to a client socket.

Notification Format

Result Code Description
AT+RSI_LTCP_CONNECT=<ip_version><socket_id>,<from_port_num>,<ip_address><mss><window_size><src_port_num> Asynchronous message from modue to host on TCP connection establishment .

where ...

ip_version (2 bytes)

socket_id(2 bytes)

from_port_num(2 bytes)

ip_address (16 bytes)

mss (2 bytes)

window_size (4 bytes)

src_port_num (2 bytes)

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

[ Go to top ]


rsi_ctcp :: Query TCP Server Socket Status

Description

This command is issued for knowing the TCP socket connection status when the module acts as a TCP server.

Command Format

at+rsi_ctcp=<socket_descriptor>

Parameters

socket_descriptor (2 bytes)

Response

Result Code Description
OK <socket_descriptor><ip_version><ip_address><dest_port> Successful Execution of Command.
ERROR Failure

where ...

socket_descriptor (2 bytes)

ip_version (2 bytes)

dest_port (2 bytes)

Possible error codes are 0x0021, 0x0025, 0x002C, 0xFF86, 0xFFFA, 0xFF82 .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

Command

at+rsi_ctcp=7
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x63 0x74 0x63 0x70 0x3D 0x37 0x0D 0x0A

Response

OK <socket_descriptor=7><ip_version><ipv4_address =192.168.40.10><dest_port=8001>
0x4F 0x4B 0x07 0x00 0x04 0xC0 0xA8 0x28 0x0A 0x41 0x1F 0x0D 0x0A

[ Go to top ]


rsi_cls :: Close Socket

Description

This command closes a TCP/LTCP/UDP/SSL/Web socket in the module.

Command Format

at+rsi_cls=<socket_descriptor>,<port_number>

Parameters

socket_descriptor (2 bytes)

port_number (2 bytes)


Note!

  1. This field will be ignored in case of closing UDP/TCP client sockets.
  2. To use port based socket close to close all LTCP sockets, user has to set socket_handle as zero.
  3. For web socket: If close command is given socket will be closed without waiting for server to initiate web socket close.

Response

Result Code Description
OK <socket_dsc><bytes_sent > Successful execution of command
ERROR <Error code> Failure

where ...

socket_dsc (2 bytes)

bytes_sent (4 bytes)


Note! In the case of TCP socket, when a remote peer closes the socket connection, the module sends the AT+RSI_CLOSE<socket_handle><number of bytes sent> message to the Host. This is an asynchronous message sent from module to host and not the response of a specific command. Socket_handle is sent in 2 bytes, number of bytes sent is 4 bytes in hex. The least significant byte is returned first. AT+RSI_CLOSE is returned in uppercase and ASCII format


Possible error codes are 0x0021, 0x0025, 0x002C, 0xFF86, 0xBB35, 0xBB27, 0xBB42

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

To close the socket with handle 1, the command is

Command

at+rsi_cls=1
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x63 0x6C 0x73 0x3D 0x31 0x0D 0x0A

Response

OK <socket_handle><number of bytes sent>
0x4F 0x4B 0x01 0x00 0x01 0x02 0x03 0x04 0x0D 0x0A

[ Go to top ]


rsi_snd :: Send Data

Description

This command is used to send data from the host to the module, which is transmitted.


Note! The following table lists the maximum individual chunk of data that can be sent over each supported protocol.

Protocol Maximum data chunk (bytes)
TCP/LTCP socket 1460
LUDP socket 1472
Web socket 1450
TCP-SSL/LTCP-SSL 1370
Web socket over SSL 1362

Command Format

at+rsi_snd=<socket_descriptor>,<send_buf_len>,<dest_ip_addr>,<dest_port>,<send_data_buf>

Parameters

socket_descriptor (2 byte)

send_buf_len (4 bytes)

dest_ip_addr (4 bytes)

dest_port (2 bytes)

Mode Functionality
0 Continuation frame
1 Text frame
2 Binary frame
3-7 Reserved for further non-control frames
8 Connection close frame
9 Ping frame
10 Pong frame
11-15 Reserved for further control frames
FIN Bit 0 : More web socket frames to be followed. 1 : Final frame web socket message.

send_data_buf (1400 bytes)

Response

Result Code Description
OK <length> (or) 2 bytes length (2 bytes hex), length of data sent.
OK <socket id><length> 1 byte socket id, 2 bytes length (2 bytes hex), length of data sent.
ERROR <Error code> Failure. On a failure while sending the data on the TCP socket, if the error code indicates "TCP connection closed", then the module closes the socket. Possible error codes are 0x0030, 0xFFFE, 0xFF7E, 0xFFF8, 0x003F, 0xFFF7.

Note!

  1. When enabled the socket bit map(2)(open socket), the send response gives 3bytes. User needs to consider the following for snd command if TCP_ACK(bit[2] is enabled. User will get an immediate OK <socket id ><length> response for snd command. This indicates the snd command transaction happened successfully at the host interface level. This doesn’t mean that the packet is successfully transmitted to the remote peer. Module responds with OK <socket id ><length> and takes the next snd command till it has buffers to buffer those packets.
  2. In case of SSL socket the response of send command gives length of data (Includes SSL data) on the TCP socket.
  3. The parameter send_data_buf contains the actual data not the ASCII representations of the data. User need to consider following for "snd" command in case of UART mode. User will get an immediate OK <length> response for snd command. This indicates the snd command transaction happened successfully at the host interface level. This doesn't mean that the packet is successfully transmitted to the remote peer. Module responds with OK <length> and takes the next snd command till it has buffers to buffer those packets. User need to take care that the data_len value that is given in snd command should be same as the number of bytes that are getting transmitted with snd command.
  4. In TCP/IP bypass mode, only <send_data_buf> parameter is valid and remaining parameters are dummy user can send dummy parameter as 0. After successfull joining in TCP/IP bypass mode, user can use this 'at command' to communicate further. For example, at+rsi_snd=0,0,0,0,<ARP broadcast>

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.


Note! Byte Stuffing is handled as described in the following text.

The '' character sequence (0x0D, 0x0A in hex) is used to indicate the termination of an AT command. If the actual data to be sent from Host comprises of characters in sequence, the host should replace this set of characters with (0xDB) and (0xDC). If (0xDB) itself is part of the data then (0xDB 0xDD ) has to be sent. If (0xDB 0xDC) itself is part of the data then (0xDB 0xDD 0xDC) has to be sent. If either 0xDD or 0xDC is not sent after 0xDB, then an error (-9) is sent.

Example 1. If 0x41 0x42 0x43 0x0D 0x0A is the actual data stream that needs to be sent then the command is

at+rsi_snd <hn> <sz=5> <Dip> <dest_port> <0x41> <0x42> <0x43> <0xDB> <0xDC> <0x0D> <0x0A>

Example 2. If 0x41 0x42 0x43 0x0D 0x0A 0x31 0x32 is the actual data stream that needs to be sent then the command is

at+rsi_snd <hn> <sz=7> <Dip> <dest_port> <0x41> <0x42> <0x43> <0xDB> <0xDC> <0x31> <0x32> <0x0D> <0x0A>

Example 3. If 0x41 0x42 0x43 0xDB 0x31 0x32 is the actual data stream that needs to be sent then the command is

at+rsi_snd <hn> <sz=7> <Dip> <dest_port> <0x41> <0x42> <0x43> <0xDB> <0xDD> <0x31> <0x32> <0x0D> <0x0A>

Example 4. If 0x41 0x42 0x43 0xDB 0xDC 0x31 0x32 is the actual data that needs to be transmitted, then the command is

at+rsi_snd <hn> <sz=8> <Dip> <dest_port> <0x41> <0x42> <0x43> <0xDB><0xDD><0xDC> <0x31><0x32> <0x0D> <0x0A>

Example 5. If 0x41 0x42 0x43 0x0D 0x0A 0xDB 0x31 0x32 is the actual data that needs to be transmitted, then the command is

at+rsi_snd <hn> <sz=9> <Dip> <dest_port> <0x41> <0x42> <0x43> <0xDB><0xDC> <0xDB> <0xDD> <0x31> <0x32> <0x0D> <0x0A>

Example 6. If 0x41 0x42 0x43 0x0D 0x0A 0xDB 0xDC 0x31 0x32 is the actual data that needs to be transmitted, then the command is

at+rsi_snd <hn> <sz=10> <Dip> <dest_port> <0x41> <0x42> <0x43> <0xDB><0xDC> <0xDB> <0xDD> <0xDC> <0x31> <0x32> <0x0D> <0x0A>

at+rsi_snd is the only command that requires byte stuffing to be done by the Host before sending to the module. There are NO other commands (from Host to module) that require byte stuffing. There are NO responses (from module to Host) that are byte stuffed by module before giving to Host.


Example

Data Stuffing Command Format

To send a data stream 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A over a TCP socket.

at+rsi_snd=1,10,0,0, 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x61 0x74 0x2B 0x72 0x73 0x690x5F0x730x6E0x64 0x3D 0x31 0x2C 0x31 0x30 0x2C 0x30 0x2C 0x30 0x2C 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0D 0x0A

To send a data stream 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A over a UDP socket to a destination IP 192.168.1.20 and destination port 8001.

at+rsi_snd=1,10,192.168.1.20,8001, 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x73 0x6E 0x64 0x3D 0x31 0x2C 0x31 0x30 0x2C 0x310x39 0x32 0x2E 0x31 0x36 0x38 0x2E 0x31 0x2E 0x32 0x30 0x2C 0x38 0x30 0x30 0x31 0x2C 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0D 0x0A

To send a stream "abcdefghij" over a Multicast socket.

at+rsi_snd=1,10,239.0.0.0,1900,abcdefghij
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x73 0x6E 0x64 0x3D 0x31 0x2C 0x31 0x30 0x2C 0x32 0x33 0x39 0x2E 0x30 0x2E 0x30 0x2E 0x30 0x2C 0x31 0x39 0x30 0x30 0x2C0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6A 0x0D 0x0A

Response for 250 bytes.

OK 250
0x4F 0x4B 0xFA 0x00 0x0D 0x0A

When TCP_ACK(bit[2]) is enabled in the socket_bitmap while opening the socket, the send response gives 3 Bytes of which 1 Byte is for socket id and 2 Bytes is for length.

at+rsi_snd=1,10,0,0,0123456789

Response.

OK 0x02\0x00
0x4F 0x4B 0x02 0x0A 0x00 0x0D 0x0A

To send data over SSL.

at+rsi_snd=1,10,0,0,hellohello

Response.

OK
0x4F 0x4B 0x01 0x45 0x00 0x0D 0x0A

Possible error codes are -2, 63 .

[ Go to top ]


rsi_read :: Read Data

This section explains how to read socket data from the module to host.


Note! To use this feature, BIT(0) should be set in socket_bitmap (TCP/UDP open socket parameter) while opening a socket.


Description

This command is used to request number of bytes received on given socket. Module will give requested number of bytes received on particular socket (synchronous) only if this command is given from host. If requested numbers of bytes are greater than bytes available on given socket module will return only available number of bytes to host. If no data available on given socket module will wait till data received on given socket to serve this command.

Command Format

at+rsi_read=<socket_descriptor>,<no of bytes>,<timeout in ms>

Parameters

socket_descriptor (1 byte)

no of bytes (4 bytes)

timeout in milliseconds (2 bytes)

Response

AT+RSI_READ<ip_version><recv_socket><recv_buf_len><ip_address><src_port><recv_data_buf>

where ...

ip_version (2 bytes, hex)

recv_socket (2 bytes, hex)

recv_buf_len (2 bytes, hex)

ap_address (16 bytes)

src_port (2 bytes, hex)

recv_data_buf

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

Command

at+rsi_read=1,4,100

Response

If abcd is sent from remote terminal to module, on an UDP socket with handle 1, from source IPv4 address 192.168.1.1 to destination IPv4 address 192.168.1.2 (module address) and source port 8001 , the module sends the following response to the host.

AT+RSI_READ 4 1 4 192 168 1 1 8001 abcd

0x41 0x54 0x2B 0x52 0x53 0x49 0x5F 0x52 0x45 0x41 0x44 0x04 0x00 0x01 0x00 0x04 0x00 0xC0 0xA8 0x01 0x01 0x41 0x1F 0x61 0x62 0x63 0x64 0x0D 0x0A

If abcd is sent from remote terminal to module, on a TCP socket with handle 1, the module sends the following response to the host.

AT+RSI_READ 4 1 4 abcd
0x41 0x54 0x2B 0x52 0x53 0x49 0x5F 0x52 0x45 0x41 0x44 0x04 0x00 0x01 0x00 0x04 0x00 0x61 0x62 0x63 0x64 0x0D 0x0A

Note! The data delivered to the Host on receiving data on a TCP socket does not include the source IP address and source port.


[ Go to top ]


RSI_READ :: Socket Receive Data Notification

This section explains how the module sends received data to Host.


Note!

The module supports a maximum TLS record size of 4K. If the TLS record size is greater than 4K, the module will close the socket. To support more than 4K record size, user has to enabled 16K record size. ie., enable BIT [6] in ext_tcp_ip_feature_bit_map .


Description

The module delivers the data obtained on a socket to the Host with this message. This is an asynchronous response. It is sent from the module to the host when the module receives data from a remote terminal. SSL data is also received in a similar fashion.

Notification Format

AT+RSI_READ<ip_version><recv_socket><recv_buf_len><ip_address><src_port><recv_data_buf>

where ...

ip_version (2 bytes, hex)

recv_socket (2 bytes, hex)

recv_buf_len (2 bytes, hex)

ip_address (16 bytes)

src_port (2 bytes, hex)

recv_data_buf

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

Command

at+rsi_read=1,4,100

Response for IPv4

If 'abcd' is sent from remote terminal to module, on a UDP socket with handle 1, from source IPv4 address 192.168.1.1 to destination IPv4 address 192.168.1.2 (module address) and source port 8001 , the module sends the following response to the host.

AT+RSI_READ 4 1 4 192 168 1 1 8001 abcd

0x41 0x54 0x2B 0x52 0x53 0x49 0x5F 0x52 0x45 0x41 0x44 0x04 0x00 0x01 0x00 0x04 0x00 0xC0 0xA8 0x01 0x01 0x41 0x1F 0x61 0x62 0x63 0x64 0x0D 0x0A

If 'abcd' is sent from remote terminal to module, on a TCP socket with handle 1, the module sends the following response to the host.

AT+RSI_READ 4 1 4 abcd
0x41 0x54 0x2B 0x52 0x53 0x49 0x5F 0x52 0x45 0x41 0x44 0x04 0x00 0x01 0x00 0x04 0x00 0x61 0x62 0x63 0x64 0x0D 0x0A

Note! The data delivered to the Host on receiving data on a TCP socket does not include the source IP address and source port.

[ Go to top ]


rsi_fwupok :: Wireless Firmware Update

Description

This command is sent as a response to a wireless firmware udpate request.

When user clicks on update button on the wireless update page, module sends an asynchronous message, AT+RSI_FWUPREQ to the host. Upon receiving this message, the host should send wireless firmware update request message if update is required. Host can ignore if update is not required.

For an example command sequence showing how to use this command, see Wireless Firmware Update Example .

Command Format

at+rsi_fwupok

Parameters

N/A

Response

There is no response for this command.

After successful update, firmware gives a success indication with an asynchronous message as AT+RSI_FWUPSUCCESS . Also "Firmware update successful" pop-up window appears on the browser.

On firmware update failure or host not responding for firmware update request, module gives an error message on pop-up window: "module not responding" on the browser.

Possible error codes are 0x0021, 0x0025, 0x002C, 0x0034

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

[ Go to top ]


rsi_bgscan :: Background Scan

Description

This command is used to scan for Wi-Fi Access Points when the module is in a connected state. The scan results are sorted in decreasing order of signal strength (RSSI value). The scanned access point with highest signal strength will be the first in the list.

Upon issuing this command, RS9116 WiSeConnect validates the channel bit map issued through the scan command, to ensure that background scan is performed only on those channels.

For examples showing how to perform background scans, see Background Scan Example and Enable Roaming in Open mode as a client .

Command Format

at+rsi_bgscan=<bgscan_enable>,<enable_instant_bgscan>,<bgscan_threshold>,<rssi_tolerance_threshold>,<bgscan_periodicity>,<active_scan_duration>,<passive_scan_duration>,<multi_probe>

Parameters

bgscan_enable (2 bytes)

enable_instant_bgscan (2 bytes)


Note!


bgscan_threshold (2 bytes)

rssi_tolerance_threshold (2 bytes)

bgscan_periodicity (2 bytes)

active_scan_duration (2 bytes)

passive_scan_duration (2 bytes)

multi_probe (1 byte)


Note!


Response

If instant_bg_enable is disabled:

OK

If instant_bg_enable is enabled:

Result Code Description
OK <scan_count><padding><rf_channel><security_mode><rssi_val><u_network_type><ssid><bssid><reserved> up to the number of scanned nodes Success.
ERROR <Error code> Failure

where ...

Possible error codes are 0x0021, 0x0025, 0x002C, 0x004A

Availability

This command is available when the module is configured in Operating Mode 0, 2.

Example 1

When instant bgscan is enabled, host will get OK response followed by the response of background scan. Module will do background scanning in the configured channel given in the channel bit map or scan all channels if bitmap is not provided (all non DFS channels in 5GHz) and send the scanned result to host.

Command

at+rsi_bgscan=1,1,63,4,2,50,50,1
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x62 0x67 0x73 0x63 0x61 0x6E 0x3D 0x31 0x2C 0x31 0x2C 0x36 0x33 0x2C 0x34 0x2C 0x32 0x2C 0x35 0x30 0x2C 0x35 0x30 0x2C 0x31 0x0D 0x0A

Response If two networks are found with the SSID ap_ssid_net1 and ap_ssid_net2 ", in channels 6 and 11, with measured RSSI of -20 dBm and -14 dBm respectively, the return value is:

OK <scan_count =2><padding><rf_channel =0x0B> <security_mode =0x02> <rssi_val =14> <u_network_type =0x01> <ssid =ap_ssid_net2> <bssid =0x00 0x23 0xA7 0x1F 0x1F 0x15> <reserved><rf_channel =0x06> <security_mode =0x00> <rssi_val =20> <u_network_type =0x01> <ssid =ap_ssid_net1><bssid =0x00 0x23 0xA7 0x1F 0x1F 0x14> <reserved>

0x4F 0x4B 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0B 0x02 0x0D 0x01 0x52 0x65 0x64 0x70 0x69 0x6E 0x65 0x5F 0x6E 0x74 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x23 0xA7 0x1F 0x1F 0x15 0x00 0x00 0x06 0x00 0x14 0x01 0x52 0x65 0x64 0x70 0x69 0x6E 0x65 0x5F 0x6E 0x74 0x31 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x23 0xA7 0x1F 0x1F 0x14 0x00 0x00 0x0D 0x0A

Example 2

When instant bgscan is disabled and when connected, AP RSSI falls below -63dBm (e.g. -65, -68 etc) then bgscan will be triggered at a later time, but the host will only receive the OK message immediately as shown below.

Command

at+rsi_bgscan=1,0,63,4,2,50,50,1
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x62 0x67 0x73 0x63 0x61 0x6E 0x3D 0x31 0x2C 0x30 0x2C 0x36
0x33 0x2C 0x34 0x2C 0x32 0x2C 0x35 0x30 0x2C 0x35 0x30 0x2C 0x31 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_roam_params :: Roam Parameters

Description

This command is used to enable roaming and to set roaming parameters. This command can be issued any time after init command but this command will come into action only after bgscan, see the Roaming Example and Enable Roaming in Open mode as a Client Example .

Command Format

at+rsi_roam_params= <roam_enable>,<roam_threshold>,<roam_hysteresis>

Parameters

roam_enable (4 bytes)

roam_threshold (4 bytes)

roam_hysteresis (4 bytes)

  (connected_AP_RSSI – selected_AP_RSSI) > roam_hysteresis

Response

Result Code Description
OK Successful execution of command.
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025, 0x002C, 0x0026 .

Availability

This command is available when the module is configured in Operating Mode 0,2.

Example

Command

at+rsi_roam_params=1,67,4
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x72 0x6F 0x61 0x6D 0x5F 0x70 0x61 0x72 0x61 0x6D 0x73 0x3D 0x31 0x2C 0x36 0x37 0x2C 0x34 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

Suggested roaming and background scan configuration for Home environment :

Parameter Suggested values
background scan Enabled
background scan periodicity 2 seconds
background scan threshold -63 dbm
background scan tolerance 4
Active scan duration 50ms
Passive scan duration 50ms
Multiprobe 0
Instant background scan 1
Scan channels \
Roam Threshold -67dbm
Roam Hysteresis 4

[ Go to top ]


rsi_ht_caps :: High Throughput Capabilities

Description

This command is used to enable high throughput capabilities in the module when operating in AP mode. This command must be issued after the AP configuration parameters command.

Command Format

at+rsi_ht_caps=<mode_11n_enable>,<ht_caps_bitmap>

Parameters

mode_11n_enable (2 bytes)

ht_caps_bit_map (2 bytes)

ht_caps_bit_map Functionality Set to 0 Set to 1 Description
ht_caps_bit_map[15:9] - Not Supported, set to 0
ht_caps_bit_map[8] Rx STBC support Disable Enable STA capability of receiving PPDU using STBC (Space Time Block Coding)
ht_caps_bit_map[7:6] - Not Supported, set to 0
ht_caps_bit_map[5] Short GI for 20Mhz support Disable Enable STA capability to receive frames with a short GI in 20MHz
ht_caps_bit_map[4] Green field support Disable Enable When set to 1 STA is capable of receiving HT Greenfield PPDU.
ht_caps_bit_map[3:2] - Not Supported, set to 0
ht_caps_bit_map[1] Channel-width Support Disable Enable 0 for only 20MHz, 1 should not be enabled as 40 MHz bandwidth is not supported, set to 0 .
ht_caps_bit_map[0] - Not Supported, set to 0

Response

Result Code Description
OK Successful execution of command.
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025, 0x002C, 0x004D .

Availability

This command is available when the module is configured in Operating Mode 6.

Example

Command

at+rsi_ht_caps=1,2
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x68 0x74 0x5F 0x63 0x61 0x70 0x73 0x3D 0x31 0x2C 0x32 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_dnsserver :: DNS Server

Description

This command is used to provide the DNS server's IP address to the module. This command should be issued before the "[DNS Resolution]"command and after the "Set IP Parameter" command.

Command Format

Format for IPv4

at+rsi_dnsserver=<dns_mode>,<primary_dns_ip>,<secondary_dns_ip> 

Parameters

dns_mode (8 bytes)

primary_dns_ip (16 bytes)

secondary_dns_ip (16 bytes)

Response

Result Code Description
OK <primary_dns_ip><secondary_dns_ip> Successful execution of command.
ERROR <Error code> Failure.

Response

For IPv4, only the first 4 bytes of the IP address are filled, rest 12 bytes are zero.

Possible error codes are 0x0021, 0x0025, 0x002C, 0xFFF8, 0xFF74, 0xBBA8, 0xBBB2, 0xBBAF, 0xBB17, 0xBBB3

Availability

This command is available in Operating Modes 0, 2, 6.

Example 1 for IPv4

Command

at+rsi_dnsserver=1,0,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x64 0x6E 0x73 0x73 0x65 0x72 0x76 0x65 0x72 0x3D 0x31 0x2C 0x30 0x2C 0x30 0x0D 0x0A

Response

OK <primary=1.2.3.4><secondary=5.6.7.8>
0x4F 0x4B 0x01 0x02 0x03 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x05 0x06 0x07 0x08 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0D 0x0A

Example 2 for IPv4

Command

at+rsi_dnsserver=0,8.8.8.8,0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x64 0x6E 0x73 0x73 0x65 0x72 0x76 0x65 0x72 0x3D 0x30 0x2C 0x38 0x2E 0x38 0x2E 0x38 0x2E 0x38 0x2C 0x30 0x0D 0x0A

Response

OK <primary=8.8.8.8><secondary=0>
0x4F 0x4B 0x08 0x08 0x08 0x08 0x00 0x00 0x00 0x00 0x0D 0x0A

[ Go to top ]


rsi_dnsget :: DNS Resolution

Description

This command is to obtain the IP address of the specified domain name.

Command Format

Format for IPv4

at+rsi_dnsget=<domain_name>,<dns_server_number>

Parameters

domain_name (90 bytes)

dns_server_number (2 bytes)

Response

For IPv4

Result Code Description
OK <ip_version><ip_count><ip_addr> ... up to 10 times Successful execution of command
ERROR <Error code> Failure.

where ...

Possible error codes are 0x0015, 0x0021, 0x0025, 0x002C, 0xFFBB, 0xBBA1, 0xBBAA, 0xBBA3, 0xBBA4, 0xBBAC

Availability

This command is available in Operating Modes 0, 2 and 6.

Example for IPv4

Command

at+rsi_dnsget=www.silabs.com,1
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x64 0x6E 0x73 0x67 0x 65 0x74 0x3D 0x77 0x77 0x77 0x2E 0x72 0x65 0x64 0x70 0x69 0x6E 0x65 0x73 0x69 0x67 0x6E 0x61 0x6C 0x73 0x2E 0x63 0x6F 0x6D 0x2C 0x31 0x0D 0x0A

Response

OK< ip_version >< uIPCount >< ip_addr1= 201.168.1.100>
0x4F 0x4B 0x04 0x00 0x01 0x00 0xC9 0xA8 0x01 0x64 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0D 0x0A

[ Go to top ]


rsi_dnsupdate :: DNS Update

Description

The DNS update functionality enables DNS Client Host to register and to dynamically update their resource records with a DNS server whenever changes occur. If you use this functionality, you can reduce the requirement for manual administration of zone records, especially for clients that frequently move and use Dynamic Host Configuration Protocol (DHCP) to obtain an IP address.

DNS Update will need the Hostname, Domain and the DNS Server specification for dynamic update of client Records

Command Format

at+rsi_dnsupdate=<ipversion>,<a_zone_name>,<a_host_name>,<dns_server_number>,<ttl>

Parameters

ip_version (1 byte)

a_zone_name(31 bytes)

a_host_name(31 bytes)

dns_server_number (2 bytes)

ttl (2 bytes)

Response

Result Code Description
OK Successful execution of command
ERROR <Error code> . Failure

Possible error codes are 0x0015, 0x0021, 0x0025, 0x002C, 0xFFBB, 0xBBA1, 0xBBAA, 0xBBA3, 0xBBA4, 0xBBAC

Availability

This command is available in Operating Modes 0, 2 and 6.

Example

Command

at+rsi_dnsupdate=4,RPS,silabs,1,53 

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_httpget :: HTTP Get

Description

This command is used to transmit HTTP GET request from the module to a remote HTTP server. A subsequent HTTP GET request can be issued only after receiving the response of the previously issued HTTP GET request. Module acts as a HTTP client when this command is issued. This command should only be used after IP configuration is complete.

Command Format

Format for IPv4

at+rsi_httpget=<https_enable>,<http_port>,<user_name>,<password>,<host_name>,<ip_address>,<url>,<extended_header>

Parameters

https_enable


Note! If SSL/TLS is enabled by default, it will use TLS 1.0 and TLS 1.2. BIT(2) and BIT(3) are valid only when HTTPS is enabled.


http_port

user_name

password

host_name

ip_address

url

extended_header (1 byte)


Note!


Response

Module may give http response in multiple chunks for a single HTTP GET request.

Result Code Description
AT+RSI_HTTPRSP=<more><status_code><offset><data_len><data> After the module sends out the HTTP GET request to the remote server, it may take some time for the response to come back. The response from the remote server is sent out to the Host from the module in the following form: AT+RSI_HTTPRSP=<more><status_code><offset><data_len><data> . The string AT+RSI_HTTPRSP is in uppercase ASCII.
ERROR <Error_code> Failure

where ...

more (2 bytes)

status_code (2 bytes)

offset (4 bytes)

data_len (4 bytes)

Data (maximum 1400 bytes)

Possible error codes for this command are 0x0015, 0x0021, 0x0025, 0x002C, 0xFF74, 0xBBF0

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example 1

Command

at+rsi_httpget=0,80,username,password,hostname,192.168.40.86,/index.html,ContentType: htmlÛÜ

Example 2

Command

at+rsi_httpget=0,80,username,password,hostname,192.168.0.5,/index.html
61 74 2B 72 73 69 5F 68 74 74 70 67 65 74 3D 30 2C 38 30 2C 75 73 65 72 6E 61 6D 65 2C 70 61 73 73 77 6F 72 64 2C 68 6F 73 74 6E 61 6D 65 2C 31 39 32 2E 31 36 38 2E 30 2E 35 2C 2F 69 6E 64 65 78 2E 68 74 6D 6C 2C 0D 0A

Response

AT+RSI_HTTPRSP=<NUL><NUL>È<NUL><NUL><NUL><NUL><NUL>œ<SOH><NUL><NUL><html><head><6/22/2021 18:38:07.082RX] - style type=\"text/css\">body{font- family:Arial;background:#EFF4F3;margin:0;color:#32403f;}#wp{width:600px;margin:0 auto;} p{display:inline-block;font-weight:bold;text-align:right;margin:9px 30px 9px 0;}p,input{width:200px;} h1{text-align:center;font-size:3em;margin:0;padding:20px 0;color:#d6e4e1;border:1px solid #7F8D8C;text-shadow:1px 1px 0 #333;}input{height:24px;border:1px solid #ccc;border-radi<CR><LF> AT+RSI_HTTPRSP=<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><STX><NUL><NUL>us:4px;padding:2px 5px;margin:0 6px 0 20px;}input:focus{border-color:#32403f;}form{padding-top: 20px;border-top:1px solid #2B3736;}.btn{width:100px;margin:15px 0 15px 250px;font-weight: 700;color:#fff;border:1px solid #000;}h1,.btn{background:#485c5a;background:linear- gradient(#485c5a,#32403f);}.btn:active{background:#32403f;}input[type=checkbox],input[type=radio]{width:16px;height:14px;}#msg{margin:0 0 10px 0;}</style></head><body><h1>Employee Details</ h1><form id=\"fm\" method=\"post\" action=\"#\" onsubmit<CR><LF> AT+RSI_HTTPRSP=<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>N<SOH><NUL><NUL>=\"return pt()\"><div id=\"wp\"></div><p>Employee_name:</p><input id=\"emp_name\" name=\"emp_name\"><p>Employee ID:</p><input id=\"emp_id\" name=\"emp_id\"><p>Designation:</ p><input id=\"designation\" name=\"designation\"><p>Company:</p><input id=\"company\" name=\"company\"><p>Location:</p><input id=\"location\" name=\"location\"><LF><CR>

41 54 2B 52 53 49 5F 48 54 54 50 52 53 50 3D 00 00 C8 00 00 00 00 00 9C 01 00 00 3C 68 74 6D 6C 3E
3C 68 65 61 64 3E 3C
6/22/2021 18:38:07.082RX] - 73 74 79 6C 65 20 74 79 70 65 3D 5C 22 74 65 78 74 2F 63 73 73 5C 22
3E 62 6F 64 79 7B 66 6F 6E 74 2D 66 61 6D 69 6C 79 3A 41 72 69 61 6C 3B 62 61 63 6B 67 72 6F 75 6E
64 3A 23 45 46 46 34 46 33 3B 6D 61 72 67 69 6E 3A 30 3B 63 6F 6C 6F 72 3A 23 33 32 34 30 33 66 3B
7D 23 77 70 7B 77 69 64 74 68 3A 36 30 30 70 78 3B 6D 61 72 67 69 6E 3A 30 20 61 75 74 6F 3B 7D 70
7B 64 69 73 70 6C 61 79 3A 69 6E 6C 69 6E 65 2D 62 6C 6F 63 6B 3B 66 6F 6E 74 2D 77 65 69 67 68 74
3A 62 6F 6C 64 3B 74 65 78 74 2D 61 6C 69 67 6E 3A 72 69 67 68 74 3B 6D 61 72 67 69 6E 3A 39 70 78
20 33 30 70 78 20 39 70 78 20 30 3B 7D 70 2C 69 6E 70 75 74 7B 77 69 64 74 68 3A 32 30 30 70 78 3B
7D 68 31 7B 74 65 78 74 2D 61 6C 69 67 6E 3A 63 65 6E 74 65 72 3B 66 6F 6E 74 2D 73 69 7A 65 3A 33
65 6D 3B 6D 61 72 67 69 6E 3A 30 3B 70 61 64 64 69 6E 67 3A 32 30 70 78 20 30 3B 63 6F 6C 6F 72 3A
23 64 36 65 34 65 31 3B 62 6F 72 64 65 72 3A 31 70 78 20 73 6F 6C 69 64 20 23 37 46 38 44 38 43 3B
74 65 78 74 2D 73 68 61 64 6F 77 3A 31 70 78 20 31 70 78 20 30 20 23 33 33 33 3B 7D 69 6E 70 75 74
7B 68 65 69 67 68 74 3A 32 34 70 78 3B 62 6F 72 64 65 72 3A 31 70 78 20 73 6F 6C 69 64 20 23 63 63
63 3B 62 6F 72 64 65 72 2D 72 61 64 69 0D 0A 41 54 2B 52 53 49 5F 48 54 54 50 52 53 50 3D 00 00 00
00 00 00 00 00 00 02 00 00 75 73 3A 34 70 78 3B 70 61 64 64 69 6E 67 3A 32 70 78 20 35 70 78 3B 6D
61 72 67 69 6E 3A 30 20 36 70 78 20 30 20 32 30 70 78 3B 7D 69 6E 70 75 74 3A 66 6F 63 75 73 7B 62
6F 72 64 65 72 2D 63 6F 6C 6F 72 3A 23 33 32 34 30 33 66 3B 7D 66 6F 72 6D 7B 70 61 64 64 69 6E 67
2D 74 6F 70 3A 32 30 70 78 3B 62 6F 72 64 65 72 2D 74 6F 70 3A 31 70 78 20 73 6F 6C 69 64 20 23 32
42 33 37 33 36 3B 7D 2E 62 74 6E 7B 77 69 64 74 68 3A 31 30 30 70 78 3B 6D 61 72 67 69 6E 3A 31 35
70 78 20 30 20 31 35 70 78 20 32 35 30 70 78 3B 66 6F 6E 74 2D 77 65 69 67 68 74 3A 37 30 30 3B 63
6F 6C 6F 72 3A 23 66 66 66 3B 62 6F 72 64 65 72 3A 31 70 78 20 73 6F 6C 69 64 20 23 30 30 30 3B 7D
68 31 2C 2E 62 74 6E 7B 62 61 63 6B 67 72 6F 75 6E 64 3A 23 34 38 35 63 35 61 3B 62 61 63 6B 67 72
6F 75 6E 64 3A 6C 69 6E 65 61 72 2D 67 72 61 64 69 65 6E 74 28 23 34 38 35 63 35 61 2C 23 33 32 34
30 33 66 29 3B 7D 2E 62 74 6E 3A 61 63 74 69 76 65 7B 62 61 63 6B 67 72 6F 75 6E 64 3A 23 33 32 34
30 33 66 3B 7D 69 6E 70 75 74 5B 74 79 70 65 3D 63 68 65 63 6B 62 6F 78 5D 2C 69 6E 70 75 74 5B 74
79 70 65 3D 72 61 64 69 6F 5D 7B 77 69 64 74 68 3A 31 36 70 78 3B 68 65 69 67 68 74 3A 31 34 70 78
3B 7D 23 6D 73 67 7B 6D 61 72 67 69 6E 3A 30 20 30 20 31 30 70 78 20 30 3B 7D 3C 2F 73 74 79 6C 65
3E 3C 2F 68 65 61 64 3E 3C 62 6F 64 79 3E 3C 68 31 3E 45 6D 70 6C 6F 79 65 65 20 44 65 74 61 69 6C
73 3C 2F 68 31 3E 3C 66 6F 72 6D 20 69 64 3D 5C 22 66 6D 5C 22 20 6D 65 74 68 6F 64 3D 5C 22 70 6F
73 74 5C 22 20 61 63 74 69 6F 6E 3D 5C 22 23 5C 22 20 6F 6E 73 75 62 6D 69 74 0D 0A 41 54 2B 52 53
49 5F 48 54 54 50 52 53 50 3D 00 00 00 00 00 00 00 00 4E 01 00 00 3D 5C 22 72 65 74 75 72 6E 20 70
74 28 29 5C 22 3E 3C 64 69 76 20 69 64 3D 5C 22 77 70 5C 22 3E 3C 2F 64 69 76 3E 3C 70 3E 45 6D 70
6C 6F 79 65 65 5F 6E 61 6D 65 3A 3C 2F 70 3E 3C 69 6E 70 75 74 20 69 64 3D 5C 22 65 6D 70 5F 6E 61
6D 65 5C 22 20 6E 61 6D 65 3D 5C 22 65 6D 70 5F 6E 61 6D 65 5C 22 3E 3C 70 3E 45 6D 70 6C 6F 79 65
65 20 49 44 3A 3C 2F 70 3E 3C 69 6E 70 75 74 20 69 64 3D 5C 22 65 6D 70 5F 69 64 5C 22 20 6E 61 6D
65 3D 5C 22 65 6D 70 5F 69 64 5C 22 3E 3C 70 3E 44 65 73 69 67 6E 61 74 69 6F 6E 3A 3C 2F 70 3E 3C
69 6E 70 75 74 20 69 64 3D 5C 22 64 65 73 69 67 6E 61 74 69 6F 6E 5C 22 20 6E 61 6D 65 3D 5C 22 64
65 73 69 67 6E 61 74 69 6F 6E 5C 22 3E 3C 70 3E 43 6F 6D 70 61 6E 79 3A 3C 2F 70 3E 3C 69 6E 70 75
74 20 69 64 3D 5C 22 63 6F 6D 70 61 6E 79 5C 22 20 6E 61 6D 65 3D 5C 22 63 6F 6D 70 61 6E 79 5C 22
3E 3C 70 3E 4C 6F 63 61 74 69 6F 6E 3A 3C 2F 70 3E 3C 69 6E 70 75 74 20 69 64 3D 5C 22 6C 6F 63 61
74 69 6F 6E 5C 22 20 6E 61 6D 65 3D 5C 22 6C 6F 63 61 74 69 6F 6E 5C 22 3E 0A 0D 0A 41 54 2B 52 53
49 5F 48 54 54 50 52 53 50 3D 01 00 00 00 00 00 00 00 00 00 00 00 0D 0A

[ Go to top ]


rsi_httppost :: HTTP Post

Description

This command is used to transmit a HTTP POST request to a remote HTTP server.

A subsequent HTTP POST request can be issued only the response to a previously issued HTTP POST request is received. Module acts as a HTTP client when this command is issued.

Use rsi_httppost_data to send multiple chunks (max size 900 byte) of data.

Command Format

at+rsi_httppost=<https_enable>,<http_port>,<user_name>,<password>,<host_name>,<ip_address>,<url>,<extended_header>,<data/data_length>

Parameters

https_enable

http_port

user_name

password

host_name

ip_address

url

extended_header (1 byte)

data/data_length


Note!


Example 1

Example 2

Set BIT[5] in https_enable field.


Note! As per httppost_data , maximun bytes of data length is 1400 only. As per above example, sending data length as 1800 bytes but will post the data chunk by chunk i.e. 1400 bytes will be sent followed by the remaining 400 bytes.


Response

Module may give http response in multiple chunks for a single HTTP POST request.

Result Code Description
AT+RSI_HTTPRSP=<more><status_code><offset><data_len><data> After the module sends out the HTTP POST request to the remote server, it might take some time to receive the response. The response from the remote server is sent out to the Host from the module in the following form: AT+RSI_HTTPRSP=<more><status_code><offset><len><data> . The string AT+RSI_HTTPRSP is in uppercase ASCII.
ERROR <Error_code> Failure

where ...

more (2 bytes)

status_code (2 bytes)

offset (4 bytes)

data_len (4 bytes)

data (Maximum 1400 bytes)

Possible error codes for this command are 0x0015, 0x0021, 0x0025, 0x002C, 0xFF74, 0xBBF0

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6 .

Example 1

Command

at+rsi_httppost=1,443,username,password,hostname,192.168.40.86,/index.html, ContentType: **html**ÛÜ,<data=abcd>

Example 2

Command

at+rsi_httppost=32,80,username,password,posttestserver.com,64.90.48.15,/index.html, ContentType: **html**ÛÜ, 100

at+rsi_httppost=65,443,username,password,posttestserver.com,64.90.48.15,/index.html,ContentType: **html**ÛÜ, 100

at+rsi_httppost=97,443,username,password,posttestserver.com,64.90.48.15,/index.html,ContentType: **html**ÛÜ, 100

[ Go to top ]


rsi_httppost_data :: HTTP Post Data

Description

This command is used to transmit chunks of HTTP data to http server.

To use this command it is MANDATORY to enable large data transfer using https_enable[5] in the at+rsi_httppost command.

A subsequent `HTTP POST data request can be issued only when the response to a previously issued HTTP POST DATA request is received. Module acts as a HTTP client when this command is issued.

Command Format

at+rsi_httppost_data=<current_chunk_length>,<data>

current_chunk_length

data

Response

Module may give http response in multiple chunks for a single HTTP POST request.

Result Code Description
AT+RSI_HTTPPOSTRSP=<more><status_code><offset><data_len><data> After the module sends out the HTTP POST request to the remote server, it might take some time to receive the response. The response from the remote server is sent out to the Host from the module in the following form AT+RSI_HTTPRSP=<more><status_code><offset><data_len><data> . The string AT+RSI_HTTPRSP is in uppercase ASCII.
ERROR <Error_code> Failure

where ...

more (2 bytes)

status_code (2 bytes)

offset (4 bytes)

data_len (4 bytes)

data (maximum 1400 bytes)

Possible error codes for this command are as follows 0x0015,0x0021, 0x0025, 0x002C, 0xFF74, 0xBBF0, 0XBB38, 0xBBEF, 0xBB3E, 0xBB38, 0xBBE7 .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6 .

Example

Command

at+rsi_httppost=32,80,username,password,posttestserver.com,64.90.48.15,/index.html,ContentType: **html**ÛÜ, 1800

ok successful response
at+rsi_httppost_data=1400,<first 1400 byte of total 1800 byte data>

ok successful response
at+rsi_httppost_data=400,<last 400 byte of total 1800 byte data>

ok successful response

[ Go to top ]


rsi_httpput :: HTTP Put

Description

This command is used to transmit HTTP PUT request to a remote HTTP server. Module acts as a HTTP client when this command is issued. This section explains different commands to use HTTP client PUT. This command should only be issued afterSet IP Parameterscommand. The following table explains the list of HTTP PUT commands and their description.

HTTP PUT Command Description
PUT_CREATE Creates HTTP client thread and HTTP client socket. This should be the first command to use the HTTP client PUT
PUT_START Connects to the specified HTTP server and creates the specified resource.
PUT_PACKET To send the resource data packet
PUT_DELETE To delete the HTTP client thread and socket

Command Format

The HTTP PUT client has different command types. Based on the command type, following parameters change accordingly.

For at+rsi_httpput=<command_type>,<remaining parameters> the following are available command types.

HTTP PUT command Command Type Command Format
PUT create 1 at+rsi_httpput=1
PUT start 2 at+rsi_httpput=2,<ip_version>,<https_enable>,<port number>,<total content length>,<http buffer> where ...
ip_version = 4
ip_address = IP address of the HTTP server.
port number = HTTP server port number
total_length = Total content length of the HTTP PUT data
http_buffer = http buffer contains the username, password, host name, ip address, URL address, extended http header.
PUT PACKET 3 at+rsi_httpput=3,<current length>,<http buffer> where ...
current length = length of the current http put content chunk
http_buffer = http buffer contains the put data
PUT DELETE 4 at+rsi_httpput=4

Note!


https_enable

port_number

http_put_buffer

content_length

user_name

password

host_name

ip_address

url

extended_header

current_length

data


Note!


Response

Result Code Description
AT+RSI_HTTPRSP=<command_type><end_of_file><offset><data_len><data> After the module sends out the HTTP PUT request to the remote server, it may take some time for the response to come back. The response from the remote server is sent out to the Host from the module in the following form: AT+RSI_HTTPRSP=<command_type><end_of_file><offset><data_len><data> . The string AT+RSI_HTTPRSP is in uppercase ASCII.
ERROR <Error_code> Failure

where ...

command_type

end_of_file

offset (4 bytes)

data_length

data

Possible Error codes for this command are 0x0021, 0x0015, 0x0025, 0xBB38 .

Availability

This command is available in Operating Modes 0, 2, 6.

Example

HTTP client PUT Service

Command

at+rsi_httpput=1

at+rsi_httpput=2,4,0,80,19,username,password,192.168.1.100,192.168.1.100,/,ContentType: **html**ÛÜ

at+rsi_httpput=3,19,<html><body></html>

at+rsi_httpput=4

[ Go to top ]


rsi_fwversion :: Query Firmware Version

Description

This command queries the version of the firmware loaded in the module.

Command Format

at+rsi_fwversion?

Response

Result Code Description
OK <firmware_version> Successful execution of command. All values returned in ASCII.
ERROR <error code> Failure.

where ...

firmware_version (20 bytes)

Possible error codes for this command are 0x002C .

Availability

This command is available in all modes.

Example

Command

at+rsi_fwversion?
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x66 0x77 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x3F 0x0D 0x0A

Response from RS9116 Rev 1.4

OK1610.2.5.0.0.23
0x4F 0x4B 0x31 0x36 0x31 0x30 0x2E 0x32 0x2E 0x35 0x2E 0x30 0x2E 0x30 0x2E 0x32 0x33 0x00 0x0D 0x0A

Response from RS9116 Rev 1.5

OK1611.2.5.0.0.23
0x4F 0x4B 0x31 0x36 0x31 0x31 0x2E 0x32 0x2E 0x35 0x2E 0x30 0x2E 0x30 0x2E 0x32 0x33 0x00 0x0D 0x0A

[ Go to top ]


rsi_rssi :: Query RSSI Value

Description

This command is used to retrieve the RSSI value for Access Point to which the module is connected.

Command Format

at+rsi_rssi?

Response

Result Code Description
OK <rssi_val> Successful execution of command
ERROR <Error code> Failure.

where ...

rssi_val (2 bytes)

Possible error codes for this command are 0x0021, 0x0025, 0x002C .

Availability

This command is available when the module is configured in Operating Mode 0 and 2.

Example

Command

at+rsi_rssi?
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x72 0x73 0x73 0x69 0x3F 0x0D 0x0A

Response For a RSSI of -20 dBm, the return string is

OK20
0x4F 0x4B 0x14 0x00 0x0D 0x0A

[ Go to top ]


rsi_mac :: Query MAC Address

Description

This command is used to query the MAC address of the module. This command can be issued anytime after rsi_init command.

Command Format

at+rsi_mac?

Response

For Non-concurrent Mode

Result Code Description
OK <MAC_Address> Successful execution of command. The MAC address (6 bytes) of the module.
ERROR <Error code> Failure.

For Concurrent Mode

| OK <MAC_Address1><MAC_Address2>| Successful execution of command. MAC_Address1 is the station MAC Address and MAC_Address2 is of the AP created in the module.| | ERROR <Error code> | Failure. |

Possible error codes for this command are 0x002c .

Availability

This command is available in all operating modes.

Example 1 - Client or AP mode

Command

at+rsi_mac?
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6D 0x61 0x63 0x3F 0x0D 0x0A

Response If the MAC ID is 80:C9:55:34:F0:10 , the response is

OK <MAC_Address>
0x4F 0x4B 0x80 0xC9 0x55 0x34 0xF0 0x10 0x0D 0x0A

Example 2 - Concurrent mode

Command

at+rsi_mac?
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6D 0x61 0x63 0x3F 0x0D 0x0A

Response

OK <MAC_Address1><MAC_Address2>
0x4F 0x4B 0x80 0xC9 0x55 0x34 0xF0 0x10 0x80 0xC9 0x55 0x34 0xF0 0x11 0x0D 0x0A 

[ Go to top ]


rsi_nwparams :: Query Network Parameters

Description

This command is used to retrieve the WLAN and IP configuration parameters. This command should be sent only after the connection to an Access Point is successful.

Command Format

at+rsi_nwparams?

Response

Result Code Description
OK <wlan_state><channel_number><psk><mac_addr><ssid><connection_type><sec_type><dhcp_mode><ip_addr><subnet_mask><gateway><num_open_socks><prefix_length ><ip6><dgw6><tcp_stack_used><socket_id><socket_type><local_port><dest_port><dest_ip_address> up to maximum number of sockets supported. Successful execution of command
ERROR <Error code> Failure.

where ...

wlan_state (1 byte)

channel_number (1 byte)

psk (64 bytes)

mac_addr (6 bytes)

ssid (34 bytes)

connection_type (2 bytes)

sec_type (1 byte)

dhcp_mode (1 byte)

ip_addr (4 bytes)

subnet_mask(4 bytes)

gateway (4 bytes)

num_open_socks (2 bytes)

prefix_length (2 bytes)

ip6 (16 bytes)

dgw6(16 bytes)

tcp_stack_used (1 byte)

socket_id (2 bytes)

socket_type (2 bytes)

local_port (2 bytes)

dest_port(2 bytes)

ip_address (16 bytes)


Note! If the Set IP Params command was not sent to the module before Query Network Parameters command, the module returns default values for the following fields: dhcp_mode, ip_addr, subnetMask, gateway, num_open_socks, prefix_length, ip6, dgw6, tcp_stack_used, socket_info


Possible error codes for this command are 0x0021, 0x002C .

Availability

This command is available when the module is configured in Operating Mode 0, 2.

Example

Command

at+rsi_nwparams?
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6E 0x77 0x70 0x61 0x6D 0x73 0x3F 0x0D 0x0A

Response

Response when rsi_nwparams command is given before ipconfig command so ip parameters are not set in this response, and sockets are not opened yet. Here SSID is 'cisco' and gateway is '192.168.100.76'.

OK <wlan_state><channel_number><psk><mac_addr><ssid><connection_type><sec_type><dhcp_mode><ip_addr><subnet_mask><gateway><num_open_socks><prefix_length><ip6><dgw6><tcp_stack_used><socket_id><socket_type><local_port><dest_port><dest_ip_address>

OK <wlan_state =0x01><channel_number =0x06><psk =0x00(repeats 63 times)><mac_addr =0x00 0x23 0xA7 0x16 0x16 0x16><ssid =0x63 0x69 0x73 0x63 0x6F 0x00<repeats 27 times><conection_tType =0x01 0x00><sec_type =0x00 > <dhcp_mode =0x01><ip_addr =0x00 0x00 0x00 0x00><subnetMask =0xFF 0xFF 0xFF 0x00 0><gateway =0xC0 0xA8 0x64 0x4C><num_open_socks =0x00 0x00><prefix_length =0x00 0x00><ip6 =0x00(16times)><dgw6=0x00(16 times) ><socket_id =0x00 0x00><socket_type =0x00 0x00><local_port =0x00 0x00><dest_port =0x00 0x00><dstip_addr.ipv4_address/ dstip_addr.ipv6_address =0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00><repeats 11 times > 0x0D 0x0A.

Note! Command will not get PSK, it will get PMK to reduce connection time with AP from the next boot up. In the nwparams response structure you can find 32 bytes of PMK remaining are filled with Zeros.


[ Go to top ]


rsi_reset :: Soft Reset

Description

This command resets the module, including all information regarding the WLAN connection and IP configuration. After giving this command, the Host has to start from the beginning, from Auto Baud Rate Detection (ABRD) for device detection and issuing the first command "Set Operating Mode". This command is valid only in case of UART and USB-CDC interface.

There is no response for this command.

Command Format

at+rsi_reset

Parameters

N/A

Response

N/A

Availability

This command is available in all operating modes.

Example

Command

at+rsi_reset
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x72 0x65 0x73 0x65 0x74 0x0D 0x0A

Response None

[ Go to top ]


rsi_multicast_filter :: Multicast Filter

Description

This command is to configure the multicast MAC address bitmap to filter multicast packets. This command should be given after init command.

Command Format

at+rsi_multicast_filter=<mcast_bitmap_frame>

Parameters

mcast_bitmap_frame

mcast_bitmap_frame Functionality
mcast_bitmap_frame[0:1] These 2 bits represents the command type. Possible values are as follows ...
RSI_ MULTICAST_MAC_CLEAR_ALL - Clear all the bits in the multicast bitmap
RSI_ MULTICAST_MAC_SET_ALL - Set all the bits in multicast bitmap
mcast_bitmap_frame[2:7] reserved
mcast_bitmap_frame[8:13] 6 bit hash value generated from the hash algorithm which corresponds to the multicast MAC address is used to set/reset corresponding bit in multicast filter bitmap.This field is valid only if 0 or 1 is selected in command type(mcast_bitmap_frame[0:1])
mcast_bitmap_frame[14:15] reserved

Response

Result Code Description
OK Successful execution of command.
ERROR <Error code> Failure.

Possible error codes are 0x0021, 0x0025, 0x002c .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.


Note! The Hash function is generated using CRC-8 with the polynomial x^8 + x^2 + x + 1 . Only 6 bits are provided as the hash input to mcast_bitmap_frame[8:13], the 2 MSBs are ignored.

[ Go to top ]


rsi_multicast :: Join/Leave Multicast Group

Description

This command is used to join or leave a multicast group. This command should be issued after IP config done. The module can only join a single Multicast group at a time.

Command Format

at+rsi_multicast=<request_type>,<ip_address>

Parameters

reqest_type (2 bytes)

ip_address (16 bytes)

Response

Result Code Description
OK Successful execution of command.
ERROR <Error code> Failure.

Possible error codes 0x0021, 0x0025, 0x002C, 0xBB21, 0xBB4c, 0xBB17, 0xBB55 .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example 1 - Join a multicast group

Command

at+rsi_multicast=1,239.0.0.0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6D 0x75 0x6C 0x74 0x69 0x63 0x61 0x73 0x74 0x3D 0x31 0x2C 0x32 0x33 0x39 0x2E 0x30 0x2E 0x30 0x2E 0x30 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

Example 2 - Leave a multicast group

Command

at+rsi_multicast=0,239.0.0.0
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6D 0x75 0x6C 0x74 0x69 0x63 0x61 0x73 0x74 0x3D 0x30 0x2C 0x32 0x33 0x39 0x2E 0x30 0x2E 0x30 0x2E 0x30 0x0D 0x0A

Response

OK
0x4F 0x4B 0x0D 0x0A

Note! If mDNS feature is enabled, multicast group is not supported.


[ Go to top ]


rsi_ping :: ICMP Ping

Description

This command is used to send and ICMP ping to the target IP address. This command should be issued after IP config is done. To enable, set PING from module which is tcp_ip_feature_bit_map[11] .

Command Format

at+rsi_ping=<ip_version>,<ping_address>,<ping_size>,<timeout_ms>

Parameters

ip_version (2 bytes)

ping_size (2 bytes)

ping_address (16 bytes)

timeout_ms (2 bytes)

Response

Result Code Description
OK <ping_size><ping_address> Successful execution of command
ERROR <Error code> Failure.

where ...

ip_version (2 bytes)

ping_size (2 bytes)

ping_address (16 bytes)

Availability

This command is available when the module is configured in Operating Mode 0, 2 or 6.

Possible error codes are 0x0025, 0x002C, 0x002F, 0xBB29, 0xFF74, 0x0015, 0xBB21, 0xBB4B, 0xBB55 .

Example

Command

at+rsi_ping=4,192.168.1.100,10
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x70 0x69 0x6E 0x67 0x3D 0x34 0x2C 0x31 0x39 0x32 0x2E 0x31 0x36 0x38 0x2E 0x31 0x2E 0x31 0x30 0x30 0x2C 0x31 0x30 0x0D 0x0A

Response 0x4F 0x4B 0x04 0x00 0x0A 0x00 0xC0 0xA8 0x01 0x64 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0D 0x0A

[ Go to top ]


rsi_webpage :: Write Static Webpage

RS9116W allows two kinds of webpages to be stored in flash: static and dynamic. Static pages allow plain html, css and JavaScript; whereas dynamic pages allow JSON data to be associated with the static webpages. This JSON data can be stored, retrieved and updated independently. The webpages can fetch this data and dynamically fill form fields. These fields can be modified from the host side or the browser.

The host can store up to 10 webpages, each up to 4K in size. The size of a page can exceed the 4K limitation, but this will result in lesser number of files that can be stored. For example, user could store one 12K file, and seven 4K files. Similarly, there can be 10 JSON data objects with each NOT exceeding 512 bytes in any circumstances. These objects can only be stored if they have an associated webpage.

Description

This command is used to load a static webpage, to store a static webpage and to overwrite an existing static webpage. This command should be issued before join command.

If webpage total length is more than MAX_WEBPAGE_SEND_SIZE , then host has to send webpage in multiple chunks.

Command Format

at+rsi_webpage=<filename>,<total_len>,<current_len>,<has_json_data>,<webpage>

Parameters

filename (24 bytes)

*total_len (2 bytes)

current_len (2 bytes)

has_json_data (1 byte)

webpage (1024 bytes)

Response

Result Code Description
OK Successful execution of command.
ERROR <Error code> Failure.

Possible error codes are 0x0021, 0x0015, 0x0025, 0x00C1, 0x00C2, 0x00C3 , 0x00C5, 0x00C6, 0x00C8

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

The host can also overwrite an existing page, this is achieved by issuing this same command with the same filename. No explicit erase is required. However the size of the new file cannot exceed the size of the old file rounded up to the 4K chunk boundary. Precisely, if an old file used 2 chunks of 4K i.e. up to 8K in size, then the new file can't exceed 8K in size. To overcome this limitation, the host should erase the existing file and then write a new file which can exceed the size of the old file provided the device has enough space available.

Command

at+rsi_webpage=sample.html,2783,1024,0,<html><head><title></title>[1024-chars]

Response

OK 

[ Go to top ]


rsi_jsoncreate :: Write Dynamic Webpage

Description

This command is used to write to flash json data associated with static webpages.

Command Format

at+rsi_jsoncreate=<filename>,<total_len>,<current_len>,<json_data>

Parameters

filename (24 bytes)

total_length (2 bytes)

current_length(2 bytes)

json_data

Response

Result Code Description
OK Success.
ERROR <Error code> Failure.

There is no response payload.

Possible error codes are 0x0015, 0x0021, 0x0025, 0x002C, 0x00B1, 0x00B2,0x00B3, 0x00B4, 0x00B5, 0x00B6 .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

The webpage associated with the dynamic webpage data should already be present in the flash with has_json_data = 1 before issuing this command.

Command

at+rsi_jsoncreate=sample.html,60,60,{"temp":27, "accx":2.4, "accy":2.6, "accz":1.1, "enabled":true}

Response

OK

Note! The webpage associated with the dynamic webpage data should already be present in the flash with bool json set to 1 before issuing this command.


[ Go to top ]


rsi_erasefile :: Erase Static Webpage

This command is used to erase the webpage file from flash memory. This command should be issued before join command. The erase command should be used specifying the filename, this will free up the number of 4K chunks the existing file was using.

Command Format

at+rsi_erasefile=<filename> 

Parameters

filename (24 bytes)

Response

Result Code Description
OK Successful execution of command.
ERROR <Error code> Failure.

There is no response payload.

Possible error codes are 0x0021, 0x0025,0x002C, 0x00C4

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

Command

at+rsi_erasefile=sample.html

Response

OK

[ Go to top ]


rsi_erasejson :: Erase Dynamic Webpage

This command is used to erase the JSON data file associated with a webpage in the flash memory. This command should be issued after opermode command.

Command Format

at+rsi_erasejson=<filename> 

Parameters

filename (24 bytes)

Response

Result Code Description
OK Successful execution of command.
ERROR <Error code> Failure.

There is no response payload.

Possible error codes are 0x0021, 0x0025, 0x002C, 0x00B4 .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

at+rsi_erasejson=sample.html

Response

OK

[ Go to top ]


rsi_clearfiles :: Erase All Webpages

Description

This command is used to erase all webpages in the file system. This command should be issued after opermode command.

Command Format

at+rsi_clearfiles=<clear> 

Parameters

clear (1 byte)

Response

Result Code Description
OK Successful execution of command.
ERROR <Error code> Failure.

There is no response payload.

Possible error codes are 0x0021, 0x0025, 0x002C .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

Command

at+rsi_clearfiles=1

Response

OK

[ Go to top ]


rsi_urlrsp :: Webpage Passthrough

Description

If a request for an unknown URL (webpage) with a .html extension is received, the module sends an asynchronous indication message AT+RSI_URLREQ to the host to request the unknown webpage. The host responds with the webpage content using the rsi_urlrsp command.

After receiving an AT+RSI_URLREQ message, the host should provide the module with the webpage to serve. The format of the asynchronous indication sent to the host is shown below.

AT+RSI_URLREQ <length><url_name><request_type> <post_content_length><post_data> 

where ...

url_length (1 byte)

url_name (40 bytes)

request_type (1 byte)

post_content_length (2 bytes)

post_data (512 bytes)


Note! The post_content_length and post_data fields are valid if request_type is HTTP POST . These fields can be ignored if request_type is HTTP GET.


Command Format

at+rsi_urlrsp=<total_len>,<more_chunks>,<webpage>

Parameters

total_len (4 bytes)

more_chunks (1 byte)

webpage (1400 bytes)

Response

Result Code Description
OK Successful execution of command.
ERROR <Error code> Failure.

There is no response payload.

Possible error codes are 0x0015, 0x0021, 0x0025, 0x002C .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example 1

If the web page source code is of 3000 characters, the Host should send it through 3 segments, the first two of 1400 bytes, and the last one of 200 bytes as shown:

Command

at+rsi_urlrsp=<total_len =3000>,<more_chunks =1>, <webpage =code of the 1st segment>
at+rsi_urlrsp=<total_len =3000>,<more_chunks =1>, <webpage =code of the 2nd segment>
at+rsi_urlrsp=<total_len =3000>,<more_chunks =0>, <webpage =code of the 3rd segment>

Example 2

If the requested webpage can not be served e.g. the page is unknown, the host should send the following command

Command

at+rsi_urlrsp=0

[ Go to top ]


rsi_setregion :: Set Regulatory Region for Client Mode

Description

This command configures the device to operate according to the regulations of its operating region. This command should be given immediately followed by init command.

Command Format

at+rsi_setregion=<setregion_code_from_user_cmd>,<region_code>/r/n

Parameters

setregion_code_from_user_cmd (1 byte)

region_code (1 byte)

Response

Result Code Description
OK <region_code> Successful execution
ERROR Failure

where ...

region_code (1 byte)

Possible error codes for this command are 0x0021, 0x0025, 0x002C, 0xFF82, 0x00CC, 0x00C7, 0x00CD, 0x00CE


Note!


US Domain Regulations

Rule No Band First Channel # Channels Last Channel Max power in dBm Scan type
1 2.4 GHz 1 11 11 27 Active
2 5 GHz 36 4 48 16 Active
3 5 GHz 52 4 64 23 Passive
4 5 GHz 100 5 116 23 Passive
5 5 GHz 132 4 144 23 Passive
6 5 GHz 149 5 165 29 Active

Europe Domain Regulations

Rule No Band First Channel # Channels Last Channel Max power in dBm Scan type
1 2.4 GHz 1 13 13 20 Active
2 5 GHz 36 4 48 23 Active
3 5 GHz 52 4 64 23 Passive
4 5 GHz 100 11 144 30 Passive

Japan Domain Regulations

Rule No Band First Channel # Channels Last Channel Max power in dBm Scan type
1 2.4GHz 1 14 14 20 Active
2 5GHz 36 4 48 20 Active
3 5GHz 52 4 64 20 Passive
4 5GHz 100 11 144 30 Passive

Korea Domain Regulations

Rule No Band First Channel # Channels Last Channel Max power in dBm Scan type
1 2.4 GHz 1 13 13 20 Active
2 5 GHz 36 4 48 20 Active
3 5 GHz 52 4 64 20 Passive
4 5 GHz 100 12 144 30 Passive
5 5 GHz 149 5 165 30 Active

Availability

This command is available when the module is configured in Operating Mode 0, 2, 8 modes. The tabulated rules are followed for the regions supported by the module.

Example

Set the region to 'Rest of World'.

Command

at+rsi_setregion=1,4

Response

OK

[ Go to top ]

rsi_setregion_ap :: Set Regulatory Region for AP Mode

Description

This command is used to set the region of the module in Access point mode. This command helps device to self-configure and operate according to the regulations of its operating country and includes parameters like country name, channel quantity and maximum transmit power. These parameters are added in Country information element in the beacons and probe responses. This command should be immediately followed by init command.

Command Format

at+rsi_setregion_ap=<setregion_code_from_user_cmd>,<country_code>,<num_rules>,[<first_channel>,<num_channels>,<max_tx_power>, ...] repeated for each rule.

Parameters

setregion_code_from_user_cmd (1 byte)

country_code (3 bytes)

num_rules (4 byte)

first_channel (1 byte)

num_channels (1 byte)

max_tx_power (1 byte)

Response

Result Code Description
OK Successful execution
ERROR Failure

Possible error codes for this command are 0x0021, 0x0025, 0x002C, 0x00ca, 0x00cb, 0x00cc, 0xFF71, 0xFF82

Availability

This command is available when the module is configured in Operating Mode 6.


Note!


Example 1

Example for 2.4 GHz

Command

at+rsi_setregion_ap=1,US<space>,2,1,4,23,5,7,30

Consider the first rule 1,4,23

Consider the second rule 5,7,30

The Country code given in the command reflects as it is in the beacon frame.

Example 2

Example for 5 GHz

Command

at+rsi_setregion_ap=1,US<space>,2,40,4,23,149,3,30

Consider the first rule 40,4,23

Consider the second rule 149,3,30

Example 3

Set the region using a previously stored configuration.

Command

at+rsi_setregion_ap=0,US<space>

Response OK


Note! Refer to the tables dcoumented in the Set Region command for the region supported and domain rules followed by the module.


[ Go to top ]


rsi_per_stats :: Query PER Statistics

Description

Returns Transmit and Receive packet statistics once per second.

Command Format

at+rsi_per_stats=<per_stats_enable>,<per_stats_channel>

Parameters

per_stats_enable (2 bytes)

per_stats_channel (2 bytes)

Response

Result Code Description
OK Success
ERROR Failure

The format of packet statistics is shown in the following table.

AT+RSI_PER_STATS=<reserved_1>,<reserved_2>,
                 <reserved_3>,<crc_pass>,<crc_fail>,<cca_stk>,<cca_not_stk>,<pkt_abort>,<fls_rx_start>,<cca_idle>,<reserved_4>,
                 <rx_retries>,<reserved_5>,
                 <cal_rssi>,<reserved 6>,
                 <xretries>,<max_cons_pkts_dropped>,<reserved 7>
                 <bss_broadcast_pkts>,<bss_multicast_pkts>,<bss_filter_matched_multicast_pkts>,
                 <eof_pkt_drop_count>,<mask_pkt_drop_count>,<no_of_acks_sent>,
                 <pkt_rcvd with 48M>,<pkt rcvd with 24M>,<pkt rcvd with 12M>,<pkt rcvd with 6M>,
                 <pkt rcvd with 54M>,<pkt rcvd with 36M>,<pkt rcvd with 18M>,<pkt rcvd with 9M>,
                 <pkt rcvd with 11M>,<pkt rcvd with  5M>,<pkt rcvd with  2M>,<pkt rcvd with 1M>,
                 <pkt rcvd with mcs0>,<pkt rcvd with mcs1>,<pkt_rcvd_with_mcs2>,<pkt_rcvd_with_mcs3>,
                 <pkt_rcvd_with_mcs4>,<pkt_rcvd_with_mcs5>,<pkt_rcvd_with_mcs6>,<pkt_rcvd_with_mcs7>

Response

Field Size (bytes) Description
reserved_1 2 Reserved
reserved_2 2 Reserved
reserved_3 2 Reserved
crc_pass 2 Number of RX packets that passed CRC
crc_fail 2 Number of RX packets that failed CRC
cca_stk 2 Number of times cca got stuck
cca_not_stk 2 Number of times cca didn't get stuck
pkt_abort 2 Number of times RX packet aborts happened
fls_rx_start 2 Number of false rx starts.If Valid wlan packet is recived and is dropped due to some reasons
cca_idle 2 CCA idle time
reserved_4 26 Reserved
rx_retries 2 Number of RX retries happened
reserved_5 2 Reserved
cal_rssi 2 The calculated RSSI value of recently received RX packet
reserved_6 4 Reserved
xretries 2 Number of TX Packets dropped after maximum retries
max_cons_pkts_dropped 2 Number of consecutive packets dropped after maximum retries
reserved_7 2 Reserved
bss_broadcast_pkts 2 BSSID matched broadcast packets count
bss_multicast_pkts 2 BSSID matched multicast packets count
bss_filter_matched_multicast_pkts 2 BSSID and multicast filter matched packets count. The filtering is based on the parameters given in multicast filter commandSet/Reset Multicast filter]. If multicast filter is not set then this count is equal to bss_multicast_pkts count

Possible error codes for this command are 0x0021, 0x0025, 0x002c, 0x000A .


Note! In PER mode (opermode 8), the following stats related to RX packets ( crc_pass , crc_fail , cca_stk , cca_not_stk , pkt_abort , fls_rx_start , cca_idle , cal_rssi ) are only valid, the remaining fields can be ignored.

The multicast stats are valid only in associated state in client mode and are invalid in non-associated state. In associated state, the stats are for packets which are destinated for the module's MAC address only. In non-associated state, the stats are for all the packets received, irrespective of the destination MAC address.

Parameters valid in modes other than PER mode (opermode = 0 , 2 , 6 ) are : cal_rssi , xretries , crc_pass , max_cons_pkts_dropped , crc_fail , cca_stk , cca_not_stk , pkt_abort , fls_rx_start , cca_idle , bss_broadcast_pkts , bss_multicast_pkts , bss_filter_matched_multicsast_pkts


Availability

This command is valid in all operating modes.

[ Go to top ]


RSI_CLOSE :: Remote Socket Close Notification

Description

This is an asynchronous message issued in the following cases.

  1. When the remote peer closes connected TCP/SSL/Web socket.
  2. When module is not able to send data over socket because of unavailability of remote peer.
  3. When remote peer becomes unreachable, the module closes the socket after TCP keep alive time (~20 minutes) and sends this message to host.

Notification Format

AT+RSI_CLOSE<socket_desc><bytes_sent>

where ...

socket_desc (2 bytes)

bytes_sent (4 bytes)

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

[ Go to top ]


rsi_bytes_sent_count :: Query Socket Tx Byte Count

Description

This command is used to query the number of bytes successfully transmitted (by the module) on a given socket.

Command Format

at+rsi_bytes_sent_count=<socket_handle>

Parameters

sock_handle (1 byte)

Response

Result Code Description
OK <socket_handle><num_bytes_sent> Success
ERROR Failure

where ...

socket_handle (2 bytes)

num_bytes_sent (4 bytes)

Possible error codes for this command are 0xFF86, 0XFFFA, 0xFF82, 0x002C, 0x0025, 0x0021 .

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example

Command

at+rsi_bytes_sent_count=1
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x62 0x79 0x74 0x65 0x73 0x5F 0x73 0x65 0x6E 0x74 0x5F 0x63 0x6F 0x75 0x6E 0x74 0x3D 0x31 0x0D 0x0A

Response

OK <socket_handle><num_bytes_sent>
0x4F 0x4B 0x01 0x00 0x0E 0x00 0x00 0x00 0x0D 0x0A

[ Go to top ]


rsi_debug :: Configure UART Debug Printing

Description

This command is used to enable debug prints on UART interfaces 1 and 2. Debug prints are controlled using the assertion level and assertion type parameters. This command should be issued after the device is initialized.

Command Format

at+rsi_debug=<assertion_type>,<assertion_level>

Parameters

assertion_type (4 byte)

assertion_level (4 byte)


Note!


Response

Result Code Description
OK Success
ERROR Failure

Possible error codes for this command are 0x0021, 0x0025, 0x002C, 0xFFF8

Availability

This command can be given at any time.

[ Go to top ]


RSI_STATE-X :: Connection State Notification

Description

Asychronous messages are used to indicate module state to host. Asynchronous message are enabled by setting bit 10 of the custom feature bitmap during, see rsi_opermode .

Command Format

N/A

Response

This type of asynchronous message is given by the module when it is in scanning state.

AT+RSI_STATE-I<time_stamp>,<state_code>,<reason_code>,<rsi_channel>,<rsi_rssi>,<rsi_bssid>

This kind of message is given by the module once the scan results are observed and decided to join or not to join/Rejoin to AP.

AT+RSI_STATE-II<time_stamp>,<state_code>,<reason_code>,<rsi_channel>,<rsi_rssi>,<rsi_bssid>

Once the association or disassociation is done, module will give final state asynchronous message.

AT+RSI_STATE-III<time_stamp>,<state_code>,<reason_code>,<rsi_channel>,<rsi_rssi>,<rsi_bssid>

where ...

time_stamp (4 bytes)

state_code (1 byte)

State Upper Nibble Indication
Scan Trigger (State I) 0x00 Startup. Initial Roam
0x10 Beacon Loss. Failover Roam
0x20 De-authentication. AP induced roam / Disconnect from supplicant
Scan Result/Decision (State II) 0x50 Current AP is best
0x60 Better AP found
0x70 No AP found
Final Connection (State III) 0x80 Associated
0x90 Unassociated
Lower Nibble Reason for State Change
0x00 No reason specified
0x01 Authentication denial
0x02 Association denial
0x05 WPA2 key exchange failed

reason_code (1 byte)

reason_code Reason for state change failure
0x00 No reason specified
0x01 Authentication denial
0x02 Association denial
0x10 Beacon Loss (failover Roam)
0x20 De-authentication (AP induced Roam/Deauth from supplicant)
0x07 PSK not configured
0x09 Roaming not enabled

rsi_channel (1 byte)

rsi_rssi (1 byte)

rsi_bssid (6 bytes)

Availability

This command is available in oper modes 0, 2 and 6.


Note! By default this feature is disabled. To enable this feature, set the custom bit 0x400 in opermode command.


[ Go to top ]


RSI_CLIENT_STATION_CONNECTED :: Client Connection Notification

Description

Asychronous messages used to indicate to the host in AP mode when a station connects (frame type 0xC2) / or disconnects (frame type 0xC3).

Notification Format

Client connected message.

AT+RSI_CLIENT_STATION_CONNECTED=<client_mac_address>

Client disconnected message.

AT+RSI_CLIENT_STATION_DISCONNECTED=<client_mac_address>

where ...

mac_address (6 bytes)

Availability

This command is valid when opermode is 6.

Possible Error Codes:

N/A

[ Go to top ]


rsi_trans_mode_params :: Transparent Mode Command

Description

In transparent mode, the module acts as a virtual serial line. Once the module enters into the transparent mode, it will take raw data (byte stream) from a host on a serial port and forward it to the remote device using an internal TCP/IP stack. Similarly, data received from remote devices passed to the host (by discarding TCP/IP protocol-specific header) through a serial line. In transparent mode, the module does not process AT commands. This command is used to Enter/Start transparent mode, parameters for transparent mode are to be provided in this command. On reception of this command, the module tries to start transparent mode and replies with AT+RSI_TMODE message with status.

Command Format

at+rsi_trans_mode_params=<packetization_length>,<escape_character>,<gap_time>,<frame_time>,<escape_time>,<ip_version>,<socket_type>, <local_port>,<dest_port>,<ip_address>,<max_count>,<type_of_service>,<ssl_parameters>,<ssl_ciphers>

Parameters

packetization_length (2 bytes)

escape_character (1 byte)

gap_time (2 bytes)

frame_time (2 bytes)

escape_time (2 bytes)

ip_version (2 bytes)

socket_type (2 bytes)

local_port (2 bytes)

dest_port (2 bytes)

ip_address (4 bytes)

max_count (2 bytes)

type_of_service (4 bytes)

ssl_parameters (1 byte)

ssl_ciphers (1 byte)

Response

Result Code Description
AT+RSI_TMODE0 Successfully entered into transparent mode
AT+RSI_TMODE1 Graceful exit from Transparent mode (by giving escape sequence from host after escape time)
AT+RSI_TMODE2 Exited from transparent mode due to WiFi disconnected.
AT+RSI_TMODE3 Exited from transparent mode due to TCP remote terminate from peer.
AT+RSI_TMODE4 Exited from transparent mode due to TCP retries over terminated TCP connection.
AT+RSI_TMODE5 Did not enter transparent mode due to invalid transparent mode params.
AT+RSI_TMODE6 Did not enter transparent mode due to module doesn't have IP
AT+RSI_TMODE7 Did not enter transparent mode as could not create requested socket.
Error Codes Failure. Possible error codes for this command are 0xFF87, 0x0021, 0x0025, 0x002C, 0xFFF8 .

Availability

This command can be given only after successful connection with AP, module should have a valid IP and there should be no prior sockets opened.

[ Go to top ]


rsi_hfc :: UART Hardware Flow Control

Description

This command is used to Enable/Disable UART hardware flow control. This command should be issued after initialization.

Command Format

at+rsi_hfc=<hfc_config>

Parameters

hfc_config (1 byte)

Response

Result Code Description
OK Success
ERROR Failure

Possible error codes for this command are 0x004E, 0x002C


Note!

Hardware flow control feature is not supported in Auto-Join/Auto-Create mode. To enable this feature, rsi_hfc should be called separately.


[ Go to top ]


rsi_socket_config :: Socket Configuration Parameters

Description

This command sets socket configuration parameters; configuration of sockets is recommended, but optional. Based on the socket configuration, the module will use the available buffers effectively. This command should be given after IP configuration command and before any socket creation.

Command Format

at+rsi_socket_config=<total_sockets>,<total_tcp_sockets>,<total_udp_sockets>,<tcp tx only sockets>,<total_tcp_rx_only_sockets>,<total_udp_tx_only_sockets>,<total_udp_rx_only_sockets>,<total_tcp_rx_high_performance_sockets>,<tcp_rx_window_size_cap>,<ack window division factor>

Parameters

total_sockets (1 byte)

total_tcp_sockets (1 byte)

total_udp_sockets (1 byte)

tcp_tx_only_sockets (1 byte)

tcp_rx_only_sockets (1 byte)

udp_tx_only_sockets (1 byte)

udp_rx_only_sockets (1 byte)

tcp_rx_high_performance_sockets (1 byte)

tcp_rx_window_size_cap (1 byte)

tcp_ack_div_factor (1 byte)


Note!

The maximum published window is based on available memory.


Response

Result Code Description
OK Success
ERROR Failure

Possible error codes for this command are 0x0021, 0x0025, 0x002C, 0xFF6D

Availability

This command is valid when opermode is 0, 2 or 6.

Example

Command

at+rsi_socket_config=4,2,2,1,1,1,1,1,10

[ Go to top ]


rsi_trigger_auto_config :: Trigger Auto Configuration

Description

This command is used to trigger the Stored Auto Configuration. This command should only be issued after Card Ready response.

Command Format

at+rsi_trigger_auto_config

Response

Result Code Description
OK Success
ERROR Failure

Possible Error codes are 0x0021, 0xFF36, 0xFF74, 0xFF35

Availability

This command is valid when opermode is 0, 2 and 6.


Note!


[ Go to top ]


rsi_http_abort :: HTTP Abort

Description

This command is used to abort an HTTP/HTTPS GET/POST. This command should only be issued after Ipconf command.

Command Format

at+rsi_http_abort

Response

Result Code Description
OK Success
ERROR Failure

Possible Error codes for this command are 0x0021, 0x0025, 0x002C

Availability

This command is valid when opermode is 0, 2 and 6.

[ Go to top ]


rsi_credentials :: HTTP Server Credentials

Description

This command is used to set the HTTP Server Credentials. This command should only be issued after Opermode command.

Command Format

at+rsi_credentials=<username>,<password>

username (31 byte)

password (31 byte)

Response

Result Code Description
OK Success
ERROR Failure

Possible Error codes for this command are 0x0021, 0x0025, 0x00F1, 0x0015 .

Availability

This command is valid when opermode is 0, 2 and 6.

[ Go to top ]


rsi_ftp :: FTP Client

Description

This section explains different commands to use FTP client. This command should only be issued after Set IP Parameters command.

The following table describes the list of ftp command options.

FTP Command Description
Create Creates FTP objects. This should be the first command for accessing FTP.
Connect Connects to FTP server.
Make Directory Creates directory in a specified path.
Delete Directory Deletes directory in a specified path
Change Working Directory Changes working directory to a specified path.
Directory List Lists directory contents in a specified path.
File Read Reads the file
File Write Open file to write
File Write Content Writes content into file which is opened using File Write command. File content can be written in multiple chunks using this command.
File Delete Deleted file
File Rename Renames file
Disconnect Disconnects from FTP server.Once disconnect is done user can connect again using connect command.
Destroy Destroys FTP objects.Once destroy is given user cant use FTP unless it is created again.

Command Format

FTP client has different command types. Based on the command type next parameters will change.

at+rsi_ftp=<command_type>,<r](None)emaining parameters>

Following are available command types.

FTP Command Type Command Option
Create 1 at+rsi_ftp=1
Connect 2 at+rsi_ftp=2,<ip_version>,<ip_address>,<username>,<password>,<server_port> where ...
- ip_version (1 byte). IP version = 4
- ip_address (4 bytes). IPv4 address for FTP server to connect.
- username (31 bytes). Username of FTP server
- password (31 bytes). Password of FTP server
- server_port (4 bytes). FTP server port number
Make Directory 3 at+rsi_ftp=3,<directory_path>
- directory_path (51 bytes). Path of the directory to make.
Delete Directory 4 at+rsi_ftp=4,<directory_path>
- directory_path (51 bytes). Path of the directory to delete.
Change Working Directory 5 at+rsi_ftp=5,<directory_path>
- directory_path (51 bytes). Change of directory path.
Directory List 6 at+rsi_ftp=6,<directory_path>
- directory_path (51 bytes). Path of the directory for list.
File Read 7 at+rsi_ftp=7,<file_name>
- file_name (51 bytes). Name of the file to read.
File Write 8 at+rsi_ftp=8,<file_name>
- file_name (51 bytes). Name of the file to write.
File Write content 9 at+rsi_ftp_file_content=<end_of_file>,<content>
- end_of_file (1 byte). Represents whether end of file is reached or not.
... 0 – More data is coming to write into file.
... 1 – Current chunk is the last chunk and no more data is coming.
- File_content(1400 byte). Content of the file to write.
File Delete 10 at+rsi_ftp=10,<file_name>
- file_name (51 bytes). Name of the file to delete.
File Rename 11 at+rsi_ftp=11,<file_name>,<new_file_name>
- file_name (51 bytes). Old name of the file.
- new_file_name (51 bytes). New file name.
Disconnect 12 at+rsi_ftp=12
Destroy 13 at+rsi_ftp=13
Passive mode 14 at+rsi_ftp=14
Active mode 15 at+rsi_ftp=15

Response

FTP Command Type: Directory List

AT+RSI_FTP_DIR_LIST=<command_type><more><length><data>

command_type (1 byte)

more(1 byte)

Length (2 bytes)

Data (variable bytes)

FTP Command Type - File Read

 AT+RSI_FTP_FILE=<command_type><more><length><data>

command_type (1 byte)

length (2 bytes)

data (variable bytes)

FTP Command Type - All others

OK <command_type>

Possible Error codes for this command are 0x0021, 0x0015, 0xFF6B, 0xBB01, 0xBB50, 0xBBD3, 0xBBD4, 0xBBD5, 0xBBD6, 0xBBD9, 0xBBDA, 0xBBDB, 0xBBDC, 0xBBDD, 0xBBDE

Availability

This command is valid when opermode is 0, 2 and 6.

Example : FTP File Read

at+rsi_ftp=1
at+rsi_ftp=2,4,192.168.0.150,admin,test123,201
at+rsi_ftp=7,file_read1.txt
at+rsi_ftp=12
at+rsi_ftp=2,4,192.168.0.150,admin,test123,201
at+rsi_ftp=7,file_read2.txt
at+rsi_ftp=12
at+rsi_ftp=13

Example: FTP File Write

at+rsi_ftp=1
at+rsi_ftp=2,4,192.168.0.150,admin,test123,201
at+rsi_ftp=8,file_write1.txt
at+rsi_ftp_file_content=0,This is start of sample data
at+rsi_ftp_file_content=1,This is end of sample data
at+rsi_ftp=12
at+rsi_ftp=13

[ Go to top ]


rsi_sntp :: SNTP Client

Description

This section explains different commands to use SNTP client. This command should only be issued after Set IP Parameters command.

The following table describes the list of sntp commands.

SNTP Command Description
Create Creates SNTP objects. This should be the first command to get time updates from the SNTP server
Get Time To Get the Current time in seconds
Get Time-Date To Get the Current time in Time-Date format
Get Server Address To Get the SNTP server Details.
Get Server Info To Get the SNTP server Details.
Delete To Delete the SNTP client.

Note! SNTP broadcast method is currently not supported.


Command Format

SNTP client has different command types. Based on the command type next parameters will change.

at+rsi_sntp=<command_type>,[<ip_version>,<server_ip_address><sntp_method>]

where ...

command_type (1 byte)

ip_version (1 byte)

server_ip_address (4 byte)

sntp_method (1 byte)

Response

SNTP command Command Response
Create OK 1
Get Time OK <time in seconds>
Get Time Date OK <time in Date-Time format>
Get Server Address OK <ip version><ip address><sntp method> where ...
ip_version (1 byte) = IP version of the SNTP server.
ip_address (4 bytes) = IP address of the SNTP server
sntp_method (1 byte) = SNTP method of the server
Invalid SNTP server response AT+RSI_INVALID_SNTP_SERVER=<ip_version><ip_address><sntp_method> where ...
ip_version (1 byte) = IP version of the SNTP server
ip_address (4 bytes) = IP address of the SNTP server
sntp_method (1 byte) = SNTP method of the server
All remaining commands OK <command_type> (1 byte) where Command_type is the type of SNTP command

Possible Error codes for this command are 0x0021, 0x0015, 0x0074, 0xBB10, 0xFF5F .

Availability

This command is valid when opermode is 0, 2 and 6.

Example

Create SNTP client and read time, date, server address inf, then delete the client.

at+rsi_sntp=1,4,192.168.0.100,2
at+rsi_sntp=2
at+rsi_sntp=3
at+rsi_sntp=4
at+rsi_sntp=5

[ Go to top ]


rsi_mDNS :: mDNS/DNS-SD

Description

mDNS command resolves domain names to IP addresses. This section explains different commands to use mDNS and DNS-SD. This command should only be issued after Set IP Parameters command. Following table explains list of mDNS and DNS-SD commands and their description.

mDNSD Command Command Type Description
Init 1 Creates mDNS Daemon . This should be the first command to initialize.
Register Service 3 To add a service/start service discovery.
Deinit 6 To Stop mDNS responder in module

Command Format

mDNS/DNS-SD client has different command types. Based on the command type, the following parameters will change accordingly.

at+rsi_mDNS=<command_type>,<remaining parameters>

Following are available command types.

mDNSD command Command Type Command Format
Initialize 1 at+rsi_mDNS=1,<ip_version>,<ttl>,<buffer> where ...
- ip_version (1 byte). IP version to use. Use 4
- ttl (2 bytes). Time To Live. Time in seconds for which service should be active
- buffer (1000 bytes). Host name which is to used as host name in Type-A record.
Register Service. 3 at+rsi_mDNS=3,<port_number>,<ttl>,<more>,<buffer> where ...
- port_number (2 bytes). Port number on which service which should be added
- ttl (2 bytes). Time To Live, time in seconds for which service should be active
- more (1 byte). Set to 0 if this is the last service which starts the mDNS service. Set to 1 if there are still more services to be added
- buffer (1000 bytes). This field contains strings separated by null character 0x00 . The fields are:
... 1 = Name to be added in Type-PTR record
... 2 = Name to be added in Type-SRV record (Service name)
... 3 = Text field to be added in Type-TXT record.
Deinitialize. 6 at+rsi_mDNS=6

Note! For the Register Service command, only one service registration is currently supported.


Response

mDNS command Response
Any mDNS Command OK <command_type>

Possible Error codes for this command are 0x0021, 0x0015, 0x0074, 0xFF2B

Availability

This command is valid when opermode is 0, 2 and 6.

Example

mDNSD Add Service

at+rsi_mDNS=1,4,600,http-wsc_obe.local.
at+rsi_mDNS=3,80,600,0,_http._tcp.local< NULL >wsc_obe._http._tcp.local< NULL >text_field
at+rsi_mDNS=6

Note!

[ Go to top ]


rsi_otaf :: OTA Firmware Update

Description

Update the device firmware via TCP by establishing a TCP client connection with a remote TCP server.

Command Format

at+rsi_otaf=<ip_version>,<dest_ip_addr>,<server_port>,<chunk_number>,<rx_timeout>,<tcp_retry_count>

Parameters

ip_version (1 byte)

dest_ip_addr (4 bytes)

server_port (4 bytes)

chunk_number (2 bytes)

rx_timeout (2 bytes)

tcp_retry_count (2 bytes)

Response

After successful update, the firmware indicates success with the RSI_FWUPSUCCESS asynchronous message.

AT+RSI_FWUPSUCCESS

In addition "reach end of file" message is sent to the server.

On firmware update failure, the firmware gives the error message

ERROR <error_code><Chunk number where the update stopped>

User needs to give same command again from the chunk number specified here.

Possible error codes 0xBB01, 0xBB38

Example

at+rsi_otaf = 4, 192.168.0.100, 5001, 1, 100, 10

Response

OTA update success

AT+RSI_FWUPSUCCESS on success update. 

OTA update failure

ERROR <Error_Code = 0x01 0xBB><number of chunk where update stopped = 0xD2 0x04>

After receiving this error, the host should send the command

at+rsi_otaf = 4,192.168.0.100, 5001, 1234, 100, 10

Note! It is recommended to finalise any pending network transactions, close any open sockets and disable powersave before starting a firmware update.


[ Go to top ]


rsi_httpota :: HTTP OTAF

Description

This command is used to transmit HTTP OTAF request from the module (which acts as a HTTP client) to a remote HTTP server. Any subsequent HTTP OTAF requests can only be issued after receiving the response of the previously issued HTTP OTAF request. After a new firmware file is successfully downloaded, teh module should be reset to load the newly downloaded firmware.

Command Format

at+rsi_httpota=<https_enable>,<http_port>,<username>,<password>,<host_name>,<address>,<url>,<extended_header>

Parameters

https_enable


Note! If SSL is enabled, SSL TLS v1.0 and TLS v1.2 will be used. BIT(2) and BIT(3) are valid only when HTTPS is enabled.


http_port

username

password

host_name

ip_address

url

extended_header

The extended header field provides a way to append user configurable header fields to the default HTTP/HTTPS header. To write extended header, user must use 'Data stuffing' mentioned separately and here in context of extended header. The extended header can have multiple header fields each ended by ( 0xD 0xA ) but here our delimiter for whole 'at' command so use data stuffing and replace all ( 0xD 0xA ) by 0xDB 0xDC besides delimiter(). Follow the example given below.

Default http header contains the following:

The abovementioned fields are created in the header by the firmware.


Note!


Response

The device may give HTTP response in multiple chunks for a single HTTP OTAF request.

Result Response Description
Success AT+RSI_HTTPOTARSP=<update success> After HTTP response, for user to understand the update status, the following response is added with "update Success"
AT+RSI_HTTPRSP=<more><status_code><data_offset><data_length><update_success> The string AT+RSI_HTTPRSP is in uppercase ASCII.
Failure ERROR <error_code> Failure case with error code. There may be multiple reasons for update Failure, see Expected Error Codes Section
AT+RSI_HTTPOTARSP=<update_failed> Update Failure response

Possible error codes for this command are 0x0015, 0x0021, 0x0025, 0x002C, 0xFF74, 0xBBF0

where ...

more (2 bytes)

status code (2 bytes)

offset (4 bytes)

data_len (4 bytes)

data (up to 1400 bytes)

Availability

This command is available when the module is configured in Operating Mode 0, 2 and 6.

Example for HTTP OTAF

Parameter Value
https_enable 0
http_port 80
username username
password password
host_name www.google.com
ip_address 192.168.40.86
URL /index.html
extended HTTP header ContentType:htmlÛÜ
at+rsi_httpota=0,80,username,password,www.google.com,192.168.40.86,/index.html,ContentType:htmlÛÜ

Example for HTTPS OTAF

Parameter Value
https_enable 1
http_port 443
username username
password password
host_name www.google.com
ip_address 192.168.40.50
URL /index.html
extended HTTP header ContentType:htmlÛÜ
at+rsi_httpota=1,443,username,password,www.google.com,192.168.40.50,/index.html,ContentType:htmlÛÜ

[ Go to top ]


rsi_cfgsave :: Store Configuration Parameters

Description

This command is used to save parameters into non-volatile memory which are used either to join an Access point (auto-join mode) as a client or create an Access point (auto-create mode). This command should be issued after IP config is complete.

The feature is valid in operating modes 0, 2 and 6.

Command Format

at+rsi_cfgsave

Note!


Result Code Description
OK Success
ERROR Failure

Possible error codes for this command are 0x0021, 0x0025, 0x002C .

Availability

This command is valid when opermode is 0, 1, 2 or 6.

[ Go to top ]

rsi_store_server_ip_port :: Store Server IP and Port Parameters

Description

This command is used to save (up to 4) sets of IP addresses and ports into non-volatile memory, which can be used by the TCP command to establish connections. It should be issued only after opermode is set. This command will store the given destination IP address and the port into the flash at the given index.

The feature is valid in operating modes 0, 2 and 6.

Command Format

at+rsi_store_server_ip_port=<index>,<destination_ip>,<port>

Note!


Result Code Description
OK Success
ERROR Failure

Possible error codes for this command are 0x0021 .

Availability

This command is valid when opermode is 0, 1, 2 or 6.

[ Go to top ]


rsi_cfgenable :: Enable Auto-join / Auto-Create

Description

This command is used to enable or disable the feature of auto-join or auto-create on power up. This command should be issued after Opermode.

Command Format

at+rsi_cfgenable=<cfg_enable>

Parameters

cfg_enable (1 byte)

Response

Result Code Description
OK For response payload parameters description, see Store configuration parameters
ERROR Failure

If user tries to give any other command during autojoin then user gets error 0x002C. To avoid this, user have to disable auto_join feature by giving rsi_cfgenable=0\r\n and give other commands.

Possible error codes for this command are 0x0021, 0x0025, 0x002C .

Availability

This command is valid when opermode is 0, 2 and 6.

[ Go to top ]


rsi_cfgget : Get Stored Configuration

Description

Gets configuration values used in auto-join or auto-create modes. The config values are stored in non-volatile flash memory. This command should be given after successful WLAN connection.

Command Format

at+rsi_cfgget?

Response

Result Code Description
OK For response payload parameters description, refer to the following section, Store User Configuration
ERROR Failure.

Note!

  1. Transparent mode parameters are only valid in UART interface in AT command mode only.
  2. After a firmware update, a saved configuration may be lost if the config checksum fails.
  3. If the CUSTOM_FEAT_HTTP_SERVER_CRED_TO_HOST [25th bit] is not set in custom_feature_bit_map , then http params [http_credentails_avail, http_username, http_password] will not be sent to host and the size of payload will get reduced by 63 bytes.

For response payload parameters description, refer to sectionStore configuration structure parameters.

Possible error codes for this command are 0x0021, 0x0025, 0x002C .

Availability

This command is valid when opermode is 0, 2 and 6.

[ Go to top ]


rsi_usercfg :: Store User Configuration

Description

Set the stored configuration values for auto-join and auto-create modes. This command can be given at any time after opermode is given.

Command Format

at+rsi_usercfg=<payload_length>,<payload>

Parameters

payload_length

Payload :

cfg_enable (1byte)

opermode (4 bytes)

feature_bit_map (4 bytes)

tcp_ip_feature_bit_map (4 bytes)

custom_feature_bit_map (4 bytes)

band (1 byte)

scan_feature_bitmap (1 byte)

join_ssid (34 bytes)

user_data_rate (1 byte)

Please refer the PER Mode command section, for the data rates supported by the module.

uTXPower (1 byte)

FIPS_key_type_stored (1 byte)

Uchannel (1 byte)

scan_ssid_len (1 byte)

FIPS_key_restore (1byte)

csec_mode (1byte)

psk (64 bytes)

scan_ssid (34bytes)

scan_cnum (1 byte)

dhcp_enable (1 byte)

ip (4 bytes)

subnet_mask (4 bytes)

default_gateway (4 bytes)

eap_method (32 bytes)

inner_method (32 bytes)

user_identity (64 bytes)

password (128 bytes)

go_intent (2 bytes)

device_name (64 bytes)

operating_channel (2 bytes)

ssid_postfix (64 bytes)

psk_key (64 bytes)

pmk (32 bytes)

channel_no (2 bytes)

ssid (34 bytes)

security_type (1 byte)

encrypt_mode (1 byte)

psk (64 bytes)

beacon_interval (2 bytes)

dtim_period (2 bytes)

ap_keepalive_type (1 byte)

ap_keepalive_period/ap_keepalive_counter (1byte)

max_sta_support (2 bytes)

module_mac (6 bytes)

antenna_select (2 bytes)

fips_bypass_mode (2bytes)

wep Index (2 bytes)

wep key (4 * 32 bytes)

dhcpv6_enable (2 bytes)

prefix_length (2 bytes)

ip6 (16 bytes)

Dgw6 (16 bytes)

tcp_stack_used (1 byte)

bgscan_magic_code (2 bytes)

bgscan_enable (2 bytes)

bgscan_threshold (2 bytes)

rssi_tolerance_threshold (2 bytes)

bgscan_periodicity (2 bytes)

active_scan_duration (2 bytes)

passive_scan_duration (2 bytes)

multi_probe (1 byte)

chan_bitmap_magic_code (2 bytes)

scan_chan_bitmap_stored_2_4_GHz (4bytes)

scan_chan_bitmap_stored_5_GHz (4bytes)

roam_magic_code (2 bytes)

roam_enable (4 bytes)

roam_threshold (4 bytes)

roam_hysteresis (4 bytes)

rejoin_magic_code (2 bytes)

rejoin_max_retry/rsi_max_try (4 bytes)

rsi_scan_interval (4 bytes)

rsi_beacon_missed_count (4 bytes)

rsi_first_time_retry_enable (4 bytes)

region_request_from_host (1 byte)

rsi_region_code_from_host (1 byte)

region_code (1 byte)


Note! All the magic codes should be 0x4321. Firmware validates the respective details if and only if the magic code is matching. Below given parameters are transparent mode specific.


transparent_mode_enable (2 bytes)

packet_len (2 bytes)

escape_char (1byte, ASCII)

gap_time (2 bytes)

frame_time (2 bytes)

escape_time (2 bytes)

ip_version(2 bytes)

nsocket_type (2 bytes)

stLocalPort (2 bytes)

dst_port (2 bytes)

ipv4_address/ipv6_address (16 bytes)

max_count (2 bytes)

TOS (4 bytes)

ssl_enabled (1 byte)

ssl_ciphers (1 byte)

multicast_magic_code (2 bytes)

multicast_bitmap (2 bytes)

powermode_magic_code (2 bytes)

powermode (1 byte)

ulp_mode (1 byte)

wmm_ps_magic_code (2 bytes)

wmm_ps_enable (1 byte)

wmm_ps_type (1 byte)

wmm_ps_wakeup_interval (4 bytes)

wmm_ps_uapsd_bitmap (1 byte)

listen_interval (4 byte)

Listen_interval_dtim (1 byte)

ext_custom_feature_bit_map (4 bytes)

private_key_password (82 byte)

join_bssid (6 bytes)

join_feature_bitmap (1 byte)

is_11n_ap (2 bytes)

ht_caps (2 bytes)

ht_caps_magic_word (2 bytes)

fast_psp_enable (1 byte)

monitor_interval (2 bytes)

request_timeout_magic_word (2 bytes)

timeout_value (2 bytes )

timeout_bitmap (4 bytes)

dhcp_ap_enable (1 byte)

ap_ip (4 bytes)

ap_sn_mask (4 bytes)

ap_dgw (4 bytes)

dhcpv6_ap_enable (2 bytes)

ap_prefix_length (2 bytes)

ap_ip6 (16 bytes)

ap_dgw6 (16 bytes)

ext_tcp_ip_feature_bit_map (4 bytes)

http_credentials_avail (1 byte)

http_username (31 bytes)

http_password (31 bytes)

Result Code Description
OK Success.
ERROR Failure.

Possible error codes for this 0x003D, 0x0021, 0x002C, 0x0025, 0x0015 .

Availability

This command is valid when opermode is 0, 2 and 6.

Response

OK
0x4F 0x4B 0x0D 0x0A

Example

at+rsi_usercfg=1294,<Example payload hex format>

See, Example AT Command Sequence for an example.

Example flow for Connecting to a pre-Configured AP

Example flow for Creating a pre-configured AP

[ Go to top ]


rsi_get_wlan_stats :: WLAN Statistics

Description

This command is used to query for WLAN statistics of the module. If this command is issued immediately after opermode command, all the stats will be empty. It should be issued after WLAN connection. This command is supported in WLAN only mode.

Command Format

at+rsi_get_wlan_stats?

Parameters

operating_mode (1 byte)

dtim_period (1 byte)

ideal beacon info (2 Bytes)

busy beacon info (2 bytes)

beacon interval (2 bytes)

Response

Result Description
OK <Wi-Fi stats> Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0xFF82 .

Availability

This command is available when the module is configured in Operating Mode 0, 2.

Example

at+rsi_get_wlan_stats?

Response

OK\0x00\0x01\0x0b\0x00\0x0c\0x00\0xc8\0x00
4f 4b 00 01 0b 00 0c 00 c8 00 0d 0a

[ Go to top ]


rsi_host_rtc_time :: Set RTC Time

Description

This command is used to set/initialize the real time clock of the module from the host. This command can be issued after Opermode command. To enable this feature, set custom feature bitmap BIT[28] .

Command Format

at+rsi_host_rtc_time=<second>,<minute>,<hour>,<day>,<month>,<year><weekday>

Parameters

second

minute

hour

day

month

year

weekday

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025

Availability

This command is available in all modes.

Example

The following example configures the module rtc time to APRIL 2 10:10:10 2018 6

at+rsi_host_rtc_time=10,10,10,2,3,2018,6

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]

rsi_get_rtc_time :: Get RTC Time

Description

This command is used to get the real time clock of the module from the host. This command should only be used after rsi_host_rtc_time and rsi_init commands.

Command Format

at+rsi_get_rtc_time?

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x0025

Availability

This command is available in all modes.

Example

The following example gets the configured module rtc time.

at+rsi_get_rtc_time?

Response

OK <tm_sec><tm_min><tm_hour><tm_mday><tm_mon><tm_year ><tm_wday>

[ Go to top ]


rsi_feat_frame :: Set Feature Frame

Description

This command is used to select Internal RF type or External RF type and Clock Frequency. This command should be issued after opermode command.

Command Format

at+rsi_feat_frame=<pll_mode>,<rf_type>,<wireless_mode>,<enable_ppp>,<afe_type>,<features_enable>

Parameters

pll_mode (1 byte)

rf_type (1 byte)

wireless_mode (1 byte)

enable_ppp (1 byte)

afe_type (1 byte)

feature_enables (4 bytes)


Note!


Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0xFF74 .

Availability

This command is available in all modes.

Example

at+rsi_feat_frame=0,1,0,0,1

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_get_ram_dump :: Get RAM Dump

Description

This command is used to get ram dump of the module for a given address and offset. This command should be issued after Opermode.

Command Format

at+rsi_get_ram_dump=<address><length>

address (4 bytes)

length (4 bytes)

Chunk length to read from RS9116 module. Maximum chunk length is 384Kb (in WiSeConnect mode).

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x003e

Availability

This command is available in all modes.

Example

at+rsi_get_ram_dump=0,4096

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_filter_bcast :: Broadcast Filter

Description

Sets the threshold to ignore broadcast packets when the client is in powersave mode. This is used to achieve low power in standby associated mode.

Command Format

at+rsi_filter_bcast=<beacon_drop_threshold><filter_bcast_in_tim><filter_bcast_tim_until_next_cmd>

Parameters

beacon_drop_threshold (2 bytes)

filter_bcase_in_tim (1 byte)

filter_bcast_tim_until_next_cmd (1 byte)

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021

Availability

This command is available in all modes.

Example

at+rsi_filter_bcast=2,1,1

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_buf_alloc :: Configure Tx-Rx Buffer Ratio

Description

This command is used to configure the Tx, Rx and global buffer ratio. This command should be issued after Opermode.

Command Format

at+rsi_buf_alloc=<dynamic_tx_pool><>dynamic_rx_pool<dynamic_global_pool>

Parameters

dynamic_tx_pool (1 byte)

dynamic_rx_pool(1 byte)

dynamic_global_pool (1 byte)


Note! The summation of the above three ratios should equal 10 and the ratio should be in decimal value.


Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021

Availability

This command is available in all modes.

Example

at+rsi_buff_alloc=1,1,1

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_antenna :: Antenna Selection

Description

This command is used to select the antenna. This command must be given after rsi_init .

Command Format

at+rsi_antenna=<antenna>

Parameters

antenna (1 byte)

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error codes are 0x0021, 0x002C

Availability

This command is available in all modes.

Example

at+rsi_antenna=1 

Response

OK
0x4F 0x4B 0x0D 0x0A

[ Go to top ]


rsi_gpioconf :: Configuring GPIOs

Description

Configures GPIOs. This command must be issued after rsi_opermode command.

Command Format

at+rsi_gpioconf=<gpio_type>,<mode>,<pin_num>,<config_values>,<value>

Parameters

gpio_type

mode

pin_num


Note! It is not recommended to configure ULP_GPIO6 as it is used for WOWLAN feature.


config_values

value

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Example

at+rsi_gpioconf=1,0,5,0,1 // Set ULP_GPIO_5 low

at+rsi_gpioconf=1,1,5,0,1 // Set ULP_GPIO_5 high

at+rsi_gpioconf=1,2,5,0,0 // Get status of ULP_GPIO_5

at+rsi_gpioconf=1,0,5,0,1 // Set drive strength of ULP_GPIO_5 to 8 mA

Result Code GPIO status
OK\0x00 LOW
OK\0x01 HIGH

Note! The GPIO must be configured before issuing set and get mode commands.


rsi_memrd:: Performs memory read from the module.

Description

This command is used to read memory content from the module for a given address and length.This command can be issued anytime before or after rsi_opermode command.

Command Format

at+rsi_memrd=<address><length>

address (4 bytes)

length (4 bytes)

Length to read from RS9116 module.

Note! Maximum length 4 bytes.

Response

Result Code Description
OK Success
ERROR <Error code> Failure

Possible error code are 0x003e

Availability

This command is available in all modes.

Example

at+rsi_memrd=0x4000437,1

Response

OK
4F 4B 14 0D 0A
From above response 14 is for 1.4 silicon version


rsi_mqtt :: MQTT Client

Description

This section explains different commands to use MQTT client. This command should only be issued after Set IP Parameters command.


Note!


MQTT Command Description
Init This command creates MQTT objects. This should be the first command for accessing MQTT. TCP level connection is established in this command. This command has to be issued after the ipconfig command.
Connect This command is used to Connect to MQTT Server/Broker. MQTT level connection is established in this command. This command has to be issued after "MQTT Init" command.
Subscribe This command is used to send the MQTT subscribe packet. This command has to be issued after "MQTT Connect" command.
Publish This command is used to send MQTT publish packet. This command has to be issued after "MQTT Connect" command.
Unsubscribe This Command is used to send MQTT unsubscribe packet. This command has to be issued after "MQTT Connect" command.
Disconnect This command is used to Disconnect from the Socket. MQTT and TCP level disconnection occur in this command. This command has to be issued after "MQTT Connect" command.
Delete/Destroy This command is used to delete the MQTT client configuration and TCP level disconnection happens in this command. This command has to be issued after "MQTT Init" command.

Following table explains list of MQTT commands and their description.

Command Format

MQTT client has different command types. Based on the command type, the parameters will change.

at+rsi_mqtt=<command_type>,<parameters>

Following are available command types.

MQTT Command Type Format
init 1 at+rsi_mqtt=1,<ip_version>,<server_ip>,<server_port>,<client_id_length>,<client_id>,<kee palive>,<username_length>,<username>,<password_length>,<password>,<clean_sessio n>,<encrypt>,<client_port>

MQTT Command: Init (command_type = 1)

at+rsi_mqtt=1,<ip_version>,<server_ip>,<server_port>,<client_id_length>,<client_id>,<keepalive>,<username_length>,<username>,<password_length>,<password>,<clean_session>,<encrypt>,<client_port>

where ...

ip_version

server_port

server_ip

client_id_length

client_id

keepalive

username_length

username

password_length

password

clean_session

encrypt

client_port

MQTT Command: Connect (command_type = 2)

at+rsi_mqtt=2,<usr_flag>,<pwd_flag>,<will_flag>,<will_retain>,<will_qos>,<will_topic_length>,<will_topic>,<will_msg_length>,<will_msg>

where ...

usr_flag

pwd_flag

will_flag

will_retain

will_qos

will_topic_length

will_topic

will_msg_length

will_msg

MQTT Command: Subscribe (command_type = 3)

at+rsi_mqtt=3,<topic_length>,<topic>,<qos>

topic_length

topic

qos

MQTT Command: Publish (command_type = 4)

at+rsi_mqtt=4,<topic_length>,<topic>,<qos>,<retained>,<dup>,<message_length>,<mess age>

topic_length

topic

qos

retained

dup

message_len

message

MQTT Command: Unsubscribe (command_type = 5)

at+rsi_mqtt=5,<topic_length>,<topic>

topic_len

topic

MQTT Command: Disconnect (command_type = 8)

at+rsi_mqtt=8

MQTT Command: Delete (command_type = 9)

at+rsi_mqtt=9

Response

MQTT Command: Init

Success

OK <ip_version =0x04 0x00><socket_type =0x0000><socket_descriptor =0x0001><local_port_port =0x4d2>, <dest_port=0x75b>, <ipv4_addr= 0xC0 0xA8 0x28 0x12 0x00(12 times)> <dest_ip4_addr =0xC0 0xA8 0x28 0x2 0x00(12 times)> <mss =0xB4 0x05><window_size =0x00 0x00 0x01 0x0>

Error

MQTT Command: Connect

Success

Value Return Code / Response Description
0 0x00 / Connection Accepted Connection accepted
1 0x01 / Connection Refused, unacceptable protocol version The Server does not support the level of the MQTT protocol requested by the Client
2 0x02 / Connection Refused, identifier rejected The Client identifier is correct UTF-8 but not allowed by the Server
3 0x03 / Connection Refused, Server unavailable The Network Connection has been made but the MQTT service is unavailable
4 0x04 / Connection Refused, bad user name or password The data in the user name or password is malformed
5 0x05 / Connection Refused, not authorized The Client is not authorized to connect
6-255 Reserved for future use

MQTT Command: Subscribe/Publish/Unsubscribe

Success

Failure

MQTT Command: Destroy/Delete/Disconnect

Success

Failure


Note!

DUT sends received data on published topic to host asynchronously using the following format.

AT+RSI_MQTT_READ_DATA<mqtt_flags><current_chunk_length><topic_length><topic><message>

Asynchronous Response: Remote Terminate

ERROR<ERROR-CODE>

Asynchronous Response: Keep Alive Timeout

AT+RSI_MQTT_KA_TIMEOUT

Asynchronous Response: Publish Message

AT+RSI_MQTT_READ_DATA<mqtt_flags><current_chunk_length><topic_length><topic><message>

where ...

mqtt_flags (2 bytes)

topic_length (2 bytes)

current_chunk_length (2 bytes)

message

Example

-- Init the device
at+rsi_opermode=0,0,2147484676,2147483648,3145728,0,131072,0,0,0
at+rsi_band=0
at+rsi_init
at+rsi_scan=0,MY_NETWORK
at+rsi_psk=1,MY_PASSWORD
at+rsi_join=MY_NETWORK,0,2,2
at+rsi_ipconf=1

-- MQTT Init
at+rsi_mqtt=1,4,139.196.133.125,1883,38,6789|securemode=3,signmethod=hmacsha1|, 200,19,Device1&a1BLKg93h0r,40,EB9558F74EF496E72C129B5EDF66427683488246,1,0

-- MQTT Connect
at+rsi_mqtt=2,1,1,0,0,0,0,0,0

-- Subscribe
at+rsi_mqtt=3,7,redpine,1,1

-- Publish to cloud
at+rsi_mqtt=4,7,redpine,0,0,0,40,{\"state\":{\"desired\":{\"toggle\":1}}}

-- Unsubscribe
at+rsi_mqtt=5,7,redpine

-- Disconnect
at+rsi_mqtt=8

-- Destroy
at+rsi_mqtt=9

Note! For TLS/SSL connectivity, SSL certificates must be configured prior to attempting to connect.


MQTT Reference

http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html

https://www.oasis-open.org/news/announcements/mqtt-version-3-1-1-becomes-an-oasis-standard