Compare 0 Products     empty

WF111 Wi-Fi

In this section are reported the procedures how to use the Wi-Fi and Bluetooth on device Engicam. The driver for support of these modules are automatically compiled in the recipes engicam-test-hw.

AP MODE

Create the file "/etc/udhcpd.conf" that will contains the address range that will assign AP

# Sample udhcpd configuration file (/etc/udhcpd.conf)
#The start and end of the IP lease block

start 192.168.0.20
end   192.168.0.254

# The interface that udhcpd will use

interface   wlan0   #default: eth0

Set the ip address for network interface

ifconfig wlan0 192.168.X.XXX

Launch the DHCP server

udhcpd

Configure the AP parameters

iwpriv wlanN AP_SET_CFG ASCII_CMD=AP_CFG,SSID="<network name>",SEC="<open/wpa2-psk>",KEY=<PSK>,CHANNEL=<channel number>,PREAMBLE=<0/1>,MAX_SCB=<N>,END
• wlanN : network interface
• SSID : service set identifier
• SEC : wireless security (open,WPA2, WPA ecc..)
• KEY : password
• CHANNEL : channel (1-14)
• PREAMBLE : 0 or 1
• MAX_SCB : is the maximum number of stations that can be connected to AP at any time (from 1 to 8 stations)

AP MODE without password :

iwpriv wlan0 AP_SET_CFG ASCII_CMD=AP_CFG,SSID="network name",SEC="open",KEY="",CHANNEL=1,PREAMBLE=1,MAX_SCB=2,END

AP MODE with password :

iwpriv wlan0 AP_SET_CFG ASCII_CMD=AP_CFG,SSID="network name",SEC="wpa2- psk",KEY="PSK",CHANNEL=1,PREAMBLE=1,MAX_SCB=2,END

To get the password in psk format, run the following command

wpa_passphrase networkname password

Start AP MODE

iwpriv wlan0 AP_BSS_START

Stop AP MODE

iwpriv wlan0 AP_BSS_STOP

WIRELESS MODE

WIRELESS PROTECTED NETWORKS

Up the network interface

ifconfig wlan0 up

Scan wireless network

iwlist scan

Set the wpa_supplicant.conf with the SSID and Password of the AP network wireless

wpa_passphrase SSID PASSWORD > /etc/wpa_supplicant.conf

Use wpa_supplicant to connect to the AP

wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant.conf -B

Launch the dhcp client to acquire the ip address

udhcpc -iwlan0

Test the connection

ping 192.168.X.XXX

WIRELESS FREE NETWORKS

Set the channel of the wireless network

iwconfig wlan0 channel X
• X : number of channel

Scan wireless network

iwlist scan

Set the SSID of the wireless network

iwconfig wlan0 essid SSID

Launch the DHCP client to acquire the IP address

udhcpc -iwlan0

Test the connection

ping 192.168.X.XXX