Labtool 핵심가이드
labtool 관련 이슈를 대응하기 위해 필요한 사항들을 정리했다.
PC(X64) 용으로 포팅하기
PC 상에서 labtool 을 실행해야 하는 경우는 evalution board 를 사용할 때이다.
기존의 labtool 소스코드에서 makefile 파일만 수정하면 된다. 만일 빌드 도중 libbluetooth.so 파일을 찾지 못한다면, build pc 에서 관련 라이브러리를 설치해야 한다.
#apt-get install libbluetooth-dev #find / -name libbluetooth.so
위 명령 결과로 나오는 경로를 makefile 에 수정한다.
ifeq (0, $(USE_MRVL_BTSTACK)) #DRVR_STACK = /build/peach_pit/usr/lib/libbluetooth.so DRVR_STACK = /usr/lib/x86_64-linux-gnu/libbluetooth.so # 수정 endif
빌드하면 labtool 바이너리가 생성된다.
FAQ
CATs 에서 802.11ac 를 바로 테스트하면 fail 이 발생하고, 다른 신호(802.11a/b/g)를 내보내고 시도하면 테스트가 pass 된다
opendut 함수에 다음과 같이 수정했다.
CATs 와 연동할 때는 rfTest.sh 의 5 번을 사용한다. labtool 에 bridge 옵션을 추가하여 실행하게 되는데, opendut 함수를 수행한다.
따라서 'MRVL_RFT_OpenDUT()' 함수를 아래와 같이 추가했다.
/*
* function : MRVL_RFT_OpenDUT
* escription : Initialize all variable for DUT test with MFG F/W
* ss at command : AT+WIFITEST=0,1,1,0
*/
int MRVL_RFT_OpenDUT()
{
int status=0,xtal_status=0;
unsigned long cmd=0, parm1=0, parm2=0, cnt=0,Cnt=0;
unsigned long dparm1=0, dparm2=0;
BOOL extern_LDO = 0;
int lnaMode = 0;
int g_TesterOption=2;
int g_RSSI_DataRate[22];
int NumDataRate=0;
double g_RSSI_CalPwrLevelStart=-45.0;
double g_InsertionLoss[MAXNUM_TXPATH][NUM_BAND][NUM_SUBBAND_A_REVD];
char line[MAX_LENGTH]="", buff[_MAX_PATH] = "";
char INIFileName[_MAX_PATH]="";
int vgcCtrl=0;
int BandAG=0;
if(gTxStart==1){
DebugLogRite("===[MARVELL]=== Txstop is not called ===\n");
MRVL_RFT_TxStop();
}
if(gOpenDut == 1){
DebugLogRite("===[MARVELL]=== CloseDut is not called, already opendut state===\n");
return 0;
}
gOpenDut = 1;
gTxStart=1;
init_PcktPifsSettings();
#if 1
DebugLogRite("===[MARVELL]=== start DutIf_InitConnection() ===\n");
status = DutIf_InitConnection(&memberVariables.mDutWlanApiClssObj);
DebugLogRite("===[MARVELL]=== end DutIf_InitConnection() ===\n");
if (status)
{
//DebugLogRite("open dut fail: 0x%X\n", status);
DebugLogRite("open dut fail: 0x%X\n", status);
return ERROR_DRIVER_NG;
}
#endif
strcpy(INIFileName, "SetUp.ini");
sprintf(line, "RSSI_CalPwrLevelStart");
GetPrivateProfileString("RSSI_CAL", line, "-45.0", buff, 256, INIFileName);
sscanf(buff, "%lf", &g_RSSI_CalPwrLevelStart);
sprintf(line, "RSSI_CAL");
NumDataRate = GetPrivateProfileInt (line, "RSSI_CalDataRate_Nb", NumDataRate, INIFileName);
for(Cnt = 0; Cnt < NumDataRate; Cnt++)
{
sprintf (line, "RSSI_CalDataRate_%d", Cnt);
g_RSSI_DataRate[Cnt] = GetPrivateProfileInt ("RSSI_CAL", line, g_RSSI_DataRate[Cnt], INIFileName);
}
//printf("--------*****---------------------------!%d**\n",status);
#if 1
DebugLogRite("===[MARVELL]=== when first time, shoot tx power one time ===");
DutIf_SetBandAG(gBand); // jeremy 추가
MRVL_RFT_Channel(6);
MRVL_RFT_TxDataRate(6);
//MRVL_RFT_TxGain(17);
MRVL_RFT_TxGain(16); // jeremy 추가
MRVL_RFT_TxStart();
DebugLogRite("===[MARVELL]=== JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ ===");
usleep(500000);
DebugLogRite("===[MARVELL]=== RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR ===");
MRVL_RFT_TxStop();
usleep(200000);
DebugLogRite("===[MARVELL]=== MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM ===");
#endif
return status;
}
추가한 부분은 신호를 쏘기 전에 band 및 채널 대역, data rate, gain 을 설정한 후 tx 를 출력하게끔 했다. 따라서 opendut 만 하더라도 tx 를 출력하게 되는 것이다.
실제 위와 같이 수정한 후, 11ac 만 측정할 때 발생하던 문제가 사라졌다.