#Software AP in Linux

106 messages · Page 1 of 1 (latest)

buoyant sinew
#

Hey, i was wondering how can windows easily create AP with my usb wifi dongle using ethernet, "iw list" shows no AP support.
Is it possible to replicate the same in arch or linux in general?

#

iw list

Wiphy phy0
...
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP-128 (00-0f-ac:4)
                * CCMP-256 (00-0f-ac:10)
                * GCMP-128 (00-0f-ac:8)
                * GCMP-256 (00-0f-ac:9)
                * CMAC (00-0f-ac:6)
                * CMAC-256 (00-0f-ac:13)
                * GMAC-128 (00-0f-ac:11)
                * GMAC-256 (00-0f-ac:12)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * managed
                 * monitor
proud stream
#

does it work if you create it on windows

#

because windows did create an ap on my main laptop, but it never worked because my wifi card does not know how to ap

buoyant sinew
hardy laurel
#

hotspot wifi

buoyant sinew
hardy laurel
#

all you need is a wireless network controller

buoyant sinew
#

i see

hardy laurel
buoyant sinew
# hardy laurel actually idk, just try and see how it goes

UUID=$(grep uuid /etc/NetworkManager/system-connections/Hotspot | cut -d= -f2)
nmcli con up uuid $UUID

i dont understand how this command gets the UUID, the file doesn't exist for me. Following the stackoverflow post the answer post created it

#

of what the UUID is exactly?

hardy laurel
#

what desktop are you using?

#

jus try it in desktop's netowrk settings before you try the CLI method

buoyant sinew
#

I have tried with hostapd in the past and the create_ap script

hardy laurel
buoyant sinew
#

┌──(oc㉿ArchOp)-[~]
└─$ sudo ls /etc/NetworkManager/system-connections/

┌──(oc㉿ArchOp)-[~]
└─$
hardy laurel
#

it's Hotspot.nmconnection

#

better just see it via nmcli connection show | grep Hotspot

buoyant sinew
#
cat: /etc/NetworkManager/system-connections/Hotspot.nmconnection: No such file or directory```
#
└─$ nmcli connection show | grep Hotspot

┌──(oc㉿ArchOp)-[~]
└─$
hardy laurel
#

did you name it hotspot or not

buoyant sinew
#

name what

hardy laurel
#

the connection

buoyant sinew
#

i may be missing something lemme read more

#

"I created a Hotspot with the GNOME Network-Manager. The problem was, that I can not configure the SSID and password in GUI. If you create the Hotspot with the Network-Manager GUI, it creates the file /etc/NetworkManager/system-connections/Hotspot. In that file it is possible to edit the SSID and the password."

ah i see

#

how do i create from CLI

#

im not usinmg GNOME

#

@hardy laurel

hardy laurel
#

your coming to the wrong conclusions

buoyant sinew
hardy laurel
#

run history | tail -n 15

buoyant sinew
#
 2019* sudo UUID=$(grep uuid /etc/NetworkManager/system-connections/Hotspot | cut -d= -f2)\nnmcli con up uuid $UUID\n
 2020* grep uuid /etc/NetworkManager/system-connections/Hotspot
 2021* sudo grep uuid /etc/NetworkManager/system-connections/Hotspot
 2023* sudo vim /etc/NetworkManager/system-connections/Hotspot
 2024* nmcli con up Hotspot ifname ArchOp
 2025* ip a
 2026* nmcli con up Hotspot ifname wlp0s20f0u2
 2029* sudo ls /etc/NetworkManager/system-connections/
 2030* cat /etc/NetworkManager/system-connections/Hotspot
 2031* cat ~/Documents/L.txt| xclip -selection clipboard
 2032* sudo cat /etc/NetworkManager/system-connections/Hotspot
 2033  sudo cat /etc/NetworkManager/system-connections/Hotspot.nmconnection
 2034  nmcli connection show | grep Hotspot
 2035  nmcli d

hardy laurel
#

okay let's go further in the history

buoyant sinew
#

networkmanager "hotspot" uses AP mode too, right?

#

so i don't see how that would be useful

#

to my understanding of how such hotspot works it must support AP, correct?

buoyant sinew
hardy laurel
#

oh rip

#

is the usb wireless dongle the only wireless interface you have?

buoyant sinew
#

creating the hotspot from NM gui seems to be the starting of the solution, that's why i asked how do i create it using CLI.

hardy laurel
buoyant sinew
buoyant sinew
hardy laurel
buoyant sinew
#
nmcli connection modify con-name 802-11-wireless.mode ap 802-11-wireless-security.key-mgmt wpa-psk ipv4.method shared 802-11-wireless-security.psk 'PASSWORD'
nmcli connection up con-name```

are you referring to this?
buoyant sinew
hardy laurel
#

ip link

buoyant sinew
#

wait

#

uh

#

iw list*

hardy laurel
#

ip link

buoyant sinew
#
    link/ether 62:a3:82:12:1d:a6 brd ff:ff:ff:ff:ff:ff permaddr 20:e7:16:00:8e:28```
#

is the wifi dongle one

hardy laurel
buoyant sinew
hardy laurel
#

you know what, give me all the nmcli connection show output

buoyant sinew
hardy laurel
buoyant sinew
hardy laurel
#

see the Type column?

buoyant sinew
#

yes but the wifi one is not listed there

#

althought it is listed in nmcli d what does that command show?

hardy laurel
#

i see, sorry, should've asked this from the start, whats the wi-fi dongle

#

could be a driver problem why it doesn't have AP

buoyant sinew
#

7601 Ralink Technology, Corp. MT7601U Wireless Adapter

hardy laurel
#

Network controller: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
damn, mediatek like mine

buoyant sinew
#

it uses mt7601u driver probably

#

im blind, don't mind me

hardy laurel
hardy laurel
#

see if there's an aur for it first before manually installing

buoyant sinew
buoyant sinew
#

using make

#
/home/oc/mt7601u-ap/include/os/rt_linux.h:55:10: fatal error: asm/unaligned.h: No such file or directory
   55 | #include <asm/unaligned.h>      /* for get_unaligned() */
      |          ^~~~~~~~~~~~~~~~~
#

uh

#

either way it seems to be broken from kernel 6.1

hardy laurel
buoyant sinew
hardy laurel
#

linux-headers

#

or linux-zen-headres, depends on your kernel

buoyant sinew
#

pretty sure i did install them

#

──(oc㉿ArchOp)-[~]
└─$ yay -Qi linux-headers
Name : linux-headers

#

yh i have them

#

or do i

#

that command shows package info only prob

#

nvm

hardy laurel
#

i see, then we'll need to modify the source code ourselves
try to edit the include/rt_linux.h file in the source code and delete asm/

hardy laurel
buoyant sinew
#

it wasn't listed in yay -Qt so i got confused, i do have it installed

hardy laurel
#

enter the file an modify parts of the code

buoyant sinew
#

you know what, scratch this i don't have this kinda time now

hardy laurel
#

an di'm sayign change ```
#include <asm/unaligned.h>

 to ```
#include <unaligned.h>
```or ```
#include <linux/unaligned.h>
buoyant sinew
#

thanks for your time