Trying to figure out an AP from TP-LINK TL-WN725N

Posted by housix 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Trying to figure out an AP from TP-LINK TL-WN725N
February 02, 2018 01:19AM
Hi,

I'm trying to get this nano usb to respond to make itself useful, so that it becomes an AP for my PB from RPI3 Model B.
The one I'm talking about is TP-LINK TL-WN725N, it seems though it could happen because when I execute the "/opt/piratebox/rpi/bin/wifi_detect.sh" the light begins to flash from time to time, meaning that every few seconds it flashes. I tried to see when I first tried to do it if it somehow created an AP, and unfortunately it didn't. And I know that this type isn't supported. Would very much appreciate if someone would be able to figure this out. And I found a website that created a driver for it, though I don't know how to compile it, or if I should compile it then install it. Yes I'm a scrub, just begun, was intrigued by the idea that there was an offline/off-grid file-sharing system.
Re: Trying to figure out an AP from TP-LINK TL-WN725N
February 02, 2018 05:03AM
Hi,

ok, but we need to go a big deeper into your investigation to understand what is going on and if it may work. Is the onboard wifi still enabled via confix.txt / did you change something about that topic onboard wifi?

Please post the output of the following commands - please edit the wpa_supplicant.conf output and remove your wifi password, if it is set.

sudo cat /boot/wifi_card.conf
echo "------------------------------------------------"
sudo cat /opt/piratebox/conf/hostapd.conf
echo "------------------------------------------------"
sudo cat /boot/wpa_supplicant.conf  
echo "------------------------------------------------"
sudo  /opt/piratebox/rpi/bin/wifi_detect.sh
echo "------------------------------------------------"
sudo iw phy | grep -e phy -e AP
echo "------------------------------------------------"
pacman -Ss hostap

Mh, I hope that is everything needed confused smiley
We will see....

best regards Matthias
Re: Trying to figure out an AP from TP-LINK TL-WN725N
February 02, 2018 10:50PM
So, I couldn't connect with the putty so I tried it with my pocketchip, and it worked. But I wanted a bigger screen so I just connected it to my tv screen.
I'll write all the data that is written.

sudo cat /boot/wifi_card.conf
wlan0

sudo cat /opt/piratebox/conf/hostapd.conf
interface=wlan0
driver=rtl871xdrv
ssid=PirateBox - Share Freely

channel=1
#auth_algs=1

# Remove # to enable n wifi mode
ieee80211n=1
wmm_enabled=1
#ht_capab=[HT40+][SHORT-G1-40][DSSS_CCK-40]
hw_mode=g

#put a # in front of the following line to allow
# direct client 2 client communication
ap_isolate=1

# Uncomment the following lines to enable WPA
wpa=2
wpa_key_mgmt=WPA_PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_passphrase=

sudo cat /boot/wpa_supplicant.conf
# In case no supported AP enabled WiFi USB could be found, the PirateBox
# will try to connect to the following network.

network={
ssid="ESSID to connect to"
psk="your password in clear text"
}

sudo /opt/piratebox/rpi/bin/wifi_detect.sh
Found wifi card config
cat: /sys/class/net/wlan0/phy80211/index: No such file or directory
command failed: No such file or directory (-2)
Could not find an AP enabled WiFi card...
Found wifi card config
Found wpa_supplicant conf, trying to connect...
Successfully initialized wpa_supplicant
rfkill: Cannot get wiphy information
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODETEXT]: Invalid argument
ioctl[SIOCSIWENCODETEXT]: Invalid argument
wlan0: waiting for carrier
timed out
dhcpcd exited

sudo iw phy | grep -e phy -e AP
Wiphy phy0
* AP
* #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,

pacman -Ss hostap
extra/python2-wpactrl 20090609-5
A Python extension for wpa_supplicant/hostapd control interface access
community/hostapd 2.6-3 [installed]
IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/RADIUS Authenticator
Re: Trying to figure out an AP from TP-LINK TL-WN725N
February 02, 2018 11:14PM
PS. I tried to change the wlan0 to wlan1 from /boot/wifi_card.conf file, but hadn't any luck either.
Then for some reason I tried to sudo the wifi detection, this came out:
Found wifi card config
Found nl80211 device capable of AP mode...
warning: downgrading package hostapd (2.6-3 => 2.5-1)
Now, I noticed that the driver was the default written thing, so I changed it back again and rebooted it, now it says right after reboot:
smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
So, I checked if the wifi was up and running, and no luck. It isn't blinking the greenlight either, as it has before.



Edited 2 time(s). Last edit at 02/02/2018 11:28PM by housix.
Re: Trying to figure out an AP from TP-LINK TL-WN725N
February 02, 2018 11:51PM
I'm so impatient..



Edited 2 time(s). Last edit at 02/03/2018 12:09AM by housix.
Re: Trying to figure out an AP from TP-LINK TL-WN725N
February 03, 2018 06:45PM
in general: it seems our wifi detect scripts needs some improvements.

About you particular case:

Is your onboard wifi of the RPi3 still active? If so, then wlan0 is you onboard.

Can you post the output of

iwconfig
?

Which version is the adapter? is it a v1 or v2 ?

I fear it is not easy going to get it working...

best regards Matthias
Re: Trying to figure out an AP from TP-LINK TL-WN725N
February 05, 2018 05:02AM
#Okay so, wlan1 outputs:
IEEE 802.11 ESSIDyawning smileyff/any
Mode:Managed Access Point: Not-Associated
Retry short limit:7 RTS thryawning smileyff Fragment thryawning smileyff
Power management: on

eth0 no wireless extensions.

lo no wireless extensions.

#whilst wlan0 is like this:
wlan0 unassociated Nickname:"<WIFI@REALTEK>"
Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retryyawning smileyff RTS thryawning smileyff Fragment thryawning smileyff

Power Managementyawning smileyff
Link Quality:0 Signal Level:0 Noise Level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Re: Trying to figure out an AP from TP-LINK TL-WN725N
February 07, 2018 03:04PM
these yawning smileys are 0 I'd guess. And I'm using v2. Which said to have a "soft AP"