Project

General

Profile

WiFiAdapter » History » Version 40

Kurtis Hanna, 05/01/2020 08:45 PM
added 6.0 0004 rc1 documentation

1 6 Wolfgang Wiedmeyer
h1. Enabling WiFi with an USB WiFi adapter
2 1 Wolfgang Wiedmeyer
3 19 Wolfgang Wiedmeyer
{{>toc}}
4
5 7 Wolfgang Wiedmeyer
All Replicant-supported devices need non-free firmware to be loaded to make the internal WiFi component work. See the [[Wifi|WiFi research page]] for more information. Free replacements for these non-free firmwares do not yet exist.
6 3 Wolfgang Wiedmeyer
7 40 Kurtis Hanna
However, free firmware does exist for WiFi adapters with the AR9271 and rt2500usb chipsets. Such adapters can be used with a device running Replicant 6.0. A USB OTG (On-The-Go) cable is needed to connect the WiFi adapter to the phone.
8 1 Wolfgang Wiedmeyer
9 32 Denis 'GNUtoo' Carikli
h2. Replicant compatible devices
10
11
WiFi adapters work best with the [[GalaxyNote2N7100|Galaxy Note 2]] or the supported tablets because of their large batteries, though connection issues or crashes of the RepWifi app can happen.
12
13 40 Kurtis Hanna
Otherwise, the [[GalaxyS3I9300|Galaxy S 3]] works well, while the [[GalaxyNexusI9250|Galaxy Nexus]], [[GalaxyNoteN7000|Galaxy Note]] and especially the [[GalaxyS2I9100|Galaxy S 2]] are more unstable and have a smaller battery life. Extended See [[WifiAdapter#Known-issues|known issues]] for more details. Using an USB OTG Y-cable with an additional power source helps preventing battery-related issues.
14 32 Denis 'GNUtoo' Carikli
15 30 Denis 'GNUtoo' Carikli
h2. WiFi adapters
16 1 Wolfgang Wiedmeyer
17 8 Wolfgang Wiedmeyer
More adapters exist that have the AR9271 chipset than are listed below. The listed adapters are the ones that are known to us.
18 1 Wolfgang Wiedmeyer
19
h3. Known to work
20
21 17 Wolfgang Wiedmeyer
* "Penguin Wireless N USB Adapter (TPE-N150USB)":https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb
22 7 Wolfgang Wiedmeyer
* "Technoethical N150 Mini Wireless USB Adapter":https://tehnoetic.com/adapters/tehnoetic-wireless-adapter-gnu-linux-libre-tet-n150
23 1 Wolfgang Wiedmeyer
* "Technoethical N150 High Gain Antenna Wireless USB Adapter":https://tehnoetic.com/adapters/tet-n150hga
24 37 Kurtis Hanna
* TP-Link TL-WN722N, but only version 1[1]
25 39 Kurtis Hanna
* VIA Technologies VNT9271BU0DB
26 30 Denis 'GNUtoo' Carikli
27 31 Denis 'GNUtoo' Carikli
h3. Should work but not tested
28 30 Denis 'GNUtoo' Carikli
29 1 Wolfgang Wiedmeyer
* "Penguin Wireless N USB Adapter /w External Antenna (TPE-N150USBL)":https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-w-external-antenna-gnu-linux-tpe-n150usbl
30 39 Kurtis Hanna
* VIA Technologies VNT9271BB05B
31
* More AR9271 chipset USB devices that should work: https://wiki.parabola.nu/WiFi_devices_known_to_work_with_Parabola_GNU/Linux-libre#Supported_.28probably.29_devices
32 30 Denis 'GNUtoo' Carikli
33 8 Wolfgang Wiedmeyer
h2. WiFi adapter usage
34 1 Wolfgang Wiedmeyer
35 40 Kurtis Hanna
In Replicant versions before 6.0 0004 rc1, using the WiFi adapter with the RepWifi app was the recommended and most convenient way.
36 1 Wolfgang Wiedmeyer
37 40 Kurtis Hanna
As of "Replicant 6.0 0004 rc1":https://ftp-osl.osuosl.org/pub/replicant/images/replicant-6.0/0004-rc1/, RepWifi has been removed since it is now possible to configure WiFi connections through the adapter with the pull-down quicksettings or the regular WiFi menu in the settings. In 6.0 0003 and older, these methods only worked with the internal WiFi component of the device.
38 8 Wolfgang Wiedmeyer
39
h3. With the RepWifi app
40
41 40 Kurtis Hanna
Replicant 6.0 version before 0004 rc1 shipped with the RepWifi app. [[UsageNotes#Enabling-root-access|Root access for apps]] needs to be enabled to make the app work.
42 29 Denis 'GNUtoo' Carikli
 
43
The app has the following capabilities:
44
* searching for WiFi access points
45
* connecting to WPA/WPA2 secured and unsecured networks
46
* storing network connections (including passwords)
47
* managing stored network connections (viewing and deleting them)
48
49
"Forum thread about the app and its development":/boards/9/topics/14079?r=1410
50
51 8 Wolfgang Wiedmeyer
h3. With the WiFi scripts
52 1 Wolfgang Wiedmeyer
53 37 Kurtis Hanna
While the RepWifi app should be preferred, use cases might exist where the WiFi scripts yield better results. The scripts were developed before work on the RepWifi app was started. Scripts both for Replicant 6.0 and Replicant 4.2[2] exist. It is unlikely that the WiFi scripts will be improved further as the development focus lies on the RepWifi app.
54 9 Wolfgang Wiedmeyer
55 12 Wolfgang Wiedmeyer
The scripts can be retrieved by cloning the user-scripts repository:
56
<pre>
57
git clone https://git.replicant.us/replicant/user-scripts.git -b replicant-6.0
58
</pre>
59
60
for Replicant 6.0 and
61
<pre>
62
git clone https://git.replicant.us/replicant/user-scripts.git -b replicant-4.2
63
</pre>
64
65
for Replicant 4.2.
66
67
For the next steps, [[ADB]] needs to be set up and [[ADB#Accessing-root-shell|running as root]]. Connect the device to your PC. The scripts are in the @networking/wifi@ folder. Run the setup script the folder to push the scripts to the device:
68
<pre>
69
./setup.sh
70
</pre>
71 1 Wolfgang Wiedmeyer
72 13 Wolfgang Wiedmeyer
Then disconnect the device and attach the WiFi adapter. Make sure [[UsageNotes#Enabling-root-access|root access for apps]] is enabled. Open a [[UsageNotes#Terminal-emulator|terminal emulator]]. If the terminal is not running as root, you can gain root by running:
73
<pre>
74
su
75
</pre> 
76 1 Wolfgang Wiedmeyer
77 13 Wolfgang Wiedmeyer
Navigate to the @data/misc/wifi@ directory and run the script to scan and select the network access point:
78
<pre>
79
bash select_network.sh
80
</pre>
81
82
After selecting the preferred AP and entering the password (if required), a WiFi connection should be successfully established.
83 1 Wolfgang Wiedmeyer
84 13 Wolfgang Wiedmeyer
"Forum thread about the WiFi scripts and their development":/boards/9/topics/13932 (contains some more usage notes, especially for Replicant 4.2)
85 18 Wolfgang Wiedmeyer
86 1 Wolfgang Wiedmeyer
h2. Known issues
87
88 33 Denis 'GNUtoo' Carikli
* The adapter usage causes high battery drain. Frequent usage might result in a shortened lifecycle of the battery and battery damage is possible.
89
* In the case of a low battery charge, it might not be possible to power the WiFi adapter. It is then not possible to use the it adapter until after the next recharge. If the adapter is not recognized, make sure to fully charge the battery and then try again.
90
* The displayed battery charge level can be inaccurate and not up-to-date. As the adapter causes an unusually quick battery drain, the actual battery charge level can be a lot lower than what is currently displayed. This can be observed when the phone is rebooted after adapter usage. The displayed level can be a lot lower than before the reboot. That primarily happen with the Galaxy S 2 (see #1791).
91 1 Wolfgang Wiedmeyer
92 26 Fil Bergamo
h2. Notes:
93
 
94 37 Kurtis Hanna
fn1. According to "WikiDevi page on the version 1":https://wikidevi.com/wiki/TP-LINK_TL-WN722N and "WikiDevi page on the version 2":https://wikidevi.com/wiki/TP-LINK_TL-WN722N_v2 only version 1 of TP-Link TL-WN722N works with free software, while version 2 doesn't
95
96
fn2. Replicant 4.2 does not include the required drivers to make these adapters work. Custom kernel images are necessary for Replicant 4.2. The scripts for Replicant 4.2 run services with greater privileges and do not restrict file access as good as the scripts for Replicant 6.0 do, so using them is less secure.