微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI WIFI设计交流 > CC3200发射功率

CC3200发射功率

时间:10-02 整理:3721RD 点击:

1.CC3200发射功率是否可以降低。

2.CC3200发射功率是否可以设置到一个固定的值。

3.cc3200现在代码中默认的功率是多少dbm?

4.cc3200只需要802.11b协议,在代码中怎么限制?

CC3200的发射功率

– TX Power
•18.0 dBm @ 1 DSSS
• 14.5 dBm @ 54 OFDM

CC3200的发射功率可以降低,具体可以调节TX Power Level的等级来进行控制

/*
*****************************************************************************
//
//! Configure the device to Default state according to the given use case
//!
//! \param None
//!
//!\return Negtive int value on failure other value on succusses
//
*****************************************************************************
*/
static long ConfigureSimpleLinkToDefaultState()
{
SlVersionFull ver = {0};
_WlanRxFilterOperationCommandBuff_t RxFilterIdMask = {0};

unsigned char ucVal = 1;
unsigned char ucConfigOpt = 0;
unsigned char ucConfigLen = 0;
unsigned char ucPower = 0;

long lRetVal = -1;
long lMode = -1;

SlNetCfgIpV4Args_t ipV4;

lMode = sl_Start(0, 0, 0);
ASSERT_ON_ERROR(lMode);

/* configure device to station mode */
SwitchToStaMode(lMode);

/* Get the device's version-information */
ucConfigOpt = SL_DEVICE_GENERAL_VERSION;
ucConfigLen = sizeof(ver);
lRetVal = sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION, &ucConfigOpt,
&ucConfigLen, (unsigned char *)(&ver));
ASSERT_ON_ERROR(lRetVal);

UART_PRINT("Host Driver Version: %s\n\r",SL_DRIVER_VERSION);
UART_PRINT("Build Version %d.%d.%d.%d.31.%d.%d.%d.%d.%d.%d.%d.%d\n\r",
ver.NwpVersion[0],ver.NwpVersion[1],ver.NwpVersion[2],ver.NwpVersion[3],
ver.ChipFwAndPhyVersion.FwVersion[0],ver.ChipFwAndPhyVersion.FwVersion[1],
ver.ChipFwAndPhyVersion.FwVersion[2],ver.ChipFwAndPhyVersion.FwVersion[3],
ver.ChipFwAndPhyVersion.PhyVersion[0],ver.ChipFwAndPhyVersion.PhyVersion[1],
ver.ChipFwAndPhyVersion.PhyVersion[2],ver.ChipFwAndPhyVersion.PhyVersion[3]);
/*
* Set connection policy to Auto + SmartConfig
* (Device's default connection policy)
*/
lRetVal = sl_WlanPolicySet(SL_POLICY_CONNECTION,
SL_CONNECTION_POLICY(1, 0, 0, 0, 1), NULL, 0);
ASSERT_ON_ERROR(lRetVal);

/* Remove all profiles */
lRetVal = sl_WlanProfileDel(0xFF);
ASSERT_ON_ERROR(lRetVal);
/*
// Device in station-mode. Disconnect previous connection if any
// The function returns 0 if 'Disconnected done', negative number if already
// disconnected Wait for 'disconnection' event if 0 is returned, Ignore
// other return-codes
*/
lRetVal = sl_WlanDisconnect();
if(0 == lRetVal)
{
/* Wait for connection */
while(IS_CONNECTED(g_ulStatus))
{

_SlNonOsMainLoopTask();
}
}
/* static IP or DHCP configuration */
if (g_IpV4Option == STATIC_IP) {
ipV4.ipV4 = g_myIpAddr;
ipV4.ipV4Mask = (_u32)SL_IPV4_VAL(255,255,255,0);
ipV4.ipV4Gateway = g_GwIPAddr;
ipV4.ipV4DnsServer = g_GwIPAddr;
sl_NetCfgSet(SL_IPV4_STA_P2P_CL_STATIC_ENABLE,IPCONFIG_MODE_ENABLE_IPV4,sizeof(SlNetCfgIpV4Args_t),(_u8 *)&ipV4);
UART_PRINT("Configured to Static IP Address \n\r");
}
if (g_IpV4Option == DHCP) {
/* Enable DHCP client */
UART_PRINT("IP Address will be obtained through DHCP \n\r");
lRetVal = sl_NetCfgSet(SL_IPV4_STA_P2P_CL_DHCP_ENABLE,1,1,&ucVal);
ASSERT_ON_ERROR(lRetVal);
}

/* Disable scan */
ucConfigOpt = SL_SCAN_POLICY(0);
lRetVal = sl_WlanPolicySet(SL_POLICY_SCAN , ucConfigOpt, NULL, 0);
ASSERT_ON_ERROR(lRetVal);
/*
// Set Tx power level for station mode
// Number between 0-15, as dB offset from max power - 0 will set max power
*/
ucPower = 0;
lRetVal = sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,
WLAN_GENERAL_PARAM_OPT_STA_TX_POWER, 1, (unsigned char *)&ucPower);
ASSERT_ON_ERROR(lRetVal);

if (g_ActiveUseCase == TRANSCEIVER_MODE) {
lRetVal = sl_WlanPolicySet(SL_POLICY_PM ,SL_LOW_POWER_POLICY , NULL, 0);
ASSERT_ON_ERROR(lRetVal);
} else {
/* Set PM policy to normal */
lRetVal = sl_WlanPolicySet(SL_POLICY_PM , SL_NORMAL_POLICY, NULL, 0);
ASSERT_ON_ERROR(lRetVal);
}
/* set the sleep interval */
if (g_ActiveUseCase == ALWAYS_CONNECTED && LSI_SLEEP_DURATION_IN_MSEC > 100) {
_u16 PolicyBuff[4] = {0,0,LSI_SLEEP_DURATION_IN_MSEC,0}; /* PolicyBuff[2] is max sleep time in mSec */
sl_WlanPolicySet(SL_POLICY_PM , SL_LONG_SLEEP_INTERVAL_POLICY, (_u8*)PolicyBuff,sizeof(PolicyBuff));
}

/* Unregister mDNS services */
lRetVal = sl_NetAppMDNSUnRegisterService(0, 0);
ASSERT_ON_ERROR(lRetVal);
/* disable mdns */
sl_NetAppStop(SL_NET_APP_MDNS_ID);
/* Remove all 64 filters (8*8) */
memset(RxFilterIdMask.FilterIdMask, 0xFF, 8);
lRetVal = sl_WlanRxFilterSet(SL_REMOVE_RX_FILTER, (_u8 *)&RxFilterIdMask,
sizeof(_WlanRxFilterOperationCommandBuff_t));
ASSERT_ON_ERROR(lRetVal);

if (g_ActiveUseCase == INTERMITTENTLY_CONNECTED) {
/* Set connection policy to Auto + fast connect in */
lRetVal = sl_WlanPolicySet(SL_POLICY_CONNECTION, SL_CONNECTION_POLICY(1, 1, 0, 0, 0), NULL, 0);
ASSERT_ON_ERROR(lRetVal);
}
if (g_ActiveUseCase == SLEEP_MEASURE || g_ActiveUseCase == TRANSCEIVER_MODE) {
/* Set connection policy to None */
lRetVal = sl_WlanPolicySet(SL_POLICY_CONNECTION, SL_CONNECTION_POLICY(0, 0, 0, 0, 0), NULL, 0);
ASSERT_ON_ERROR(lRetVal);
}
if (g_SocketType == SEC_TCP_SOCKET) {
ASSERT_ON_ERROR(SetTime());
};

lRetVal = sl_Stop(10);
ASSERT_ON_ERROR(lRetVal);

g_ulStatus = 0;

return lRetVal; // Success
}

/*
// Set Tx power level for station mode
// Number between 0-15, as dB offset from max power - 0 will set max power
*/
ucPower = 0;
lRetVal = sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,
WLAN_GENERAL_PARAM_OPT_STA_TX_POWER, 1, (unsigned char *)&ucPower);
ASSERT_ON_ERROR(lRetVal);

是直接更改ucPower的值吗?我们尝试修改了下,好像没有作用。

还有在STA模式下,将发送模式固定在54OFDM?

感谢!

// Set Tx power level for station mode
// Number between 0-15, as dB offset from max power - 0 will set max power
ucPower = 0;
lRetVal = sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, 
WLAN_GENERAL_PARAM_OPT_STA_TX_POWER, 1, (unsigned char *)&ucPower);
ASSERT_ON_ERROR(lRetVal);

谢谢Alvin Chen!

在STA模式下,在软件中怎样将模式固定在11g,而不是自由切换。

感谢!

连接的模式取决于AP的网络模式,可以将AP的网络模式固定为11g,这个时候CC3200连接上后的收发数据都是在11g下完成的。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top