NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

OMAP Wireless Connectivity WLAN Station demo NLCP

From Texas Instruments Wiki
Jump to: navigation, search

WLAN Demo use-cases[edit]

This page demonstrates three main demo use-cases.

  1. Connect AP and Perform a “ping” Test.
  2. Perform Web-Browsing over the EVM GUI.
  3. Perform Web-browsing over the EVM in non-Internet environment.


Hardware Configuration[edit]


WLAN Station 1.jpg


Description[edit]

The PC is connected to the EVM through a serial port, in order to invoke commands on the EVM.
The EVM will connect to an AP, then we will send "ping" from the EVM to the AP, in order to check the wireless connectivity.

Overview[edit]

The following setup is a basic topology network to enable wlan connection and test it using TI wl12xx mac80211 driver.

Basic topology requires:

  1. One PC
  2. One access-point
  3. One EVM board running wl12xx mac80211 station driver.


It is assumed that the EVM board runs a full SDK package, including GUI and wpa supplicant.

The Setup[edit]
  1. PC ("Console PC") - running Win/Linux OS. This PC will be used as console for the EVM board.
  2. Access point - set to non-secured mode.
  3. EVM board – running full SDK package including GUI and supplicant.


Prerequisites[edit]

Before starting the Connection process, it is assumed that the board is connected to the PC and controlled via the serial port with the serial port application. It is also assumed that the board is already booted and has the Linux prompt.
Otherwise, refer to the < AM37x board bringup> in order to boot the AM37x board or to the < AM18x board bringup> in order to boot the AM18x board.

WLAN Connection Work Flow[edit]

This section explains the Connection work flow.
A. Prerequisites and One-Time Procedures

  • Calibration – A one-time procedure, performed before any WLAN operation. Calibration must be performed once after the board assembly, and also in any case the 1271 connectivity daughter-card or EVM are replaced by new ones.
  • MAC address setting - This is a one-time procedure, done before any WLAN operation and after the Calibration proccess.

For instructions, refer to the following links: Calibration Process and Modifying WLAN MAC Address.



B. Steps for Establishing Connection to WiFi Network


Run WPA Supplicant[edit]

Before starting the connection/scan procedure, we first need to run the WPA supplicant.
Note that the following command should be executed only once per boot.

[root@am37x-evm:#] cd /usr/sbin
[root@am37x-evm:/usr/sbin#] wpa_supplicant -d -Dnl80211 -c/etc/wpa_supplicant.conf -iwlan0 -B 


Expected Results:

wpa_supplicant v0.8.x
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' b'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
eapol_version=1
ap_scan=1
fast_reauth=1
Priority group 20
   id=18 ssid='example'
Priority group 10
   id=4 ssid='example'
Priority group 5
   id=0 ssid='simple'
   id=13 ssid='static-wep-test'
   id=14 ssid='static-wep-test2'
Priority group 2
   id=1 ssid='second ssid'
   id=2 ssid='example'
   id=5 ssid='example'
   id=7 ssid='example'
Priority group 1
   id=3 ssid='example'
Priority group 0
   id=6 ssid='example'
   id=8 ssid='example'
   id=9 ssid=''
   id=10 ssid='1x-test'
   id=11 ssid='leap-example'
   id=12 ssid='plaintext-test'
   id=15 ssid='test adhoc'
   id=16 ssid='example'
   id=17 ssid='example'
   id=19 ssid=''
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
netlink: Operstate: linkmode=1, operstate=5
nl80211: driver param='(null)'
wlan0: Own MAC address: de:ad:be:ef:00:00
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
wlan0: RSN: flushing PMKID list in the driver
wlan0: Setting scan request: 0 sec 100000 usec
WPS: UUID based on MAC address - hexdump(len=16): eb 6c 86 6b 88 24 5e e2 96 02 d9 bf 67 3b d5 5c
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
Using existing control interface directory.
wlan0: Added interface wlan0
Daemonize..

Scan for AP[edit]

To run a scan command, in order to see available networks for connection:

root@am180x-evm:~# wpa_cli scan

The following printout will be displayed on the screen:

Selected interface 'wlan0'
OK

To see the available networks, run the following command:

root@am180x-evm:~# wpa_cli scan_results

The following printout describes the scan results in my enviroment:

Selected interface 'wlan0'
bssid / frequency / signal level / flags / ssid
00:16:46:c6:2b:90       2437    -68     [WPA2-EAP-CCMP][ESS]    externalhotspot84
00:24:01:f6:bd:c6       2462    -67     [WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][WPS][ESS]       dlink655
e0:91:f5:ea:9e:ee       2422    -45     [WPS][ESS]      Eyal
00:21:55:62:29:b0       2437    -79     [ESS]   nisim_ap
00:16:46:c6:2b:92       2437    -68     [WPA2-EAP-CCMP][ESS]    mobilenet84
d0:d0:fd:69:cb:f0       2437    -78     [WPA-PSK-TKIP][ESS]     YaelSL
00:14:bf:28:e0:2a       2457    -70     [WPA-PSK-TKIP][ESS]     linksys_SES_16751
00:0d:ed:99:32:e0       2437    -85     [WPA2-EAP-CCMP][ESS]    externalhotspot84
00:16:47:93:66:21       2412    -45     [WPA-EAP-TKIP][WPA2-EAP-CCMP][ESS]

Choose an AP from the list and keep its SSID. This SSID will be needed later during the connection procedure.

Connect to AP[edit]

The next step is to connect the station to a remote AP (assuming wpa_supplicant is already running, from previous step ):
use one of the following options depends on Security mode


Verify Connection Establishment[edit]


To make sure that EVM is connected to the AP, use the following command:

iw wlan0 link

You should see something similar to the following:

root@am37x-evm:~#  iw wlan0 link
Connected to 00:16:b6:da:29:3c (on wlan0)
SSID: linksys
freq: 2462
RX: 168 bytes (4 packets)
TX: 0 bytes (0 packets)
signal: -55 dBm
tx bitrate: 1.0 MBit/s

Get an IP Address for the EVM Board[edit]


To get an IP address for the EVM, use the following command: udhcpc -i wlan0

root@am37x-evm:~# udhcpc -i wlan0
udhcpc (v1.13.2) started
Sending discover...
Sending select for 192.168.3.8...
Lease of 192.168.3.8 obtained, lease time 86400
adding dns 192.168.3.1

To see the IP address that the EVM recieved from the DHCP, use ifconfig [interface] command.

root@am37x-evm:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr DE:AD:BE:EF:00:00
          inet addr:192.168.3.8  Bcast:0.0.0.0  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:195 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:18042 (17.6 KiB)  TX bytes:1220 (1.1 KiB)

Remark: The AP should run DHCP server; Otherwise you should set the static IP for the wlan0 interface using ifconig wlan0 xxx.xxx.xxx.xxx up command

Perform a “ping” Test[edit]


Run a "ping" command from the EVM (using the PC console) to the AP.
Assuming that the IP address of the AP is 192.168.1.1, the command should be:

ping 192.168.1.1

The result should appear as follows:

PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=10.838 ms
64 bytes from 192.168.1.1: seq=1 ttl=64 time=10.778 ms
64 bytes from 192.168.1.1: seq=2 ttl=64 time=10.647 ms
64 bytes from 192.168.1.1: seq=3 ttl=64 time=10.568 ms

This means that we established a connection with the AP via the EVM.

Perform Web-Browsing over the EVM GUI[edit]


Two setup-topologies are available for web browsing over the EVM GUI. These setups are:
Option 1: The EVM is connected to an AP which is connected to the Internet directly.

WLAN Station web browsing.jpg
To perform web browsing from the EVM, the AP should be connected to the internet on its WAN interface.
When AP is connected to the internet you should:
1. Connect to AP
2. Get IP address for EVM board
After connection was established, click the web browser icon on the EVM GUI.
A browser window will open, with the default address. To set a different address, you need to connect a USB keyboard and type the required address (the keyboard has to be connected to the USB using a USB Bridge with Electrical power, since the EVM cannot supply the required power through the USB). We've used the following websites: http:/doc.qt.nokia.com

Option 2: In case there in no Modem to connect to the Web
The EVM is connected to an AP which is connected to a web server based PC. This is useful in case we do not have Internet access but still need to demonstrate the web capabilities.
WLAN Station.jpg

In case there is no internet connection available for demonstrating the Web Access, as an alternative it possible to demonstrating web browsing where the web server is located on a PC which is connected to the EVM (that works in Soft AP mode) through the Ethernet port.
For Web server we used Apache (any other web server can fit as well), it is an open-source HTTP server for modern operating systems including UNIX and Windows. The web server can be downloaded from <Apache web server>. (for demo we used the Apache HTTP Server 2.2.19 Release, published on 2011-05-22)

For the Demo, follow these steps:
Connect the WLAN and the Ethernet connections

  1. Connect to AP
  2. Get IP address for EVM board
  3. Assuming the AP Ethernet port IP address is 192.168.2.1
  4. Connect the Web Server PC to the EVM using Ethernet cable
  5. Set the PC (that is connected to the AP via the Ethernet cable) Ethernet port to have static IP for example use 192.168.2.10 - For more information follow the link <Windows>


Set the Web server on the PC that is connected to the AP

  1. For Demo, use the Apache web server (or any other available web server) that can be downloaded from <Apache web server>
  2. Install a web server on the PC, that will act as the internet cloud.
  3. Download the wiki page HTML source from: (Will be provided soon).
  4. Extract the zip file to a local folder on the PC.
  5. Set the HTML web page that is displayed when browsing the web server to the location from which you extracted the wiki page sources.



HomepageIcon.jpgHOME

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article OMAP Wireless Connectivity WLAN Station demo NLCP here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article OMAP Wireless Connectivity WLAN Station demo NLCP here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article OMAP Wireless Connectivity WLAN Station demo NLCP here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article OMAP Wireless Connectivity WLAN Station demo NLCP here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article OMAP Wireless Connectivity WLAN Station demo NLCP here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article OMAP Wireless Connectivity WLAN Station demo NLCP here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article OMAP Wireless Connectivity WLAN Station demo NLCP here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article OMAP Wireless Connectivity WLAN Station demo NLCP here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article OMAP Wireless Connectivity WLAN Station demo NLCP here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity