Connect-io-n™ RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 January 2013 Redpine Signals, Inc. 2107 N. First Street, #680 San Jose, CA 95131. Tel: (408) 748-3385 Fax: (408) 705-2019 Email: info@redpinesignals.com Website: www.redpinesignals.com Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Document Conventions This document is for the below part numbers. All references to RS9110-N-11-2X denote the below modules only. This version of document is not applicable for RS9110-N-11-24 modules.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Table of Contents 1 Introduction ...................................................................... 10 2 Architecture Overview ....................................................... 11 2.1 2.1.1 2.1.2 2.2 Host ..................................................................................12 UART ........................................................................................... 12 SPI ................................
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3.4.5 Open a Listening TCP Socket ........................................................... 46 3.4.6 Open a Multicast socket.................................................................. 48 3.4.7 Query a Listening Socket‟s Active Connection Status .......................... 49 3.4.8 Close a Socket .............................................................................. 50 3.4.9 Send data to a Socket .........................
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4.6 INTR_MASK ........................................................................................ 113 INTR_CLEAR ....................................................................................... 114 Power modes ................................................................... 114 4.6.1 4.6.2 4.6.3 4.7 Power mode 0 ............................................................................. 114 Power mode 1 ..........
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 5.1 Firmware Upgrade Process .............................................. 183 5.2 Boot-loading Process ....................................................... 185 5.3 Firmware Upgrade Using SPI Interface without Wireless Firmware Upgrade feature ......................................................... 188 5.4 Firmware Upgrade Using SPI Interface with Wireless Firmware Upgrade feature .................................................
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 List of Figures Figure 1:RS9110-N-11-2X Software Architecture Block Diagram ............... 11 Table 1: Channel Parameters for 2.4 Ghz ................................................... 20 Table 2: Channel Parameters for 5 Ghz ...................................................... 21 Table 3: Data Rate Parameter ....................................................................
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Table 21: Error Codes and Descriptions .................................................... Figure 30:Flowchart for Transmitting Frames .......................................... Figure 31 : Send Frame Body (TCP and client UDP) .................................. Figure 32 Send Frame Body (Listening UDP) ............................................ Figure 33: Process for Reading Data ......................................................
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 List of Tables Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table 1: Channel Parameters for 2.4 Ghz ................................................... 20 2: Channel Parameters for 5 Ghz ...................................................... 21 3: Data Rate Parameter .................................................................... 34 4: Error Codes ........
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 1 Introduction This document describes the commands to operate the RS9110-N-11-2x modules. The parameters in the commands and their valid values; and the expected responses from the modules are also described. It also describes the flow of commands to be used to configure the modules into specific functionality. The document should be used by the developer to write software on the Host MCU to control and operate the module.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 2 Architecture Overview The architecture of the RS9110-N-11-2X module is shown below. HOST PROCESSOR (HOST) Application Thin SPI Driver UART Driver SPI UART Interrupt SPI UART Host Abstraction Layer SLIP Wireless Control Block TCP/IP Station Managment Entity WPA/WPA-2 802.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 2.1 Host The Host is any system that has applications being executed and either a UART or SPI interface to connect to the RS9110-N-11-2X module. 2.1.1 UART The UART on the Host side provides an interface for the Host to access the Wi-Fi module. UART is used to configure various parameters of the RS9110-N-11-2X module and also to send and receive data over the network by accessing the TCP/IP stack in the RS9110-N-11-2X module. 2.1.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 2.2.6 TCP/IP Control frames If the frames from the Host are interpreted as TCP/IP specific frames then the WCB interacts with the TCP/IP stack. 2.2.7 Station Management Entity (SME) The SME is the core layer which manages the Wi-Fi connectivity. The SME maintains the state machine to detect the activity on the Wi-Fi network and indicates to the user accordingly.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3 RS9110-N-11-2X in UART Mode The following sections show how to operate the module using the UART interface. 3.1 Auto Baud Rate Detection (ABRD) The RS9110-N-11-2X module automatically detects the baud rate of the Host‟s UART interface by exchanging some bytes. The Host should configure the UART interface for the following parameters for ABRD detection.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 In case of failure of this exchange, the module gets configured with the default baud rate of 115200 bps after a maximum of 18 secs. 3.2 Module Operation in UART Mode The Wi-Fi AT command set represents the control frames that are sent from the Host to the RS9110-N-11-2X module to set or get the values of various control parameters. The command set resembles the standard AT command interface used for modems.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Parameters band_val: 0– 2.4 GHz 1– 5 GHz RS9110-N-11-22/24(-xx) are single band modules (2.4 GHz only), while RS9110-N-11-28(-xx) is a dual band module (2.4 GHz and 5 GHz). For Example, band command is given as at+rsi_band=1\r\n …………………………….. 0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x62 0x61 0x6E 0x64 0x3D 0x31 0x0D 0x0A NOTE: Note: This format of command and the corresponding byte stream under the dotted line is followed in all examples.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 This is command to be executed right after the at+rsi_band command. This command programs the RS9110-N-11-2X module‟s Baseband and RF components.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Parameters ?: To get the number of networks already scanned by the “Scan” or Next Scan” command. value: This parameter configures the number of scan results the module returns for the Scan and NextScan commands. Example 1 : To configure for 10 scan results, the command is at+rsi_numscan=10\r\n ……………………………….
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 at+rsi_passscan=bit_map\r\n Parameters bit_map: Parameter to configure for which channels passive scan is to be done. For example, if only channel 1 and channel 4 are required to be scanned passively, then the value for bit_map is calculated as Channel[n] Channel[n-1] ……..Channel[4] Channel[3] Channel[2] Channel[1] 0 0 1 0 0 1 Decimal for <000..001001> is 9.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 chan_num: Channel Number on which the scan has to be done. Parameters for 2.4 GHz Channel chan_num Number parameter 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 Table 1: Channel Parameters for 2.4 Ghz Parameters for 5 GHz Channel Number All channels 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 chan_num parameter 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Redpine Signals, Inc.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 140 149 153 157 161 165 19 20 21 22 23 24 Table 2: Channel Parameters for 5 Ghz If this value is 0, the module scans in all the channels in the band that is selected through the at+rsi_band command. SSID: Optional Input. To scan a specific AP with a known SSID, or a hidden Access Point, this parameter is used. NOTE: In 5 GHz, DFS Client (802.11h) is supported. DFS client implementation is internal to the module.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Result Code Description according to the value configured by the at+rsi_numscan command. If the at+rsi_numscan command is not issued, then the module returns the maximum number of APs it can scan. ERROR Failure The maximum number of Access Points that can be scanned by the module is 14 for RS9110-N-11-22(-xx) and RS9110-N-11-24(-xx) and 10 for RS9110-N-1128(-xx). The SSIDs are returned in decreasing order of their RSSI.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3.2.6 Next Scan Results Description This command is used in conjunction with the at+rsi_numscan and at+rsi_scan commands. It is valid only if the at+rsi_numscan command has been used to configure the number of scan results to be returned by the module. The module responds by returning the scanned Access Points.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Result Code Description information, returned in hexadecimal, 1 byte. RSSI information indicates the signal strength of the Access Point ERROR Failure 3.2.7 Query MAC Address of Scanned APs Description This command returns the MAC addresses of the Access Points returned by the “Scan” command. This command should be issued after “Scan” command to retrieve MAC addresses of the scanned networks.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Result Code Description 0x00 - Ad-hoc ERROR Failure For example, if there is an infrastructure network “Redpine_net”, that is already scanned by the at+rsi_scan command, then at+rsi_nwtype?r\n ………………………………….
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 INFRASTRUCTURE/IBSS is sent as an ASCII string. type: 0 indicates IBSS Joiner and 1 indicates IBSS Creator chan_num: Indicates the channel in which the IBSS network has to be created. If the module is intended to be an ad-hoc joiner, this field can be set to „0‟ or to the specific channel in which the creator is present. For 2.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 132 136 140 149 153 157 161 165 17 18 19 20 21 22 23 24 Example 1: In order to create an open network in channel 11 in Ad-hoc (IBSS) mode, the command (to be issued before the join command) is at+rsi_network=IBSS,1,11\r\n …………………………………………………….
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 at+rsi_network=INFRASTRUCTURE\r\n ……………………………………………………. 0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x6E 0x74 0x74 0x77 0x6F 0x72 0x6B 0x3D 0X49 0X4E 0X46 0X52 0X41 0X53 0X54 0X52 0X55 0X43 0X54 0X55 0X52 0X45 0x0D 0x0A Response Result Code Description OK Successful execution of the command ERROR Failure 3.2.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 at+rsi_psk=ABCDE12345\r\n WEP (ASCII Mode): In this mode, the key to be supplied to the AP should be 5 characters (for 64 bit WEP mode) or 13 characters (for 128 bit WEP mode). All ASCII characters are allowed. In this mode the ASCII code of the key should be supplied to the module.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3.2.11Set WEP Key Description This command is issued to supply WEP keys to the module, if the AP is in WEP mode. In some APs, Four WEP keys (with indices 1, 2, 3, 4) can be configured. This command can be used to supply the right key to the module in such a case. It is an optional command and need not be issued if the AP is configured with the WEP key of index 1.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Authvalue: 0– WEP Open Key Authentication 1– WEP Shared Key Authentication 2– WPA 3- WPA2 4- No security (open) The relevance of this command changes with Bit[11] of the “Feature Select” command. Bit[11]=0: The command is not a mandatory command if the AP is in WPA/WPA2 or open mode. If the AP is in WEP mode, it must be issued to set the mode to either WEP-open or WEP-shared.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 This command is used to join a network. The SSID is selected from the list of SSID‟s returned after performing scan operation. It is also used to create an IBSS network in creator mode.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Data Rate (Mbps) Value of uTxDataRate Auto-rate 0 1 1 2 2 5.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Response Result Code Description OK Successful execution of the command ERROR Failure 3.2.14 Re-join Description The module tries to re-join to a network if it loses connection to the network it was associated with. If the re-join is successful, then the link is re-established. The module aborts the re-join after a fixed number of re-tries.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 No Parameters Response Result Code Description OK Successful execution of the command ERROR Failure 3.3 Power Modes and commands1 The RS9110-N-11-2X module supports three power modes with the UART interface. The Host can switch among the power modes using the AT commands depending on the Wi-Fi connection status as defined in this section.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Go back to sleep No Sleep Timer Expired? Yes Module wakes up Sends “SLEEP\r\ n” to Host Yes “ACK\r\n” sent from Host? No Host should make the module scan and join to an Access Point Figure 2: Power Save Mode1 before Connection to an AP After Wi-Fi Connection In this state, the RS9110-N-11-2X module periodically wakes up to receive DTIM (Delivery Traffic Indication Message) from the Access Point.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Module goes to sleep DTIM interval reached? No Yes Module wakes up Sends “SLEEP\r\ n” to Host “ACK\r\n” sent from Host? No Send/receive data Yes Yes All data received from AP delivered to Host? No Deliver data to Host Figure 3: Power Save Mode1 after Connection to an AP 3.3.3 Power mode 2 The RS9110-N-11-2X module puts to sleep the Baseband and RF components in this mode.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 The functioning of the module in this mode depends on the connection status as explained below Before Wi-Fi connection If this power mode is enabled before the Wi-Fi connection is established, the module powers off the Baseband and RF components until the Host reconfigures the module to Power Mode 0. If the host wants to perform any Wi-Fi related activity viz., SCAN, JOIN, etc., it has to switch to Power Mode 0.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Example: To configure in power mode 1 at+rsi_pwmode=1\r\n ………………………………………… 0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x70 0x77 0x6D 0x6F 0x64 0x65 0x3D 0x31 0x0D 0x0A Sleep Timer Description This command configures the sleep timer which is used in Power Mode 1 when the module has not established the Wi-Fi connection.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Parameters bitval - Note that the default values of the bits described below is „0‟. Bit[0] – „1‟ - Add DNS Server Address to the Response for Network Param Query command. This command is not used for DNS configuration, it is used to query DNS parameters using the at+rsi_nwparams command „0‟ – Do not add DNS Server Address to the Response for Network Param Query.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Result Code Description OK Successful execution of the command. “OK” is returned in ASCII ERROR Failure 3.4 TCP/IP Commands The TCP/IP AT command set represents the control frames that are sent from the Host to the RS9110-N-11-2X to access the TCP/IP stack. The following are the RS9110-N-11-2X TCP/IP configuration AT commands. 3.4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 lport – Local Port on the RS9110-N-11-2X module (allowed range 1024 to 49151) Response Result Code Description OK Upon successfully opening and connecting the TCP socket to the Host port, a socket handle is returned. OK is returned as ASCII, while in hexadecimal. The socket handle would be followed after OK. Socket handle is a 1 byte value, ranging from 1 onwards.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Parameters lport – Local port on the RS9110-N-11-2X module Response Result Code Description OK Upon successfully opening and connecting the UDP socket to the host port, a socket handle is returned. The socket handle is followed after OK. OK is returned as ASCII, while as a 1 byte value in hexadecimal. Failure ERROR Example: at+rsi_ludp=8000\r\n ………………………….
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 lport – Local port on the RS9110-N-11-2X module Response Result Code Description OK Upon successfully opening and connecting the UDP socket to the host:port, a socket handle is returned. The socket handle is followed after OK.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 d. You can now open the second socket in module with the same port no. 8001 e. Socket handle returned for the new socket would be 2 f. Connect this socket to another remote peer socket Command at+rsi_ltcp Usage at+rsi_ltcp=port\r\n Parameters port – Listening port to be used by a remote system when connecting to the RS9110-N-11-2X module.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 NOTE: Redpine module has total of 7 sockets for UART modules and 6 sockets for SPI modules. User must use the socket handle returned from the socket creation commands. Apart from these user provided sockets there are internal sockets reserved for HTTP client,DNS client, Wireless firmware upgrade/configuration, ARP and DHCP client. 3.4.6 Open a Multicast socket1 Description This command opens a multicast socket.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 ……………………. 0x4F 0x4B 0x01 0x0D 0x0A 3.4.7 Query a Listening Socket’s Active Connection Status Description This command retrieves handles of active socket connections established through the listening socket. This command can be issued when a listening/server TCP socket has been opened in the module, to get information about the remote peer’s client socket.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Result Code Description ERROR is returned, then 0x1F Failure Example 1: at+rsi_ctcp=1\r\n …………………………………………………………………. 0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x63 0x74 0x63 0x70 0x3D 0x31 0x0D 0x0A Example 2: OK \r\n ……………………. 0x4F 0x4B 0x07 0xC0 0xA8 0x28 0x0A 0x41 0x1F 0x0D 0x0A Example 3: OK \r\n ……………………. 0x4F 0x4B 0xFF 0x0D 0x0A 3.4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Result Code Description OK Upon successfully closing the socket “OK” would be returned. Failure ERROR NOTE: In the case of TCP socket, when a remote peer closes the socket connection, the RS9110-N-11-2X module sends the “AT+RSI_CLOSE\r\n” response (hn is the socket handle) to the Host. This is an asynchronous message sent from module to host and not the response of a specific command. is sent in 1 byte hex.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Result Code Description ERROR Failure. On a failure while sending the data on the TCP socket, if the error code indicates “TCP connection closed”, then the RS9110-N-11-2X module closes the socket. Input parameter delimiter The input parameters are delimited by commas (0x2C in ASCII format) in this command. For example to send a stream “abcdefghij” over a TCP socket at+rsi_snd=1,0,0,0,abcdefghij\r\n ………………………………………………..
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 at+rsi_snd Send OK or ERROR -2, 8, -9, -113, -20 to Host. ERROR -2 is sent if module already knows remote socket is not present. Yes OK or Error sent? No Operations happening inside the module Module sends data to remote terminal Got TCP ACK from remote terminal ? Try sending again No No Retry count =14? Yes AT+RSI_CLOSE\r\n is sent to the host.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 NOTE on Byte Stuffing: The „\r\n‟ 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 \r\n 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.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3.4.10 Receive data on a Socket Description The RS9110-N-11-2X module delivers the data obtained on a socket to the Host with this message. This is an asynchronous operation and NOT one that the host can invoke in the module. It is sent from the module to the host when the module receives data from a remote terminal. The data received by the module is sent to the host through this command.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 AT+RSI_READ 1 4 abcd \r\n ……………………….. 0x41 0x54 0x2B 0x52 0x53 0x49 0x5F 0x52 0x45 0x41 0x44 0x01 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 (Sip and Sport). 3.4.11 DNS Commands1 DNS Query Description This command is used to configure the DNS server‟s IP address when the DNS is used in DHCP disable mode.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 at+rsi_dnsserver=192.168.10.20\r\n ……………………………………………….. 0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x64 0x6E 0x65 0x72 0x76 0x65 0x72 0x3D 0x31 0x39 0x32 0x2E 0x38 0x2E 0x31 0x30 0x2E 0x32 0x30 0x0D 0x0A 0x73 0x73 0x31 0x36 For success, the response is OK\r\n …………………. 0x4F 0x4B 0x0D 0x0A DNS Resolution Description This command is used to send the domain name of a website to the module to resolve the IP address.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 ……………………………………………….. 0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x64 0x6E 0x73 0x67 0x65 0x74 0x3D 0x77 0x77 0x77 0x2E 0x67 0x6F 0x6F 0x67 0x6C 0x65 0x3E 0x63 0x6F 0x6D 0x0D 0x0A For example, for 3 IP addresses, the response is OK 3 192 168 10 10 192 168 10 20 192 168 10 30 \r\n ………………….
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Result Code Description OKMajor.Minor1.Minor2 The firmware version follows after OK. The version is indicated by 3 bytes. Each byte is separated by a dot. Major number (1 Byte), Minor number1 (1 Byte), Minor number2 (1 Byte). All are returned in ASCII. ERROR Failure Example, if the firmware version is 1.2.3, then the response is OK 1.2.3\r\n …………………. 0x4F 0x4B 0x31 0x2E 0x32 0x2E 0x33 0x0D 0x0A 3.5.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 OK [] [] … up to the number indicated by String of response parameters follows after OK. Please refer to the next table for description of each parameter.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Response Parameter Description connect to the Access Point. If the connection to the Access Point is in Open mode, then these bytes will be zeros. If the actual key is less than 32/64 characters long, then filler bytes 0x00 are added to complete the length of the return value. This parameter contains dummy bytes in IBSS mode (with module as creator) if no Wi-Fi nodes have joined the network.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Response Parameter Description 0xC0 0xA8 0x32 0x01 GATEWAY This is 4 bytes and indicates the Gateway address of the module. Returned in hex. For example, if gateway is 255.255.255.0, the value returned is 0xFF 0xFF 0xFF 0x00 NO_OF_OPEN_SOCKETS1 This is 1 byte and indicates the number of open sockets in the module. Returned in hex. This value ranges from 0x00 to 0x08.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Response Parameter Description 2- LTCP 3– Multicast 4-LUDP Returned in hex. Sport This is 2 bytes and indicates the source port of the open socket. Returned in hex Dport This is 2 bytes and indicates the destination port for the open socket. Returned in hex. Dip This is 4 bytes and indicates the destination IP of the open socket. Returned in hex.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3.5.4 Query MAC Address of Module Description This command is used to retrieve the MAC address of the module. Command at+rsi_mac? Usage at+rsi_mac?\r\n Parameters NA Response Result Code Description OK The MAC address follows after OK. The MAC address is 6 bytes long, returned in hex. ERROR Failure Example: at+rsi_mac?\r\n ………………………………….
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3.5.5 Query RSSI value Description This command is used to get the signal strength of the Access Point or network that the module is connected to. Command at+rsi_rssi? Usage at+rsi_rssi?\r\n Parameters NA Response Result Code Description OK 1 Byte, hexadecimal, return value for absolute value of RSSI.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3.6.1 Store Configuration in Flash Memory Description This command is used to save the parameters of an access point to internal memory. This command should be given after at+rsi_scan, at+rsi_psk, at+rsi_join and at+rsi_ipconf commands , to save the configuration of the access point to which the module joined.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Result Code Description OK Successful execution ERROR Failure 3.6.3 Get Information about Stored Configuration Description This command is used to get the configuration values that have been stored in the module‟s memory. The parameters returned in this command are the parameters used in automatically joining to a pre-configured network when the module boots up in the auto-join mode.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description the stored access point or network. For example, if channel number is 6, then 0x06 is returned. If channel number is 12, then 0x0C is returned. Network Type 1 byte, hex. It returns the 0x01 : Infrastructure 0x00 : Ad-hoc Sec Mode Data Rate Power Level PSK 1 byte, hex. Security Mode of the scanned Access Point, returned in hexadecimal, 1 byte.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description 0x00 DHCP Disable 0x01 DHCP Enable Subnet Mask 4 bytes, hex. IP Address of the module 4 bytes, hex. Subnet mask Default Gateway 4 bytes, hex. Default gateway Feature Select bit map 4 bytes hex, please refer the Feature Select section for more information. Authmode 1 byte, hex.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Power up Boot up Was Auto-join enabled in the last power cycle? No Yes at+rsi_band Module scans only the channel of the Pre-configured AP and joins it ( OK response corresponding to at+rsi_ipconf is given back to host) Yes Yes Want to enable Auto- join? Configuration already stored at+rsi_cfgget? No No Scan and join AP and configure IP ( either DHCP enable or disable) at+rsi_cgfsave to store configuration.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3.7 Upgrading Firmware There are two options for firmware upgrade: Firmware upgrade without wireless firmware upgrade feature Firmware upgrade with wireless firmware upgrade feature. The detailed procedure for firmware upgrade is mentioned in the below sections. 3.7.1 Firmware Upgrade Using UART Interface without wireless firmware upgrade feature When the module is powered up, the following sequence is executed 1.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Select the firmware files from RS.CN.xx.GENR.UT.x.x.x\Software\Firmware\ Firmware files Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Select Kermit Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Follow the same sequence to load all the files from RS.CN.xx.GENR.UT.4.7.x\Software\Firmware\ta*. After all the files are loaded, the message “Firmware Upgradation completed” is sent by the module.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 NOTE: Firmware upgrade need not be done every time the module is powered up. It is only done when a new firmware is released for the product. 5. The user can now power cycle or hard reset the module and not opt for firmware upgrade when “Firmware upgrade (y/n)” comes in the screen, by sending „n\n‟ (0x6E 0x0A) to the module immediately after the message comes.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4. Power cycle or hard reset the module. The module sends the message – “Firmware upgrade (y/n)”. Send „y‟ to the module. 5. On being prompted by the module, send taim1, taim2, tadm1 and tadm2 from RS.CN.xx.GENR.UT.4.7.x\Software\Firmware\ta** to the module. The module sends the message “Firmware Upgradation completed” 6. Again power cycle or hard reset the module. The module sends the message – “Firmware upgrade (y/n)”.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3.7.3 Firmware Upgrade from 4.7.x to a higher version wirelessly The modules RS9110-N-11-22(-xx) and RS9110-N-11-28(-xx) can be upgraded wirelessly. Also, they can be configured wirelessly1 to join specific access points. The features of wireless configuration and wireless firmware upgrade are available from firmware version 4.7.1 onwards.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Figure 7: Configuration GUI 4. By default, the “Device IP Address” is 192.168.40.61 and “Device Port” is 14320. Keep them unchanged and click “Connect”. This makes the laptop establish a TCP socket connection with the AP. The AP has an IP hardcoded into itself – 192.168.40.61. Ignore the values on the right side of the GUI. 5. Click “Enable Upgrade” button and then click on the “Firmware” tab. Redpine Signals, Inc.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 6. Click on “Upgrade Folder” and select the FOLDER RS.CN.xx.GENR.UT.x.x.x\Software\Wireless_Upgrade\Functional_firm ware\. Then click on the check box for the file wlan_file.rps that appears on the GUI. Click on “Upgrade” button. NOTE: The file RS.CN.xx.GENR.UT.x.x.x\Software\Wireless_Upgrade\Functional_firmware\ wlan_file.rps has the same contents as the files RS.CN.xx.GENR.UT.x.x.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 7. The upgrade process starts. After successful upgrade , a message “Upgrade Complete” is shown in the GUI. At the same time, the message “AT+FWUPGRADE_DONE” is sent to the Host PC (P) from the module through the UART interface. It can be seen on hyperterminal. 8. The module is now upgraded with the latest firmware.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 UART Interface PC (P) RS9110-N-11-22/28 Laptop (C) Figure 8: Wireless Configuration Set-up 1. Power up the module. The module sends the message – “Firmware upgrade (y/n)”. Send „s‟ to the module. The module sends two options: 1.Configuration Firmware upgrade 2.Load Configuration Firmware 2. Press „2‟. The module now becomes an Access Point with open mode and SSID REDPINE_ 3.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Figure 9: Configuration GUI 5. Click on the “Get Configuration” button. It displays the currently stored configuration parameters. These parameters can be ignored for now. 6. Fill the values of the parameters a. Channel: Channel number of the AP or Adhoc network that the module should connect to. Refer tables Channel Number Parameter (2.4 Ghz) and Channel Number Parameter (5 Ghz). b. Network Type c.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 “Source Subnet Mask” and “Source Gateway” respectively. The module will get configured with these parameters. l. Feature Bitmap- The decimal value of the parameter “bitval” of the command Feature Select can be entered here. It can be set to „0‟ for most use cases. m. Auth mode- If “WEP” is selected in “Security Mode”, then the options of “WEP Open” or “WEP Shared” should be used here. 7. Click on the button “Set Configuration”.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Power up the module. Complete Process in Firmware Upgrade Using UART Interface with wireless firmware upgrade feature. Execute the process in section 3.8.1(Wireless Configuration in AP mode). Power Cycle or hard reset the module Complete normal boot-up. Issue Band command, and get OK response Module automatically joins the AP Module sends respose to the Host corresponding to internally executed “Join” operation.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 UART Interface PC (P) RS9110-N-11-22/28 AP Laptop (C) Figure 11: Wireless Configuration Set-up 1. Assuming the module is already connected to an AP, connect a Laptop to the same AP. 2. Open the application RS.CN.xx.GENR.UT.x.x.x\Software\Wireless_Upgrade\ DeviceConfigGUI.jar in Laptop (C) and click on the connect button. Enter the IP address of the module in the field “Device IP Address”. Keep the “Device Port” unchanged to 14320.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3. Click on the “Get Configuration” button. It displays the currently stored configuration parameters. These parameters can be ignored for now. 4. Fill the values of the parameters a. Channel: Channel number of the AP or Adhoc network that the module should connect to. Refer tables Channel Number Parameter (2.4 Ghz) and Channel Number Parameter (5 Ghz). b. Network Type c.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 (y/n)”. Send “n/n” to the module. Now issue the command at+rsi_band to configure the correct band of operation. After this command is issed, the module will automatically join to the configured AP or Adhoc network depending on the parameters entered in the above steps. NOTE: When the module is configured using wireless interface, the “Autojoin” feature is enabled.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3.10 Error Codes The following are the valid error codes, along with their two‟s complement values in hexadecimal, for the commands. Error Code Description -1 (0xFF) Waiting for the connection from peer. -2 (0xFE) Socket not available. -3 (0xFD) De-authentication from the Access Point. -4 (0xFC) Illegal IP/Port parameters. -5 (0xFB) TCP/IP configuration failure. -6 (0xFA) Invalid socket. -7 (0xF9) Association not done.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Error Code Description -16 (0xF0) DHCP Failure, DHCP Renewal not done by AP -17 (0xEF) Baud Rate Not Supported -18 (0xEE) Encryption mode not supported -19 (0xED) Invalid channel -20 (0xEC) at+rsi_snd command is issued but there is no network in the remote terminal -21 (0xEB) Authentication failure -22 (0xEA) Re-join failure -23 (0xE9) Country information not found in probe response from AP during scan.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Error Code Description -92 (0xA4) DNS response timed out -95 (0xA1) Unable to send data as ARP is not resolved -100 (0x9C) DHCP handshake failure -113 (0x8F) Unable to send data because of connectivity disruption (such as AP switched off abruptly) -121 (0x87) Error issued when trying to connect to a nonexistent TCP server socket -124 (0x84) Connection establishment failure. -127 (0x81) Socket already exists.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Table 4: Error Codes NOTE: When the error code received is -10 (IP lease expired), the Host has to issue the TCP/IP configure command to reconfigure the IP address. The Host has to ensure that the Wi-Fi connection is established. Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4 RS9110-N-11-2X in SPI Mode The following figure illustrates the software components of the Host when the RS9110-N-11-2X module is configured in SPI mode.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4.1.2 Features Serial interface Supports 8-bit and 32-bit data mode Supports little-endian format 4.1.3 Interrupt The interrupt signal, an output pin of the module, is asserted when the module needs to indicate to the host that there is data waiting to be sent from the module to the host through the SPI interface. It is also asserted when the module wakes up from sleep in SPI based modules.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Command C1 Bit Number [7:6] Description Command Type “00”- Initialization Command “01”- Read/Write Command “10”, “11”- Reserved for future use 5 Read/Write „0‟- Read Command „1‟- Write Command 4 Internal/Bus Access „0‟- SPI Slave Internal Access. Used in register read/write „1‟- Bus Access. Used in Master read/write and slave read/write 3 Master/Slave Access „0‟- Master Access. Used in master read/write „1‟- Slave Access.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Command Bit Number Description cleared. Otherwise, it these bits are used to indicate type of the packet, flowing from the Host to the RS9110-N-11-2X module. Definition is as follows: 2 – Regular data frame. 4 – Management frame. Other values are reserved for future use. C3 7:0 Length (7:0) LSB of the transfer‟s length (which is in terms of bytes) in case bit 2 of C1 is set. This command is skipped if bit 2 of C1 is cleared.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4.2 Bit ordering of SPI transmission/reception 8-bit mode If a sequence of bytes is to be sent, where B3 is interpreted as the most significant byte, then the sequence of transmission is as follows : B0[7] ..B0[6] .. B0[0] -> B1[7] ..B1[6] ..B1[0] -> B2[7] ..B2[6] .. B2[0] -> B3[7] ..B3[6] .. B3[0] B0 is sent first, then B1, then B2 and so on. In each of the bytes, the MSB is sent first.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 ............... ...................... sclk cs data W0 [31] W0 [30] W0 [29] ....... ....... ....... W0 [1] W0 [0] W1 [31] W1 [30] ...... W0[31:0] ...... .... W1 [2] W1 [1] W1 [0] W1[31:0] Figure 17: 32-bit mode 4.3 Slave Response The SPI slave gives responses to the SPI Master‟s requests. These are as follows: A success/failure response at the end of receiving the command.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 For the initialization command, the Host drives C1 command followed by an 8-bit dummy data. Bits [7:6] of C1 are cleared and 0x15 is driven on bits [5:0]. Status response from the SPI Interface is driven during the transmission of the dummy data i.e. after the transfer of 8-bits of command C1.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4.5 Host Interactions using SPI commands. This section describes the procedures to be followed by the Host to interact with the RS9110-N-11-2X module using SPI commands.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Host Module C1 C2 Dummy R(0x58) Response C3 C4 R R Response A0 A1 A2 A3 Address bytes W0 R R R R Response W1 ……… W(N-1) . (0x00) Data payload to be written D0 D1 …… D(N-1) …. (0x00) Dummy Response Figure 19: Memory Write Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Padded data , where D[7:0] is the dummy data. The first byte sent is W0, the second byte sent is W1 and so on (refer Bit ordering of SPI transmission/reception). 4.5.2 Frame Write (Slave Write) The sequence of command transactions (with no failure from the slave) for a Frame Write (also called slave write) is as described in the figure below.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Original data Padded data , where D[7:0] is the dummy data. The first byte sent is W0 , the second byte sent is W1 and so on.(refer Bit ordering of SPI transmission/reception.) 4.5.3 Memory Read (Master Read) To read from a memory location, Master Read command has to be formed. Redpine Signals, Inc.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 The following figure gives the flow for memory reads between the master and the slave. Host Module C1 C2 Dummy R (0x58) Response C3 C4 R R Response A0 A1 A2 A3 Address bytes R R R R Response dummy (0x00) Dummy response dummy (0x00) Dummy response Wait period ……………. dummy (0x00) D0(0x00) D1 (0x00) …… D(N-1) …. (0x00) Dummy data Start Token (0x55 or 0x0000_0055 depending on granularity) W0 W1 …… W(N-1) ….
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 sclk cs data in to SPI slave (RSI module) 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 C2 (0x40) C1 (0x54) data out from SPI slave (RS module) 0 1 1 sclk 0 0 1 0 0 0 0 C3 (0x12) Status Response for C1 (0x58) Dummy 1 1 1 Status Response for C2 (0x58) ....... ....... .......
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 C1[7] -> C1[6] … C1[0] -> C2[7] -> C2[6] … C2[0] -> C3[7] -> C3[6] … C3[0] -> C4[7] -> C4[6] … C4[0]. That is, C1[7] bit is sent first, then C1[6] and so on. If is the data read, then D0 is sent from module first, then D1 and so on. D0[7] -> D0[6] … D0[0] -> D1[7] -> D1[6] … D1[0] -> D2[7] -> D2[6] … D2[0] -> D3[7] -> D3[6] … D3[0] 4.5.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Host Module C1 C2 Dummy R (0x58) Response C3 C4 R R Response Dummy (0x00) Dummy response Dummy (0x00) Wait period Dummy response ……………. Dummy (0x00) D0(0x00) D1 (0x00) …… D(N-1) …. (0x00) Start Token (0x55 or 0x0000_0055 depending on 8-bit or 32-bit mode) W0 W1 …… W(N-1) ….
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4. After sending/receiving C3, C4 commands/response, Host should wait for a start token (0x55). The data then follows after the start token. Host writes a dummy byte to read the data from the module each time. The Host should read this data until the start token is received. The data following the start token should be interpreted as the frame of specified length that is read from the slave.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 SOFT_RESET Base Address: 0x2200_0000, Offset Address: 0x04 Function Default Value Bit Access [31:0] Read/Write Soft Reset 0x0000_0001 Description Valid values are 0x0000_0001- Puts the module in soft reset 0x0000_0000- Brings the module out of reset. Refer figure Firmware Upgrade and Bootload Table 8: SOFT_RESET Register Register Write This is same as master write. The address to be supplied is 0x2200_0004.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 SPI_HOST_INTR SPI_HOST_INTR Address: 0x00 Default Value Bit Access Function [7:0] Read SPI_HOST 0x00 _INTR only Description These bits indicate the interrupt vector value coming from module side. Bit 0: If „1‟, Buffer Full condition reached. This bit has to be polled every time before sending data to the module, to check that the buffer in the module is is full or not. Bit 1: Reserved. Ignore this bit.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Host C1 Module C2 Dummy R Response Dummy (0x00) Dummy response Dummy (0x00) Dummy response Wait period ……………. Dummy (0x00) Start Token (0x55) Dummy data (0x00) Valid data read Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 INTR_MASK INTR_MASK Base Address: 0x2200_0000, Offset Address: 0x08 Bit Access Function Default Value Description [7:6] R Reserved 0x3 Reserved for future use 5 R/W POWER_M 0x0 ODE1_MAS K This bit is used to mask the interrupt generated by bit 5 of the Interrupt register. The Host can mask this bit when it does not want to shut down the Core control block after the module raises the interrupt.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 INTR_CLEAR INTR_CLEAR Base Address: 0x2200_0000, Offset Address: 0x10 Bit Access Function Default Value Description [7:6] R Reserved 0x0 Reserved for future use 5 R/W POWER_M ODE1 interrupt clear 0x0 Writing a „1‟ to this bit clears the interrupt raised by the module due to this bit. [4:0] R/W Reserved 0x0 Reserved for future use Table 11: Interrupt Clear Register Register Write This is same as master write.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 confirmed that the interrupt is raised because of sleep request. If there are packets to be sent from the host, then the Host should first mask the received interrupt by writing a „1‟ to bit 5 of the INTR_MASK register (Base Address: 0x2200_0000, Offset Address: 0x08 ) (read back the register, set bit 5 to „1‟ and write back, so that the other bits are not changed) and then start sending the data.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Module goes to sleep DTIM interval reached or data received from Host? No Module wakes up and executes data transaction Yes Data transaction complete? No Complete data transactions Figure 25: Activities for Power Save Mode 2 4.7 TCP/IP Stack Usage in RS9110-N-11-22/24/28 RS9110-N-11-22, RS9110-N-11-24 and RS9110-N-11-28 are Wi-Fi modules with integrated TCP/IP stack.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Figure 26: Set-up with TCP/IP Enabled 4.7.2 Using the Wi-Fi module with TCP/IP stack bypassed The TCP/IP stack in the WiFi module can be bypassed by sending a software command from the Host to the module. The “TCP bypass command” should be issued to convert the RS9110-N11-22/24/28 from a TCP/IP enabled module to a TCP/IP bypassed module. The following should be taken care of: 1.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 ifconfig wlan0 ifconfig wlan0 up The user can query wlan0 interface status using: ifconfig wlan0 The Redpine Module's MAC address should be listed in the HW Addr (00:23:A7:xx:xx:xx) Figure 27: Set-up with TCP/IP Disabled 4.8 Command frames The module is configured and operated using the SPI interface.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 data payload for commands is shown below. This description is for a Little Endian System. Descriptor (16 bytes ) Management/Data Frame Body (multiples of 4 bytes) The following table provides the general description of the frame descriptor for management and data frames.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Word Management Frame Descriptor Data Frame Descriptor Word4 W4[15:0] If word0[7:0]=0xFF, then W4[15:0] should be used for specifying the length of management frame body.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 W0[15:8] according to tables above Status word according to below table (for frames sent from module to host) C1 C2 C3 C4 W0 W1 …… W7 Descriptor C1 C2 C3 C4 Frame Body Data payload Figure 28: Data payload for management frames Note: C1, C2, C3, C4 shown in the diagram above are sent from Host to Module. For responses coming from Module to Host, these are not sent by the module.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Back ground scan cancelled 0x0015 Invalid Channel 0x000A SSID already in roam list 0x000B SCAN_NOT_DONE (Upon issue of query MAC address and network type command without having scanned at least once since the bring-up of module) 0x000D 1.802.11 Authentication failure. 2.If a module tries to join to an adhoc network while its uNwType flag is set to 1 (infrastructure mode) in the join command 0x000E 3. Re-join limit over.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Keep alive timeout. On lack of activity over an existing TCP socket connection, the module sends out a Keep-alive frame to the remote terminal. If there is no response, the module closes its TCP socket and sends out an interrupt to the Host. The Host, on reading the response as it does for any other command, would get 0x0033 0x0033 A packet of size more than 1460 bytes (TCP) or more than 1472 bytes (UDP) is sent.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 NOTE: Writing code from a scratch to execute the below commands may be time consuming. The user is strongly advised to use the API set, the source code of which is provided with the software package. Reference files are at RS.CN.xx.GENR.SP.x.x.x/Driver/Driver_TCP/API_Lib . Documentation for the API set is available at RS.CN.xx.GENR.SP.x.x.x/Driver/Driver_TCP/Documentation/ 4.9.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Frame Body None Response The second 16-bit word of the descriptor (W1[15:0]) of the received packet is used to identify the frame‟s success or failure. A value of „0‟ for the W1[15:0] is interpreted as a success and a non-zero value is interpreted as a failure. The reason for the init failure is also indicated by the non-zero value of this byte. 4.9.3 Scan Description This request makes the module scan in the channel specified.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description channel 10, then uSSID=Test_Network and uChannelNo = 10 pScan_bitmap Parameter to configure for which channels passive scan is to be done. For example, in 2.4 GHz, if only channel 1 and channel 4 are required to be scanned passively, then the value for pScan_bitmap is calculated as Channel[n] Channel[n-1] ……..Channel[4] Channel[3] Channel[2] Channel[1]= 000 …1001 Decimal for <000..001001> is 9.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 Table 16: Channel Number Parameter (2.4 Ghz) uchannel parameter for 5 Ghz Channel chan_num Number parameter All channels 0 36 1 40 2 44 3 48 4 52 5 56 6 60 7 64 8 100 9 104 10 108 11 112 12 116 13 120 14 124 15 128 16 132 17 136 18 140 19 149 20 153 21 157 22 161 23 165 24 Table 17: Channel Number Parameter (5 Ghz) NOTE: In 5 GHz, DFS Client (802.11h) is supported.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 passive scan in DFS channels. If the Access Point detects radar signals, it indicates to the module (client) to switch to a different channel by using the “channel switch frame”. The module performs channel switch as per the AP‟s channel switch parameters. There is no command required to enable this feature, it is enabled by default. Response The response frame for the scan response is as shown below.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description is -20dBm, the value returned is 20. RSSI information indicates the signal strength of the Access Point. aSSID SSID of the Access Point uScanCount Number of scanned Access points 4.9.4 Set WEP Key Description This command is issued to supply WEP keys to the module, if the AP is in WEP mode. In some APs, there is an option to provide four WEP keys (with indices 0, 1, 2, 3).
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Response The response is found in W0[15:8] as explained in Frame Descriptor for Management/Data Frames in SPI mode. Expected value is 0xA4 4.9.5 Join Description This command is issued to associate the RS9110-N-11-2X module (in infrastructure or ad-hoc modes) to an Access Point. The SSID is selected from the list of SSID‟s returned after performing scan operation.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description security uDataRate Transmission data rate. Rate at which the data has to be transmitted. uPowerValue This fixes the Transmit Power level of the module. This value can be set as follows: 0 – Low power (6-9 dBm) 1 – Medium power (10-14 dBm) 2 – High power (15-17dBm) uSecType Security type1 0 – OPEN 1 – WPA 2 – WPA2 3 – WEP uPSK Pass-phrase (Only in Security mode). It is ignored in open mode.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description the length of the array of this parameter should be 32. Please refer to the Driver API Library Manual document section “MCU Applications” to get the rsi_global.h file description that enables 63 byte mode. uSSID SSID of the access point to join or to create (in ad-hoc mode) uIbss_mode IBSS Mode 0 – Joiner 1 – Creator Unused in infrastructure mode. uchannel Channel number for IBSS Creator Mode.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Data Rate (Mbps) Value of uTxDataRate 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 Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Data Rate (Mbps) Value of uTxDataRate 54 12 MCS0 13 MCS1 14 MCS2 15 MCS3 16 MCS4 17 MCS5 18 MCS6 19 MCS7 20 Table 18: Data Rates and Corresponding Values Response W1[15:0] contains the response, as explained in Frame Descriptor for Management/Data Frames in SPI mode , is used to identify the frame‟s success or failure. A value of „0‟ is interpreted as a success and a non-zero value is interpreted as a failure.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 { UINT32 uScanCount; UINT32 uErrorcode; struct SPI_WiFi_CNFG_BssidInfo stBssidInfo[32]; }; struct SPI_WiFi_CNFG_BssidInfo { UINT8 uChannelNumber; UINT8 uSecMode; UINT8 rssiVal; UINT8 aSSID[32]; UINT8 uNetworkType; UINT8 BSSID[6]; }; Structure member name Description uChannelNumber Channel Number of the Access Point. This value can be one of many values, as listed. uSecMode Security Mode of the scanned Access Point.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure member name Description BSSID The MAC address corresponding to the Station uScanCount Number of scanned Access points uErrorcode Error Code 4.9.7 Power Mode Description This command configures the power mode, viz., Power Mode 0, Power Mode 1 or Power Mode 2 to be used by the RS9110-N-11-2X module. Relevance This command is relevant both when the TCP/IP stack is enabled or bypassed.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 typedef struct WiFi_CNFG_SlpTimer_s { UINT32 timerValue; }WiFi_CNFG_SlpTimer; Structure member name Description timerValue Time in milliseconds for which the module sleeps before waking up. The maximum value is 10000 milliseconds. Response The response is found in W0[15:8] as explained in Frame Descriptor for Management/Data Frames in SPI mode. Expected value is 0x98 4.9.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4.9.10Feature Select Description This command configures different sub-features in the WiFi module. Relevance This command is relevant both when the TCP/IP stack is enabled or bypassed.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description WEP Open or Shared authentication mode, WEP index and WEP keys Bit[8] – Set to „0‟ Bit[9]- Passive scan is enabled if this bit is set to „1‟. If this command is not issued, or is issued with value of this bit as „0‟, passive scan will remain disabled by default. Bit[10]- LED in RS9110-N-11-2204/05 modules is disabled if this bit is set to „1‟.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Unlike management frames the frame body of data frames comprises of a twobyte type field, which identifies the type of the command, followed by the corresponding command data structure. The following are the types of the TCP/IP commands, responses and events and the corresponding codes. Each data frame will start with the code as mentioned below.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Response Code Connection Status Response Event 0x0A DHCP Info Response Event 0x0B Disconnect Response Event 0x0C HTTP Response Event 0x0D Firmware Version Query Response Event 0x0F Set MAC Address Response Event 0x10 Query MAC Address 0x12 DNS Response 0x14 Listen Interval Command Response 0x15 Table 20: Data Frame Based Response Codes (sent from module to host) C1 C2 C3 C4 W0 W1 …….
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 The response frames from the module contain error codes where applicable. These error codes and their descriptions are mentioned below. These are applicable only for data frames (TCP/IP related commands). Error Code Description Generic Error Codes – WLAN, Sockets, DHCP, ARP -1 This error is issued when “Query DHCP Information” is given when DHCP mode is disabled. -2 Sockets not available.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Error Code Description -72 DNS_COUNT_ERROR -73 DNS_RCODE_ERROR -74 DNS_OPCODE_ERROR -75 DNS_ID_ERROR -85 INVALID_VALUE -190 DNS_RESPONSE_TIME_OUT Table 21: Error Codes and Descriptions NOTE: Writing code from a scratch to execute the below commands may be time consuming. The user is strongly advised to use the API set, the source code of which is provided with the software package. Reference files are at RS.CN.xx.GENR.SP.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 UINT8 aDefaultGateway [4]; UNIT8 aDNSAddr[4]; }; Structure Member Name Description uUseDHCP The mode with which the TCP/IP stack has to be configured.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description aMacAddr MAC address of RS9110-N-11-2X module aNetMask Subnet mask with which the TCP/IP stack is configured. aDefaultGateway Default gateway with which the TCP/IP stack is configured. uErrorCode 0 – Success -100: DHCP handshake failure -4 : IP configuration failed -131:If parameters other than 0 or 1 is given for set IP parameters command. 4.10.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 UINT16 sin_port; struct in_addr1 sin_addr; }; struct TCP_CNFG_Socket { UINT16 uSocketType; UINT16 stLocalPort; struct sockaddr_in stRemoteAddress; }; Structure Member Name Description uSocketType Type of the socket 0 – TCP Client 1 – UDP Client 2 – TCP Server (Listening TCP) 3 – Multicast1 socket 4- Listening UDP. This type of socket is used to receive/send from any remote UDP socket with any remote IP and port number.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 struct TCP_EVT_SocketResp { UINT16 uSocketType; UINT16 uSocketDescriptor; struct sockaddr_in stLocalAddress; UINT32 nErrorCode; UINT16 max_segment_size; }; Structure Member Name Description uSocketDescriptor Created socket‟s descriptor or handle . Starts from 1. The first socket opened will have a socket descriptor of 1. This should be used as an input for commands where socket descriptor is an input parameter.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description etc.) -124: TCP socket open failure -127: Socket already exists max_segment_size Indicates the maximum allowable TCP data packet size NOTE: Redpine module has total of 7 sockets for UART modules and 6 sockets for SPI modules. User must use the socket handle returned from the socket creation commands.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 { UINT16 uSocketDescriptor; UINT32 nErrorCode; }; Structure Member Name Description uSocketDescriptor Socket descriptor of the socket to be closed. uErrorCode 0 – Success -2 : Socket not available -91: IGMP Error -95: ARP request failed 4.10.4 Send Data to a Socket Description This command sends a byte stream of a certain size to the socket specified by the socket handle.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Relevance This command is relevant only when the TCP/IP stack is enabled. Frame Body The following is the structure of the Send command.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 For the 3000 bytes of the data the wrapper has to send 3 frames to the module. The uDataoffset (refer to the figure above) shall depend on the socket type. Frame1: uBufferLength = 1400 bytes Frame2: uBufferLength = 1400 bytes Frame3: uBufferLength = 200 bytes 4.10.5 Receive Data on a Socket Description The data received from the network is sent to the Host.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description data payload. Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Continue normal operations No Interrupt received? yes Read SPI_INTR_HOST register Confirmed that it is not a data pending interrupt Bit[3] = 1? Yes Confirmed that it is a data pending interrupt Do Frame Read to read 16 byte descriptor from module No W7[7:0] = 0x04? No W7[7:0] = 0x02? Yes Yes Confirmed that it is the response to a management frame.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Receive Frame Body Payload Buffer uSocketDescriptor uBufferLength 2 Bytes uDataOffset 2 Bytes 4 Bytes stFrom_Address 6 Bytes Offset Payload uDataOffset = 2 + 2 + 4 + 2 + 6 + Offset (Offset = 38(TCP) or 26(UDP)) Figure 34:Receive Frame Body Note: The extra 2 in the equation for uDataOffset in the diagram above is the two bytes included in the payload. Refer to Data payload for data frames (from Host to module). 4.10.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description ipaddr_len The length of the IP Address. This is required since the IP address is sent as a string in this frame. For example, if the IP address of www.website.com is 192.168.30.6, the ipaddr_len = 12 url_len The length of the URL. For example, if www.website.com/index.html is the webpage, then url_len = 11 (for “/index.html”, www.website.com is not included in the url ).
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description -191 : HTTP socket creation failed W0 W1 W2 W3 W4 W5 W6 W7 Payload Offset (in terms of bytes) Length of actual HTTP response = W0[11:0] + 16 - Offset Actual response from HTTP server starts Figure 35: Offset Parameter in HTTP Get Request 4.10.7 HTTP POST Request1 Description This command is used to transmit an HTTP POST request to an HTTP server.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 UINT16 header_len; UINT16 data_len; UINT8 buffer[1200]; }__attribute__((packed)); Structure Member Name Description ipaddr_len The length of the IP Address. This is required since the IP address is sent as a string in this frame. For example, if the IP address of www.website.com is 192.168.30.6, the ipaddr_len = 12 url_len The length of the URL. For example, if www.website.com/welcome.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description 0 – End of HTTP data offset This indicates the byte-offset from which the valid HTTP data is present in the response. This offset is with respect to the first byte of the received frame. nErrorCode Error code. 0 :Success -191 : HTTP socket creation failed NOTE: The actual HTTP server response starts from the value in the “offset” 4.10.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description aDomainName Domain name, example: www.website.com . A maximum of 150 characters are allowed.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 a command sent from Host to module. It is an asynchronous message to be read by the module (after an interrupt is sent from the module) when a connection is established with a listening TCP socket. Relevance This command is relevant when the TCP/IP stack is enabled. Frame Body The following is the data structure for the Connection Establishment frame returned to the Host.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4.10.10 Remote Termination Description The TCP peer can remotely terminate the connection asynchronously. The Remote termination frame indicates termination of the connection (preceded by an interrupt, at which the Host should read the frame from the module). This message is sent from module to Host in the following cases: 1.The remote TCP peer closes the socket connection 2.The module closes the socket connection.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4.11.1 Send data Description This command sends data from the host to the module, to be transmitted over a wireless media.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Tx routine called Query buffer status( Interrupt Status Register Bit[0] Return buffer full C1 = 0x7C, C2=0x42, C3=0x10, C4=0x00, W0[11:0] = Length of data to be sent W1,W2,W3,W4,W5,W6,=0x00 W7 = 0x0002 Send descriptor (Slave write) Send data (Slave write) C1 (0x7C), C2 (0x42), C3, C4, Data Stream C3 = Length of data[7:0] C4= Length of data[15:8] Figure 36: Transmitting Data 4.11.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Word Data Frame Descriptor Word1 W1[15:0] 0x0000 Word2 W2[15:0] 0x0000 Word3 W3[15:0] 0x0000 Word4 W4[15:0] 0x0000 Word5 W5 [15:0] 0x0000 Word6 W6 [15:0] 0x0000 Word7 W7 [15:0] 0x0002 Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Interrupt received Read ( Interrupt Status Register Bit[3]).
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4.12.1Query RSSI Value1 Description This command is used to retrieve the RSSI value for Access Point to which the module is connected. Relevance This command is relevant both when the TCP/IP stack is enabled or bypassed.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 This command is used to query the network parameters, including the WLAN connection and IP configuration details. This command is to be issued only after the WLAN connection is established. Relevance This command is relevant when the TCP/IP stack is enabled.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description wlan_state This indicates whether the module is connected to an Access Point or not. 0 – Not connected 1 – Connected Ssid This value is the SSID of the Access Point to which the module is connected. ipaddr This is the IP Address of the module.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 This feature is used to intimate to the access point the number of beacon intervals for which the AP must buffer the packets destined to our module when in power save mode. This is an optional command and can be issued before Join Command. When the “join” command is given after this command, then “Association Request” frame sent from module to access point will have information about this interval.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 this feature can be used only when the target application does not need to receive any broadcast packets. 4.12.4Query Connection Status Description This command is used to query status of the existing WLAN connection. Relevance This command is relevant both when the TCP/IP stack is enabled or bypassed.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Response The structure for the Disconnect frame‟s response is as follows: struct TCP_EVT_Disconnect_t { UINT32 nErrorCode; }; Structure Member Name Description nErrorCode Always „0‟ is returned 4.12.6 Query DHCP Information Description This command is used to query the DHCP information. This command is valid only if the module is configured to acquire its IP address through DHCP from a DHCP server.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description lease_time_left The lease time left for the DHCP connection. renew_time The time left for renewal of the IP address acquired through DHCP. rebind_time The time left for rebind of the IP address acquired through DHCP. server_ip_address The IP address of the DHCP server. nErrorCode 0: Success Possible error code: -1 4.12.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 address stored in the memory. Host should ensure that this command is issued before the mode select command. Relevance This command is relevant both when the TCP/IP stack is enabled or bypassed.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Response The first Word (first two bytes) of the Frame body are used to indicate the type of Control Data Frame Response. First Word = 0x0012. Refer For response to Query MAC address , the MAC address is in Frame body after this first 2 bytes in a structure described below: typedef struct WLAN_EVT_GET_MAC_Addr { UINT8 aMacAddr[6]; UINT32 reserved; } WLAN_EVT_GET_MAC_Addr_t; The “reserved field” always returns „0‟. 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 UINT16 uErrorCode; }; Result code (in Descriptor) Description UErrorCode 0- Success 1- Flash access failure 2- Not connected 4.13.2 Enable automatic joining to pre-configured Access Point Description This command is used to enable or disable the feature of automatic joining to a preconfigured Access Point on power up. Relevance This command is relevant both when the TCP/IP stack is enabled or bypassed.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4.13.3 Get Information about Stored Configuration Description This command is used to get the configuration values that have been stored in the module‟s memory. The parameters returned in this command are the parameters used in automatically joining to a pre-configured network when the module boots up in the auto-join mode. Relevance This command is relevant both when the TCP/IP stack is enabled or bypassed.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 }flash_config_t; Structure of Response Structure Member Name Description Valid_Flag 0 - Invalid configuration 1 - Valid configuration CNum It returns the channel number of the stored access point or network, according to Channel Number Parameter (2.4 Ghz) and Channel Number Parameter (5 Ghz).
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Structure Member Name Description wep_mode1 „1‟- WEP Shared suthentication „0‟- WEP Open authentication 1 2 3 wep_index2 Index of the WEP key Wep_psk[3][32]3 WEP 3 keys Valid only when 7th bit of feature select bitmap is set. Valid only when 7th bit of feature select bitmap is set. Valid only when 7th bit of feature select bitmap is set. Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Power up Boot up Was auto-join enabled in the last power cycle? No Yes Issue band command Module scans only the channel of the preconfigured AP and joins it Want to enable Auto- join? Yes Yes Configuration already stored? Issue Get Configuration command No No Scan and join AP and configure IP ( either DHCP enable or disable) Issue command to store configuration. Issue command to enabled configuration storage.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 5 Firmware Upgrade and Bootload The firmware of the RS9110-N-11-2X module resides in a Flash memory on the module. The host has to load a compact software bootloader that in turn loads the functional firmware from the Flash to the on-chip memory. NOTE: Writing code from a scratch to execute these sequences may be time consuming.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 2. Load image upgrader file iuinst1 using Memory Write with address 0x00000000. 3. Load iuinst2 using Memory Write with address 0x02000000. 4. Load iudata using Memory Write with address 0x20003100. 5. Bring the module out of soft reset by writing 0 to the address 0x22000004 using Memory Write. 6. Read card ready status (by doing a 16 bytes slave read) after getting interrupt. The response is as shown below.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 11. Load ffdata using Memory Write with address 0x02008000. 12. Transmit „ffdata Upgrade‟ management frame. W0[15:8] = 0x15 W0[7:0] = 0x00 W1[15:0] =Number of bytes of ffdata file W7[7:0] = 0x04 C1 C2 C3 C4 W0 W1 …… W7 Read status of ffdata upgrade success (by doing 16 bytes slave read) after getting an interrupt. Expected response is shown below.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 16. Bring the module out of soft reset by writing 0x00000000 to the address 0x22000004 using Memory Write. 17. Read card ready status (by doing 16 bytes slave read) after getting interrupt. The response is as shown below. W0[15:8] = 0x89 W0 W1 …… W7 18. Load RS.CN.xx.GENR.SP.x.x.x/Firmware/sbdata2 using Memory Write with address 0x02010000. NOTE: Irrespective of the firmware version (4.5.0 and 4.7.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Execute Boot- Power up Ready for general operation loading Process.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 5.3 Firmware Upgrade Using SPI Interface without Wireless Firmware Upgrade feature The following process should be followed to upgrade the firmware through SPI interface without wireless firmware upgrade feature.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 5.4 Firmware Upgrade Using SPI Interface with Wireless Firmware Upgrade feature1 The following process should be followed to upgrade the firmware through SPI interface with wireless firmware upgrade feature.2 1 Wireless Firmware Upgrade Feature is available from 4.7.X onwards only. The folder “Wireless Upgrade” is referred to as WFU in the figure. For example WFU/cfdata means Wireless_Upgrade/cfdata 2 Redpine Signals, Inc.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 5.5 Firmware Upgrade from 4.7.x to a higher version Wirelessly The firmware of the modules RS9110-N-11-22(-04)(-05) and RS9110-N11-28(-04) can be upgraded wirelessly. The wireless firmware upgrade feature is available in firmware version 4.7.1 and above. The following sections describe how to use this features. SPI Interface PC (P) RS9110-N-11-22/28 Laptop (C) Figure 42: Wireless Firmware Upgrade Set-up Redpine Signals, Inc.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 1. Power up the module and follow the processes in figure 43(Firmware Upgrade – Flow 3).
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 connection with the AP. The AP has an IP hardcoded into itself – 192.168.40.61. Ignore the values on the right side of the GUI. Figure 44: Configuration GUI 4. Click “Enable Upgrade” button and then click on the “Firmware” tab. Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Figure 45: Configuration GUI(contd..) 5. Click on “Upgrade Folder” and select the FOLDER RS.CN.xx.GENR.SP.x.x.x\Software\Wireless_Upgrade\. Then click on the check box for the file wlan_file.rps that appears on the GUI. Click on “Upgrade” button. NOTE: The file RS.CN.xx.GENR.SP.x.x.x\Software\Wireless_Upgrade\wlan_file.rps has the same contents as the files RS.CN.xx.GENR.SP.x.x.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 9. The upgrade process starts. After successful upgrade, an interrupt is sent from the module to the Host. The Host should read the status in the same way as 17 and should get the read value as 0x38. 10. The module is now upgraded with the latest firmware. It can be now power cycled or hard reset and used in functional mode as shown in figure General Operation. 5.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 SPI Interface Host (P) RS9110-N-1122/24/28 Laptop (C) Figure 46: Wireless Configuration Set-up 1. Power up the module. Follow the same process as in figure 43(Firmware Upgrade – Flow 3).The module comes up as an Access Point with open mode and SSID REDPINE_ 2. Connect a Laptop (C) to the AP created by the module. The Laptop should be configured as a DHCP client.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3. Click on the “Get Configuration” button. It displays the currently stored configuration parameters. These parameters can be ignored for now. 4. Fill the values of the parameters a. Channel: Channel number of the AP or Adhoc network that the module should connect to. Refer tables Channel Number Parameter (2.4 Ghz) and Channel Number Parameter (5 Ghz). b. Network Type c.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Power up the Module. Complete Process Using the Wireless Configuration in AP mode. Power Cycle or hard reset the module Complete normal boot-up as in Bootloading Process Issue Band command and get corresponding interrupt to read the response Module automatically joins the configured AP Module sends interrupt to Host to read the response to the internally executed “Join” operation.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 UART Interface PC (P) RS9110-N-11-22/28 AP Laptop (C) Figure 49: Wireless Configuration Set-up 1. Assuming the module is already connected to an AP after a normal boot-up as described in section Boot-loading Process, connect a Laptop to the same AP. 2. Open the application RS.CN.xx.GENR.SP.x.x.x\Software\Wireless_Upgrade\ DeviceConfigGUI.jar in Laptop (C) and click on the connect button.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 3. Click on the “Get Configuration” button. It displays the currently stored configuration parameters. These parameters can be ignored for now. 4. Fill the values of the parameters a. Channel: Channel number of the AP or Adhoc network that the module should connect to. Refer tables Channel Number Parameter (2.4 Ghz) and Channel Number Parameter (5 Ghz). b. Network Type c.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 NOTE: When the module is configured using wireless interface, the “Autojoin” feature is enabled. This makes the module join to the configured AP on the next power cycle or hard reset. If at any point of time, the user wants to disable the “Auto-join” feature, the command Enable automatic joining to pre-configured Access Point should be used. Redpine Signals, Inc. Proprietary and Confidential.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 6 Appendix A: Example Flow for AT Commands This section gives an example flow of AT Commands for setting up Wi-Fi connection in Infrastructure and IBSS modes and then opening TCP/UDP/LTCP sockets and exchanging data. The commands are given according to the following network settings mentioned in each section.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 4. Autmode: at+rsi_authmode=3\r\n 5. Pre-Shared Key: at+rsi_psk=RSI_EVAL\r\n 6. Joining (Association): at+rsi_join=RSI_Infrastructure,0,2\r\n 7. IP Address Configuration (Manual): at+rsi_ipconf=0, 192.168.1.175,255.255.255.0,192.168.1.99\r\n 8. TCP server socket creation at (C): at+rsi_tcp=5001\r\n. The return value for this command would be the socket number, e.g., 1. 9.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 10. TCP server socket creation at (C): at+rsi_tcp=5001\r\n. The return value for this command would be the socket number, e.g., 1. 11. TCP client socket creation on (A): Run on command line of Laptop A“RS.CN.xx.GENR.UT.x.x.x\Software\Applications\Windows\TCP.exe c 2001 192.168.1.175 5001. 12.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 5.Create IBSS network: at+rsi_join=RSI_IBSS,0,2\r\n 6.IP Address Configuration (DHCP Manual): at+rsi_ipconf=0, 192.168.1.175,255.255.255.0,192.168.1.1\r\n 7.Connect to this network from node (A) Note: Wireless adapter of node (A) should be in the same network. IP address used in this example is 192.168.1.172. Default gateway can be configured same as the RS module (192.168.1.1 in this case).
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 7 Appendix B: SPI Data Transactions between a MCU Host and the WiFi module The following sample logs are for a RS22/28 module with the TCP/IP stack enabled. This log may not be exactly same with different firmware versions.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Send : 74 Recv : 00 Send : 00 Recv : 58 Send : f0 Recv : 58 Send : 03 Recv : 58 Send : 10 Recv : 58 Send : 40 Recv : 58 Send : 01 Dummy Recv : 58 Send : 02 Dummy Recv : 58 SBINST2 Bytes start here Send : 03 Recv : 58 Send : 20 Recv : 58 Send : 80 Dummy Recv : 58 Send : 20 Dummy Recv : 58 Send : 7c Dummy Recv : 58 Send : 12 Dummy Recv : 58 Send : 04 Dummy Recv : 58 Send : 20 Dummy Recv : 58 ..............
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Send Send Send Send Send : : : : : Dummy Dummy Dummy Dummy Dummy 00 00 00 00 00 Recv Recv Recv Recv Recv : : : : : 00 00 00 02 00 The first word, 0x0016 is payload length Read the payload of length 0x0016 Send : 5c Recv : 00 Send : 00 Recv : 58 Send : 16 Recv : 58 Send : 00 Recv : 58 .................................. ..................................
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Send : Dummy 00 Recv : 00 .....
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 .................................... All bytes of received scan response is not put in this log.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 ............................................. ............................................. continue till start token is received Send : Dummy 00 Recv : 58 Send : Dummy 00 Recv : 58 Send : Dummy 00 Recv : 55 Send : Dummy 00 Recv : 00 Send : Dummy 00 Recv : 96 .... Join Response code Send : Dummy 00 Recv : 00 Send : Dummy 00 Recv : 00 ....
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Send Send Send Send Send Send Send : : : : : : : Dummy Dummy Dummy Dummy Dummy Dummy Dummy 00 00 00 00 00 00 00 Recv Recv Recv Recv Recv Recv Recv : : : : : : : a8 01 Gate way 01 .... 00 .... 00 00 Error code 00 .... IPPARAMR =01 Len =0018 MAC Addr =00:23:a7:1d:0a:6d IP Addr =192.168.1.120 Netmask =255.255.255.0 Gateway =192.168.1.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Sent Packet Count = 01 Sending data - this is data from redpine to remote terminal ------------------------------------------------------------------------------------------------------------- The logs are same for TCP enabled and bypass modes, for commands that are relevant in both modes, except for the send data and receive data commands and the commands listed in Other Commands (Data Frames).
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Send Send Send Send Send Send Send Send : : : : : : : : Dummy Dummy Dummy Dummy Dummy Dummy Dummy Dummy 00 00 00 00 00 00 00 00 Recv Recv Recv Recv Recv Recv Recv Recv : : : : : : : : a7 1d 0a 6d ..... MAC address end 00 ..... 00 00 Error code 00 .....
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 Send : Dummy 00 Recv : 69 Send : Dummy 00 Recv : 6e Send : Dummy 00 Recv : 65-----All bytes of received data are not actual. These are for illustrative pruposes only -------------------------------------------Sending data to remote terminal Send descriptor Send : 7c Recv : 00 Send : 02 Recv : 58 Send : 10 Recv : 58 Send : 00 Recv : 58 Send : 59 Recv : 58 .... Send : 00 Recv : 58 ....
RS9110-N-11-22/24/28 Software Programming Reference Manual Version 4.15 8 Recent Revision History: Rev. Ver. No. Date Changes 4.00 10 Dec, 2012 This version is built on top of 3.31 4.10 31 Dec 2013 Modified description about at+rsi_wep_keys command Modified Bit[9] description for at+rsi_feat_sel command Changed description for at+rsi_cfgget? command response .Added wep_index wep_keys description. 4.