MTK-OpenWrt-3.10.14-SDK

OpenWrt MediaTek AP Router

Security settings

MediaTek Confidential ? 2014 - 2015 MediaTek Inc. This document contains information that is proprietary to MediaTek Inc.

Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.Page 17 of 34

OpenWrt MediaTek AP Router

MediaTek Confidential ? 2014 - 2015 MediaTek Inc. This document contains information that is proprietary to MediaTek Inc.

Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.Page 18 of 34

OpenWrt MediaTek AP Router 1

1.1

Wireless configuration via UCI

Basic idea

There are already 2 ways to configure MTK wireless drivers.

1) Using iwpriv command. (eg: iwpriv ra0 set SSID=myrouter)

2) Edit the profile of the driver. (located at /etc/Wireless/chipname/chipname.dat)

rd

Here we introduce the 3 way, which is for the convenience of LuCI development. To use this feature, you should enable uci2dat first. You can find this application at: Menuconfig -> Ralink Properties -> Applications -> uci2dat

Then you can configure MTK wireless drivers via uci commands, like this:

uci set wireless.chipname.option1=value1 uci set wireless.chipname.option2=value2 ……

uci commit wifi down wifi up

1.2 Examples

In your script, you should replace “chipname” with the right name of your wireless chip, (like mt7620, mt7612, mt7602, mt7610 etc).

1.2.1

SSID

This is a little tricky, read the example carefully. uci set wireless.@wifi-iface[n].ssid=newssid

N is the index of the interface you want to change. You can check the interface index by : uci show wireless

You may see something like this:

MediaTek Confidential ? 2014 - 2015 MediaTek Inc. Page 19 of 34

This document contains information that is proprietary to MediaTek Inc.

Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.

OpenWrt MediaTek AP Router [root@OpenWrt]uci show wireless wireless.mt7612=wifi-device wireless.mt7612.type=mt7612 wireless.mt7612.vendor=ralink wireless.mt7612.channel=0 wireless.mt7612.autoch=2 wireless.@wifi-iface[0]=wifi-iface wireless.@wifi-iface[0].device=mt7612 wireless.@wifi-iface[0].ifname=rai0 wireless.@wifi-iface[0].network=lan wireless.@wifi-iface[0].mode=ap wireless.@wifi-iface[0].ssid=OpenWrt-mt7612 wireless.@wifi-iface[0].encryption=psk2 wireless.@wifi-iface[0].key=12345678 wireless.mt7620=wifi-device wireless.mt7620.type=mt7620 wireless.mt7620.vendor=ralink wireless.mt7620.channel=0 wireless.mt7620.autoch=2 wireless.@wifi-iface[1]=wifi-iface wireless.@wifi-iface[1].device=mt7620 wireless.@wifi-iface[1].ifname=ra0 wireless.@wifi-iface[1].network=lan wireless.@wifi-iface[1].mode=ap wireless.@wifi-iface[1].ssid=OpenWrt-mt7620 wireless.@wifi-iface[1].encryption=psk2 wireless.@wifi-iface[1].key=12345678 Then you have 2 WiFi interfaces, one has SSID “OpenWrt-mt7620” and the other has SSID “OpenWrt-mt7612”. If you want to change “OpenWrt-mt7620” to “MyNew7620”, you should call:

uci set wireless.@wifi-iface[1].ssid=MyNew7620 # “1” is the index of “OpenWrt-mt7620”

1.2.2

Encryption

Read the example in “SSID” section first, then you can: uci set wireless.@wifi-iface[n].encryption=x x could be: x psk-mixed psk2 psk wpa-mixed wpa2 encryption WPAPSKWPA2PSK WPA2PSK WPAPSK WPAWPA2 WPA2 ? 2014 - 2015 MediaTek Inc.

Page 20 of 34

MediaTek Confidential

This document contains information that is proprietary to MediaTek Inc.

Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4