# Realtek Mass Production DLL Specification ## General Functions ### StartDUT Function define: ```C PVOID RTLMP_API StartDUT(UINT32 ChipID, UINT32 ChipVersion); ``` Description: >This function attempts to start the service of the protocol driver. Parameter description * ChipID - input chip name :::info Example : 0x8852A ::: * ChipVersion - input chip version :::info Example : 0x1:PCIE, 0x2:USB, 0x3:SDIO ::: ### StopDUT Function define: ```C BOOL RTLMP_API StopDUT(); ``` Description: > This function attempts to stop the service of the protocol driver. Parameter description * NULL ### CloseDUT Function define: ```C BOOL RTLMP_API CloseDUT(); ``` Description: > This function attempts to close the service of the protocol driver, and it will change driver into normal mode. Parameter description * NULL ### RTW_GetDeviceID Function define: ```C int RTLMP_API RTW_GetDeviceID(); ``` Description: >This function attempts to get device id. Parameter description * NULL ### RTW_GetUUID Function define: ```C int RTLMP_API RTW_GetUUID(); ``` Description: >This function attempts to get device uuid. Parameter description * NULL ### SetAntenna Function define: ```C BOOL RTLMP_API SetAntenna(UINT32 Antenna); ``` Description: > Set tx/rx antenna path Parameter description * Antenna - set antenna value as shift bit, example like as following. :::info Ex: SetAntenna(Tx_RF_PATH << 4 | Rx_RF_PATH); ::: ```C=1 public enum RF_PATH { RF_PATH_A = 0, RF_PATH_B = 1, RF_PATH_C = 2, RF_PATH_D = 3, RF_PATH_AB, RF_PATH_AC, RF_PATH_AD, RF_PATH_BC, RF_PATH_BD, RF_PATH_CD, RF_PATH_ABC, RF_PATH_ABD, RF_PATH_ACD, RF_PATH_BCD, RF_PATH_ABCD, RF_PATH_NONE }; ``` ### RTW_SetChannelBandwith Function define: ```C bool RTLMP_API RTW_SetChannelBandwith(int channel, int bandwidth, int SC_idx); ``` Description: > Set channel, bandwidth and sc location Parameter description * Channel - channel number :::info Ex: channel 1, set 0x1 ::: * bandwidth - bandwidth index :::info Ex: BANDWIDTH_20M = 0; BANDWIDTH_40M = 1; BANDWIDTH_80M = 3 ; ::: * SC_index - reference as following ![](https://i.imgur.com/ZC0K1Mp.png) ### RTW_SwitchBTCPath Function define: ```C bool RTLMP_API RTW_SwitchBTCPath(int btc_mode); ``` Description: > This function attempts to swich antenna for wl/bt. Parameter description * btc_mode ```C public enum BTC_mode { BTC_MODE_NORMAL, BTC_MODE_WL, BTC_MODE_BT } ``` ## Get Support capability ### RTW_GetTxNSS Function define: ```C INT RTLMP_API RTW_GetTxNSS(); ``` Description: > Get maximum support TX spacial stream Parameter description * NULL ### RTW_GetRxNSS Function define: ```C INT RTLMP_API RTW_GetRxNSS(); ``` Description: > Get maximum support RX spacial stream Parameter description * NULL ## Read/Write register ### RegisterRead Function define: ```C INT RTLMP_API ReadRegData( LPADAPTER AdapterObject, UINT RegOffsetValue, UINT RegDataWidth, ULONG* RegDataValue ); ``` Description: > Read MAC register Parameter description > Write MAC register Parameter description * RegOffsetValue :::info Ex: 0x280 ::: * RegDataWidth :::info 1, 2, or 4 Bytes datawidth ::: * RegDataValue :::info value read from corresponding MAC register ::: ### RegisterWrite Function define: ```C INT RTLMP_API RFWriteRegData( LPADAPTER AdapterObject, UINT RegOffsetValue, UINT RegDataWidth, ULONG RegDataValue ); ``` Description: > Write MAC register Parameter description * RegOffsetValue :::info Ex: 0x280 ::: * RegDataWidth :::info 1, 2, or 4 Bytes datawidth ::: * RegDataValue :::info value write to corresponding MAC register ::: ### RegisterRead_RF Function define: ```C INT RTLMP_API RFReadRegData( LPADAPTER AdapterObject, UINT RegOffsetValue, UINT RegDataWidth, ULONG* RegDataValue ); ``` Description: > Read RF register Parameter description * RegOffsetValue :::info Ex: 0x18 ::: * RegDataWidth :::info 1, 2, or 4 Bytes datawidth ::: * RegDataValue :::info value read from corresponding RF register ::: ### RegisterWrite_RF Function define: ```C INT RTLMP_API RFWriteRegData( LPADAPTER AdapterObject, UINT RegOffsetValue, UINT RegDataWidth, ULONG RegDataValue ); ``` Description: > Write RF register Parameter description * RegOffsetValue :::info Ex: 0x18 ::: * RegDataWidth :::info 1, 2, or 4 Bytes datawidth ::: * RegDataValue :::info value write to corresponding RF register ::: ### RegisterRead_BB Function define: ```C INT RTLMP_API ReadBBData( LPADAPTER AdapterObject, UINT RegOffsetValue, UINT RegDataWidth, BOOLEAN bOFDM, ULONG* RegDataValue ); ``` Description: > Read BB register Parameter description * RegOffsetValue :::info Ex: 0xF4 ::: * RegDataWidth :::info 1, 2, or 4 Bytes datawidth ::: * bOFDM :::info 0 for CCK, 1 for OFDM ::: * RegDataValue :::info value read from corresponding BB register ::: ### RegisterWrite_BB Function define: ```C INT RTLMP_API WriteBBData( LPADAPTER AdapterObject, UINT RegOffsetValue, UINT RegDataWidth, BOOLEAN bOFDM, ULONG RegDataValue ); ``` Description: > Write BB register Parameter description * RegOffsetValue :::info Ex: 0xF4 ::: * RegDataWidth :::info 1, 2, or 4 Bytes datawidth ::: * bOFDM :::info 0 for CCK, 1 for OFDM ::: * RegDataValue :::info value write to corresponding BB register ::: ## Efuse related ### RTW_LoadEFuseMaskFile Function define: ```C int RTLMP_API RTW_LoadEFuseMaskFile(char *path); ``` Description: > Load EFUSE mask from EFUSE mask file Parameter description * path :::info (Windows) > Mask file should be put in %SystemRoot%\System32\drivers\ > Ex: rtl8852ae\efuse_mask.mask ::: Return reason code ```C enum rtw_hal_status { RTW_HAL_STATUS_SUCCESS, /* 0 */ RTW_HAL_STATUS_FAILURE, /* 1 */ RTW_HAL_STATUS_RESOURCE, /* 2 */ RTW_HAL_STATUS_IO_INIT_FAILURE, /* 3 */ RTW_HAL_STATUS_MAC_INIT_FAILURE, /* 4 */ RTW_HAL_STATUS_BB_INIT_FAILURE, /* 5 */ RTW_HAL_STATUS_RF_INIT_FAILURE, /* 6 */ RTW_HAL_STATUS_BTC_INIT_FAILURE, /* 7 */ RTW_HAL_STATUS_HAL_INIT_FAILURE, /* 8 */ RTW_HAL_STATUS_EFUSE_UNINIT, /* 9 */ RTW_HAL_STATUS_EFUSE_IVALID_OFFSET, /* 10 */ RTW_HAL_STATUS_EFUSE_PG_FAIL, /* 11 */ RTW_HAL_STATUS_MAC_API_FAILURE, /* 12 */ RTW_HAL_STATUS_BB_CH_INFO_LAST_SEG, /*13*/ RTW_HAL_STATUS_UNKNOWN_RFE_TYPE /* 14 */ }; ``` ### RTW_LoadEFuseMapFile Function define: ```C int RTLMP_API RTW_LoadEFuseMapFile(char *path); ``` Description: > Load EFUSE map from EFUSE mask file to driver efuse logical map Parameter description * path :::info (Windows) > Map file should be put in %SystemRoot%\System32\drivers\ > Ex: rtl8852ae\efuse_map.map ::: Return reason code ```C enum rtw_hal_status { RTW_HAL_STATUS_SUCCESS, /* 0 */ RTW_HAL_STATUS_FAILURE, /* 1 */ RTW_HAL_STATUS_RESOURCE, /* 2 */ RTW_HAL_STATUS_IO_INIT_FAILURE, /* 3 */ RTW_HAL_STATUS_MAC_INIT_FAILURE, /* 4 */ RTW_HAL_STATUS_BB_INIT_FAILURE, /* 5 */ RTW_HAL_STATUS_RF_INIT_FAILURE, /* 6 */ RTW_HAL_STATUS_BTC_INIT_FAILURE, /* 7 */ RTW_HAL_STATUS_HAL_INIT_FAILURE, /* 8 */ RTW_HAL_STATUS_EFUSE_UNINIT, /* 9 */ RTW_HAL_STATUS_EFUSE_IVALID_OFFSET, /* 10 */ RTW_HAL_STATUS_EFUSE_PG_FAIL, /* 11 */ RTW_HAL_STATUS_MAC_API_FAILURE, /* 12 */ RTW_HAL_STATUS_BB_CH_INFO_LAST_SEG, /*13*/ RTW_HAL_STATUS_UNKNOWN_RFE_TYPE /* 14 */ }; ``` ### RTW_GetLogicalEFuseSize Function define: ```C int RTLMP_API RTW_GetLogicalEFuseSize(void); ``` Description: > Get size of the driver EFUSE logical map. Parameter description * NULL ### RTW_GetEFuseSize Function define: ```C int RTLMP_API RTW_GetEFuseSize(void); ``` Description: > Get total size of the HW EFUSE. Parameter description * NULL ### RTW_GetEFuseAvaliableSize Function define: ```C int RTLMP_API RTW_GetEFuseAvaliableSize(void); ``` Description: > Get avaliable size of the HW EFUSE Parameter description * NULL ### RTW_GetMaskByIndex Function define: ```C int RTLMP_API RTW_GetMaskByIndex(int Offset); ``` Description: > Get efuse mask with index > Each index represents one byte of mask > Each bit of the mask represents two bytes of logical EFUSE map > 1: Can be modified 0: Can not be modified Parameter description * Offset - offset of the efuse mask ### RTW_ReadEfuse1Byte Function define: ```C int RTLMP_API RTW_ReadEfuse1Byte(int Offset); ``` Description: > Read value from offset of the driver EFUSE logical map. Parameter description * Offset - Offset of the EFUSE logical map ### RTW_WriteEfuse1Byte Function define: ```C int RTLMP_API RTW_WriteEfuse1Byte(int Offset, int Value); ``` Description: > Write value to offset of the driver EFUSE logical map Parameter description * Offset - Offset of the EFUSE logical map * Value - Value to be written ### RTW_UpdateEFuse Function define: ```C int RTLMP_API RTW_UpdateEFuse(void); ``` Description: > Program HW EFUSE with driver EFUSE logical map :::danger You have to load EFUSE mask file before trying to program the EFUSE! ::: :::danger You have to program entire EFUSE map before trying to program partial of the EFUSE! ::: Parameter description * NULL ### RTW_UpdateEFuseMAP Function define: ```C int RTLMP_API RTW_UpdateEFuseMAP(void); ``` Description: > Reload driver EFUSE logical map from HW EFUSE. Parameter description * NULL ## BT Efuse related ### RTW_GetLogicalBTEFuseSize Function define: ```C int RTLMP_API RTW_GetLogicalBTEFuseSize(void); ``` Description: > Get size of the driver BT EFUSE logical map. Parameter description * NULL ### RTW_GetBTEFuseSize Function define: ```C int RTLMP_API RTW_GetBTEFuseSize(void); ``` Description: > Get total size of the HW BT EFUSE. Parameter description * NULL ### RTW_GetBTEFuseAvaliableSize Function define: ```C int RTLMP_API RTW_GetBTEFuseAvaliableSize(void); ``` Description: > Get avaliable size of the HW BT EFUSE Parameter description * NULL ### RTW_LoadBTEFuseMapFile Function define: ```C int RTLMP_API RTW_LoadBTEFuseMaskFile(char *path); ``` Description: > Load BT EFUSE mask from EFUSE mask file Parameter description * path :::info (Windows) > Mask file should be put in %SystemRoot%\System32\drivers\ > Ex: rtl8852ae\bt_efuse_mask.mask ::: Return reason code ```C enum rtw_hal_status { RTW_HAL_STATUS_SUCCESS, /* 0 */ RTW_HAL_STATUS_FAILURE, /* 1 */ RTW_HAL_STATUS_RESOURCE, /* 2 */ RTW_HAL_STATUS_IO_INIT_FAILURE, /* 3 */ RTW_HAL_STATUS_MAC_INIT_FAILURE, /* 4 */ RTW_HAL_STATUS_BB_INIT_FAILURE, /* 5 */ RTW_HAL_STATUS_RF_INIT_FAILURE, /* 6 */ RTW_HAL_STATUS_BTC_INIT_FAILURE, /* 7 */ RTW_HAL_STATUS_HAL_INIT_FAILURE, /* 8 */ RTW_HAL_STATUS_EFUSE_UNINIT, /* 9 */ RTW_HAL_STATUS_EFUSE_IVALID_OFFSET, /* 10 */ RTW_HAL_STATUS_EFUSE_PG_FAIL, /* 11 */ RTW_HAL_STATUS_MAC_API_FAILURE, /* 12 */ RTW_HAL_STATUS_BB_CH_INFO_LAST_SEG, /*13*/ RTW_HAL_STATUS_UNKNOWN_RFE_TYPE /* 14 */ }; ``` ### RTW_LoadBTEFuseMaskFile Function define: ```C int RTLMP_API RTW_LoadBTEFuseMapFile(char *path); ``` Description: > Load BT EFUSE map from BT EFUSE mask file to driver efuse logical map Parameter description * path :::info (Windows) > Map file should be put in %SystemRoot%\System32\drivers\ > Ex: rtl8852ae\bt_efuse_map.map ::: Return reason code ```C enum rtw_hal_status { RTW_HAL_STATUS_SUCCESS, /* 0 */ RTW_HAL_STATUS_FAILURE, /* 1 */ RTW_HAL_STATUS_RESOURCE, /* 2 */ RTW_HAL_STATUS_IO_INIT_FAILURE, /* 3 */ RTW_HAL_STATUS_MAC_INIT_FAILURE, /* 4 */ RTW_HAL_STATUS_BB_INIT_FAILURE, /* 5 */ RTW_HAL_STATUS_RF_INIT_FAILURE, /* 6 */ RTW_HAL_STATUS_BTC_INIT_FAILURE, /* 7 */ RTW_HAL_STATUS_HAL_INIT_FAILURE, /* 8 */ RTW_HAL_STATUS_EFUSE_UNINIT, /* 9 */ RTW_HAL_STATUS_EFUSE_IVALID_OFFSET, /* 10 */ RTW_HAL_STATUS_EFUSE_PG_FAIL, /* 11 */ RTW_HAL_STATUS_MAC_API_FAILURE, /* 12 */ RTW_HAL_STATUS_BB_CH_INFO_LAST_SEG, /*13*/ RTW_HAL_STATUS_UNKNOWN_RFE_TYPE /* 14 */ }; ``` ### RTW_GetBTMaskByIndex Function define: ```C int RTLMP_API RTW_GetBTMaskByIndex(int Offset); ``` Description: > Get efuse mask with index > Each index represents one byte of mask > Each bit of the mask represents two bytes of logical EFUSE map > 1: Can be modified 0: Can not be modified Parameter description * Offset - offset of the efuse mask ### RTW_ReadBTEFuseByte Function define: ```C int RTLMP_API RTW_ReadBTEFuseByte(int Offset); ``` Description: > Read value(1byte) from offset of the driver BT EFUSE logical map. Parameter description * Offset - Offset of the EFUSE logical map ### RTW_WriteBTEFuseByte Function define: ```C int RTLMP_API RTW_WriteBTEFuseByte(int Offset, int Value); ``` Description: > Write value(1byte) to offset of the driver BT EFUSE logical map Parameter description * Offset - Offset of the EFUSE logical map * Value - Value to be written ### RTW_UpdateBTEFuse Function define: ```C int RTLMP_API RTW_UpdateBTEFuse(void); ``` Description: > Program HW BT EFUSE with driver BT EFUSE logical map :::danger You have to load EFUSE mask file before trying to program the EFUSE! ::: :::danger You have to program entire EFUSE map before trying to program partial of the EFUSE! ::: Parameter description * NULL ### RTW_UpdateBTEFuseMAP Function define: ```C int RTLMP_API RTW_UpdateBTEFuseMAP(void); ``` Description: > Reload driver BT EFUSE logical map from HW BT EFUSE. Parameter description * NULL ## Rx related ### RTW_QueryRxPacketReceived Function define: ```C unsigned int RTLMP_API RTW_QueryRxPacketReceived(); ``` Description: > Get rx ok counter of driver layer recevied. Parameter description * NULL ### RTW_QueryRxPacketCRC32Error Function define: ```C unsigned int RTLMP_API RTW_QueryRxPacketCRC32Error(); ``` Description: > Get rx crc error counter of driver layer recevied. Parameter description * NULL ### RTW_QueryMacRxPacketReceived Function define: ```C unsigned int RTLMP_API RTW_QueryMacRxPacketReceived(); ``` Description: > Get rx ok counter of mac layer recevied. Parameter description * NULL ### RTW_QueryMacRxPacketCRC32Error Function define: ```C unsigned int RTLMP_API RTW_QueryMacRxPacketCRC32Error(); ``` Description: > Get rx crc error counter of mac layer recevied. Parameter description * NULL ### RTW_QueryPHYLayerRxPacketReceived Function define: ```C unsigned int RTLMP_API RTW_QueryPHYLayerRxPacketReceived(); ``` Description: > Get rx ok counter of phy layer recevied. Parameter description * NULL ### RTW_QueryPHYLayerRxPacketCRC32Error Function define: ```C unsigned int RTLMP_API RTW_QueryPHYLayerRxPacketCRC32Error(); ``` Description: > Get rx crc error counter of phy layer recevied. Parameter description * NULL ### RTW_ResetRxPacketReceived Function define: ```C bool RTLMP_API RTW_ResetRxPacketReceived(); ``` Description: > Reset rx counter of phy layer recevied. Parameter description * NULL ### RTW_ResetMACPacketReceived Function define: ```C bool RTLMP_API RTW_ResetMACPacketReceived(); ``` Description: > Reset rx counter of mac layer recevied. Parameter description * NULL ### RTW_ResetDrvPacketReceived Function define: ```C bool RTLMP_API RTW_ResetDrvPacketReceived(); ``` Description: >Reset rx counter of driver layer recevied. Parameter description * NULL ### RTW_ReadRSSIValue Function define: ```C int RTLMP_API RTW_ReadRSSIValue(int rx_path); ``` Description: > Get rx crc error counter of phy layer recevied. Parameter description * rx_path - input rf_path which rx path enabled. ### RTW_ReadRSSIValue_Ex Function define: ```C int RTLMP_API RTW_ReadRSSIValue(int* rssi, int rx_path); ``` Description: > Get rx crc error counter of phy layer recevied. Parameter description * rssi - input an array pointer to get rssi value (array[0] = path_A rssi; array[1] = path_B rssi) * rx_path - input path-AB. * nss - input rx nss amount. ### RTW_ReadRxEVM_Ex Function define: ```C bool RTLMP_API RTW_ReadRxEVM_Ex(int* rxevm); ``` Description: > Get rx evm table. Parameter description * rxevm - fill in a int array pointer. :::info Example: int[] array = new array[]; RTW_ReadRxEVM_Ex(array); ::: ### RTW_SetGainOffset Function define: ```C bool RTLMP_API RTW_SetGainOffset(int offset, int rf_path); ``` Description: > Set rx gain offset. Parameter description * offset - fill in offset value. * rf_pth - input rf_path which rx path enabled ## Tx related ### RTW_DLL_SwitchTxPwrTrack Function define: ```C bool RTLMP_API RTW_DLL_SwitchTxPwrTrack(int TxPwrTrackState); ``` Description: > This function attempts to set current power track status. Parameter description * TxPwrTrackState - fill in track state; :::info Example: TSSI_OFF = 0x0; TSSI_ON = 0x1 ; TSSI_Calibration = 0x2 ::: ### RTW_DLL_QueryTxPwrTrack Function define: ```C unsigned int RTLMP_API RTW_DLL_QueryTxPwrTrack(); ``` Description: > This function attempts to get current power track status. Parameter description * NULL ### RTW_ReadRFThermalMeter_Ex Function define: ```C unsigned int RTLMP_API RTW_ReadRFThermalMeter_Ex(int Rf_Path); ``` Description: > This function attempts to read current thermal value. Parameter description * RF_Path - fill in which path need to read. ### RTW_SetTxPowerControl Function define: ```C bool RTLMP_API RTW_SetTxPowerControl(int phy_index, double txpower); ``` Description: > This function attempts to set current tx power dBm. Parameter description * phy_index :::info Example : 0 : phy_0 ; 1 : phy_1 ::: * txpower - fill in dBm value. ### RTW_ReadPowerTable Function define: ```C double RTLMP_API RTW_ReadPowerTable(int rfpath, int rate, int dcm, int offset, int bandwidth, int beamforming, int channel); ``` Description: > This function attempts to get current tx power dBm. Parameter description * rfpath * rate :::info [Reference - Data Rate](#Reference) ::: * dcm :::warning dcm = 0 ::: * offset :::warning offset = 0 ::: * bandwidth :::info Input current bandwidth ::: * beamforming :::warning beamforming = 0 ::: * channel :::info Input current channel ::: ### RTW_SetTxPowerAGCCW Function define: ```C bool RTLMP_API RTW_SetTxPowerAGCCW(int phy_index,int is_cck,int RfPath, double txpowercw); ``` Description: > Adjust each rf path tx power agc codeword. Parameter description * phy_index :::info Example : 0 : phy_0 ; 1 : phy_1 ::: * is_cck :::info Example : 0 : not cck rate ; 1 : cck rate ::: * RFPath * txpowercw :::danger txpowercw = RTW_ReadTXPwrRef_CW() + offset ::: ### RTW_ReadTXInfoPwr Function define: ```C double RTLMP_API RTW_ReadTXInfoPwr(); ``` Description: > This function attempts to get tx power value which calculated by mac layer Parameter description * NULL ### RTW_ReadTXPwrRef Function define: ```C double RTLMP_API RTW_ReadTXPwrRef(int is_cck, int RfPath); ``` Description: > Get tx power reference value from driver. Parameter description * is_cck :::info Example : 0 : not cck rate ; 1 : cck rate ::: * RFPath ### RTW_ReadTXPwrRef_CW Function define: ```C double RTLMP_API RTW_ReadTXPwrRef_CW(int is_cck, int RfPath); ``` Description: > Get tx power reference codeword value from driver. Parameter description * is_cck :::info Example : 0 : not cck rate ; 1 : cck rate ::: * RFPath ### RTW_SetTxMode Function define: ```C int RTLMP_API RTW_SetTxMode(int tx_mode); ``` Description: > Select interface to generate tx packet. Parameter description * tx_mode :::info Example: 0: true mac tx; 1: pseudo mac tx ::: ### RTW_SetSwTxData Function define: ```C int RTLMP_API RTW_SetSwTxData(UINT dbw, INT long_preamble_en, UINT stbc, UINT gi, UINT he_ltf_type, UINT he_mcs_sigb, UINT he_dcm_sigb, UINT max_tx_time_0p4us, UINT bss_color, UINT he_er_u106ru_en, UINT mode, UINT ppdu_type, UINT cbw, UINT txsc, UINT n_user, UINT sw_tx_gen_usr_idx, UINT data_rate, UINT mcs, UINT fec, UINT dcm, UINT aid, UINT apep, UINT ru_alloc, UINT nss, UINT pwr_boost_db, UINT scrambler_seed, UINT random_init_seed); ``` Description: > This function attempts to start sw packet tx. Parameter description * dbw :::warning Need to follow sc index like example as following : ::: :::info Example : sc = 0 , dbw = current bandwidth ; sc = 1~4 , dbw = bandwidth_20M ; sc = 9~12 , dbw = bandwidth_40M ; sc = 13~14 , dbw = bandwidth_80M ; ::: * long_preamble_en :::info Example : 0 : disable ; 1: enable ::: * stbc :::info Example : 0 : disable ; 1: enable ::: * gi * he_ltf_type ```C=1 GI+LTF rule : if (HT || VHT) GI+LTF = {0.4, 0.8} //0.4 -> GI= 0, LTF = 0 ; 0.8 -> GI= 1, LTF = 0 else if (HE) if (HE_SU || HE_ER_SU) if (!DCM && !STBC) GI+LTF = {1x 0.8, 2x 0.8, 2x 1.6, 4x 3.2, 4x 0.8} //1x 0.8 -> GI= 1, LTF = 0 //2x 0.8 -> GI= 1, LTF = 1 //2x 1.6 -> GI= 2, LTF = 1 //4x 3.2 -> GI= 3, LTF = 2 //4x 0.8 -> GI= 1, LTF = 2 else GI+LTF = {1x 0.8, 2x 0.8, 2x 1.6, 4x 3.2} //1x 0.8 -> GI= 1, LTF = 0 //2x 0.8 -> GI= 1, LTF = 1 //2x 1.6 -> GI= 2, LTF = 1 //4x 3.2 -> GI= 3, LTF = 2 else if (HE_MU) GI+LTF = {2x 0.8, 2x 1.6, 4x 0.8, 4x 3.2} //2x 0.8 -> GI= 1, LTF = 1 //2x 1.6 -> GI= 2, LTF = 1 //4x 0.8 -> GI= 1, LTF = 2 //4x 3.2 -> GI= 3, LTF = 2 else if (HE_TB) GI+LTF = {1x 1.6, 2x 1.6, 4x 3.2} //1x 1.6 -> GI= 2, LTF = 0 //2x 1.6 -> GI= 2, LTF = 1 //4x 3.2 -> GI= 3, LTF = 2 ``` * he_mcs_sigb :::info Example : 0~5 ::: * he_dcm_sigb :::info Example : 0 : disable ; 1: enable ::: * max_tx_time_0p4us :::warning max_tx_time_0p4us = 0 ::: * bss_color :::warning bss_color = 0 ::: * he_er_u106ru_en :::info Example : 0 : disable ; 1: enable ::: * mode :::warning mode = 1 ::: * ppdu_type ```C=1 public enum PPDU { CCK, Legacy, HT_MF, HT_GF, VHT, HE_SU, HE_ER_SU, HE_MU, HE_TB } ``` * cbw :::info Input current bandwidth ::: * txsc :::info Input current txsc ::: * n_user :::warning n_user = 1 ::: * sw_tx_gen_usr_idx :::warning sw_tx_gen_usr_idx = 0 ::: * data_rate :::info [Reference - Data Rate](#Reference) ::: * mcs :::info Example 1: PPDU = OFDM(6M,9M,12M ...) Select OFDM-6M , MCS index = 0 ; Select OFDM-12M , MCS index = 2 Example 2: PPDU = VHT(MCS0,MCS1,MCS2 ...) Select VHT-MCS0 , MCS index = 0 ; Select VHT-MCS2 , MCS index = 2 ::: * fec :::info Example : 0 : BCC ; 1 : LDPC ::: * dcm :::info Example : 0 : disable ; 1: enable ::: * aid :::warning aid = 0 ::: * apep :::warning apep = 0 ::: * ru_alloc :::warning ru_alloc = 0 ::: * nss :::info Example : 1 = NSS1; 2 = NSS2; ::: * pwr_boost_db :::warning pwr_boost_db = 0 ::: * scrambler_seed :::warning scrambler_seed = 0 ::: * random_init_seed :::warning random_init_seed = 0 ::: ### RTW_SetPlcpTxData Function define: ```C int RTLMP_API RTW_SetPlcpTxData(UINT dbw, UINT long_preamble_en, UINT stbc, UINT gi, UINT he_ltf_type, UINT he_mcs_sigb, UINT he_dcm_sigb, UINT max_tx_time_0p4us, UINT bss_color, UINT he_er_u106ru_en, UINT mode, UINT ppdu_type, UINT cbw, UINT txsc, UINT n_user, UINT mu_mimo_user_idx, UINT mcs, UINT fec, UINT dcm, UINT aid, UINT apep, UINT ru_alloc, UINT nss, UINT pwr_boost_db, UINT scrambler_seed, UINT random_init_seed); ``` Description: > This function attempts to config hw packet tx. Parameter description * dbw :::warning Need to follow sc index like example as following : ::: :::info Example : sc = 0 , dbw = current bandwidth ; sc = 1~4 , dbw = bandwidth_20M ; sc = 9~12 , dbw = bandwidth_40M ; sc = 13~14 , dbw = bandwidth_80M ; ::: * long_preamble_en :::info Example : 0 : disable ; 1: enable ::: * stbc :::info Example : 0 : disable ; 1: enable ::: * gi * he_ltf_type ```C=1 GI+LTF rule : if (HT || VHT) GI+LTF = {0.4, 0.8} //0.4 -> GI= 0, LTF = 0 ; 0.8 -> GI= 1, LTF = 0 else if (HE) if (HE_SU || HE_ER_SU) if (!DCM && !STBC) GI+LTF = {1x 0.8, 2x 0.8, 2x 1.6, 4x 3.2, 4x 0.8} //1x 0.8 -> GI= 1, LTF = 0 //2x 0.8 -> GI= 1, LTF = 1 //2x 1.6 -> GI= 2, LTF = 1 //4x 3.2 -> GI= 3, LTF = 2 //4x 0.8 -> GI= 1, LTF = 2 else GI+LTF = {1x 0.8, 2x 0.8, 2x 1.6, 4x 3.2} //1x 0.8 -> GI= 1, LTF = 0 //2x 0.8 -> GI= 1, LTF = 1 //2x 1.6 -> GI= 2, LTF = 1 //4x 3.2 -> GI= 3, LTF = 2 else if (HE_MU) GI+LTF = {2x 0.8, 2x 1.6, 4x 0.8, 4x 3.2} //2x 0.8 -> GI= 1, LTF = 1 //2x 1.6 -> GI= 2, LTF = 1 //4x 0.8 -> GI= 1, LTF = 2 //4x 3.2 -> GI= 3, LTF = 2 else if (HE_TB) GI+LTF = {1x 1.6, 2x 1.6, 4x 3.2} //1x 1.6 -> GI= 2, LTF = 0 //2x 1.6 -> GI= 2, LTF = 1 //4x 3.2 -> GI= 3, LTF = 2 ``` * he_mcs_sigb :::info Example : 0~5 ::: * he_dcm_sigb :::info Example : 0 : disable ; 1: enable ::: * max_tx_time_0p4us :::warning if want to use tx time control packet length, set max_tx_time_0p4us = 13710 else max_tx_time_0p4us = 0 ::: * bss_color :::warning bss_color = 0 ::: * he_er_u106ru_en :::info Example : 0 : disable ; 1: enable ::: * mode :::info Example : 0:length control ; 1: tx time control ::: * ppdu_type ```C=1 public enum PPDU { CCK, Legacy, HT_MF, HT_GF, VHT, HE_SU, HE_ER_SU, HE_MU, HE_TB } ``` * cbw :::info Input current bandwidth ::: * txsc :::info Input current txsc ::: * n_user :::warning if PPDU = HE-MU, fill in HE-MU user number, else n_user = 1 ::: * mu_mimo_user_idx :::warning mu_mimo_user_idx = 0 ::: * mcs :::info Example 1: PPDU = OFDM(6M,9M,12M ...) Select OFDM-6M , MCS index = 0 ; Select OFDM-12M , MCS index = 2 Example 2: PPDU = VHT(MCS0,MCS1,MCS2 ...) Select VHT-MCS0 , MCS index = 0 ; Select VHT-MCS2 , MCS index = 2 ::: * fec :::info Example : 0 : BCC ; 1 : LDPC ::: * dcm :::info Example : 0 : disable ; 1: enable ::: * aid :::warning aid = 0 ::: * apep :::warning if want to use length control packet length, set apep else apep = 0 ::: * ru_alloc :::info Input current RU allocation ::: * nss :::info Example : 1 = NSS1; 2 = NSS2; ::: * pwr_boost_db :::warning pwr_boost_db = 0 ::: * scrambler_seed :::info random a integer number (1~255) ::: * random_init_seed :::info random a integer number (1~255) ::: Function retuen ```C public enum plcp_sts { PLCP_SUCCESS = 0, LENGTH_EXCEED, CCK_INVALID, OFDM_INVALID, HT_INVALID, VHT_INVALID, HE_INVALID, SPEC_INVALID }; ``` ### RTW_ConfigPlcpUserInfo Function define: ```C int RTLMP_API RTW_ConfigPlcpUserInfo( UINT plcp_usr_idx, UINT mcs, UINT fec, UINT dcm, UINT aid, UINT scrambler_seed, UINT random_init_seed, UINT apep, UINT ru_alloc, UINT nss, UINT pwr_boost_db ); ``` Description: > Config plcp info fo every user. Parameter description * plcp_usr_idx :::info Input current user index ::: * mcs :::info Example 1: PPDU = OFDM(6M,9M,12M ...) Select OFDM-6M , MCS index = 0 ; Select OFDM-12M , MCS index = 2 Example 2: PPDU = VHT(MCS0,MCS1,MCS2 ...) Select VHT-MCS0 , MCS index = 0 ; Select VHT-MCS2 , MCS index = 2 ::: * fec :::info Example : 0 : BCC ; 1 : LDPC ::: * dcm :::info Example : 0 : disable ; 1: enable ::: * aid :::warning aid = 0 ::: * scrambler_seed :::info random a integer number (1~255) ::: * random_init_seed :::info random a integer number (1~255) ::: * apep :::info Input packet length for current user ::: * ru_alloc :::info Input ru allocation for current user ::: * nss :::info Example : 1 = NSS1; 2 = NSS2; ::: * pwr_boost_db :::info Example : 0: disable ; 1: enble ::: ### RTW_SetSingleToneTx_ax Function define: ```C bool RTLMP_API RTW_SetSingleToneTx_ax(int enable, int tx_path); ``` Description: > This function attempts to start single tone tx Parameter description * enable * tx_path - fill in which RF_path want to tx :::info Start tx example : RTW_SetSingleToneTx_ax(1, path_A); Stop tx example : RTW_SetSingleToneTx_ax(0, path_A); ::: ### RTW_SetPacketPMacTx Function define: ```C bool RTLMP_API RTW_SetPacketPMacTx(int is_cck, int enable, int tx_cnt, int period, int tx_time, int tx_concurrent_en); ``` Description: > This function attempts to send hw packet tx. Parameter description * is_cck :::info Example : 0 : not cck rate ; 1 : cck rate ::: * enable :::info Example : 0 : stop tx ; 1 : start tx ::: * tx_cnt :::danger This parameter no effect ! Please set tx_cnt = 1 ::: * period :::danger This parameter no effect ! Please set period = 1 ::: * tx_time :::warning tx_time = 5484 ::: * tx_concurrent_en :::info Example : 0: disable concurrent mode ; 1: enable concurrent mode ::: ### RTW_SetContinuousPMacTx Function define: ```C bool RTLMP_API RTW_SetContinuousPMacTx(int is_cck, int enable); ``` Description: > This function attempts to start continuous tx Parameter description * is_cck - is cck rate equal 1; else equal 0 * enable :::info Start tx example : RTW_SetContinuousPMacTx(is_cck, 1); Stop tx example : RTW_SetContinuousPMacTx(is_cck, 0); ::: ### RTW_SetFWTriggerPMacTx Function define: ```C bool RTLMP_API RTW_SetFWTriggerPMacTx(int is_cck, int enable, int tx_cnt, int tx_duty, int tx_concurrent_en); ``` Description: > This function attempts to send hw packet tx through fw. Parameter description * is_cck :::info Example : 0 : not cck rate ; 1 : cck rate ::: * enable :::info Example : 0 : stop tx ; 1 : start tx ::: * tx_cnt :::info This parameter no effect ! ::: * tx_duty :::info This parameter is used to determine tx density durning whole tx time ::: * tx_concurrent_en :::info Example : 0: disable concurrent mode ; 1: enable concurrent mode ::: ### RTW_SetRfMode Function define: ```C bool RTLMP_API RTW_SetRfMode(int rf_mode); ``` Description: > This function attempts to control RF layer. Parameter description * rf_mode ```C enum phl_rf_mode { RF_MODE_NORMAL = 0, RF_MODE_SHUTDOWN = 1, RF_MODE_STANDBY = 2, RF_MODE_RX = 3, RF_MODE_TX = 4, RF_MODE_MAX }; ``` ## TSSI ### RTW_Set_TSSI_DE_Offset Function define: ```C bool RTLMP_API RTW_Set_TSSI_DE_Offset(int DE_Offset, int RF_PATH); ``` Description: > When TSSI on, this function will control tssi offset. Parameter description * DE_Offset - fill in a int value :::warning For mptool each index maybe difference 0.125 dB, therefore need to multiply by 8 to set this value ::: ### RTW_Get_Online_TSSI_DE_Value Function define: ```C int RTLMP_API RTW_Get_Online_TSSI_DE_Value(int RF_Path, int dbm, int pout); ``` Description: > When TSSI on, this function attempts to get TSSI de value. Parameter description * RF_Path - fill in a int value to which path need to be get. * dbm - fill in current power value. * pout - fill in pout value. ### RTW_Set_TSSI_DE_TX_Verify Function define: ```C bool RTLMP_API RTW_Set_TSSI_DE_TX_Verify(int DE_VALUE, int RF_PATH); ``` Description: > When TSSI on, this function attempts to set TSSI de value. Parameter description * DE_VALUE - fill in a int value * RF_Path - fill in a int value to which path need to be set. ## AP related ### RTW_Set_IP_Address Function define: ```C bool RTLMP_API RTW_Set_IP_Address(char* ip) ``` Description: > set IP address of DUT Parameter description * ip :::info Example: fill in string like "192.168.1.254" ::: ### RTW_Set_AP_Wlan_Interface Function define: ```C bool RTLMP_API RTW_Set_AP_Wlan_Interface(char* interface) ``` Description: > switch WLAN0/WLAN1 Parameter description * interface :::info Example: fill in string like "wlan0" or "wlan1" ::: ## AP flash calibration related ### RTW_Flash_Read_Xcap Function define: ```C int RTLMP_API RTW_Flash_Read_Xcap( enum WLAN wlan, enum BAND band ); ``` Description: > Read calibrarion data (crystal cap) from flash storage Parameter description * wlan ```C enum WLAN { WLAN_0 = 0, WLAN_1, WLAN_2 }; ``` * band ```C enum BAND { BAND_2G = 0, BAND_5G, BAND_6G }; ``` ### RTW_Flash_Write_Xcap Function define: ```C bool RTLMP_API RTW_Flash_Write_Xcap( enum WLAN wlan, enum BAND band, int value ); ``` Description: > Write calibrarion data (crystal cap) to flash storage Parameter description * wlan ```C enum WLAN { WLAN_0 = 0, WLAN_1, WLAN_2 }; ``` * band ```C enum BAND { BAND_2G = 0, BAND_5G, BAND_6G }; ``` * value :::info value write to flash ::: ### RTW_Flash_Read_Thermal Function define: ```C int RTLMP_API RTW_Flash_Read_Thermal( enum WLAN wlan, enum BAND band, enum RF_PATH path ); ``` Description: > Read calibrarion data (thermal) from flash storage Parameter description * wlan ```C enum WLAN { WLAN_0 = 0, WLAN_1, WLAN_2 }; ``` * band ```C enum BAND { BAND_2G = 0, BAND_5G, BAND_6G }; ``` * path ```C enum RF_PATH { RF_PATH_A = 0, RF_PATH_B = 1, RF_PATH_C = 2, RF_PATH_D = 3, RF_PATH_AB, RF_PATH_AC, RF_PATH_AD, RF_PATH_BC, RF_PATH_BD, RF_PATH_CD, RF_PATH_ABC, RF_PATH_ABD, RF_PATH_ACD, RF_PATH_BCD, RF_PATH_ABCD, RF_PATH_NONE }; ``` ### RTW_Flash_Write_Thermal Function define: ```C bool RTLMP_API RTW_Flash_Write_Thermal( enum WLAN wlan, enum BAND band, enum RF_PATH path, int value ); ``` Description: > Write calibrarion data (thermal) to flash storage Parameter description * wlan ```C enum WLAN { WLAN_0 = 0, WLAN_1, WLAN_2 }; ``` * band ```C enum BAND { BAND_2G = 0, BAND_5G, BAND_6G }; ``` * path ```C enum RF_PATH { RF_PATH_A = 0, RF_PATH_B = 1, RF_PATH_C = 2, RF_PATH_D = 3, RF_PATH_AB, RF_PATH_AC, RF_PATH_AD, RF_PATH_BC, RF_PATH_BD, RF_PATH_CD, RF_PATH_ABC, RF_PATH_ABD, RF_PATH_ACD, RF_PATH_BCD, RF_PATH_ABCD, RF_PATH_NONE }; ``` * value :::info value write to flash ::: ### RTW_Flash_Read_TSSI_Table Function define: ```C bool RTLMP_API RTW_Flash_Read_TSSI_Table( enum flash_k_tablename name, int length, enum RF_PATH path, int table[] ); ``` Description: > Read calibration data (2G/5G) TSSI DE table from flash storage Parameter description * name ```C enum flash_k_tablename { TABLE_2G_CCK_TSSI = 0, TABLE_2G_BW40_1S_TSSI, TABLE_5G_BW40_1S_TSSI }; ``` * length :::info length for TSSI table 6 for TABLE_2G_CCK_TSSI 5 for TABLE_2G_BW40_1S_TSSI 14 for TABLE_5G_BW40_1S_TSSI ::: * path ```C enum RF_PATH { RF_PATH_A = 0, RF_PATH_B = 1, RF_PATH_C = 2, RF_PATH_D = 3, RF_PATH_AB, RF_PATH_AC, RF_PATH_AD, RF_PATH_BC, RF_PATH_BD, RF_PATH_CD, RF_PATH_ABC, RF_PATH_ABD, RF_PATH_ACD, RF_PATH_BCD, RF_PATH_ABCD, RF_PATH_NONE }; ``` * table :::info array to save read/write value of TSSI table ::: ### RTW_Flash_Write_TSSI_Table Function define: ```C bool RTLMP_API RTW_Flash_Write_TSSI_Table( enum flash_k_tablename name, int length, enum RF_PATH path, int table[] ); ``` Description: > Write calibration data (2G/5G) TSSI DE table to flash storage * name ```C enum flash_k_tablename { TABLE_2G_CCK_TSSI = 0, TABLE_2G_BW40_1S_TSSI, TABLE_5G_BW40_1S_TSSI }; ``` * length :::info length for TSSI table 6 for TABLE_2G_CCK_TSSI 5 for TABLE_2G_BW40_1S_TSSI 14 for TABLE_5G_BW40_1S_TSSI ::: * path ```C enum RF_PATH { RF_PATH_A = 0, RF_PATH_B = 1, RF_PATH_C = 2, RF_PATH_D = 3, RF_PATH_AB, RF_PATH_AC, RF_PATH_AD, RF_PATH_BC, RF_PATH_BD, RF_PATH_CD, RF_PATH_ABC, RF_PATH_ABD, RF_PATH_ACD, RF_PATH_BCD, RF_PATH_ABCD, RF_PATH_NONE }; ``` * table :::info array to save read/write value of TSSI table ::: ### RTW_Flash_Read_RXGain Function define: ```c int RTLMP_API RTW_Flash_Read_RXGain( enum WLAN wlan, enum BAND band, enum RF_PATH path, enum CHANNEL_GROUP group, /*only for 5G*/ bool is_ofdm /*only for 2G*/ ); ``` Description: > Write calibration data (2G/5G) RX gain to flash storage Parameter description * wlan ```C enum WLAN { WLAN_0 = 0, WLAN_1, WLAN_2 }; ``` * band ```C enum BAND { BAND_2G = 0, BAND_5G, BAND_6G }; ``` * path ```c enum RF_PATH { RF_PATH_A = 0, RF_PATH_B = 1, RF_PATH_C = 2, RF_PATH_D = 3, RF_PATH_AB, RF_PATH_AC, RF_PATH_AD, RF_PATH_BC, RF_PATH_BD, RF_PATH_CD, RF_PATH_ABC, RF_PATH_ABD, RF_PATH_ACD, RF_PATH_BCD, RF_PATH_ABCD, RF_PATH_NONE }; ``` * group the variable is to recognize low, middle, high group of 5G channel, if you are using 2G channel, pass 0 to API ```c enum CHANNEL_GROUP { GROUP_LOW = 0, GROUP_MID, GROUP_HIGH }; ``` * is_ofdm the variable is to recognize ofdm and CCK group of 5G channel, if you are using 2G channel, pass 0 to API :::info true: ofdm false: cck ::: ### RTW_Flash_Write_RXGain Function define: ```c bool RTLMP_API RTW_Flash_Write_RXGain( enum WLAN wlan, enum BAND band, enum RF_PATH path, enum CHANNEL_GROUP group, /*only for 5G*/ bool is_ofdm, /*only for 2G*/ int value ); ``` Description: > Read calibration data (2G/5G) RX gain from flash storage Parameter description * wlan ```C enum WLAN { WLAN_0 = 0, WLAN_1, WLAN_2 }; ``` * band ```C enum BAND { BAND_2G = 0, BAND_5G, BAND_6G }; ``` * path ```c enum RF_PATH { RF_PATH_A = 0, RF_PATH_B = 1, RF_PATH_C = 2, RF_PATH_D = 3, RF_PATH_AB, RF_PATH_AC, RF_PATH_AD, RF_PATH_BC, RF_PATH_BD, RF_PATH_CD, RF_PATH_ABC, RF_PATH_ABD, RF_PATH_ACD, RF_PATH_BCD, RF_PATH_ABCD, RF_PATH_NONE }; ``` * group the variable is to recognize low, middle, high group of 5G channel, if you are using 2G channel, pass 0 to API ```c enum CHANNEL_GROUP { GROUP_LOW = 0, GROUP_MID, GROUP_HIGH }; ``` * is_ofdm the variable is to recognize low, middle, high group of 5G channel, if you are using 2G channel, pass 0 to API :::info true: ofdm false: cck ::: * value :::info RX gain value to write ::: ## DBCC ### RTW_ConfigDBCC Function define: ```C bool RTLMP_API RTW_ConfigDBCC(bool dbcc_en); ``` Description: > This function attempts enable/disable DBCC feature. Parameters * dbcc_en - 0: Disable DBCC, 1:Enable DBCC ### RTW_SetDBCCSwTxData Function define: ```C int RTLMP_API RTW_SetDBCCSwTxData( UINT dbw, UINT long_preamble_en, UINT stbc, UINT gi, UINT he_ltf_type, UINT he_mcs_sigb, UINT he_dcm_sigb, UINT max_tx_time_0p4us, UINT bss_color, UINT he_er_u106ru_en, UINT mode, UINT ppdu_type, UINT cbw, UINT txsc, UINT n_user, UINT sw_tx_gen_usr_idx, UINT data_rate, UINT mcs, UINT fec, UINT dcm, UINT aid, UINT apep, UINT ru_alloc, UINT nss, UINT pwr_boost_db, UINT scrambler_seed, UINT random_init_seed, UINT cur_phy ); ``` Description: > This function control DUT to transmit packets through specific phy index under DBCC mode. Parameters * dbw :::warning Need to follow sc index like example as following : ::: :::info Example : sc = 0 , dbw = current bandwidth ; sc = 1~4 , dbw = bandwidth_20M ; sc = 9~12 , dbw = bandwidth_40M ; sc = 13~14 , dbw = bandwidth_80M ; ::: * long_preamble_en :::info Example : 0 : disable ; 1: enable ::: * stbc :::info Example : 0 : disable ; 1: enable ::: * gi * he_ltf_type ```C=1 GI+LTF rule : if (HT || VHT) GI+LTF = {0.4, 0.8} //0.4 -> GI= 0, LTF = 0 ; 0.8 -> GI= 1, LTF = 0 else if (HE) if (HE_SU || HE_ER_SU) if (!DCM && !STBC) GI+LTF = {1x 0.8, 2x 0.8, 2x 1.6, 4x 3.2, 4x 0.8} //1x 0.8 -> GI= 1, LTF = 0 //2x 0.8 -> GI= 1, LTF = 1 //2x 1.6 -> GI= 2, LTF = 1 //4x 3.2 -> GI= 3, LTF = 2 //4x 0.8 -> GI= 1, LTF = 2 else GI+LTF = {1x 0.8, 2x 0.8, 2x 1.6, 4x 3.2} //1x 0.8 -> GI= 1, LTF = 0 //2x 0.8 -> GI= 1, LTF = 1 //2x 1.6 -> GI= 2, LTF = 1 //4x 3.2 -> GI= 3, LTF = 2 else if (HE_MU) GI+LTF = {2x 0.8, 2x 1.6, 4x 0.8, 4x 3.2} //2x 0.8 -> GI= 1, LTF = 1 //2x 1.6 -> GI= 2, LTF = 1 //4x 0.8 -> GI= 1, LTF = 2 //4x 3.2 -> GI= 3, LTF = 2 else if (HE_TB) GI+LTF = {1x 1.6, 2x 1.6, 4x 3.2} //1x 1.6 -> GI= 2, LTF = 0 //2x 1.6 -> GI= 2, LTF = 1 //4x 3.2 -> GI= 3, LTF = 2 ``` * he_mcs_sigb :::info Example : 0~5 ::: * he_dcm_sigb :::info Example : 0 : disable ; 1: enable ::: * max_tx_time_0p4us :::warning max_tx_time_0p4us = 0 ::: * bss_color :::warning bss_color = 0 ::: * he_er_u106ru_en :::info Example : 0 : disable ; 1: enable ::: * mode :::warning mode = 1 ::: * ppdu_type ```C=1 public enum PPDU { CCK, Legacy, HT_MF, HT_GF, VHT, HE_SU, HE_ER_SU, HE_MU, HE_TB } ``` * cbw :::info Input current bandwidth ::: * txsc :::info Input current txsc ::: * n_user :::warning n_user = 1 ::: * sw_tx_gen_usr_idx :::warning sw_tx_gen_usr_idx = 0 ::: * data_rate :::info [Reference - Data Rate](#Reference) ::: * mcs :::info Example 1: PPDU = OFDM(6M,9M,12M ...) Select OFDM-6M , MCS index = 0 ; Select OFDM-12M , MCS index = 2 Example 2: PPDU = VHT(MCS0,MCS1,MCS2 ...) Select VHT-MCS0 , MCS index = 0 ; Select VHT-MCS2 , MCS index = 2 ::: * fec :::info Example : 0 : BCC ; 1 : LDPC ::: * dcm :::info Example : 0 : disable ; 1: enable ::: * aid :::warning aid = 0 ::: * apep :::warning apep = 0 ::: * ru_alloc :::warning ru_alloc = 0 ::: * nss :::info Example : 1 = NSS1; 2 = NSS2; ::: * pwr_boost_db :::warning pwr_boost_db = 0 ::: * scrambler_seed :::warning scrambler_seed = 0 ::: * random_init_seed :::warning random_init_seed = 0 ::: * Cur_phy - input phy index :::info Ex: phy0=0x0, phy1=0x1 ::: ### RTW_SetPhyIndex Function define: ```C bool RTLMP_API RTW_SetPhyIndex(int Cur_phy); ``` Description: > This function attempts to change phy index under DBCC mode Parameters * Cur_phy - input phy index :::info Ex: phy0=0x0, phy1=0x1 ::: ## RF Calibration ### RTW_SetCrystalCap Function define: ```C bool RTLMP_API RTW_SetCrystalCap(int CrystalCap, int sc_xo); ``` Description: > This function attempts to set crystal cap. Parameter description * CrystalCap - fill in crystal cap value * sc_xo - a part of crystal cap :::warning Fill in crystal cap value need to both control sc_xo and sc_xi. ::: :::info Example: RTW_SetCrystalCap(value, 1); //sc_xo RTW_SetCrystalCap(value, 0); //sc_xi ::: ### RTW_GetCrystalCap Function define: ```C unsigned int RTLMP_API RTW_GetCrystalCap(int sc_xo); ``` Description: > This function attempts to get crystal cap. Parameter description * sc_xo - a part of crystal cap :::warning Getting crystal cap value just select one of sc_xo or sc_xi. ::: :::info Example: RTW_GetCrystalCap(0); //sc_xi ::: ### RTW_TriggerDPKTracking Function define: ```C bool RTLMP_API RTW_TriggerDPKTracking(); ``` Description: > This function attempts to trigger dpk tracking. Parameter description * NULL ## Reference ### Data rate ```C=1 public enum Data_Rate { RTW_DATA_RATE_CCK1 = 0x0, RTW_DATA_RATE_CCK2 = 0x1, RTW_DATA_RATE_CCK5_5 = 0x2, RTW_DATA_RATE_CCK11 = 0x3, RTW_DATA_RATE_OFDM6 = 0x4, RTW_DATA_RATE_OFDM9 = 0x5, RTW_DATA_RATE_OFDM12 = 0x6, RTW_DATA_RATE_OFDM18 = 0x7, RTW_DATA_RATE_OFDM24 = 0x8, RTW_DATA_RATE_OFDM36 = 0x9, RTW_DATA_RATE_OFDM48 = 0xA, RTW_DATA_RATE_OFDM54 = 0xB, RTW_DATA_RATE_MCS0 = 0x80, RTW_DATA_RATE_MCS1 = 0x81, RTW_DATA_RATE_MCS2 = 0x82, RTW_DATA_RATE_MCS3 = 0x83, RTW_DATA_RATE_MCS4 = 0x84, RTW_DATA_RATE_MCS5 = 0x85, RTW_DATA_RATE_MCS6 = 0x86, RTW_DATA_RATE_MCS7 = 0x87, RTW_DATA_RATE_MCS8 = 0x88, RTW_DATA_RATE_MCS9 = 0x89, RTW_DATA_RATE_MCS10 = 0x8A, RTW_DATA_RATE_MCS11 = 0x8B, RTW_DATA_RATE_MCS12 = 0x8C, RTW_DATA_RATE_MCS13 = 0x8D, RTW_DATA_RATE_MCS14 = 0x8E, RTW_DATA_RATE_MCS15 = 0x8F, RTW_DATA_RATE_MCS16 = 0x90, RTW_DATA_RATE_MCS17 = 0x91, RTW_DATA_RATE_MCS18 = 0x92, RTW_DATA_RATE_MCS19 = 0x93, RTW_DATA_RATE_MCS20 = 0x94, RTW_DATA_RATE_MCS21 = 0x95, RTW_DATA_RATE_MCS22 = 0x96, RTW_DATA_RATE_MCS23 = 0x97, RTW_DATA_RATE_MCS24 = 0x98, RTW_DATA_RATE_MCS25 = 0x99, RTW_DATA_RATE_MCS26 = 0x9A, RTW_DATA_RATE_MCS27 = 0x9B, RTW_DATA_RATE_MCS28 = 0x9C, RTW_DATA_RATE_MCS29 = 0x9D, RTW_DATA_RATE_MCS30 = 0x9E, RTW_DATA_RATE_MCS31 = 0x9F, RTW_DATA_RATE_VHT_NSS1_MCS0 = 0x100, RTW_DATA_RATE_VHT_NSS1_MCS1 = 0x101, RTW_DATA_RATE_VHT_NSS1_MCS2 = 0x102, RTW_DATA_RATE_VHT_NSS1_MCS3 = 0x103, RTW_DATA_RATE_VHT_NSS1_MCS4 = 0x104, RTW_DATA_RATE_VHT_NSS1_MCS5 = 0x105, RTW_DATA_RATE_VHT_NSS1_MCS6 = 0x106, RTW_DATA_RATE_VHT_NSS1_MCS7 = 0x107, RTW_DATA_RATE_VHT_NSS1_MCS8 = 0x108, RTW_DATA_RATE_VHT_NSS1_MCS9 = 0x109, RTW_DATA_RATE_VHT_NSS2_MCS0 = 0x110, RTW_DATA_RATE_VHT_NSS2_MCS1 = 0x111, RTW_DATA_RATE_VHT_NSS2_MCS2 = 0x112, RTW_DATA_RATE_VHT_NSS2_MCS3 = 0x113, RTW_DATA_RATE_VHT_NSS2_MCS4 = 0x114, RTW_DATA_RATE_VHT_NSS2_MCS5 = 0x115, RTW_DATA_RATE_VHT_NSS2_MCS6 = 0x116, RTW_DATA_RATE_VHT_NSS2_MCS7 = 0x117, RTW_DATA_RATE_VHT_NSS2_MCS8 = 0x118, RTW_DATA_RATE_VHT_NSS2_MCS9 = 0x119, RTW_DATA_RATE_VHT_NSS3_MCS0 = 0x120, RTW_DATA_RATE_VHT_NSS3_MCS1 = 0x121, RTW_DATA_RATE_VHT_NSS3_MCS2 = 0x122, RTW_DATA_RATE_VHT_NSS3_MCS3 = 0x123, RTW_DATA_RATE_VHT_NSS3_MCS4 = 0x124, RTW_DATA_RATE_VHT_NSS3_MCS5 = 0x125, RTW_DATA_RATE_VHT_NSS3_MCS6 = 0x126, RTW_DATA_RATE_VHT_NSS3_MCS7 = 0x127, RTW_DATA_RATE_VHT_NSS3_MCS8 = 0x128, RTW_DATA_RATE_VHT_NSS3_MCS9 = 0x129, RTW_DATA_RATE_VHT_NSS4_MCS0 = 0x130, RTW_DATA_RATE_VHT_NSS4_MCS1 = 0x131, RTW_DATA_RATE_VHT_NSS4_MCS2 = 0x132, RTW_DATA_RATE_VHT_NSS4_MCS3 = 0x133, RTW_DATA_RATE_VHT_NSS4_MCS4 = 0x134, RTW_DATA_RATE_VHT_NSS4_MCS5 = 0x135, RTW_DATA_RATE_VHT_NSS4_MCS6 = 0x136, RTW_DATA_RATE_VHT_NSS4_MCS7 = 0x137, RTW_DATA_RATE_VHT_NSS4_MCS8 = 0x138, RTW_DATA_RATE_VHT_NSS4_MCS9 = 0x139, RTW_DATA_RATE_HE_NSS1_MCS0 = 0x180, RTW_DATA_RATE_HE_NSS1_MCS1 = 0x181, RTW_DATA_RATE_HE_NSS1_MCS2 = 0x182, RTW_DATA_RATE_HE_NSS1_MCS3 = 0x183, RTW_DATA_RATE_HE_NSS1_MCS4 = 0x184, RTW_DATA_RATE_HE_NSS1_MCS5 = 0x185, RTW_DATA_RATE_HE_NSS1_MCS6 = 0x186, RTW_DATA_RATE_HE_NSS1_MCS7 = 0x187, RTW_DATA_RATE_HE_NSS1_MCS8 = 0x188, RTW_DATA_RATE_HE_NSS1_MCS9 = 0x189, RTW_DATA_RATE_HE_NSS1_MCS10 = 0x18A, RTW_DATA_RATE_HE_NSS1_MCS11 = 0x18B, RTW_DATA_RATE_HE_NSS2_MCS0 = 0x190, RTW_DATA_RATE_HE_NSS2_MCS1 = 0x191, RTW_DATA_RATE_HE_NSS2_MCS2 = 0x192, RTW_DATA_RATE_HE_NSS2_MCS3 = 0x193, RTW_DATA_RATE_HE_NSS2_MCS4 = 0x194, RTW_DATA_RATE_HE_NSS2_MCS5 = 0x195, RTW_DATA_RATE_HE_NSS2_MCS6 = 0x196, RTW_DATA_RATE_HE_NSS2_MCS7 = 0x197, RTW_DATA_RATE_HE_NSS2_MCS8 = 0x198, RTW_DATA_RATE_HE_NSS2_MCS9 = 0x199, RTW_DATA_RATE_HE_NSS2_MCS10 = 0x19A, RTW_DATA_RATE_HE_NSS2_MCS11 = 0x19B, RTW_DATA_RATE_HE_NSS3_MCS0 = 0x1A0, RTW_DATA_RATE_HE_NSS3_MCS1 = 0x1A1, RTW_DATA_RATE_HE_NSS3_MCS2 = 0x1A2, RTW_DATA_RATE_HE_NSS3_MCS3 = 0x1A3, RTW_DATA_RATE_HE_NSS3_MCS4 = 0x1A4, RTW_DATA_RATE_HE_NSS3_MCS5 = 0x1A5, RTW_DATA_RATE_HE_NSS3_MCS6 = 0x1A6, RTW_DATA_RATE_HE_NSS3_MCS7 = 0x1A7, RTW_DATA_RATE_HE_NSS3_MCS8 = 0x1A8, RTW_DATA_RATE_HE_NSS3_MCS9 = 0x1A9, RTW_DATA_RATE_HE_NSS3_MCS10 = 0x1AA, RTW_DATA_RATE_HE_NSS3_MCS11 = 0x1AB, RTW_DATA_RATE_HE_NSS4_MCS0 = 0x1B0, RTW_DATA_RATE_HE_NSS4_MCS1 = 0x1B1, RTW_DATA_RATE_HE_NSS4_MCS2 = 0x1B2, RTW_DATA_RATE_HE_NSS4_MCS3 = 0x1B3, RTW_DATA_RATE_HE_NSS4_MCS4 = 0x1B4, RTW_DATA_RATE_HE_NSS4_MCS5 = 0x1B5, RTW_DATA_RATE_HE_NSS4_MCS6 = 0x1B6, RTW_DATA_RATE_HE_NSS4_MCS7 = 0x1B7, RTW_DATA_RATE_HE_NSS4_MCS8 = 0x1B8, RTW_DATA_RATE_HE_NSS4_MCS9 = 0x1B9, RTW_DATA_RATE_HE_NSS4_MCS10 = 0x1BA, RTW_DATA_RATE_HE_NSS4_MCS11 = 0x1BB, RTW_DATA_RATE_MAX }; ``` ###### tags: `MPTool` `MPDLL` `API` `SPEC`