The AP start application demonstrates Quessence as an Access point.  In the Access point mode, it allows stations to connect and communicate.

Click here to download the source code for the AP Start Application.

Setup required

  1. Quessence device
  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 any AP Start application (This example uses iperf)

Configure the application

Use an IDE to edit ap_start.c file available in the path Access_point/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 Access_point/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
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 ap_start.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. The Application opens up a TCP server socket on Quessence.
  5. Now scan and connect to WiSeConnect Access Point (Ex: “REDPINE_AP” is the AP name) from your windows machine.

6. Once connected, open a TCP client socket using iperf (use the command iperf_demo.exe –c -p -i 1 –t 100 ) available in Access_point application folder.

7. Quessence device accepts the connection request and receives data on the TCP server port and  will automatically exit after receiving the pre-configured NUMBER_OF_PACKETS.