wifi开发相关

network
wireless
在内核中选中mac80211和cfg80211,在wireless lan中选中相应的wifi模块,将XXX.bin固件复制到/lib/firmware/

查看固件存放位置可以看
# cat /proc/sys/kernel/hotplug
/sbin/stbhotplug
vi /sbin/stbhotplug
找到
HOTPLUG_FW_DIR=/lib/firmware
路径,及为固件搜索目录

 

WIFI实例
扫描相关信号
iwlist wlan0 scanning
例如发现testAp,wep:123456
iwconfig wlan0 essid "testAp" key 123456
testAp,wep:passwd
如果wep密码为ASCII,则加上s:前缀,例如:
iwconfig wlan0 essid testAp key s:passwd
iwconfig wlan0 essid testAp open key s:passwd
连接成功后动态获取IP,则用
udhcpc wlan0
同样,连接好后也可以设置静态IP地址:
ifconfig wlan0 192.168.1.8 netmask 255.255.255.0

 

# iwlist wlan0 channel
wlan0     14 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 14 : 2.484 GHz

# iwlist wlan0 scanning
wlan0     Scan completed :
          Cell 01 - Address: 00:0F:11:79:0E:62
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=43/70  Signal level=-67 dBm 
                    Encryption key:on
                    ESSID:"SoftAP-28"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
                              18 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=00000005c34cf049
                    Extra: Last beacon: 1369ms ago
                    IE: Unknown: 0009536F667441502D3238
                    IE: Unknown: 010882848B961224486C
                    IE: Unknown: 030101
                    IE: Unknown: 2A0104
                    IE: Unknown: 32040C183060
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD180050F2020101000003A4000027A400004243600062323000
                    IE: Unknown: DD07000C4307000000
                    IE: Unknown: 2D1A6E0102FF000000000000000000000000000000000E0000000000
                    IE: Unknown: 3D1601050500000000000000000000000000000000000000
                    IE: Unknown: 3E0100
                    IE: Unknown: DD1E00904C336E0102FF000000000000000000000000000000000E0000000000
                    IE: Unknown: DD1A00904C3401050500000000000000000000000000000000000000
          Cell 02 - Address: 14:E6:E4:32:01:AC
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=45/70  Signal level=-65 dBm 
                    Encryption key:off
                    ESSID:"TP-LINK_3201AC"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=00000000353efd43
                    Extra: Last beacon: 962ms ago
                    IE: Unknown: 000E54502D4C494E4B5F333230314143
                    IE: Unknown: 010882848B960C121824
                    IE: Unknown: 030106
                    IE: Unknown: 0706555320010D14
                    IE: Unknown: 2A0100
                    IE: Unknown: 32043048606C
                    IE: Unknown: 2D1A6E1003FF00000000000000000000000000000000000000000000
                    IE: Unknown: 331A6E1003FF00000000000000000000000000000000000000000000
                    IE: Unknown: 3D1606051100000000000000000000000000000000000000
                    IE: Unknown: 341606051100000000000000000000000000000000000000
                    IE: Unknown: DD180050F2020101030003A4000027A4000042435E0062322F00
                    IE: Unknown: DD0900037F01010000FF7F
                    IE: Unknown: DD800050F204104A0001101044000101103B000103104700100000000000001000000014E6E43201AC1021000754502D4C494E4B10230009544C2D57523734304E10240003312E3010420003312E301054000800060050F204000110110018576972656C657373204E20526F757465722057523734304E100800020086103C000101

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值