ivanovborislav / rtl8188eu

Realtek RTL8188EU v5.13.3 (2021-06-15) Wireless Lan Driver for Linux
GNU General Public License v2.0
123 stars 31 forks source link

i cant ap mode enable #16

Open Hzone-glitch opened 1 year ago

Hzone-glitch commented 1 year ago

hi there i use your wpa_supplicant.conf and the final command doesnt work ! () i change channel and ssid ; not work. Screenshot_2023-05-09_22_35_00 Screenshot_2023-05-09_23_04_24 Screenshot_2023-05-09_23_04_43

please help me. (WN722n v3) and then i use this config . but client dont connect to ap !

interface=wlan0 driver=nl80211 ssid=wpa3 hw_mode=g channel=7 macaddr_acl=0 ignore_broadcast_ssid=0

xiv3r commented 1 year ago

Try this

https://github.com/lakinduakash/linux-wifi-hotspot

On Wed, May 10, 2023, 3:09 AM @. @.> wrote:

hi there i use youre SoftAp config to hostapd and it doesnt work ! (WN722n v3) and then i use this config . but client dont connect to ap ! i change channel and ssid ; not work. please help me. (WN722n v3)

interface=wlan0 driver=nl80211 ssid=wpa3 hw_mode=g channel=7 macaddr_acl=0 ignore_broadcast_ssid=0 [image: Screenshot_2023-05-09_22_34_22] https://user-images.githubusercontent.com/52880633/237196361-05166e02-8c53-4280-b9fe-778d272dad1f.png [image: Screenshot_2023-05-09_22_35_00] https://user-images.githubusercontent.com/52880633/237196369-6b4a8c14-7396-4f32-81ca-ff0f36a22139.png

— Reply to this email directly, view it on GitHub https://github.com/ivanovborislav/rtl8188eu/issues/16, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4DIGRQUN7LZI5HMQTNG5X3XFKI67ANCNFSM6AAAAAAX3W67VI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ivanovborislav commented 1 year ago

Hi! Create bash script "ap-enable.sh":

#!/bin/bash

ip addr flush dev "$1"
ip addr add 192.168.100.1/24 dev "$1"

killall dnsmasq
dnsmasq --conf-file=/dev/null --interface="$1" --bind-interfaces --except-interface=lo --dhcp-range=192.168.100.100,192.168.100.149

sysctl -w net.ipv4.ip_forward=1
iptables -A FORWARD -i "$1" -o eth0 -j ACCEPT
iptables -A FORWARD -i  eth0 -o "$1" -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

killall hostapd
hostapd -i "$1" "$2"

chmod +x ap-enable.sh

Create conf file "hostapd.conf":

ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
driver=nl80211
ssid=WPA3 #change this or the network name will be "WPA3"
country_code=EN
channel=6
beacon_int=100
dtim_period=1
fragm_threshold=2346
rts_threshold=2347
hw_mode=g
ieee80211n=1
max_num_sta=16
wmm_enabled=1
ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40]
ignore_broadcast_ssid=0

auth_algs=1
wpa=2
wpa_key_mgmt=SAE
wpa_pairwise=CCMP
rsn_pairwise=CCMP
ieee80211w=2
sae_groups=19 20 21
sae_require_mfp=1
wpa_passphrase=1234567890 #change this or the password will be "1234567890"

Enable AP - run: sudo ./ap-enable wlan0 hostapd.conf

and "ap-disable.sh" script :

#!/bin/bash

killall hostapd

ip addr flush dev "$1"

killall dnsmasq

sysctl -w net.ipv4.ip_forward=0
iptables -D FORWARD -i "$1" -o eth0 -j ACCEPT
iptables -D FORWARD -i  eth0 -o "$1" -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

chmod +x ap-disable.sh

Disable AP - run: sudo ./ap-disable wlan0

Client config file "wpa_supplicant.conf":

update_config=1
ctrl_interface=/var/run/wpa_supplicant
country=EN
p2p_no_group_iface=1
sae_groups=19 20 21

network={
    ssid="WPA3"
    proto=RSN
    key_mgmt=SAE
    pairwise=CCMP
    group=CCMP
    ieee80211w=2
    psk="1234567890"
}
zenbooster commented 12 months ago

Work on 5.15.0-1038-raspi ! ))