发帖 |
[经验] MY-8188EUS Linux-4.1.15 Host-AP User Guide运行开发环境介绍
2018-7-16 17:32:17  265 IMX6 Linux
收藏 0 收藏 推荐 0 推荐
分享
运行环境
使用的开发板1
  • 开发板型号:MY-IMX6-EK200-6Q
  • 内核版本:Linux-4.1.15
  • 文件系统:fsl-image-qt5-myimx6a9.tar.bz2
使用的开发板2
  • 开发板型号:MY-IMX6-EK140P-6G
  • 内核版本:Linux-4.1.15
  • 文件系统:fsl-image-linux-myimx6a7.tar.bz2
使用的模块型号
  • 模块型号:RTL8188EUS
其它可支持的设备
  • MY-IMX6-A9系列:MY-IMX6-EK200、MY-IMX6-EK314、MY-IMX6-EK336
  • MY-IMX6-A7系列:MY-IMX6-EK140P

Host-AP 功能准备
下载需要的文件在网盘 “MYZR-IMX6 > 5_MY-Demo” 中下载以下文件:
  • 驱动模块和内核
  my-demo-8188eus-l4115-<date>.tar.xz
  • Host-AP 程序
  my-hostapd-2.6-l4115-<date>.tar.bz2
  • 配置文件
  my_wlan0_hostap_conf_<date>.tar.xz把下载的文件复制到开发板上这个步骤自己采取U盘、SD卡或自己熟悉的其它方式完成。解压文件
  • 解压驱动模块和内核
# tar xf my-demo-8188eus-l4115-<date>.tar.xz -C ~
  • 解压 Host-AP 程序
# tar xf my-hostapd-2.6-l4115-<date>.tar.bz2 -C /
  • 解压配置文件
# tar xf my_wlan0_hostap_conf_<date>.tar.xz -C /为系统运行准备
  • MY-IMX6-EK200、EK314、EK336 上替换内核
# mount /dev/mmcblk3p1 /mnt/# cp ~/my-demo/zImage-myimx6a9-l4115-svn241 /mnt/zImage-myimx6a9
  • MY-IMX6-EK140P 上替换内核
# mount /dev/mmcblk1p1 /mnt/# cp ~/my-demo/zImage-myimx6a7-l4115-svn241 /mnt/zImage-myimx6a7
  • 为 DHCP 创建文件
# touch /var/lib/misc/udhcpd.leases
  • 写入存储并重启设备
# sync && reboot
MY-IMX6-EK200 Host-AP 使用步骤
加载 WIFI 模块的驱动# insmod ~/my-demo/MY_8188EUS_V4324_L4115_IMX6A9.koRTL871X: module init startRTL871X: rtl8188eu v4.3.24_16705.20160509bFWReady == _FALSE call reset 8051...RTL871X: hal_com_config_channel_plan chplan:0x08RTL871X: rtw_ndev_init(wlan0) if1 mac_addr=e0:b9:4d:7f:e4:40usbcore: registered new interface driver rtl8188euRTL871X: module init ret=0==> rtl8188e_iol_efuse_patchIPv6: ADDRCONF(NETDEV_UP): wlan0: link is not readyRTL871X: set bssid:00:00:00:00:00:00为 WLAN0 配置 IP 地址# ifconfig wlan0 192.168.12.1==> rtl8188e_iol_efuse_patchIPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready为 WLAN0 启用 DHCP 服务# udhcpd -f /etc/my_udhcpd.conf &[1] 773udhcpd (v1.24.1) started为 WLAN0 启用 Host-AP 功能# hostapd /etc/my_hostapd_nl80211.conf -BConfiguration file: /etc/my_hostapd_nl80211.confrfkill: Cannot open RFKILL control deviceUsing interface wlan0 with hwaddr e0:b9:4d:7f:e4:40 and ssid "MY_WLAN0_HOSTAP"random: Cannot read from /dev/random: Resource temporarily unavailablerandom: Only 0/20 bytes of strong random data available from /dev/randomrandom: Not enough entropy pool available for sRTL871X: assoc successecure operationsWPA: Not enoughIPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready entropy in random pool for securRTL871X: set group key camid:1, addr:00:00:00:00:00:00, kid:1, type:AESe operations - update keys later when the first station connectswlan0: interface state UNINITIALIZED->ENABLEDwlan0: AP-ENABLED客户端设备连接到 Host-AP至此,开发板的 Host-AP 功能已启用,客户端设备可连接至此 AP。
需要说明的是,客户端设备(如手机)在首次连接 AP 成功前时可能会失败 0~2 次。
  • SSID
  MY_WLAN0_HOSTAP
  • 密码
  myzr2012设备连接成功时产生的信息Sending OFFER of 192.168.12.20Sending OFFER of 192.168.12.20Sending ACK to 192.168.12.20设备断开连接时产生的信息RTL871X: OnDeAuth(wlan0) reason=3, ta=b4:0b:44:f5:64:2fRTL871X: clear key for addr:b4:0b:44:f5:64:2f, camid:4
MY-IMX6-EK140P Host-AP 使用步骤
加载 WIFI 模块的驱动# insmod ~/my-demo/MY_8188EUS_V4324_L4115_IMX6A7.koRTL871X: module init startRTL871X: rtl8188eu v4.3.24_16705.20160509bFWReady == _FALSE call reset 8051...RTL871X: hal_com_config_channel_plan chplan:0x20RTL871X: rtw_ndev_init(wlan0) if1 mac_addr=10:a4:be:0e:c2:32usbcore: registered new interface driver rtl8188euRTL871X: module init ret=0root@myimx6ek140p:~# ==> rtl8188e_iol_efuse_patchIPv6: ADDRCONF(NETDEV_UP): wlan0: link is not readyRTL871X: set bssid:00:00:00:00:00:00为 WLAN0 配置 IP 地址# ifconfig wlan0 192.168.12.1==> rtl8188e_iol_efuse_patchIPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready为 WLAN0 启用 DHCP 服务# udhcpd -f /etc/my_udhcpd.conf &[1] 613udhcpd (v1.24.1) started为 WLAN0 启用 Host-AP 功能# hostapd /etc/my_hostapd_nl80211.conf -BConfiguration file: /etc/my_hostapd_nl80211.confrfkill: Cannot open RFKILL control deviceUsing interface wlan0 with hwaddr 10:a4:be:0e:c2:32 and ssid "MY_WLAN0_HOSTAP"random: Cannot read from /dev/random: Resource temporarily unavailablerandom: Only 0/20 bytes of strong random data available from /dev/randomrandom: Not enough entropy pool available for secure operationsWPA: Not enough entropy in random pool for secure operations - update keys latRTL871X: assoc successer when the first station connectIPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes readysRTL871X: set group key camid:1, addr:00:00:00:00:00:00, kid:1, type:AESwlan0: interface state UNINITIALIZED->ENABLEDwlan0: AP-ENABLED客户端设备连接到 Host-AP至此,开发板的 Host-AP 功能已启用,客户端设备可连接至此 AP。
需要说明的是,客户端设备(如手机)在首次连接 AP 成功前时可能会失败 0~2 次。
  • SSID
  MY_WLAN0_HOSTAP
  • 密码
  myzr2012
设备连接成功时产生的信息Sending OFFER of 192.168.12.20Sending OFFER of 192.168.12.20Sending ACK to 192.168.12.20设备断开连接时产生的信息RTL871X: OnDeAuth(wlan0) reason=3, ta=b4:0b:44:f5:64:2fRTL871X: clear key for addr:b4:0b:44:f5:64:2f, camid:4
2018-7-16 17:32:17   评论
高级模式
您需要登录后才可以回帖 登录 | 注册

发表新帖
关闭

站长推荐 上一条 /9 下一条

快速回复 返回顶部 返回列表