AM37x Wireless Connectivity NLCP WLAN AP Terminal

'''  Content is no longer maintained and is being kept for reference only! '''

Access Point Use case
'''  Content is no longer maintained and is being kept for reference only! ''' That Demo use case will provide guides how to build WiFi network with the Access Point (that is run on top of the EVM) by connecting two remote Stations to the Access point and transfer traffic between them.

Access point settings
The hostapd.conf file (located in folder /etc) defines the Soft AP settings. Following are the main definitions that should be edited in that file

Connect to non Secured network
interface=wlan0 driver=nl80211 channel=1 hw_mode=g preamble=1 dtim_period=2 beacon_int=100 logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=2 dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 supported_rates=60 90 120 180 240 360 480 540 basic_rates=60 90 120 180 240 ssid=MAC_AP max_num_sta=5 macaddr_acl=0 auth_algs=3 ieee80211d=0 uapsd_advertisement_enabled=1 wep_rekey_period=0 own_ip_addr=127.0.0.1 wpa_group_rekey=0 wpa_strict_rekey=0 wpa_gmk_rekey=0 wpa_ptk_rekey=0 eap_server=1 disassoc_low_ack=1 ap_max_inactivity=4294967295
 * 1) ap_table_max_size=255
 * 2) ap_table_expiration_time=60

Connect to Secured network (WEP-40)
interface=wlan0 driver=nl80211 channel=1 hw_mode=g preamble=1 dtim_period=2 beacon_int=100 logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=2 dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 ssid=zoomtest max_num_sta=5 macaddr_acl=0 auth_algs=1 wep_default_key=0 wep_key0=1234567890 eapol_key_index_workaround=0 eap_server=0 own_ip_addr=127.0.0.1

Connect to Secured network (WEP-128)
interface=wlan0 driver=nl80211 channel=1 hw_mode=g preamble=1 dtim_period=2 beacon_int=100 logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=2 dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 ssid=zoomtest max_num_sta=5 macaddr_acl=0 auth_algs=1 wep_default_key=2 wep_key0=1234567890 wep_key1=1234567890 wep_key2=CcCcCcCcCcCcCcCcCcCcCcCcCc wep_key3=1234567890 wme_enabled=0 eapol_key_index_workaround=0 eap_server=0 own_ip_addr=127.0.0.1

Connect to Secured network (WPA)
interface=wlan0 driver=nl80211 channel=1 hw_mode=g preamble=1 dtim_period=2 beacon_int=100 logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=2 dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 ssid=zoomtest max_num_sta=5 macaddr_acl=0 auth_algs=1 wme_enabled=0 eapol_key_index_workaround=0 eap_server=0 own_ip_addr=127.0.0.1 wpa=1 wpa_passphrase=12345678 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP

Connect to Secured network (WPA2)
interface=wlan0 driver=nl80211 channel=1 hw_mode=g preamble=1 dtim_period=2 beacon_int=100 logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=2 dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 ssid=zoomtest max_num_sta=5 macaddr_acl=0 auth_algs=1 wme_enabled=0 eapol_key_index_workaround=0 eap_server=0 own_ip_addr=127.0.0.1 wpa=2 wpa_passphrase=12345678 wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP

Connect to Secured network (any WPA)
interface=wlan0 driver=nl80211 channel=1 hw_mode=g preamble=1 dtim_period=2 beacon_int=100 logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=2 dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 ssid=zoomtest max_num_sta=5 macaddr_acl=0 auth_algs=1 wme_enabled=0 eapol_key_index_workaround=0 eap_server=0 own_ip_addr=127.0.0.1 wpa=3 wpa_passphrase=12345678 wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP TKIP

create udhcpd.conf file in order to be enable DHCP server
please create a file with name udhcpd.conf and store it in /etc folder start 		192.168.0.20	#default: 192.168.0.20 end		192.168.0.254	#default: 192.168.0.254 interface  wlan0		#default: eth0 opt	dns	8.8.8.8 8.8.4.4 # public google dns servers option	subnet	255.255.255.0 opt	router	192.168.0.1 option	lease	864000		# 10 days of seconds Press the following to get a sample of [[Media:udhcpd.zip|]], unzip the file to get the udhcpd.conf file
 * 1) Sample udhcpd configuration file (/etc/udhcpd.conf)
 * 2) The start and end of the IP lease block
 * 1) The interface that udhcpd will use
 * 1) Examles

run The AM37x EVM in Access Point mode
in order to start the Soft AP, run the following commands from the console: echo 1 > /proc/sys/net/ipv4/ip_forward ifconfig wlan0 192.168.0.1 hostapd -B /etc/hostapd.conf -P /var/run/hostapd.pid udhcpd /etc/udhcpd.conf iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE Note: the ip used for the wlan interface has to match the router IP that was set in the udhcpd.conf configuration file above.

Exit from Access Point mode
follows the next commands in order to exit from Access Point mode and return to WLAN Station mode: first need to kill both the hostapd and the udhcpd, for that use ps command to verify what is the Process ID of hostapd and udhcpd root@am37x-evm:/etc# ps PID USER       VSZ STAT COMMAND 2702 root     4904 S    hostapd -B /etc/hostapd.conf -P /var/run/hostapd.pid 2704 root     2936 S    udhcpd /etc/udhcpd.conf 2714 root     3128 R    ps once we have the Process ID, we can kiil it kill -9 2702 kill -9 2704 echo 0 > /proc/sys/net/ipv4/ip_forward iptables -F ifconfig wlan0 down iwconfig wlan0 mode managed ifconfig wlan0 up

Web Browsing
Following is demo how to use the EVM in Soft AP mode and to use it a Router to surf the web In order to perform it please follows instructions below:
 * 1) connect the EVM Ethernet port to the WAN network using Ethernet cable
 * 2) Activate the EVM in Soft AP mode, the first step is to configure the hostapd configuration file. For simple configuration please use non secured network as shown in the following link 
 * 3) Set the DHCP server configuration as shown in the following link 
 * 4) Activate the DHCP server and the NAT functionality as shown in the following link 
 * 5) Connect the PC to the WiFi network created by the EVM
 * 6) Defined the PC to get the IP address using DHCP
 * 7) Open the Web Browser application on the PC and start surfing the web

Evternal links
HOME
 * For more information on Soft AP (hostapd) configuration please use the following link 