⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sta.wlan

📁 VIA VT6655 x86下的Linux Source Code
💻 WLAN
字号:
#! /bin/sh
# VIA Networking Solomon-A/B/G Wireless LAN Card network setup script
#   
###################### Wireless Settings ######################################

# Assigned available device interface such as eth0 or eth1.

DEVICE=eth1

# wireless settings

DESIRED_SSID="TestAP"               # ["xxx"] Service Set ID for used(Max 32)
BSSTYPE=infra	                    # [adhoc|infra] adhoc or infrastructure mode
CHANNEL=11                          # [1..14] default startup channel
PSMODE=no                           # [yes|no] to enable power saving
AUTHTYPE=open                       # [open|share] authentication mode


# WEP function enable/disable

WEP_ENABLE=yes                        # [yes|no] to enable WEP 
WEP_DEFKEY=0                         # [0..3] Key Index for use


# WEP HEX key settings, only WEP_ENABLE=yes, key will take effect. 
# [no|"xx:xx:xx:xx:xx"]: no key or 40bit(10-hex)/104(26-hex)wep hex key

WEP_KEY0="11:22:33:44:55:66:77:88:99:aa:bb:cc:dd"       # 104 bit wep key
WEP_KEY1=no
WEP_KEY2=no
WEP_KEY3=no

###################### Settings End ###########################################
#
# Don't modify the following setup script ! 
# The following script use "Wireless Settings" to configure wirless network.
#
###################### Script Begin ###########################################


cnt=`/sbin/lsmod | grep -c viawget`
if [ "$cnt" = "0" ]; then
  echo "insmod 'viawget'"  
  /sbin/insmod viawget.o
fi

# Open device
#/sbin/ifconfig $DEVICE 192.168.100.60
/sbin/ifconfig $DEVICE up

if [ "$DESIRED_SSID" = "" ] ; then
  DESIRED_SSID="any"
fi

# Set your wep keys, if present

if [ "$WEP_ENABLE" = "yes" ] ; then
/sbin/wetctl $DEVICE privacy \
		$WEP_DEFKEY \
		key0 $WEP_KEY0 \
		key1 $WEP_KEY1 \
		key2 $WEP_KEY2 \
		key3 $WEP_KEY3
else 
/sbin/wetctl $DEVICE privacy off
fi	
		
# Scan for existing networks
echo "Scanning channels" 
/sbin/wetctl $DEVICE scan

# Join for existing networks
/sbin/wetctl $DEVICE join \
		$BSSTYPE \
	 	$DESIRED_SSID \
	 	$CHANNEL \
		$PSMODE \
		$AUTHTYPE
		
echo "Joining with " \
	 "Desired SSID=$DESIRED_SSID," \
	 "Network Type=$BSSTYPE" 	 


exit 0
###################### Script End #############################################

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -