openwrt STA+AP共存模式

改用MT7688板子,跟RT5350区别还是很大!尤其是在无线wifi方面。

2ap+sta共存模式,修改如下配置文件vi /etc/config/wireless

[root@2c56de0481b6 openwrt_widora]# cat package/base-files/files/etc/config/wireless //这个是制作rootfs

config wifi-device      radio0

        option type     ralink

        option variant  mt7628

        option country  TW

        option hwmode   11g

        option htmode   HT40

        option channel  auto

        option disabled 0

 

config wifi-iface ap //AP配置项

        option device   radio0

        option mode     ap

        option network  lan

        option ifname   ra0

        option ssid     Widora

        option encryption none

 

config wifi-iface sta //STA配置项

        option device   radio0

        option mode     sta

        option network  wan

        option ifname   apcli0

        option led      mediatek:orange:wifi

        option ssid     Netcore //要连接的ssid

        option key      55556666 //要连接的password

        option encryption psk2 //加密方式,wpa2

        option disabled 1

[root@2c56de0481b6 openwrt_widora]#

要在rc.local中启动一个脚本:

 cat package/base-files/files/etc/rc.local       

# Put your custom commands here that should be executed once

# the system init finished. By default this file does nothing.

echo Congradulations!!! Openwrt Welcome you!

#sleep 8

#sh /etc/checkwifi.sh

#remark, ssid passwd

connect2ap Netcore 55556666 //启动连接上级router。如果不成功,则只有AP可用。

sleep 5

FMServer & //流媒体server

exit 0


你可能感兴趣的:(物联网)