察看无限网络linux,linux 无线网络调试

1, 查看无线网卡的芯片型号

如果是usb网卡,   用lsusb(属于usbutils的命令), 查看无线网卡的型号:

#[root@localhost wireless]# lsusb

Bus 001 Device 002: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter

如果是内置网卡,或pci网卡:

#[root@localhost wireless]# lspci

04:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter

2, 网上找对应芯片的驱动

这个过程比较麻烦, 目前这2个芯片的驱动我有, 这里不能上传附件, 有需要可以网上找,

3, 编译驱动, 并安装

必须先安装内核模块编译工具, 主要有:

yum install make gcc

yum install kernel-devel

然后编译:

make;make install

最后安装:

depmode /lib/modules/xxxxxx(kernel-ver)/drvier/net/wirless/xxx.ko

modprobe xxx

4, 使用iw工具配置及登录

安装工具:

yum install wireless-tool

启动网卡:

#ifconfig wlan0 up

设置混杂模式:

#iwconfig wlan0 essid any

探测网络:

iwlist  wlan0 scanning

登录(WEP加密):

iwconfig wlan0 essid "DoMyNet_DC04" key s:123456

登录(WAP加密):

配置/etc/wpa_supplicant/wpa_supplicant.conf文件

[root@localhost wireless]# cat /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

network={

ssid="DoMyNet_DC04"

psk="123456"

priority=1

}

[root@localhost wireless]# wpa_supplicant -B -i ra0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Successfully initialized wpa_supplicant

rfkill: Cannot open RFKILL control device

ra0: Trying to associate with 14:3d:f2:68:dc:04 (SSID='DoMyNet_DC04' freq=2467 MHz)

ra0: Associated with 14:3d:f2:68:dc:04

ra0: WPA: Key negotiation completed with 14:3d:f2:68:dc:04 [PTK=CCMP GTK=TKIP]

ra0: CTRL-EVENT-CONNECTED - Connection to 14:3d:f2:68:dc:04 completed [id=0 id_str=]

这个后台进程会一直存在,

最后获取/设置IP地址

dhclient wlan0

ifconfig wlan0 x.x.x.x

机器重启自动连接wifi

网络配置静态IP/也可以动态IP

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-wlan0

TYPE=Ethernet

DEVICE=ra0

ONBOOT=yes

BOOTPROTO="static"

IPADDR=192.168.10.89

NETMASK=255.255.255.0

GETWAY=192.168.10.1

DNS1=192.168.10.1

#BOOTPROTO="dhcp"

配置wpa_supplicant.conf

[root@localhost ~]# cat /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

network={

ssid="DoMyNet_DC04"

psk="xxxxx"

priority=1

}

配置rc.local

[root@localhost ~]# cat /etc/rc.local

#!/bin/bash

# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES

#

# It is highly advisable to create own systemd services or udev rules

# to run scripts during boot instead of using this file.

#

# In contrast to previous versions due to parallel execution during boot

# this script will NOT be run after all other services.

#

# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure

# that this script will be executed during boot.

touch /var/lock/subsys/local

route del default

route add default gw 192.168.10.1

wpa_supplicant -B -i ra0 -c /etc/wpa_supplicant/wpa_supplicant.conf

改变rc.loca为可执行文件

#chmod +x /etc/rc.local

阅读(1420) | 评论(0) | 转发(0) |

a20_hummingbird_v4.5_v1.0_csi01_2ov7670_rtl8188eus 20150918 1830 JNI.7z 无法打开USB Wifi rtl8188eus.txt 配置前后ov7670双摄像头 JNI调用读写一次之后就会出现内核出错,系统死机。 有可能与系统为android4.4有关。 无法打开USB Wifi rtl8188eus shell@wing-k70:/ $ shell@wing-k70:/ $ shell@wing-k70:/ $ shell@wing-k70:/ $ logcat -c shell@wing-k70:/ $ logcat --------- beginning of /dev/log/system I/ActivityManager( 1670): Waited long enough for: ServiceRecord{41e90e08 u0 com.android.calendar/.alerts.InitAlarmsService} --------- beginning of /dev/log/main D/dalvikvm( 1849): GC_FOR_ALLOC freed 673K, 22% free 5143K/6512K, paused 41ms, total 47ms I/ActivityManager( 1670): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings} from pid 1849 D/PermissionCache( 1252): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (3161 us) D/BluetoothAdapter( 1931): 1103979928: getState() : mService = null. Returning STATE_OFF D/libEGL ( 1931): loaded /system/lib/egl/libEGL_mali.so D/libEGL ( 1931): loaded /system/lib/egl/libGLESv1_CM_mali.so D/libEGL ( 1931): loaded /system/lib/egl/libGLESv2_mali.so D/OpenGLRenderer( 1931): Enabling debug mode 0 D/BluetoothAdapter( 1931): 1103979928: getState() : mService = null. Returning STATE_OFF I/ActivityManager( 1670): Displayed com.android.settings/.Settings: +1s78ms D/WifiService( 1670): setWifiEnabled: true pid=1931, uid=1000 D/WifiHW ( 1670): Start to insmod 8188eu.ko [ 54.805792] ****wyb arch/arm/mach-sun7i/rf/wifi_pm.c:69/wifi_pm_power()! on=1 [ 54.813855] ****wyb arch/arm/mach-sun7i/rf/wifi_pm.c:73/wifi_pm_power()! [ 54.821376] ****wyb arch/arm/mach-sun7i/rf/wifi_pm_rtl8188eu.c:197/rtl8188eu_power()! mode=1 *updown=1 [ 54.831805] ****wyb arch/arm/mach-sun7i/rf/wifi_pm_rtl8188eu.c:95/rtl8188eu_gpio_ctrl()! name=rtk_rtl8188eu_wl_dis, level=1 [ 54.844290] ****wyb arch/arm/mach-sun7i/rf/wifi_pm_rtl8188eu.c:209/rtl8188eu_power()! usb wifi power state: on [ 54.855621] ----wyb arch/arm/mach-sun7i/rf/wifi_pm_rtl8188eu.c:222/rtl8188eu_power()! D/WifiHW ( 1670): faied to read proc/net/wireless D/WifiHW ( 1670): loading wifi driver... D/WifiHW ( 1670): faied to read proc/net/wireless D/WifiHW ( 1670): loading wifi driver... I/USB3G ( 1258): event { 'add', '/devices/platform/sw-ehci.2/usb4/4-1', 'usb', '', 189, 385 } I/USB3G ( 1258): path : '/sys/devices/platform/sw-ehci.2/usb4/4-1' I/USB3G ( 1258): VID :size 5,vid_path '/sys/devices/platform/sw-ehci.2/usb4/4-1/idVendor',VID '0bda I/USB3G ( 1258): '. I/USB3G ( 1258): PID :size 5,Pid_path '/sys/devices/platform/sw-ehci.2/usb4/4-1/idProduct',PID '8179 I/USB3G ( 1258): '. I/USB3G ( 1258): cmd=source /system/xbin/usb_modeswitch.sh /system/etc/usb_modeswitch.d/0bda_8179 &, D/WifiHW ( 1670): faied to read proc/net/wireless D/WifiHW ( 1670): loading wifi driver... I/USB3G ( 1258): excute ret:0,err:No such file or directory I/USB3G ( 1258): free cmd W/ContextImpl( 1670): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1123 com.android.server.usb.UsbSettingsManager.deviceAttached:621 com.android.server.usb.UsbHostManager.usbDeviceAdded:156 com.android.server.usb.UsbHostManager.monitorUsbHostBus:-2 com.android.server.usb.UsbHostManager.access$000:38 D/Tethering( 1670): sendTetherStateChangedBroadcast 1, 0, 0 W/SocketClient( 1249): write error (Broken pipe) D/Tethering( 1670): InitialState.processMessage what=4 D/Tethering( 1670): sendTetherStateChangedBroadcast 0, 0, 0 D/WifiHW ( 1670): faied to read proc/net/wireless D/WifiHW ( 1670): loading wifi driver... D/WifiHW ( 1249): Enter: wifi_get_fw_path function, fw_type=0, D/WifiHW ( 1249): Eneter: wifi_change_fw_path, fwpath = STA. D/SoftapController( 1249): Softap fwReload - Ok D/CommandListener( 1249): Setting iface cfg D/CommandListener( 1249): Trying to bring down wlan0 D/WifiMonitor( 1670): startMonitoring(wlan0) with mConnected = false I/wpa_supplicant( 2247): Successfully initialized wpa_supplicant I/wpa_supplicant( 2247): rfkill: Cannot open RFKILL control device D/BluetoothAdapter( 1931): 1103979928: getState() : mService = null. Returning STATE_OFF I/wpa_supplicant( 2247): rfkill: Cannot open RFKILL control device D/WifiConfigStore( 1670): Loading config and enabling all networks E/WifiConfigStore( 1670): Error parsing configurationjava.io.FileNotFoundException: /data/misc/wifi/ipconfig.txt: open failed: ENOENT (No such file or directory) D/BluetoothAdapter( 1931): 1103979928: getState() : mService = null. Returning STATE_OFF E/WifiStateMachine( 1670): Failed to set device name wing_k70 E/WifiStateMachine( 1670): Failed to set manufacturer Allwinner E/WifiStateMachine( 1670): Failed to set model name AOSP on wing E/WifiStateMachine( 1670): Failed to set model number AOSP on wing E/WifiStateMachine( 1670): Failed to set serial number 582034060190a829459 E/WifiStateMachine( 1670): Failed to set WPS config methods E/WifiStateMachine( 1670): Failed to set primary device type 10-0050F204-5 D/CommandListener( 1249): Setting iface cfg D/CommandListener( 1249): Trying to bring up p2p0 D/WifiMonitor( 1670): startMonitoring(p2p0) with mConnected = true E/WifiStateMachine( 1670): Failed to set frequency band 0 [ 57.384990] init: untracked pid 2221 exited D/InitAlarmsService( 2053): Clearing and rescheduling alarms. W/SocketClient( 1249): write error (Broken pipe) D/ConnectivityService( 1670): Sampling interval elapsed, updating statistics .. D/ConnectivityService( 1670): Done. D/ConnectivityService( 1670): Setting timer for 720seconds I/MediaFocusControl( 1670): AudioFocus abandonAudioFocus() from android.media.AudioManager@41cc7828com.android.music.MediaPlaybackService$3@41cc66a8 I/ActivityManager( 1670): Start proc com.android.musicfx for broadcast com.android.musicfx/.ControlPanelReceiver: pid=2265 uid=10008 gids={50008, 3003, 3002} V/MusicFXControlPanelReceiver( 2265): onReceive V/MusicFXControlPanelReceiver( 2265): Action: android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION V/MusicFXControlPanelReceiver( 2265): Package name: com.android.music V/MusicFXControlPanelReceiver( 2265): Audio session: 8 V/MusicFXControlPanelEffect( 2265): closeSession(android.app.ReceiverRestrictedContext@41ccc508, com.android.music, 8) ^C 130|shell@wing-k70:/ $
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值