【摘要】 這篇文章介紹兩個(gè)知識(shí)點(diǎn): 數(shù)碼相冊(cè)要求介紹、貼出案例代碼、介紹360隨身WIFI的驅(qū)動(dòng)移植注意事項(xiàng)。
任務(wù)1: 文件系統(tǒng)本地掛載

任務(wù)2:數(shù)碼相冊(cè)項(xiàng)目代碼
??數(shù)碼相冊(cè)功能:
1.?支持兩種格式圖片顯示: bmp、jpg
區(qū)分兩種圖片格式,通過后綴名稱區(qū)分。
2.?支持觸摸屏、按鍵方式翻頁(支持前后翻頁)
建立雙向鏈表,調(diào)用讀取目錄的函數(shù)(opendir),將目錄下所有符合要求的圖片加入到鏈表里。
3.?支持三軸加速度計(jì),實(shí)現(xiàn)姿態(tài)感應(yīng)。根據(jù)三軸加速度的姿態(tài),調(diào)整圖片的顯示方向。
4.?支持圖片的自適應(yīng): 居中顯示,超大尺寸的圖片需要自動(dòng)縮小到屏幕能夠顯示的大小。
5.?居中顯示。
6.?數(shù)碼相冊(cè)需要有狀態(tài)欄: 當(dāng)前系統(tǒng)的時(shí)間信息,當(dāng)前圖片的名稱、數(shù)量。


倒車影像、USB攝像頭網(wǎng)頁視頻控制、廣告機(jī)。
案例代碼:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "touch_input.h"
#include "key_input.h"
#include "mma7660_input.h"
#include "framebuffer.h"
#include "image_zoom.h"
#include "list.h"
#include "Imagedecoding.h"
struct PHOTOA_LBUM_INFO photo_album_info; /*重要結(jié)構(gòu)*/
/*
函數(shù)功能: 處理捕獲到的信號(hào)
*/
void exit_sighandler(int sig)
{
printf("捕獲到信號(hào)_%d\n",sig);
exit(0); /*結(jié)束進(jìn)程*/
}
/*
函數(shù)功能: 圖片類型過濾
函數(shù)返回值: 0表示支持,其他值表示不支持
*/
int ImageTypeFiltering(char *name)
{
/*1. 查找后綴*/
char *jpg_p=strstr(name,".jpg");
char *jpeg_p=strstr(name,".jpeg");
char *bmp_p=strstr(name,".bmp");
char *JPG_p=strstr(name,".JPG");
char *JPEG_p=strstr(name,".JPEG");
char *BMP_p=strstr(name,".BMP");
/*2. 過濾后綴*/
if(jpg_p==NULL&&jpeg_p==NULL&&bmp_p==NULL&&
JPG_p==NULL&&JPEG_p==NULL&&BMP_p==NULL)
{
return -1;
}
/*
123.mp4.mp3 123.c.txt p=strstr("123.c.txt",".c"); p執(zhí)行 *p=.
*/
/*3. 名稱比較,二次過濾*/
int jpg_p_cmp=1;
int jpeg_p_cmp=1;
int bmp_p_cmp=1;
int JPG_p_cmp=1;
int JPEG_p_cmp=1;
int BMP_p_cmp=1;
if(jpg_p)jpg_p_cmp=strcmp(jpg_p,".jpg");
if(jpeg_p)jpeg_p_cmp=strcmp(jpeg_p,".jpeg");
if(bmp_p)bmp_p_cmp=strcmp(bmp_p,".bmp");
if(JPG_p)JPG_p_cmp=strcmp(JPG_p,".JPG");
if(JPEG_p)JPEG_p_cmp=strcmp(JPEG_p,".JPEG");
if(BMP_p)BMP_p_cmp=strcmp(BMP_p,".BMP");
if(jpg_p_cmp!=0&&jpeg_p_cmp!=0&&bmp_p_cmp!=0&&
JPG_p_cmp!=0&&JPEG_p_cmp!=0&&BMP_p_cmp!=0)
{
return -2;
}
return 0;
}
/*
函數(shù)功能: 遍歷指定的目錄,將圖片的絕對(duì)路徑加入到鏈表
函數(shù)參數(shù): 傳入目錄名稱
函數(shù)返回值: 負(fù)數(shù)表示失敗, 大于0表示加入到鏈表里節(jié)點(diǎn)的數(shù)量
*/
int Traverse_Directory(char *dir_name)
{
int cnt=0;
/*1. 先清空鏈表*/
Remove_ALL_Node();
/*2. 打開目錄*/
DIR *dir=opendir(dir_name);
if(dir==NULL)
{
DBUG_PRINTF("%s 目錄打開失敗!\n",dir_name);
return -1;
}
/*3. 循環(huán)遍歷目錄*/
struct dirent *dir_info=NULL;
struct IMAGE_ListStruct *temp=NULL;
int len;
while(dir_info=readdir(dir))
{
/*過濾圖片*/
if(ImageTypeFiltering(dir_info->d_name)!=0)
{
DBUG_PRINTF("不符合要求的文件: %s\n",dir_info->d_name);
continue;
}
cnt++;
//給新節(jié)點(diǎn)申請(qǐng)空間
temp=malloc(sizeof(struct IMAGE_ListStruct));
//計(jì)算文件名稱長度(絕對(duì)路徑):
len=strlen(dir_name)+strlen(dir_info->d_name)+1;
//給存放文件名稱指針申請(qǐng)空間
temp->file_name=malloc(len);
strcpy(temp->file_name,dir_name);
strcat(temp->file_name,dir_info->d_name);
/*4. 添加鏈表節(jié)點(diǎn)*/
AddListNode(ListHead,temp);
}
return cnt;
}
/*
函數(shù)功能: 刪除鏈表里所有的節(jié)點(diǎn)
*/
int Remove_ALL_Node(void)
{
struct IMAGE_ListStruct *p=ListHead; //保存頭地址
struct IMAGE_ListStruct *tmp=NULL;
if(p==NULL) /*頭為空就創(chuàng)建一個(gè)頭*/
{
p=ListHead=CreateListHead(ListHead);
}
if(p->next==NULL)return 0;/*節(jié)點(diǎn)為空不需要?jiǎng)h除*/
else
{
tmp=p; //保存上一個(gè)節(jié)點(diǎn)的地址---也就是頭的地址,因?yàn)殒湵眍^不需要?jiǎng)h除
p=p->next; /*移動(dòng)到下一個(gè)數(shù)據(jù)節(jié)點(diǎn)*/
tmp->next=NULL; /*指定頭的下一個(gè)節(jié)點(diǎn)為NULL*/
}
while(p!=NULL)
{
tmp=p; //保存上一個(gè)節(jié)點(diǎn)的地址
p=p->next; /*偏移到下一個(gè)節(jié)點(diǎn)*/
/*刪除節(jié)點(diǎn)*/
free(tmp->file_name);
free(tmp);
}
return 0;
}
/*
函數(shù)功能: 在屏幕左下角實(shí)時(shí)顯示當(dāng)前時(shí)間
*/
void *time_pthread_func(void *dev)
{
time_t sec_time;
time_t sec_tmp;
struct tm *system_time;
char timebuff[20];
while(1)
{
/*獲取本地秒單位時(shí)間*/
sec_time=time(NULL);
if(sec_tmp!=sec_time)
{
sec_tmp=sec_time;
/*使用時(shí)間函數(shù)將秒單位時(shí)間轉(zhuǎn)為標(biāo)準(zhǔn)時(shí)間返回*/
system_time=localtime(&sec_time);
/*格式化打印時(shí)間*/
strftime(timebuff,20,"%Y-%m-%d %H:%M:%S",system_time);
/*清除底狀態(tài)欄*/
framebuffer_Fill(0,photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE,19*GBK_FONT_SIZE/2,photo_album_info.framebuffer_var.yres,0xD1EEEE);
/*在指定位置進(jìn)行顯示時(shí)間*/
framebuffer_String(0,photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE,timebuff);
}
}
}
/*
函數(shù)功能: GUI界面初始化代碼
*/
void GUI_Init(void)
{
/*1. 清屏初始化*/
framebuffer_Fill(0,0,photo_album_info.framebuffer_var.xres,photo_album_info.framebuffer_var.yres,0x33ffcc); /*清除整個(gè)屏幕*/
framebuffer_Fill(0,0,photo_album_info.framebuffer_var.xres,GBK_FONT_SIZE,0xD1EEEE); /*清除頂狀態(tài)欄*/
framebuffer_Fill(0,photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE,photo_album_info.framebuffer_var.xres,photo_album_info.framebuffer_var.yres,0xD1EEEE); /*清除底狀態(tài)欄*/
/*2. 項(xiàng)目名稱顯示(居中顯示)*/
framebuffer_String((photo_album_info.framebuffer_var.xres-strlen(PROJECT_NAME)*(GBK_FONT_SIZE/2))/2,
0,PROJECT_NAME);
}
int main(int argc,char **argv)
{
int current_cnt=1; /*保存當(dāng)前圖片的位置*/
struct IMAGE_ListStruct *List_current_p=NULL; /*用于保存節(jié)點(diǎn)的位置*/
struct ImageDecodingInfo image_info={0,0,NULL}; /*保存當(dāng)前圖片解碼信息*/
int current_x=0; /*顯示圖片時(shí),x坐標(biāo)起始位置*/
int current_y=0; /*顯示圖片時(shí),y坐標(biāo)起始位置*/
char CurrentNumberStr[50]; /*顯示當(dāng)前數(shù)量字符串*/
photo_album_info.lcd_direction=1; /*屏幕默認(rèn)方向*/
if(argc!=2)
{
printf("傳入的參數(shù)格式: ./app <目錄名稱>\n");
return 0;
}
/*1. 注冊(cè)將要捕獲的信號(hào)*/
signal(SIGINT,exit_sighandler); /*Ctrl+C發(fā)出*/
signal(SIGSEGV,exit_sighandler); /*進(jìn)程產(chǎn)生非法內(nèi)存訪問時(shí)發(fā)出*/
/*2. 初始化幀緩沖設(shè)備*/
if(framebuffer_Device_init(&photo_album_info)!=0)exit(1);
/*3. 字庫初始化*/
if(Fontlib_Init()!=0)exit(1);
/*4. 創(chuàng)建讀取觸摸屏坐標(biāo)的線程*/
pthread_t touch_thread_id;
pthread_create(&touch_thread_id,NULL,touch_pthread_func,NULL);
pthread_detach(touch_thread_id);
/*5. 創(chuàng)建讀取按鍵值的線程*/
pthread_t key_thread_id;
pthread_create(&key_thread_id,NULL,key_pthread_func,NULL);
pthread_detach(key_thread_id);
/*6. 創(chuàng)建讀取三軸加速度計(jì)姿態(tài)的線程*/
pthread_t mma7660_thread_id;
pthread_create(&mma7660_thread_id,NULL,mma7660_pthread_func,NULL);
pthread_detach(mma7660_thread_id);
/*7. 創(chuàng)建顯示時(shí)間的線程*/
pthread_t time_thread_id;
pthread_create(&time_thread_id,NULL,time_pthread_func,NULL);
pthread_detach(time_thread_id);
/*8. 創(chuàng)建鏈表頭*/
ListHead=CreateListHead(ListHead);
if(ListHead==NULL)
{
printf("創(chuàng)建鏈表頭失敗!\n");
exit(1);
}
while(1)
{
List_current_p=ListHead; /*保存頭地址*/
current_cnt=1; /*位置置1*/
/*遍歷指定目錄,保存圖片名稱到鏈表,并返回圖片的總數(shù)量*/
photo_album_info.image_number=Traverse_Directory(argv[1]);
/*打印鏈表里的節(jié)點(diǎn)信息*/
PintListInfo(ListHead);
/*偏移到數(shù)據(jù)節(jié)點(diǎn)*/
List_current_p=List_current_p->next;
while(List_current_p)
{
/*1. 等待加速計(jì)輸入事件*/
/*2. 判斷圖片類型,開始顯示圖片*/
if(strstr(List_current_p->file_name,".jpg")||strstr(List_current_p->file_name,".jpeg")||
strstr(List_current_p->file_name,".JPG")||strstr(List_current_p->file_name,".JPEG"))
{
/*2.1 解碼JPEG圖片*/
if(Decoding_JPEGImage(List_current_p->file_name,&image_info))
{
printf("%s圖片解碼失敗!\n",List_current_p->file_name);
}
}
else if(strstr(List_current_p->file_name,".bmp")||strstr(List_current_p->file_name,".BMP"))
{
/*2.2 解碼BMP圖片,得到圖片信息*/
if(Decoding_BmpImage(List_current_p->file_name,&image_info))
{
printf("%s圖片解碼失敗!\n",List_current_p->file_name);
}
}
/*3. 判斷是否解碼成功*/
if(image_info.rgb==NULL || image_info.Height==0 || image_info.Width==0)
{
goto FREE_MEM; /*解碼失敗,繼續(xù)下一張*/
}
/*4. 解碼成功,在LCD屏上顯示*/
/*判斷LCD屏剩余尺寸是否足夠顯示圖片,不夠顯示就縮小*/
if(image_info.Height>photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE*2||
image_info.Width>photo_album_info.framebuffer_var.xres)
{
int maximum_height;
int zoom_proportion;
int maximum_width;
if(image_info.Height>=image_info.Width) /*如果圖片高度大于寬度,那么縮放就以高度為準(zhǔn)*/
{
maximum_height=photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE*2;/*屏幕最大能夠顯示的高度*/
zoom_proportion=image_info.Height-maximum_height; /*縮放比例*/
maximum_width=image_info.Width-zoom_proportion; /*寬度根據(jù)高度進(jìn)行比例縮放*/
DBUG_PRINTF("Height:縮放之后的實(shí)際尺寸(寬*高):%d*%d\n",maximum_width,maximum_height);
/*再次判斷縮放之后圖片寬度在LCD屏是否足夠顯示,如果不夠,則進(jìn)行縮小*/
if(maximum_width>photo_album_info.framebuffer_var.xres)
{
}
}
else/*如果圖片寬度大于高度,那么縮放就以寬度為準(zhǔn)*/
{
maximum_width=photo_album_info.framebuffer_var.xres; /*屏幕最大能夠顯示的寬度*/
zoom_proportion=image_info.Width-maximum_width; /*縮放比例*/
maximum_height=image_info.Height-zoom_proportion; /*高度根據(jù)寬度進(jìn)行比例縮放*/
/*再次判斷縮放之后圖片高度在LCD屏是否足夠顯示,如果不夠,則進(jìn)行縮小*/
if(maximum_height>photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE*2)
{
/*高度以屏幕最大高度為準(zhǔn)*/
maximum_height=photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE*2;
/*高度縮小了,那么寬度也要按照比例縮小,否則會(huì)導(dǎo)致圖片變形*/
maximum_width=maximum_height-(maximum_height-photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE*2);
}
DBUG_PRINTF("Width:縮放之后的實(shí)際尺寸(寬*高):%d*%d\n",maximum_width,maximum_height);
}
/*申請(qǐng)空間存放縮放之后的數(shù)據(jù)*/
unsigned char *rgb_zoom=malloc(maximum_width*maximum_height*3);
if(rgb_zoom==NULL)
{
perror("存放圖片縮放數(shù)據(jù)的空間申請(qǐng)失敗!");
goto FREE_MEM;
}
/*將圖片按照指定的尺寸進(jìn)行縮小*/
if(Image_Zoom(image_info.rgb,image_info.Width,image_info.Height,rgb_zoom,maximum_width,maximum_height)!=0)
{
goto FREE_MEM;
}
/*縮放成功,保存縮放之后圖片實(shí)際參數(shù)*/
image_info.Height=maximum_height;
image_info.Width=maximum_width;
free(image_info.rgb); /*釋放源RGB空間*/
image_info.rgb=rgb_zoom; /*指針指向縮放之后的RGB數(shù)據(jù)空間*/
/*顯示圖片的坐標(biāo)起始位置*/
current_x=(photo_album_info.framebuffer_var.xres-maximum_width)/2;;
current_y=(photo_album_info.framebuffer_var.yres-maximum_height)/2;
}
else /*尺寸足夠顯示,進(jìn)行居中顯示*/
{
/*計(jì)算顯示圖片時(shí),xy坐標(biāo)位置--保證居中顯示*/
current_x=(photo_album_info.framebuffer_var.xres-image_info.Width)/2;
current_y=(photo_album_info.framebuffer_var.yres-image_info.Height)/2;
}
/*清空顯示區(qū)域*/
framebuffer_Fill(0,GBK_FONT_SIZE,photo_album_info.framebuffer_var.xres,photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE,0x33ffcc);
/*在LCD指定位置顯示圖片*/
DBUG_PRINTF("在LCD顯示的位置:x=%d,y=%d\n",current_x,current_y);
framebuffer_DisplayImages(current_x, /*橫坐標(biāo)位置*/
current_y, /*縱坐標(biāo)位置*/
image_info.Width,
image_info.Height,
image_info.rgb);
DBUG_PRINTF("顯示: 第%d個(gè)節(jié)點(diǎn)的數(shù)據(jù)=%s\n",current_cnt,List_current_p->file_name);
/*圖片顯示的數(shù)量情況*/
sprintf(CurrentNumberStr,"%d/%d",photo_album_info.image_number,current_cnt);
/*清除底狀態(tài)欄*/
framebuffer_Fill((photo_album_info.framebuffer_var.xres-(strlen(CurrentNumberStr)*GBK_FONT_SIZE/2))/2-32,
photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE,
photo_album_info.framebuffer_var.xres,
photo_album_info.framebuffer_var.yres,0xD1EEEE);
/*在指定位置顯示當(dāng)前數(shù)量*/
framebuffer_String((photo_album_info.framebuffer_var.xres-(strlen(CurrentNumberStr)*GBK_FONT_SIZE/2))/2,
photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE,CurrentNumberStr);
/*在右下角顯示當(dāng)前圖片名稱*/
framebuffer_String(photo_album_info.framebuffer_var.xres/2+(strlen(CurrentNumberStr)*GBK_FONT_SIZE/2)/2 +GBK_FONT_SIZE*2,
photo_album_info.framebuffer_var.yres-GBK_FONT_SIZE,basename(List_current_p->file_name));
FREE_MEM:
if(image_info.rgb) /*判斷空間是否申請(qǐng)成功*/
{
free(image_info.rgb); /*釋放空間*/
image_info.rgb=NULL;
}
image_info.Height=0;
image_info.Width=0;
/*等待按鍵信號(hào)和觸摸屏信號(hào)進(jìn)行翻頁 或者有切換屏幕的操作時(shí)進(jìn)行切換屏幕方向*/
while(!photo_album_info.page_direction&&!photo_album_info.lcd_state){}
if(photo_album_info.page_direction==1) /*右翻頁*/
{
List_current_p=List_current_p->next;
current_cnt++; /*記錄圖片位置*/
}
else if(photo_album_info.page_direction==2)/*左翻頁*/
{
if(current_cnt>1)
{
List_current_p=List_current_p->old;
current_cnt--; /*記錄圖片位置*/
}
}
photo_album_info.page_direction=0; /*狀態(tài)清0*/
photo_album_info.lcd_state=0; /*狀態(tài)清0*/
}
}
return 0;
}
任務(wù)3: 360 WIFI驅(qū)動(dòng)測試、無線工具使用
\12 20181210 文件系統(tǒng)本地掛載、360WIFI驅(qū)動(dòng)與相關(guān)無線工具安裝\參考資料\01 360USB無線網(wǎng)卡驅(qū)動(dòng)及相關(guān)無線工具安裝\03 WIFI驅(qū)動(dòng)及相關(guān)工具庫一鍵移植文件\360wifi_20170926.tar


??Udhcpc自動(dòng)分配IP地址的命令,需要的腳本和使用方法


??兩個(gè)腳本里的代碼。


??WIFI的配置文件

??一鍵移植文件布局。

[root@wbyq 360wifi]# ls 360wifi_1.sh 360wifi_2.sh bin etc lib mt7601Usta.ko simple.script [root@wbyq 360wifi]# tree . ├── 360wifi_1.sh ├── 360wifi_2.sh ├── bin │ ├── ifrename │ ├── iwconfig │ ├── iwevent │ ├── iwgetid │ ├── iwlist │ ├── iwpriv │ ├── iwspy │ ├── wpa_cli │ ├── wpa_supplicant │ └── wpa_supplicant.conf ├── etc │ ├── Wireless │ │ └── RT2870STA │ │ ├── RT2870STA.dat │ │ └── RT2870STA.dat~ │ └── wpa_supplicant.conf ├── lib │ └── libiw.so.29 ├── mt7601Usta.ko └── simple.script 5 directories, 18 files [root@wbyq 360wifi]# |
??USB設(shè)備匹配的流程
當(dāng)前USB設(shè)備插到電腦的USB口上之后,USB產(chǎn)生USB中斷,USB主機(jī)就會(huì)發(fā)生特定命令,詢問插入
進(jìn)來的設(shè)備,是什么設(shè)備。設(shè)備會(huì)按照USB協(xié)議的規(guī)定,回應(yīng)一個(gè)數(shù)據(jù)包---結(jié)構(gòu)體。
主機(jī)收到數(shù)據(jù)包之后會(huì)進(jìn)行解析,會(huì)按照設(shè)備的類型或者設(shè)備ID進(jìn)行在內(nèi)核里尋找與之匹配的驅(qū)動(dòng),
尋找成功就會(huì)調(diào)用USB驅(qū)動(dòng)程序。
??啟動(dòng)腳本連接WIFI
[root@tiny4412 etc]#vi wpa_supplicant.conf //修改將要連接的路由器名稱和密碼 [root@tiny4412 etc]#cd /work/360wifi/ [root@tiny4412 360wifi]#ls 360wifi_1.sh bin lib simple.script 360wifi_2.sh etc mt7601Usta.ko [root@tiny4412 360wifi]#./360wifi_2.sh //運(yùn)行腳本2,安裝WIFI驅(qū)動(dòng),啟動(dòng)WIFI連接熱點(diǎn),連接上之后再分配IP地址 [ 917.120000] rtusb init rt2870 ---> [ 917.120000] <-- RTMPAllocTxRxRingMemory, Status=0 [ 917.120000] <-- RTMPAllocAdapterBlock, Status=0 [ 917.120000] BULK IN MaxPacketSize = 512 [ 917.120000] EP address = 0x84 [ 917.120000] BULK IN MaxPacketSize = 512 [ 917.120000] EP address = 0x85 [ 917.120000] BULK OUT MaxPacketSize = 512 [ 917.125000] EP address = 0x 8 [ 917.130000] BULK OUT MaxPacketSize = 512 [ 917.130000] EP address = 0x 4 [ 917.135000] BULK OUT MaxPacketSize = 512 [ 917.140000] EP address = 0x 5 [ 917.145000] BULK OUT MaxPacketSize = 512 [ 917.145000] EP address = 0x 6 [ 917.150000] BULK OUT MaxPacketSize = 512 [ 917.155000] EP address = 0x 7 [ 917.155000] BULK OUT MaxPacketSize = 512 [ 917.160000] EP address = 0x 9 [ 917.170000] usbcore: registered new interface driver rt2870 [ 917.350000] Current MAC: =b0:d5:9d:0c:51:29 [ 917.355000] NICReadEEPROMParameters: RxPath = 1, TxPath = 1 [ 917.360000] 20MHz BW, 2.4G band-03030505, Adata = 03030505, Gdata = 03030505 [ 917.365000] 20MHz BW, 2.4G band-00000004, Adata = 00000004, Gdata = 00000004 [ 917.365000] 20MHz BW, 2.4G band-00000002, Adata = 00000002, Gdata = 00000002 [ 917.365000] 20MHz BW, 2.4G band-00000002, Adata = 00000002, Gdata = 00000002 [ 917.370000] 20MHz BW, 2.4G band-ffff0002, Adata = ffff0002, Gdata = ffff0002 [ 917.610000] BuildChannel # 1 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 2 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 3 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 4 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 5 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 6 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 7 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 8 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 9 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 10 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 11 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 12 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 13 :: Pwr0 = 6, Pwr1 =0, Flags = 0 BuildChannel # 14 :: Pwr0 = 6, Pwr1 =0, Flags = 0 <==== rt28xx_init, Status=0 [ 917.665000] 0x1300 = 00064300 udhcpc (v1.23.2) started Setting IP address 0.0.0.0 on ra0 Sending discover... [ 920.025000] RSN_IE: f0b15003, len = 22 [ 920.025000] 0x0000 : 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 [ 920.025000] 0x0010 : 00 0f ac 02 0c 00 [ 920.035000] /work/360_WIFI/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/rtmp_data.c:540 assert pRxWI->RxWIWirelessCliID == BSSID_WCIDfailed [ 920.090000] Key = 28:fd:b8:58:c5:ce:85:e5:33:97:d8:09:8d:46:c2:6a [ 920.090000] Rx MIC Key = 00:00:00:00:00:00:00:00 [ 920.090000] Tx MIC Key = 00:00:00:00:00:00:00:00 (表示W(wǎng)IFI已經(jīng)成功連接熱點(diǎn)) Sending discover... [ 923.340000] CmdThread : CMDTHREAD_SET_ASIC_WCID : WCID = 1, SetTid = 10000, DeleteTid = ffffffff. [ 923.340000] 1-MACValue= e02d6594, [ 923.340000] 2-MACValue= 1701d, Sending select for 192.168.43.240... Lease of 192.168.43.240 obtained, lease time 3600 Setting IP address 192.168.43.240 on ra0 Deleting routers route: SIOCDELRT: No such process Adding router 192.168.43.1 Recreating /etc/resolv.conf Adding DNS server 192.168.43.1 //表示W(wǎng)IFI已經(jīng)成功分配了IP地址 |
??查看網(wǎng)卡IP地址,ping百度測試是否可以訪問外網(wǎng)

??查看當(dāng)前WIFI連接的網(wǎng)卡信息

??通過WIFI管理工具,掃描周邊的熱點(diǎn)
[root@tiny4412 360wifi]#iwlist scanning |
-
驅(qū)動(dòng)
+關(guān)注
關(guān)注
12文章
1898瀏覽量
86497 -
數(shù)碼
+關(guān)注
關(guān)注
0文章
299瀏覽量
37317 -
WIFI
+關(guān)注
關(guān)注
81文章
5370瀏覽量
207376
發(fā)布評(píng)論請(qǐng)先 登錄
恩智浦為無線連接SoC開發(fā)的統(tǒng)一WiFi驅(qū)動(dòng)程序多芯片多接口驅(qū)動(dòng)(MXM)

迅為RK3568開發(fā)板驅(qū)動(dòng)指南Linux中通用SPI設(shè)備驅(qū)動(dòng)

linux下TLV320ADC3101音頻這塊驅(qū)動(dòng)怎么配置、移植?
北京迅為RK3568開發(fā)板嵌入式學(xué)習(xí)之Linux驅(qū)動(dòng)全新更新-CAN+

嵌入式linux開發(fā)的基本步驟有哪些?
linux系統(tǒng)的設(shè)備驅(qū)動(dòng)一般分幾類
Linux設(shè)備驅(qū)動(dòng)程序分類有哪些
linux驅(qū)動(dòng)程序如何加載進(jìn)內(nèi)核
linux驅(qū)動(dòng)程序的編譯方法是什么
Linux 驅(qū)動(dòng)開發(fā)與應(yīng)用開發(fā),你知道多少?

評(píng)論