forked from Mirror/wfb-ng
Add wifi cards autodetect
This commit is contained in:
parent
87ea87dcae
commit
4610a7110a
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,6 +10,7 @@ _trial_temp/
|
||||
wfb_rx
|
||||
wfb_tx
|
||||
wfb_tx_cmd
|
||||
wfb_tun
|
||||
gs.key
|
||||
drone.key
|
||||
wfb_keygen
|
||||
|
@ -1,6 +1,9 @@
|
||||
#WFB_NICS="wlx00c0caa578a9"
|
||||
#WFB_NICS="wlan1 wlan2"
|
||||
|
||||
# For multi-link setup you can specify path to custom config
|
||||
# and/or list of cards in /etc/default/wifibroadcast.<profile_name>
|
||||
# WIFIBROADCAST_CFG=/etc/wifibroadcast_linkXXX.cfg
|
||||
WFB_NICS="wlan0"
|
||||
|
||||
# Autodetect local cards supported by wfb-ng (8812au and 8812eu)
|
||||
WFB_NICS="$(wfb-nics)"
|
||||
|
11
scripts/wfb-nics
Executable file
11
scripts/wfb-nics
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Autodetect 8812au and 8812eu cards
|
||||
|
||||
for i in $(find /sys/class/net/ -maxdepth 1 -type l | sort)
|
||||
do
|
||||
if udevadm info $i | grep -qE 'ID_NET_DRIVER=(rtl88xxau_wfb|rtl88x2eu)'
|
||||
then
|
||||
echo $(basename $i)
|
||||
fi
|
||||
done
|
3
setup.py
3
setup.py
@ -48,7 +48,8 @@ setup(
|
||||
'wfb-server=wfb_ng.server:main',
|
||||
'wfb-log-parser=wfb_ng.log_parser:main']},
|
||||
package_data={'wfb_ng.conf': ['master.cfg', 'site.cfg']},
|
||||
data_files = [('/usr/bin', ['wfb_tx', 'wfb_rx', 'wfb_keygen', 'wfb_tx_cmd', 'scripts/wfb-cli-x11']),
|
||||
data_files = [('/usr/bin', ['wfb_tx', 'wfb_rx', 'wfb_keygen', 'wfb_tx_cmd',
|
||||
'scripts/wfb-cli-x11', 'scripts/wfb-nics']),
|
||||
('/lib/systemd/system', ['scripts/wifibroadcast.service',
|
||||
'scripts/wifibroadcast@.service',
|
||||
'scripts/wfb-cluster.service',
|
||||
|
Loading…
Reference in New Issue
Block a user