ARM-LINUX WIFI热点

    本文地址:http://tongxinmao.com/Article/Detail/id/451

    1、发出热点 参考https://www.jianshu.com/p/4b00237a4140

    killall wpa_supplicant > /dev/null 2>&1


    ifconfig wlan0 up

    ifconfig wlan0 192.168.0.1

    udhcpd /etc/udhcpd.conf # 启动DHCP,必须先设置无线网卡地址,不然启动udhcp会失败

    hostapd /etc/hostapd.conf -B


    进阶

    桥接eth方式建立热点

    brctl busybox需选中 


    NAT方式建立热点:


    sysctl net.ipv4.ip_forward=1

    echo 1 > /proc/sys/net/ipv4/ip_forward 

    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

    IPTALBES移植:

    https://blog.csdn.net/dreamintheworld/article/details/77193650



    HOSAPD多热点配置:

    http://wiki.stocksy.co.uk/wiki/Multiple_SSIDs_with_hostapd


    # vi /etc/hostapd/hostapd.conf
    
    # Change wlan0 to your wireless device
    interface=wlan0
    # Tell hostapd what your new MAC address is
    bssid=02:ab:cd:ef:12:30
    driver=nl80211
    ssid=my-secured-ssid
    channel=1
    wpa=1
    wpa_passphrase=thisismyreallylongwpapassphraseandiliketurtles
    wpa_key_mgmt=WPA-PSK
    rsn_pairwise=CCMP
    
    bss=wlan0_0
    ssid=ipooptoomuch
    
    bss=wlan0_1
    ssid=icanhearyouhavingsex
    
    bss=wlan0_2
    ssid=SurveillanceVan37
    wpa=1
    wpa_passphrase=crackthislongwpapassphraseifyoucanwhichidoubt
    wpa_key_mgmt=WPA-PSK
    rsn_pairwise=CCMP




    网卡同时工作在STA和AP模式(修改wifi驱动配置):

    https://blog.csdn.net/leumber/article/details/85337891 



    上一篇:C++ Builder 6.0 程序升级到 C++ Builder 2010 之后的版本,要修改些什么内容
    下一篇:蓝牙原理