Application Overview

The provisioning application demonstrates how device receives the raw data packets (packets of other IP network) and sends them to host, and also how it receives raw data packets from host and sends on air.

Following are the procedure steps

  1. Configure device as Access Point and set IP address
  2. Processes the ARP request packet (raw data) and sends ARP response (raw data).
  3. Process ping request (raw data) of other IP network, and sends ping response (raw data)

 Click here to download the source code for the AP UDP Echo Application

Setup required

  1. Quessence
  2. 32/64-bit PC with minimum 2GB RAM and USB port for power, downloading and debugging software
  3. Windows 7/8/8.1/10 Operating System. It should have the Keil IDE and the CMSIS DAP drivers installed on it. Refer to installation section for download and installation steps.
  4. A windows machine (as a WiFi Station) with Raw data application.

Configure the application

Use an IDE to edit raw_data.c file available in the path Raw_data/Applications to make the following changes.

Macro

  Value Description
SSID
   “”
This macro refers to the name of Access point .
CHANNEL_NO   

 
This macro refers to the channel in which AP would be started
SECURITY_TYPE
   

This macro refers to the type of security.

Security types are defined in the below path

Access_point/Libraries/Wireless/include/rsi_wlan_apis.h

PSK
   “”
This macro refers to the Pre-shared key .
ENCRYPTION_TYPE
  

This macro refers to the Encryption type of Access Point  to be made.

Encryption modes are defined in below the path

Access_point/Libraries/Wireless/include/rsi_wlan_apis.h

BEACON_INTERVAL 

 
This macro refers to the time delay between two consecutive beacons(units in milliseconds).
DTIM_INTERVAL

 
This macro is to configure DTIM interval to the Access Point.
DEVICE_PORT

 
This macro is to configure the Device port . This is the TCP local port of the module.
NUMBER_OF_PACKETS

 
This macro is to configure how many packets to receive.
DHCP_MODE

 

To configure IP address

IP address to be configured to the device should be in long format and in little endian byte order.

Example: 1.To configure “192.168.10.101” as IP address,update the macro DEVICE_IP as 0x650AA8C0.

2. To configure “192.168.10.1” as Gateway,update the macro  GATEWAY as 0x010AA8C0.

3.To configure “255.255.255.0” as network mask,update the macro NETMASK as 0x00FFFFFF 

#define  DEVICE_IP    
#define  GATEWAY  
#define  NETMASK  

 

A sample configuration is shown in the below snapshot

Update the WLAN Configuration file

Check the following macros of rsi_wlan_config.h file available in the path Raw_data/Libraries/Wireless/include

Macro Value
CONCURRENT_MODE RSI_DISABLE
RSI_FEATURE_BIT_MAP FEAT_SECURITY_OPEN
RSI_TCP_IP_BYPASS RSI_DISABLE
RSI_TCP_IP_FEATURE_BIT_MAP TCP_IP_FEAT_DHCPV4_SERVER | TCP_IP_FEAT_RAW_DATA
RSI_CUSTOM_FEATURE_BIT_MAP 0
RSI_BAND RSI_BAND_2P4GHZ

 

Execute the Application

  1. Connect Quessence to the Windows PC running Keil.
  2. Configure the macros in the files located at raw_data.c and rsi_wlan_config.h as mentioned above.
  3. Build  and launch the application.
  4. Quessence acts as an Access point with SSID (REDPINE_AP) and starts transmitting beacons.
  5. Now connect WiFi STA (Laptop) to WiSeconnect AP (Ex: AP SSID is “REDPINE_AP”). After successful connection, WiFi STA gets IP in the configured IP network (Ex: 192.168.10.4)

 6. Initiate ping to an IP of other network (Ex: 192.168.100.11) from WiFi STA (laptop).

        Ping 192.168.100.11 –t

     7. Module will reply with ARP response, if connected stations try to ping other IP (which is not in a connected network) and also responds with ping reply for the prior resolved ARP.