首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

ARM上的linux如何实现无线网卡的冷插拔和热插拔(7)

ARM上的linux如何实现无线网卡的冷插拔和热插拔(7)

在hotplug.log文件中记录了热插拔过程中传过来的一下变量,红色所示。
~ >: cat /tmp/hotplug.log
export ACTION='add'
export DEVPATH='/devices/platform/s3c2410-ohci/usb1/1-1/1-1.1/1-1.1:1.0/net/wlan0'
export DEVTYPE='wlan'
export EDITOR='/bin/vi'
export HISTFILESIZE='500'
export HISTSIZE='500'
export HOME='/'
export HOSTNAME='fulinux'
export IFINDEX='4'
export INPUTRC='/etc/inputrc'
export INTERFACE='wlan0'
export LD_LIBRARY_PATH='/lib:/usr/lib:/apps/lib'
export LOGNAME='root'
export MDEV='wlan0'
export PAGER='/bin/more '
export PATH='/bin:/sbin:/usr/bin:/usr/sbin:/apps/tools'
export PS1='\w >: '
export PWD='/dev'
export SEQNUM='493'
export SUBSYSTEM='net'
export USER='root'
export network_cfg_dir='/apps/etc/network'
~ >:

如果是在命令行中使用export命令,结果如下:
~ >: export
export EDITOR='/bin/vi'
export HISTFILESIZE='500'
export HISTSIZE='500'
export HOME='/'
export HOSTNAME='fulinux'
export INPUTRC='/etc/inputrc'
export LD_LIBRARY_PATH='/lib:/usr/lib:/apps/lib'
export LOGNAME='root'
export PAGER='/bin/more '
export PATH='/bin:/sbin:/usr/bin:/usr/sbin:/apps/tools'
export PS1='\w >: '
export PWD='/'
export SHELL='/bin/sh'
export TERM='vt100'
export USER='root'
export network_cfg_dir='/apps/etc/network'
~ >:
最后运行的结果:
~ >: ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:0C:43:30:72:81  
          inet addr:192.168.1.166  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:136 errors:0 dropped:15 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:14849 (14.5 KiB)  TX bytes:548 (548.0 B)

~ >: iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID:"Router_LingYun"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: D8:5D:4C:18:04:7A   
          Bit Rate=1 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thrff   Fragment thrff
          Encryption keyff
          Power Managementn
          Link Quality=49/70  Signal level=-61 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:4   Missed beacon:0

~ >: ping www.baidu.com
PING www.baidu.com (115.239.210.26): 56 data bytes
64 bytes from 115.239.210.26: seq=0 ttl=55 time=58.396 ms
64 bytes from 115.239.210.26: seq=1 ttl=55 time=95.457 ms
64 bytes from 115.239.210.26: seq=2 ttl=55 time=97.314 ms
64 bytes from 115.239.210.26: seq=3 ttl=55 time=99.431 ms
64 bytes from 115.239.210.26: seq=4 ttl=55 time=97.498 ms

--- www.baidu.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 58.396/89.619/99.431 ms
~ >:
表明wlan0已成功运行。
继承事业,薪火相传
返回列表