#!/bin/sh . /www/cgi-bin/functions.sh . /www/cgi-bin/language.sh module=$(cat /module_name) version=$(cat /firmware_version) firmware_region=$(cat /tmp/region-setted) print_cgi_header print_http_header cat < EOF echo "DeviceID:$module;
" #echo "HardwareVersion:RD_88F5181L_VOIP_GE;
" echo "HardwareVersion:;
" echo -n "FirmwareVersion:" echo -n "$version" echo "$firmware_region;
" str="WLAN-Security:" security_mode=$($nvram get wl_sectype) if [ $security_mode -eq 2 ]; then str="$str""SecurityMode=WEP;" shared_key=$($nvram get wl_auth) if [ "$shared_key" = "0" ]; then str="$str""WEPAuthType=Open;" elif [ "$shared_key" = "1" ]; then str="$str""WEPAuthType=Shared;" else str="$str""WEPAuthType=Auto;" fi wep_encry=$($nvram get key_length) if [ "$wep_encry" = "5" ]; then str="$str""WEPStrength=64;" else str="$str""WEPStrength=128;" fi str="$str""WEPKey1=$(nvram get wl_key1);" str="$str""WEPKey2=$(nvram get wl_key2);" str="$str""WEPKey3=$(nvram get wl_key3);" str="$str""WEPKey4=$(nvram get wl_key4);" key_no=$($nvram get wl_key) str="$str""ActiveKeyIndex=$key_no;" elif [ $security_mode -eq 3 ]; then str="$str""SecurityMode=WPA-PSK;" wpa1_pwd=$($nvram get wl_wpa1_psk) str="$str""WPAPassPhrase=\"$wpa1_pwd\";" elif [ $security_mode -eq 4 ]; then str="$str""SecurityMode=WPA2-PSK;" wpa2_pwd=$($nvram get wl_wpa2_psk) str="$str""WPAPassPhrase=$wpa2_pwd;" elif [ $security_mode -eq 5 ]; then str="$str""SecurityMode=WPA-PSK-Mixed;" wpa1wpa2_pwd=$($nvram get wl_wpas_psk) str="$str""WPAPassPhrase=$wpa1wpa2_pwd;" else str="$str""SecurityMode=NONE;" fi echo "$str" cat < EOF print_http_footer