1:iwlist eth1 scanning 查看无线路由

2:iwconfig eth1 essid "无线路由的名称"

3: ifconfig eth1 IP

4: route add default gw 网关

对于带密码的路由器,设置如下:

1:iwconfig eth1 key s:密码

2:iwconfig eth1 key open

3:ifconfig eth1 essid "名称"

4:ifconfig eth1 IP

5:route add default gw 网关

还在搞8634,看不到头了。。唉。wireless_tools的缺点是不支持WPA认证,所以有必要把wpa_supplicant也移植过来。无线网卡是基于zydas芯片的,正好可以在网上搜到wpa_supplicant的zydas专用包:wpa_supplicant-0.4.7_zydas_pre3.tar.gz

移植很简单,解包直接修改Makefile,把CC改成mipsel-linux-gcc,然后编译直接通过。编译完成后可以发现有几个可执行程序:wpa_supplicant,wpa_cli等。wpa_supplicant是核心程序,它和wpa_cli的关系就是服务和客户端的关系:后台运行wpa_supplicant,可以使用wpa_cli来搜索、设置、和连接网络等,大部分情况下编辑好配置文件,运行wpa_supplicant就可以连通网络了,创建一个wpa_supplicant.conf,键入以下内容:

#可有可无,没有的话无法用wpa_cli terminate来关闭wpa_supplicant

ctrl_interface=/var/run/wpa_supplicant

# 确保只有root用户能读取WPA的配置,可有可无,尤其是在嵌入式设备上

ctrl_interface_group=0

# 使用wpa_supplicant来扫描和选择AP,也可以设置成0或2,但只有1才能正确工作

ap_scan=1

network={

#AP的名字

ssid="my_network"

#AP的key

psk="my_key"

}

配置文件弄好后就可以运行wpa_supplicant了。在那之前当然要先插好无线网卡,载入驱动:bash# insmod zd1211b.ko

bash# ifconfig eth1 up

bash# wpa_supplicant -B -ieth1 -Dzydas -c/etc/wpa_supplicant.conf

参数-B代表后台运行,-ieth1代表使用设备eth1,-Dzydas代表网卡芯片是zydas,-c指定配置文件。

接下来就可以看下网络是否连通了:bash# iwconfig

bash# udhcpc -i eth1 -nzd1211b的驱动使用wpa_supplicant来配置的时候会有隔段时间就锁死系统一会的情况,很奇怪。

1. 此无线网络不设置安全机制,换句话说,么有设置密码,OK,我们该怎么做呢?命令行伺候

# iwlist scanning            # 搜索无线网络,我们假设搜索到了 oceanboo-wireless

# iwconfig interface essid oceanboo-wireless

# dhcpcd interface

够简单了吧,这样,你的机器就连接上 oceanboo-wireless 这个无线网络了,dhcp 获得了 ip 地址。不过不给无线路由器设置密码是很愚蠢的做法,假如你不是开咖啡厅、快餐店,还是设置一个密码吧。

2. 此无线网络设置了安全机制,使用 WEP 加密认证。

# iwlist scanning           # 还是一样的搜索,记住这个命令。

# iwconfig  interface essid oceanboo-wireless key XXXX-XXXX-XXXX-XXXX or XXXXXXXX.   # XXX多了点,不过如果你设置过无线路由,你一定知道这是啥玩意,我就不多说了。

# dhcpcd interface

哈,还是一样的简单。

关于 WEP 认证加密的输入还有下列这些方式,按需要索取吧。

引用

# iwconfig interface key 0123-4567-89

# iwconfig interface key [3] 0123-4567-89

# iwconfig interface key s:password [2]

# iwconfig interface key [2]

# iwconfig interface key open

# iwconfig interface key off

# iwconfig interface key restricted [3] 0123456789

# iwconfig interface key 01-23 key 45-67 [4] key [4]

AP基本命令

iwconfig配置接口

wlanconfig创建或销毁VAP

iwpriv设置属性

iwlist搜索无线热点

brctl网桥操作

笔记本的无线网卡搞了好久都没弄好,最后还是madwifi好使   O(∩_∩)O哈哈~

给大家分享下

madwifi配置wep atheros无线网卡

从madwifi.org获取包后

tar -xzvf madwifi-0.9.4.tar.gz        #最新的0.9.4包编译老是报错,就换0.9.3的包了……

cd madwifi-0.9.4

make

make install

modprobe ath_pci            #无线模块支持

modprobe wlan_scan_sta      #无线扫描支持

wlanconfig ath0 destroy     #取消所有ath0配置,可能多此一举

wlanconfig ath0 create wlandev wifi0 wlanmode sta

iwconfig ath0 key xxxx      #wep password,如果用ascii则s:xxxxx

iwconfig ath0 essid "xxxx"  #广播域

ifconfig ath0 up

dhclient ath0               #or route add xxxxx

如果加密方式为wpa则需要用wpa_supplicant来配置,需要写配置文件。继续研究

wlanconfig(8) - Linux man page

Name

wlanconfig - Create, destroy and manipulate madwifi VAPs

Synopsis

wlanconfig create wlandev wlanmode

wlanconfig destroy

wlanconfig list

Description The current MadWifi driver supports multiple APs and concurrent AP/Station mode operation onthe same device. The devices are restricted to using the same underlying hardware, thus are limited to coexisting on the same channel and using the samephysical layer features. Each instance of an AP or station is called a Virtual AP (or VAP). Each VAP can be in either AP mode, Station Mode, "special" stationmode, and Monitor mode. Every VAP has an associated underlying base device which is created when the driver is loaded.

Arguments

create [nounit] wlandev wlanmode [bssid|-bssid] [nosbeacon]

Create the interface using the specified and . can either be a full interface name (e.g. 'ath0'),or just the suffix (e.g. 'ath'), in which case, the kernel will automatically append the next vacant integer. [nounit] will turn off the automatic integerincrements.

destroy

Removes the given VAP interface. You must specify the full interface name. I.e 'ath0' rather than just 'ath'.

list

Show information about connected peers, keys, channels etc.

Available Modes

ahdemo

Create the station in ad-hoc demo (aka pseudo IBSS) mode.

adhoc

Create the station in ad-hoc mode.

ap

Create the VAP in AP mode.

monitor

Create the station in monitor mode.

sta

Create the VAP in station mode.

wds

Create the station in WDS mode.

Options

bssid

Create the VAP using a different MAC address from the underlying device.

-bssid

Create the VAP using the MAC address of the underlying device.

nosbeacon

When both station VAPS and AP VAPs coexist, the station should be created with the nosbeacon flag set in order to disable the use of hardware beacon timesfor the station.

List Items

sta or no parameters.

Show information on associated stations.

scan or ap

List all visible stations.

chan or freq

List all channels and frequencies.

active

List all available channels and frequencies.

keys

List all of the keys associated with the VAP

caps

List the capabilities of the given VAP.

wme

List WME (Wireless multimedia extensions, aka WMM) parameters.

Examples

wlanconfig ath create wlandev wifi0 wlanmode sta

Create a station mode VAP, using wifi0 as the underlying device. The interface wil be called athN, where N is the first free integer. The MAC address willbe the same as the underlying device.

wlanconfig ath0 create wlandev wifi0 wlanmode sta

Create a station mode VAP (ath0) using wifi0 as the underlying device. The MAC address will be the same as the underlying device.

wlanconfig ath0 create wlandev wifi0 wlanmode ap

wlanconfig ath1 create wlandev wifi0 wlanmode sta nosbeacon

Create both an AP and a station mode interface.

wlanconfig ath0 destroy

Destroy VAP ath0.

wlanconfig ath0 list scan

Scan for local stations and access points.

wlanconfig ath0 create wlandev wifi0 wlanmode ap

wlanconfig ath1 create wlandev wifi0 wlanmode wds

iwconfig ath0 essid "Normal atheros AP" channel 1

iwpriv ath1 wds_add

iwpriv ath1 wds 1

ifconfig ath1 up

ifconfig ath0 up

brctl addbr br0

brctl addif br0 ath1

brctl addif br0 ath0

ifconfig br0 up

Create a WDS bridge. See

http://madwifi.org/ for moreinformation.

Author This manual page was written by Matt Foster <

mattfoster@clara.co.uk>, using information fromthe Atheros user documentation, and MadWiFi users mailing list.

from:http://blog.csdn.net/zxy_cs/article/details/7025862

linux wifi配置命令,wifi配置常用命令总结相关推荐

  1. Linux学习笔记(二)|常用命令

    Linux学习笔记(二)常用命令 1.文件处理命令 1.1命令格式与目录处理 -ls 功能描述:显示目录文件 原意:list 所在路径:/bin/ls 语法: ls-a 显示所有文件,包括隐藏文件 l ...

  2. debian linux下载路径,Debian 常用命令,debian常用命令

    Debian 常用命令,debian常用命令 换源用中科大的比较快deb http://mirrors.ustc.edu.cn/debian jessie main contrib non-freed ...

  3. Linux 基础操作、常用shell命令、vi常用命令、man帮助手册

    Linux 基础操作.常用shell命令.vi常用命令.man帮助手册 一.简述 记录简单的Linux 基础操作.常用shell命令.vi编辑器常用命令.man帮助手册的使用. 二.Linux 基础操 ...

  4. linux系统中如何查看日志 (常用命令)

    linux系统中如何查看日志 (常用命令) cat  tail -f 日 志 文 件 说    明  /var/log/message 系统启动后的信息和错误日志,是Red Hat Linux中最常用 ...

  5. 你一定要知道的关于Linux文件目录操作的12个常用命令

    博客园 首页 新随笔 联系 管理 订阅 随笔- 26  文章- 1  评论- 18  你一定要知道的关于Linux文件目录操作的12个常用命令 转自:http://www.cnblogs.com/yo ...

  6. 抓取一台电脑linux,教程方法;用来获取Linux主机信息的5个常用命令电脑技巧-琪琪词资源网...

    琪琪词资源网-教程方法;用来获取Linux主机信息的5个常用命令电脑技巧,以下是给大家带来的教程方法;用来获取Linux主机信息的5个常用命令,大家可以了解一下哦! 有些时候Linux 系统管理员在接 ...

  7. Linux查看文件和日志的常用命令

    Linux查看文件和日志的常用命令 当项目部署和运行起来后,会产生很多的运行日志.日志的内容是程序里定义的重要输出信息,还有程序出错的报错信息. 查看日志文件大部分是去日志中获取一些数据,确认某些信息 ...

  8. 嵌入式Linux系统编程学习之二常用命令

    嵌入式Linux系统编程学习之二常用命令 文章目录 嵌入式Linux系统编程学习之二常用命令 前言 一.常用命令 1.su(用户切换) 2.useradd(添加用户) 3.passwd(修改密码) 4 ...

  9. 【Linux】vi和vim编辑器——常用命令大全

    文章目录 8.1.vi 和 vim 8.1.1 VI 8.1.2 VIM 8.2 打开和新建文件 8.2.1 打开文件并且定位行 8.3 VI三种工作模式 8.4 常用命令 8.4.1 移动 8.4. ...

  10. 基本的Dos命令以及Windows常用命令

    基本的Dos命令以及Windows常用命令 1.打开CMD的方式 开始+系统+命令提示符 win键+R 输入cmd打开控制台(推荐使用) 在任意的文件夹下面,按住shift键+鼠标右键右击,在此处打开 ...

最新文章

  1. 只讲关键点之兼容100+种关键点检测数据增强方法
  2. ignite学习笔记
  3. Scrapy学习-24-集成elasticsearch
  4. Java进阶07 嵌套类
  5. 制造业数字化转型的困难_智能制造如何助力企业转型升级?百家制造业企业共谋数字化转型路...
  6. 95-190-448-源码-window-Trigger-CountTrigger
  7. 用汇编的眼光看C++(之虚函数)
  8. 计算机开发运维测试优劣,铁路运维软件安全性测试方法的研究
  9. myeclipse(eclipse)IDE配置
  10. bm3d算法matlab,BM3D算法实现图像降噪.doc
  11. java8进制转换_Java进制转换方法大全_十进制,八进制,二进制,十六进制转换...
  12. 你离技术大牛就只差这10个优质公众号!
  13. 软件项目版本管理规范总结
  14. 6-系统管理员密码破解
  15. springboot自定义过滤器的方法
  16. 电池SOC仿真系列-Battery模块
  17. 关键词抓取规则,关键词标题SEO技巧
  18. lambda函数 python菜鸟教程-python
  19. 外贸里面 LC TT DP DA BG 是什么
  20. 那些吸引眼球的微信标题你会么?

热门文章

  1. cgb2108-day17
  2. react-intl中injectIntl/intlProvider方法的源码简析
  3. 基于KMeans算法的图像分割例子
  4. Nginx 配置FastDFS模块
  5. jQuery中淡入效果fadeTo
  6. 项目部署到云服务器后谷歌验证码图片无法显示的问题解决
  7. 优化器统计信息_高水位_柱状图等
  8. srm采购管理系统中的协同管理
  9. 基于vue 的h5微信分享
  10. java定义一个接口shape_java声明一个接口Shape2D用来实现二维几何形状类Circle和Rectangle。...