arm wifi ap热点功能
一、hostapd.
1.hostapd编译:
在rtl8188wifi资料包中解压wpa_supplicant_hostapd-0.8_rtw_20120803.zip,并进入hostapd源码目录:
修改Makefile文件,添加
1)CC=arm-linux-gcc
2)CFLAGS = -MMD -O2 -Wall -g
保存退出,make。编译完毕生成hostapd,将其拷贝到开发板/sbin目录下。
2.配置文件:hostap.conf:
内容如下:
#wifi接口
interface=wlan0
#wifi热点名称
ssid=rocky
#通道
channel=1
#可以默认为g
hw_mode=g
wpa=1
#密码
wpa_passphrase=123456789
#加密方式
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
3.获得最佳频道的方法:
ifconfig wlan0 up
iwlist wlan0 scan
cat /proc/net/rtl819xD/wlan0/best_channel
4.开发板上设置wifi的地址为:192.168.1.1
5.开发板上启动wifi热点服务:
./hostapd hostap.conf -B
6.到此为止,wifi热点已经开启,其他设备可通过静态ip来连接这个热点。若要使用动态获取ip,则还需要开启udhcpd服务。
二、udhcpd:
1.无需再编译,由busybox中已编出。
2.TQ2440上无/var/lib/misc/udhcpd.leases这个文件,开启udhcpd服务的时候会提示错误。解决方法就是自己手动创建它。
3.启动udhcpd服务命令:
udhcpd -fS /etc/udhcpd.conf &
4.配置文件dhcpd.conf内容:
1)需要注意修改的地方
interface eth0 改为 interface wlan0
2) 注释掉:option 0x08 01020304 这一行。
3)其他参数根据实际情况去修改。
5.以下附上udhcpd.conf的内容及说明:
######################################################################################
# Sample udhcpd configuration file (/etc/udhcpd.conf)
# Values shown are defaults
# The start and end of the IP lease block
start 192.168.1.20
end 192.168.1.254
# The interface that udhcpd will use
interface wlan0
# The maximum number of leases (includes addresses reserved
# by OFFER's, DECLINE's, and ARP conflicts). Will be corrected
# if it's bigger than IP lease block, but it ok to make it
# smaller than lease block.
#max_leases 254
# The time period at which udhcpd will write out a dhcpd.leases
# file. If this is 0, udhcpd will never automatically write a
# lease file. Specified in seconds.
#auto_time 7200
# The amount of time that an IP will be reserved (leased to nobody)
# if a DHCP decline message is received (seconds)
#decline_time 3600
# The amount of time that an IP will be reserved
# if an ARP conflict occurs (seconds)
#conflict_time 3600
# How long an offered address is reserved (seconds)
#offer_time 60
# If client asks for lease below this value, it will be rounded up
# to this value (seconds)
#min_lease 60
# The location of the leases file
#lease_file /etc/udhcpd.leases
# The location of the pid file
#pidfile /var/run/udhcpd.pid
# Every time udhcpd writes a leases file, the below script will be called
#notify_file # default: no script
#notify_file dumpleases # useful for debugging
# The following are bootp specific options
# next server to use in bootstrap
#siaddr 192.168.1.22 # default: 0.0.0.0 (none)
# tftp server name
#sname zorak # default: none
# tftp file to download (e.g. kernel image)
#boot_file /var/nfs_root # default: none
# Static leases map
#static_lease 00:60:08:11:CE:4E 192.168.1.54
#static_lease 00:60:08:11:CE:3E 192.168.1.44
# The remainder of options are DHCP options and can be specified with the
# keyword 'opt' or 'option'. If an option can take multiple items, such
# as the dns option, they can be listed on the same line, or multiple
# lines.
# Examples:
opt dns 210.21.4.130 221.5.88.88
option subnet 255.255.255.0
opt router 192.168.1.2
opt wins 192.168.1.8
option dns 210.21.4.130 # appended to above DNS servers for a total of 3
option domain local
option lease 864000 # default: 10 days
# Arbitrary option in hex form:
#option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4"
# Currently supported options (for more info, see options.c):
#opt lease NUM
#opt subnet IP
#opt broadcast IP
#opt router IP_LIST
#opt ipttl NUM
#opt mtu NUM
#opt hostname STRING # client's hostname
#opt domain STRING # client's domain suffix
#opt search STRING_LIST # search domains
#opt nisdomain STRING
#opt timezone NUM # (localtime - UTC_time) in seconds. signed
#opt tftp STRING # tftp server name
#opt bootfile STRING # tftp file to download (e.g. kernel image)
#opt bootsize NUM # size of that file
#opt rootpath STRING # (NFS) path to mount as root fs
#opt wpad STRING
#opt serverid IP # default: server's IP
#opt message STRING # error message (udhcpd sends it on success too)
# Options specifying server(s)
#opt dns IP_LIST
#opt wins IP_LIST
#opt nissrv IP_LIST
#opt ntpsrv IP_LIST
#opt lprsrv IP_LIST
#opt swapsrv IP
# Obsolete options, no longer supported
#opt logsrv IP_LIST # 704/UDP log server (not syslog!)
#opt namesrv IP_LIST # IEN 116 name server, obsolete (August 1979!!!)
#opt cookiesrv IP_LIST # RFC 865 "quote of the day" server, rarely (never?) used
#opt timesrv IP_LIST # RFC 868 time server, rarely (never?) used
######################################################################################
arm wifi ap热点功能相关推荐
- 树莓派学习笔记——Wifi AP热点模式 使用RT5370
0.前言 本文详细说明为树莓派增加Wifi AP热点功能的具体步骤.配置完成之后,树莓派将增加一个Wifi热点功能,使用笔记本或手机便可连接树莓派,树莓派具有了AP热点功能,可更一步扩展树莓派相关的W ...
- 无线网卡实现AP 热点功能,共享Internet连接设置
1. 首先确定无线网卡是否支持AP热点功能 windows 命令提示符中输入 "netsh wlan show drivers". 命令输出中,有一行""支持的 ...
- Android 8.0 WiFi Ap 热点控制接口
1. Android 7.0 及其以前的 WiFi 热点接口 /*** Gets the Wi-Fi enabled state.** @return One of {@link #WIFI_AP_S ...
- 8266 的Python 固件 设置wifi AP 热点
8266 设置AP 的名称代码 找了好久才找打这个 出处 https://docs.singtown.com/micropython/zh/latest/openmvcam/library/netwo ...
- android 打开ap热点
在android上,实现打开ap热点功能,记录一下过程中遇到的问题: package com.test;import android.content.Context; import android.n ...
- 迅为-iMX6ULL开发板上配置AP热点
开发板连接好电源和调试串口,然后打开调试串口终端,然后给开发板上电,等待系统启动 完成,如图 99.6.1 所示: 然后把第五章制作好的 U 盘插入开发板的 USB 接口,可以看到串口打印出 USB ...
- [教程]北京迅为iMX6ULL开发板上配置 AP 热点
本文转自迅为iMX6ULL开发板使用手册第九十九章,使用的资料已经放到了开发板网盘资料中,路径为:11_Linux 系统开发进阶\99_章节使用资料. 关注公众号"迅为电子" , ...
- STM32F103+SDIO wifi Marvell8801/Marvell88w8801 介绍(九) ---- Marvell 8801/Marvell 88w8801 实现AP功能/实现热点功能
代码工程的GITHUB连接:点进进入GITHUB仓库 https://github.com/sj15712795029/stm32f1_marvell88w8801_marvell8801_wifi ...
- linux 360wifi ap热点,rk3288 ap6335 linux下的wifi 热点功能使用
使用3288硬件平台,尝试分别在ubuntu和linux系统中实现ap6335的wifi 热点功能,能够ok: 以下为一些记录. 1.ubuntu中的实现,参考这个帖子实现的: 如何启用 FIREFL ...
最新文章
- R语言生成仿真的3D高斯簇数据集、使用scale函数进行数据缩放、并使用KMeans进行聚类分析、数据反向缩放并比较聚类生成的中心和实际数据的中心的差异、预测新的数据所属的聚类簇
- GENTLE.NET(六)--空值处理
- [SDOI2009]HH去散步(矩阵)
- hnu 暑期实训之蛇形矩阵
- Serverless 的前世今生
- C++11 Intro - Thread Id
- 计算机视觉实战(四)图像形态学操作
- Spring Boot 如何使用 Redis 进行 API 防刷限流?
- JavaEE学习总结(十四)— 人工智能微博
- 单片机c语言 课程设计报告,单片机课程设计心得体会精选
- 大学精品课matlab,大学精品课件:Matlab绘图教程.ppt
- 多闭环PID控制算法
- UG NX 12抽取复合曲线
- java实现excel合并的单元格自动换行自动调高
- 2018云计算服务器数量,2018年全球及中国云计算行业市场规模及增速预测【图】...
- 2014年禁毒工作总结,2015年工作打算
- NameNode故障处理方法
- 国内CMS技术发展的外在表现形式
- 2020年11月28日
- USERKEY_PLAT_NOMATCH——高德地图经纬度转换API使用报错
热门文章
- App流量变现并不一定损害用户体验,这些方法你得了解
- 计算机二级web题型及分值,2016年全国计算机二级《Web程序设计》考试大纲
- 人工智能如何改善运输和物流
- 使用git控制word版本
- xamarin android 微信,转换微信SDK为Xamarin绑定库 Android5.5.8 iOS1.8.6.2
- linux乱码文件删不掉,linux删除乱码文件或文件夹
- VS2010中添加Flash控件
- 狂神SpringMvc笔记
- android listview 切换,Android ListView切换按钮
- java轻量级框架_轻量级的Java 开发框架 Spring