2018-05-30
14:12:46
于深圳南山科技园
最近有个项目,客户需要通过手机app通过机器wifi热点连接,从而实现对机器的设置及视频的实时预览等各种功能。这两天一直在搞rtl8188eu的wifi热点,驱动服务都搭建好了,但是出现设置密码后无法连接,折腾了好几天也没找到原因及解决办法,
硬件平台:全志T3 + rtl8188euwifi模块(usb连接)
系统:linux kernel-3.10
ap启动脚本:ap-start.sh
hostapd版本:0.8x
DHCp版本:4.1.1-P1
ap-start.sh
ifconfig wlan0 192.168.1.24 netmask 255.255.255.0 sleep 1 hostapd /etc/hostapd.conf -B touch /var/lib/dhcp/dhcpd.leases dhcpd
/etc/hostapd.conf
##### hostapd configuration file ############################################## interface=wlan0 ctrl_interface=/var/run/hostapd ssid=carwifi channel=9 wpa=1 wpa_passphrase=88888888 # Device Name # User-friendly description of device; up to 32 octets encoded in UTF-8 device_name=RTL8192CU # Primary Device Type # Used format: <categ>-<OUI>-<subcateg> # categ = Category as an integer value # OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for # default WPS OUI # subcateg = OUI-specific Sub Category as an integer value # Examples: # 1-0050F204-1 (Computer / PC) # 1-0050F204-2 (Computer / Server) # 5-0050F204-1 (Storage / NAS) # 6-0050F204-1 (Network Infrastructure / AP) device_type=6-0050F204-1 ##### default configuration ####################################### driver=rtl871xdrv beacon_int=100 hw_mode=g ieee80211n=1 wme_enabled=1 wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP rsn_pairwise=TKIP CCMP max_num_sta=8 wpa_group_rekey=86400
/etc/dhcpd.conf
# # Sample configuration file # default-lease-time 600; max-lease-time 7200; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. #authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.8 192.168.1.128; }
开机启动log如下
[ 5.600133] insmod_host_driver [ 5.600133] [ 5.606765] [ehci0-controller]: sunxi_usb_enable_ehci [ 5.609585] RTL871X: module init start [ 5.609593] RTL871X: rtl8188eu driver version = v4.2.5_9909.20131204_beta [ 5.609597] RTL871X: build time: May 21 2018 17:49:00 [ 5.630092] [sunxi-ehci0]: probe, pdev->name: 1c14000.ehci0-controller, sunxi_ehci: 0xc0a7a474, 0x:f1c14000, irq_no:47 [ 5.642162] sunxi-ehci 1c14000.ehci0-controller: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver [ 5.652338] sunxi-ehci 1c14000.ehci0-controller: new USB bus registered, assigned bus number 1 [ 5.662652] sunxi-ehci 1c14000.ehci0-controller: irq 71, io mem 0xce0e21c0 [ 5.690130] sunxi-ehci 1c14000.ehci0-controller: USB 0.0 started, EHCI 1.00 [ 5.697960] ehci_irq: highspeed device connect [ 5.697961] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 5.697969] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 5.697976] usb usb1: Product: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver [ 5.697981] usb usb1: Manufacturer: Linux 3.10.65 ehci_hcd [ 5.697987] usb usb1: SerialNumber: sunxi-ehci [ 5.739687] usbcore: registered new interface driver rtl8188eu [ 5.740200] hub 1-0: