#WIFI-5 - OEM WiFi USB module (Mediatek MT7601U)

<abstract>
WIFI-5 is an USB 2.0 module compliant with IEEE802.11 b/g/n. It is based on a 
MediaTek MT7601U chip and fully supported by the latest Kernel Linux versions.
It can be mounted directly on a PCB instead of 
plugged in a USB port.
</abstract>

<!--
<img src="wifi_modules.jpg" width="320px"/>
-->

This module is available in two versions:

* __WIFI-5__  which needs an external RF antenna plugged on the i-PEX MHF receptacle
* __WIFI-5-IA__  without the i-PEX MHF receptacle using the onboard PCB antenna

Both models are available with a 6 pin pitch 2mm solded on semi-holes to be plugged on
a female connector or welded directly on the PCB.

<a href = "/pricelist?category=wifi" class = "btn btn-success" role = "button"><i class="glyphicon glyphicon glyphicon-shopping-cart"></i> Buy</a>


##Datasheets

* [Module specifications](./GWF-7M02-specifications.pdf)

## Linux Kernel configuration

This are the driver to enable inside the Linux Kernel to support the wifi module. Follow these articles
to know how to compile the Linux kernel:

* @article='compile_kernel_5_15'

To change the Kernel configuration use this command on your Linux PC as described on this article:

	make ARCH=arm menuconfig
	
Thanks set these items:

	Device Drivers  --->
	  [*] USB support  ---> 
	    <*> USB Wireless Device Management support

and these:

	Device Drivers > 
	  Network device support > 
	    Wireless LAN [*]
			[*]   MediaTek devices                                                                          │ │  
			<*>     MediaTek MT7601U (USB) support 
	     
## Package installation

A closed firmware made by RaLink need to be installed. This firmware will be loaded on the
module at startup

Change this line in __/etc/apt/sources.list__

	deb http://cdn.debian.net/debian/ buster main

in

	deb http://cdn.debian.net/debian/ buster main contrib non-free

then update the package index by typing

	sudo apt update
	sudo apt install firmware-ralink


Install iw and wpasupplicant using __make menuconfig__:

	sudo apt install wpasupplicant
	sudo apt install iw

###Network configuration to get access to a WPA-WPA2-protected Wi-Fi

Add, inside the directory __/etc/network/interfaces.d__ a file called __wlan0__ 
by typing:

	sudo nano /etc/network/interfaces.d/wlan0
	
Write these lines and save:	

	allow-hotplug wlan0
	iface wlan0 inet dhcp
		wireless-essid any
		pre-up wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
		post-down killall -q wpa_supplicant

Create a file called __/etc/wpa_supplicant.conf__ that contains your access point name 
and password.

	sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Write these lines and save:	

	ctrl_interface=/var/run/wpa_supplicant
	ap_scan=1
	
	network={
		ssid="acmetest"
		psk="acmetest"
	}

Alternatively it is possible to hide the password using __wpa_phassphrase__ by typing:

	wpa_passphrase acmetest acmetest
	
result	
	
	network={
		ssid="acmetest"
		#psk="acmetest"
		psk=8e347eea89c0f5a5726f56f553ae6c72240bf83e1ca23dddb3a88f7cefac1bc5
	}

Restart wlan0 with these command or reboot:

	sudo ifdown wlan0
	sudo ifup wlan0

After a while if the dhcp are working well you will obtain your interface up. 

## Wi-fi adapters

* @article='WIFI-3'
* @article='WIFI-5'
* @article='WIFI-2'

