#WIFI-6 - OEM WiFi USB module based on Realtek RTL8188EUS

## Datasheets

* [Chip RTL8188EUS product description](https://www.realtek.com/en/products/communications-network-ics/item/rtl8188eus)
* [Chip RTL8188EUS datasheet](./RTL8188EUS-Realtek.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 [*]
        < >     Realtek 8187 and 8187B USB support
        <*>     Realtek rtlwifi family of devices  ---> 
        <*>     RTL8723AU/RTL8188[CR]U/RTL819[12]CU (mac80211) support
        [*]       Include support for untested Realtek 8xxx USB devices (EXPERIMENTAL)

## Package installation

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

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

in

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

then update the package index by typing

	sudo apt update
	sudo apt install firmware-realtek


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-2'
* @article='WIFI-3'
* @article='WIFI-4'
* @article='WIFI-5'

@include='bio_tanzilli'
