mirror of
https://github.com/open-sdr/openwifi.git
synced 2024-12-28 17:49:18 +00:00
20 lines
334 B
Bash
20 lines
334 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [ $# -ne 1 ]
|
||
|
then
|
||
|
echo "Please input NIC name as input parameter!"
|
||
|
exit
|
||
|
fi
|
||
|
|
||
|
nic_name=$1
|
||
|
echo $nic_name
|
||
|
|
||
|
# sudo service network-manager stop
|
||
|
sudo ip link set $nic_name down
|
||
|
sudo iwconfig $nic_name mode managed
|
||
|
#sudo iwconfig $nic_name modulation 11g
|
||
|
sudo ip link set $nic_name up
|
||
|
ifconfig
|
||
|
iwconfig $nic_name
|
||
|
|