VAR-SOM-MX6 Wireless LAN: Difference between revisions
(→Setup) |
(Add category Debian) |
||
(19 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{PageHeader|VAR-SOM-MX6 - Wireless LAN}} {{DocImage|category1=VAR-SOM-MX6| | {{PageHeader|VAR-SOM-MX6 - Wireless LAN}} {{DocImage|category1=Yocto|category2=Debian}} [[category:VAR-SOM-MX6]] __toc__ | ||
= Setup = | |||
VAR-SOM-MX6 V2.X (WiLink8): | |||
* Before you begin working with WL183x Wi-Fi you should properly configure it (only once) for your usage scenario: | |||
<pre> | |||
$ cd /usr/bin/wlconf/ | |||
$ ./configure-device.sh | |||
select one out of : WL1831, WL1835, WL1837. | |||
</pre> | |||
As a result some additional information may be required like 1/2 antenna connected | |||
<br> | |||
<reboot system!> <br> | |||
{{Note|The default configuration is for WL1837}} | |||
= Test = | = Test = | ||
'''Scan for wireless networks''': | '''Scan for wireless networks''': | ||
Line 8: | Line 23: | ||
<br> | <br> | ||
'''Connecting to a WPA encrypted network:''' <br> | '''Connecting to a WPA encrypted network:''' <br> | ||
Find your network from the above scan command.<br> | If you are using Krogoth distro, please remember that Wifi interface is controlled by [[wifi connman | connman]].<br> | ||
Before continuing with this procedure, remember to disable wifi control running | |||
<pre> | |||
$ connmanctl disable wifi | |||
</pre> | |||
If you are using Debian, please note that Wifi interface is controlled by Network Manager.<br> | |||
Before continuing with this procedure, remember to disable wifi control running | |||
<pre> | |||
$ nmcli radio wifi off | |||
</pre> | |||
Find your network from the above scan command.<br> | |||
<pre> | <pre> | ||
$ mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.org | $ mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.org | ||
Line 30: | Line 55: | ||
<br> | <br> | ||
'''Useful link for common iw commands:''' https://wiki.archlinux.org/index.php/Wireless_network_configuration#Manual_setup | '''Useful link for common iw commands:''' https://wiki.archlinux.org/index.php/Wireless_network_configuration#Manual_setup | ||
= Access Point = | = Access Point = | ||
This example will demonstrate you how to use the VAR-SOM-MX6 as an access point. It will forward packets from wlan0 to eth0. | This example will demonstrate you how to use the VAR-SOM-MX6 as an access point. It will forward packets from wlan0 to eth0. | ||
Line 46: | Line 72: | ||
option lease 864000 # 10 days of seconds | option lease 864000 # 10 days of seconds | ||
</pre> | </pre> | ||
This is a network example. You need to set the IP address based on your network. | This is a network example. You need to set the IP address based on your network.<br> | ||
<br> | Wireless configuration can be setup in file /etc/hostapd.conf before launching hostapd for configuring access point name, requiring password, etc.<br> | ||
<pre>$ killall wpa_supplicant | For example:<br> | ||
<pre> | |||
$ vi /etc/hostapd.conf | |||
</pre> | |||
You can set the following parameters: | |||
<pre> | |||
ssid=VARI_AP | |||
wpa=2 | |||
rsn_pairwise=CCMP | |||
wpa_passphrase=12345678 | |||
wpa_key_mgmt=WPA-PSK | |||
ieee80211n=1 | |||
channel=1 | |||
hw_mode=g | |||
interface=wlan0 | |||
</pre> | |||
Ensure that wpa_supplicant is not holding the device | |||
<pre> | |||
$ killall wpa_supplicant | |||
$ killall hostapd | |||
</pre> | </pre> | ||
IP Forwarding: | IP Forwarding: | ||
<pre>$ echo 1 > /proc/sys/net/ipv4/ip_forward | <pre>$ echo 1 > /proc/sys/net/ipv4/ip_forward | ||
Line 58: | Line 105: | ||
</pre> | </pre> | ||
As a next step one should take a look at /etc/hostapd.conf. You may want to configure password access point name etc. | As a next step one should take a look at /etc/hostapd.conf. You may want to configure password access point name etc. | ||
= MAC address settings = | = MAC address settings = | ||
Line 87: | Line 114: | ||
Note: This operation should be done only once | Note: This operation should be done only once | ||
= Wi-Fi Certification Tests = | |||
Texas Instruments provides detailed description of procedures required to pass Wi-Fi certification tests: | |||
https://www.ti.com/lit/ug/swru562/swru562.pdf | |||
https://www.ti.com/lit/ug/swru570b/swru570b.pdf | |||
https://www.ti.com/tool/WL18XX-CERTIFICATION | |||
= Bluetooth RF Testing = | |||
<!-- | |||
Texas Instruments used to provide a detailed description of the procedures required for Bluetooth RF Testing at:<br> | |||
https://processors.wiki.ti.com/index.php/WL18xx_Bluetopia_PM_Bluetooth_RF_Testing | |||
Since January 2021, the above page no longer exists, but its contents are still available from the [https://archive.org/web/ Wayback Machine Internet Archive] at | |||
https://web.archive.org/web/20210115014622/https://processors.wiki.ti.com/index.php/WL18xx_Bluetopia_PM_Bluetooth_RF_Testing | |||
--> | |||
Texas Instruments provides detailed description of procedures required to pass BT certification tests: | |||
https://www.ti.com/lit/an/swra750/swra750.pdf |
Latest revision as of 18:41, 6 June 2023
Setup
VAR-SOM-MX6 V2.X (WiLink8):
- Before you begin working with WL183x Wi-Fi you should properly configure it (only once) for your usage scenario:
$ cd /usr/bin/wlconf/ $ ./configure-device.sh select one out of : WL1831, WL1835, WL1837.
As a result some additional information may be required like 1/2 antenna connected
<reboot system!>
Test
Scan for wireless networks:
$ ifconfig wlan0 up $ iw dev wlan0 scan | grep SSID
Connecting to a WPA encrypted network:
If you are using Krogoth distro, please remember that Wifi interface is controlled by connman.
Before continuing with this procedure, remember to disable wifi control running
$ connmanctl disable wifi
If you are using Debian, please note that Wifi interface is controlled by Network Manager.
Before continuing with this procedure, remember to disable wifi control running
$ nmcli radio wifi off
Find your network from the above scan command.
$ mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.org $ wpa_passphrase <YourAP> <YourPassword> >/etc/wpa_supplicant.conf $ wpa_supplicant -B -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf
wait for:
wlcore: Association completed.
Disable eth0:
$ ifconfig eth0 down
Run DHCP:
$ udhcpc -iwlan0 $ ifconfig
Useful link for common iw commands: https://wiki.archlinux.org/index.php/Wireless_network_configuration#Manual_setup
Access Point
This example will demonstrate you how to use the VAR-SOM-MX6 as an access point. It will forward packets from wlan0 to eth0. DHCPD:
$ vi /etc/udhcpd.conf # Sample udhcpd configuration file (/etc/udhcpd.conf) # The start and end of the IP lease block start 192.168.5.20 #default: 192.168.0.20 end 192.168.5.25 #default: 192.168.0.254 # The interface that udhcpd will use interface wlan0 #default: eth0 #Example opt dns 8.8.8.8 8.8.4.4 # public google dns servers option subnet 255.255.255.0 opt router 192.168.5.1 option lease 864000 # 10 days of seconds
This is a network example. You need to set the IP address based on your network.
Wireless configuration can be setup in file /etc/hostapd.conf before launching hostapd for configuring access point name, requiring password, etc.
For example:
$ vi /etc/hostapd.conf
You can set the following parameters:
ssid=VARI_AP wpa=2 rsn_pairwise=CCMP wpa_passphrase=12345678 wpa_key_mgmt=WPA-PSK ieee80211n=1 channel=1 hw_mode=g interface=wlan0
Ensure that wpa_supplicant is not holding the device
$ killall wpa_supplicant $ killall hostapd
IP Forwarding:
$ echo 1 > /proc/sys/net/ipv4/ip_forward $ ifconfig wlan0 192.168.5.1 $ hostapd -B /etc/hostapd.conf -P /var/run/hostapd.pid $ udhcpd /etc/udhcpd.conf $ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
As a next step one should take a look at /etc/hostapd.conf. You may want to configure password access point name etc.
MAC address settings
In order to use the built-in TI unique mac address of the module, change the wl1271-nvs.bin file using the calibrator application:
$ calibrator set nvs_mac /lib/firmware/ti-connectivity/wl1271-nvs.bin 00:00:00:00:00:00 reboot system!
Note: This operation should be done only once
Wi-Fi Certification Tests
Texas Instruments provides detailed description of procedures required to pass Wi-Fi certification tests:
https://www.ti.com/lit/ug/swru562/swru562.pdf
https://www.ti.com/lit/ug/swru570b/swru570b.pdf
https://www.ti.com/tool/WL18XX-CERTIFICATION
Bluetooth RF Testing
Texas Instruments provides detailed description of procedures required to pass BT certification tests: