Skip to content

Commit

Permalink
Add wifi cards autodetect
Browse files Browse the repository at this point in the history
  • Loading branch information
svpcom committed Jan 1, 2025
1 parent 87ea87d commit 4610a71
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ _trial_temp/
wfb_rx
wfb_tx
wfb_tx_cmd
wfb_tun
gs.key
drone.key
wfb_keygen
Expand Down
5 changes: 4 additions & 1 deletion scripts/default/wifibroadcast
Original file line number Diff line number Diff line change
@@ -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 changes: 11 additions & 0 deletions scripts/wfb-nics
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def _long_description():
'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/[email protected]',
'scripts/wfb-cluster.service',
Expand Down

0 comments on commit 4610a71

Please sign in to comment.