Transclusion: Debian: CL-SOM-iMX7: WiFi

From Compulab Mediawiki
Revision as of 14:17, 8 May 2017 by Grinberg (talk | contribs) (WiFi Initialization)
Jump to: navigation, search

CL-SOM-iMX7 features 802.11b/g/n wireless connectivity solution, implemented with a TI WiLink8 Combo module.

WiFi Initialization

  • WiFi requires no user interaction for being configured. The driver gets loaded automatically.

Make sure that the WiFi driver is loaded:

root@cl-rootfs:~# lsmod | grep wl18xx
wl18xx                 70950  0

The WiFi driver can be loaded manually:

root@cl-rootfs:~# modprobe wl18xx
	wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
	wlcore: WARNING falling back to default config
	wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
	wlcore: loaded
  • iwconfig command from wireless-tools package can be used to retrieve detailed information about the WiFi interfaces:
root@cl-rootfs:~# iwconfig wlan0
wlan0     IEEE 802.11abgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
  • Activate the interface:
root@cl-rootfs:~# ifconfig wlan0 up
  • Sample WiFi scanning:
root@cl-rootfs:~# iwlist wlan0 scan

The output will show the list of Access Points and Ad-Hoc cells in range. For more information about connecting to wireless networks and tuning WiFi interfaces refer to “wpa_supplicant” and “wireless-tools” man pages.

wpa_supplicant

  • Configuration sample

wpa_supplicant requires a configuration file to be created in order to get connected to a scanned wireless network.
Make use of the example bellow and put the network name and the password into the "ssid/psk" fields.

root@cl-rootfs:~# cat << eof > /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant

network={
	ssid="wireless_network_name"
	key_mgmt=WPA-PSK
	psk="wireless_network_password"
}
eof
  • Sample run
root@cl-rootfs:~# ifconfig wlan0 up
root@cl-rootfs:~# wpa_supplicant -B -Dwext -c /etc/wpa_supplicant.conf -i wlan0
root@cl-rootfs:~# dhclient wlan0