資源簡介
MT7620的出廠測試工具,修改MAC RF參數等,可以下傳和上傳數據,經測試好用,要配合SDK編譯出來的固件使用

代碼片段和文件信息
#include?“precomp.h“
#include?
#include?
#include?
#define?VERSION_STR?“1.2.2“
#define?SIGNAL
/******************************************************************************************************
* Constants
*******************************************************************************************************/
#define?NUM_DRIVER_IF?2
/******************************************************************************************************
* Prototype
*******************************************************************************************************/
static?void?RaCfg_Agent(void); /*2013.12.04.Common?Procedure*/
static?void?NetReceive(u8?*inpkt?int?len);
static?void?sendATESTOP(int?index);
static?void?sendATESTART(int?index);
static?int?GetOpt(int?argc?char?*const?argv[]?const?char?*optstring); /*?GetOpt?-?only?used?in?main.c?*/
static?void?Usage(void);
static?int?processPktOldMagic(u8?*inpkt?int?len?int?if_index);
static?int?processPktNewMagic(u8?*inpkt?int?len);
static?int?if_match(const?char?*if_name);
static?void?*pkt_proc_logic(void?*arg);
static?void?task_dispatcher(u8?*inpkt?int?len?int?if_index);
#ifdef?DBG
static?void?ate_hexdump(int?level?char?*str?unsigned?char?*pSrcBufVA?unsigned?long?SrcBufLen)
{
unsigned?char?*pt;
int?x;
if?(level? return;
pt?=?pSrcBufVA;
printf(“%s:?%p?len?=?%lu\n“str??pSrcBufVA?SrcBufLen);
for?(x=0;?x {
if?(x?%?16?==?0)?
{
printf(“0x%04x?:?“?x);
}
printf(“%02x?“?((unsigned?char)pt[x]));
if?(x%16?==?15)?printf(“\n“);
}
printf(“\n“);
}
/**
?*?ate_printf?-?conditional?printf
?*?@level:?priority?level?(MSG_*)?of?the?message
?*?@fmt:?printf?format?string?followed?by?optional?arguments
?*
?*?This?function?is?used?to?print?conditional?debugging?and?error?messages.
?*
?*?Note:?New?line?‘\n‘?is?added?to?the?end?of?the?text?when?printing?to?stdout.
?*/
void?ate_printf(int?level?char?*fmt?...)
{
va_list?ap;
va_start(ap?fmt);
if?(level?>=?ate_debug_level)
{
vprintf(fmt?ap);
printf(“\n“);
}
va_end(ap);
}
#else?/*?DBG?*/
#define?ate_printf(args...)?do?{?}?while?(0)
#define?ate_hexdump(ltble)?do?{?}?while?(0)
#endif?/*?DBG?*/
#ifdef?SIGNAL
#include??
void?init_signals(void);
void?signup(int);
#endif?//?SIGNAL?//
int?ate_debug_level?=?MSG_ERROR;?/*?default?:?ate_debug_level?==?2?*/
/******************************************************************************************************
* Private?Data
*******************************************************************************************************/
static?const?char?*ate_daemon_version?=?“ate?daemon?v“?VERSION_STR?“\n“;
static?int?sock?=?-1;
/*?respond?to?QA?by?unicast?frames?if?bUnicast?==?TRUE?*/
static?boolean?bUnicast?=?FALSE;
static?unsigned?char?buffer[PKT_BUF_SIZE];
//static?unsigned?char?*buffer;
static?const?char?broadcast_addr[6]?=?{0xFF?0xFF?0xFF?0xFF?0xFF?0xFF};
static?int?do_fork?=?1;
static?int?signup_flag?=?1;
stat
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????25383??2014-08-20?22:41??MT7620QA-V1.0.6.0-AP\ated\ate-v2.c
?????文件??????20548??2014-08-20?22:41??MT7620QA-V1.0.6.0-AP\ated\ate.c
?????文件???????8580??2014-06-11?09:13??MT7620QA-V1.0.6.0-AP\ated\ate.h
?????文件??????11611??2011-02-10?18:08??MT7620QA-V1.0.6.0-AP\ated\ated.c
?????文件???????2542??2007-06-26?17:45??MT7620QA-V1.0.6.0-AP\ated\ated.h
?????文件???????3421??2014-06-11?09:13??MT7620QA-V1.0.6.0-AP\ated\eth.c
?????文件????????358??2014-06-11?09:13??MT7620QA-V1.0.6.0-AP\ated\eth.h
?????文件???????1112??2014-08-20?22:42??MT7620QA-V1.0.6.0-AP\ated\ioctl2driver.c
?????文件????????251??2014-06-11?09:13??MT7620QA-V1.0.6.0-AP\ated\ioctl2driver.h
?????文件???????4012??2014-08-20?22:42??MT7620QA-V1.0.6.0-AP\ated\ipc_socket.c
?????文件????????728??2014-06-11?09:13??MT7620QA-V1.0.6.0-AP\ated\ipc_socket.h
?????文件???????3512??2014-08-07?15:37??MT7620QA-V1.0.6.0-AP\ated\Makefile
?????文件???????7856??2014-06-11?09:13??MT7620QA-V1.0.6.0-AP\ated\multi_fork.c
?????文件???????1118??2014-06-11?09:13??MT7620QA-V1.0.6.0-AP\ated\multi_fork.h
?????文件???????3327??2014-06-11?09:13??MT7620QA-V1.0.6.0-AP\ated\multi_thread.c
?????文件????????994??2014-06-11?09:13??MT7620QA-V1.0.6.0-AP\ated\multi_thread.h
?????文件????????750??2014-06-11?09:13??MT7620QA-V1.0.6.0-AP\ated\precomp.h
?????文件????1409024??2013-01-16?09:49??MT7620QA-V1.0.6.0-AP\MT7620?V1.0.6.0?AP\MT7620QA.exe
?????文件??????????0??2006-11-24?13:41??MT7620QA-V1.0.6.0-AP\MT7620?V1.0.6.0?AP\Must?Install?WinPcap?First.txt
?????文件????????104??2012-12-20?14:53??MT7620QA-V1.0.6.0-AP\MT7620?V1.0.6.0?AP\Readme.txt
?????文件?????915920??2011-09-16?10:19??MT7620QA-V1.0.6.0-AP\MT7620?V1.0.6.0?AP\WinPcap_4_1_2\WinPcap_4_1_2.exe
?????文件?????895555??2012-05-17?17:22??MT7620QA-V1.0.6.0-AP\MT7620?V1.0.6.0?AP\WinPcap_4_1_2.zip
?????文件???????1417??2015-04-21?13:56??MT7620QA-V1.0.6.0-AP\新建文本文檔.txt
?????目錄??????????0??2016-04-23?14:18??MT7620QA-V1.0.6.0-AP\MT7620?V1.0.6.0?AP\WinPcap_4_1_2
?????目錄??????????0??2016-04-23?14:18??MT7620QA-V1.0.6.0-AP\ated
?????目錄??????????0??2016-04-23?14:18??MT7620QA-V1.0.6.0-AP\MT7620?V1.0.6.0?AP
?????目錄??????????0??2016-04-23?14:18??MT7620QA-V1.0.6.0-AP
-----------?---------??----------?-----??----
??????????????3318123????????????????????27
............此處省略0個文件信息
評論
共有 條評論