资源简介
在Ubuntu 12.04.4下 更新TL-WN821N无线网卡驱动
2014-02-26 09:58:03| 分类: 日志 | 标签:ubuntu |举报 |字号 订阅
下载LOFTER
我的照片书 |
运行环境:
版本:Ubuntu 12.04.4 LTS
内核:Linux version 3.5.0-46-generic
无线网卡:TL-WN821N v4.0 300Mbps
在Ubuntu 12.04下,安装TL-WN821N usb无线网卡。虽然系统自带的驱动,但输入iwconfig后,发现Bit
代码片段和文件信息
#include
#include
#include
#include
#include
#include
#include
//#include
//#include
#include
#include
#include /* gethostbyname getnetbyname */
#include
#include /* for “struct sockaddr“ et al */
#include /* struct timeval */
#include
#include
//#if LINUX_VERSION_CODE < KERNEL_VERSION(2627)
//#include
//#endif
#include /* struct ether_addr */
#include
#include
#include
#include
//#include “iwlib.h“
static void HWPBC_SignalHandler(int sig)
{
//if(sig==0x0a)
{
printf(“get HW_PBC signal from driver\n“);
//todo: execute the command below to start WPS PBC Method
//“./wpa_cli -p/var/run/wpa_supplicant wps_pbc any“
//pop UI/dialog to show starting WPS PBC - timeout = 120sec
}
}
/*------------------------------------------------------------------*/
/*
* Wrapper to push some Wireless Parameter in the driver
*/
static inline int
iw_set_ext(int skfd /* Socket to the kernel */
const char * ifname /* Device name */
int request_id /* WE ID */
struct iwreq * pwrq) /* Fixed part of the request */
{
/* Set device name */
strncpy(pwrq->ifr_name ifname IFNAMSIZ);
//strncpy(pwrq->ifr_ifrn.ifr_name ifname IFNAMSIZ);
/* Do the request */
return(ioctl(skfd request_id pwrq));
}
int main(int argc char** argv)
{
int pid;
struct iwreq wrq;
int devsock;
char ifrn_name[IFNAMSIZ]; /* if name e.g. “wlan0“ */
int cmd = SIOCIWFIRSTPRIV + 0x05;
int req[2];
printf(“for example\n“);
/*
if ((argc != 2) || (argv[1][0] == ‘-‘)) {
printf(“Usage: macaddr interface\n“);
exit(1);
}
*/
strncpy(ifrn_name “wlan0“ IFNAMSIZ);
devsock = socket(AF_INET SOCK_STREAM 0);
//devsock = socket(AF_INET SOCK_DGRAM 0);
if (devsock == -1) {
//perror(“Failed opening socket“);
printf(“failed opening socket\n“);
exit(1);
}
/*(1) set signal handler. */
signal(SIGUSR1 HWPBC_SignalHandler);
/*(2) Tell wifi driver our pid so that it can send a signal to us. */
pid = getpid();
printf(“my pid is %d\n“ pid);
req[0]=0; req[1]=pid;
memcpy(wrq.u.name req sizeof(int)*2);
if(iw_set_ext(devsock ifrn_name cmd &wrq) < 0)
{
printf(“failed iw_set_ext!\n“);
close(devsock);
exit(1);
}
while(1)
{
printf(“$> “);
while( getchar() != ‘\n‘)
{
}
}
close(devsock);
exit(0);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-09-11 17:17 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\
目录 0 2013-09-11 17:13 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_reference_codes\
文件 10936 2013-09-11 17:13 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_reference_codes\realtek_wifi_SDK_for_android.txt
文件 1213179 2013-09-11 17:13 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_reference_codes\realtek_wifi_SDK_for_android_20120618.tar.gz
目录 0 2013-09-11 17:14 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_reference_codes_ICS_nl80211\
文件 100080 2013-09-11 17:14 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_reference_codes_ICS_nl80211\Realtek_Wi-Fi_SDK_for_Android_ICS.pdf
文件 253610 2013-09-11 17:13 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_reference_codes_ICS_nl80211\realtek_wifi_SDK_for_android_ICS_20120621.tar.gz
目录 0 2013-09-11 17:14 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_ref_codes_JB_4.1\
文件 2030 2013-09-11 17:13 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_ref_codes_JB_4.1\linux-3.0.42_STATION_INFO_ASSOC_REQ_IES.diff
文件 123738 2013-09-11 17:14 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_ref_codes_JB_4.1\Realtek_Wi-Fi_SDK_for_Android_JB_4_1.pdf
文件 38905 2013-09-11 17:13 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_ref_codes_JB_4.1\realtek_wifi_SDK_for_android_JB_4.1_20130306.tar.gz
目录 0 2013-09-11 17:14 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_ref_codes_JB_4.2\
文件 2030 2013-09-11 17:13 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_ref_codes_JB_4.2\linux-3.0.42_STATION_INFO_ASSOC_REQ_IES.diff
文件 129536 2013-09-11 17:14 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_ref_codes_JB_4.2\Realtek_Wi-Fi_SDK_for_Android_JB_4_2.pdf
文件 17892 2013-09-11 17:13 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\android_ref_codes_JB_4.2\realtek_wifi_SDK_for_android_JB_4.2_20130208.tar.gz
目录 0 2013-09-11 17:19 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\
文件 42969 2013-09-11 17:15 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\HowTo_enable_driver_to_support_80211d.pdf
文件 16929 2013-09-11 17:15 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\HowTo_enable_driver_to_support_WIFI_certification_test.pdf
文件 154971 2013-09-11 17:15 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\HowTo_enable_the_power_saving_functionality.pdf
文件 15821 2013-09-11 17:15 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\HowTo_support_more_VidPids.pdf
文件 4190 2013-09-11 17:13 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\linux_dhcp_server_notes.txt
文件 128554 2013-09-11 17:15 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\Miracast_for_Realtek_WiFi.pdf
文件 16779 2013-09-11 17:15 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\Quick_Start_Guide_for_Bridge.pdf
文件 68842 2013-09-11 17:16 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\Quick_Start_Guide_for_Driver_Compilation_and_Installation.pdf
文件 39476 2013-09-11 17:16 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\Quick_Start_Guide_for_SoftAP.pdf
文件 36189 2013-09-11 17:16 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\Quick_Start_Guide_for_Station_Mode.pdf
文件 174071 2013-09-11 17:17 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\Realtek_WiFi_concurrent_mode_Introduction.pdf
文件 128897 2013-09-11 17:17 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\RTK_P2P_WFD_Programming_guide.pdf
文件 25571 2013-09-11 17:17 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\SoftAP_Mode_features.pdf
文件 13447 2013-09-11 17:17 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\Wireless_tools_porting_guide.pdf
文件 41564 2013-09-11 17:17 RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911\document\wpa_cli_with_wpa_supplicant.pdf
............此处省略25个文件信息
相关资源
- FTD3XXDriver_WHQLCertified_v1.3.0.2.zip
- Modbus Poll、Modbus Slave和Virtual Serial Po
- Driver_Windows.zip
- DriverAssitant_v4.8.zip
- 虚拟串口软件Virtual Serial Port Driver最新
- FriendlyARM USB Download Driver Setup
- GUIDE_USB_Driver_Setup.exe
- Essential Linux Device Drivers + 源码
- PL2303_Prolific_DriverInstaller_v130.zip
- VCPDriver_V1.1_Setup.exe
- Virtual Serial Port Driver 9.0.567
- 虚拟串口神器——Virtual Serial Port Dr
- PEDrivers_install
- EzDriverInstaller.exe
- altera EP4CGX15 PCI-e 驱动源码
- HSM USB Serial Driver ver 3.1.4
- rtl8188eu_USB_linux.tar.gz
- xds100_drivers_xds100v1驱动_xds100v2驱动_x
- vspd 虚拟串口 Virtual Serial Port Driver 7
- WinUSB Drivers x64、x86
-
syba
se odbc driver for win64 - db2driver(8.1.17).rar
- 64位系统Mini2440-USBDriver-DebugTool
- CP210x_Driver03.rar
- usb2串口驱动(PL2303_Prolific_DriverInsta
- Essential Linux Device Drivers.pdf
- selenium-webdriver
- Mac geckodriver v0.20.0资源
-
中兴ME3612驱动ZTE WEli
nk Drivers SetupV - PS3 摄像头驱动 CL-Eye-Driver-5.3.0.0341
评论
共有 条评论