jsp: usebean, jsp: setproperty Detailed explanation


ZSTACK Launch power settings


Discover ZSTACK 2530 RF transmitting powerActually notis set to the maximum, but 0xd5 1 dbm

maximum can be setTXPOWER=0XF5,(4.5dbm) ,SettingsLocationmain After the function starts

osal_start_system(); // No Return from here before


Background information:

1: http://nt1985.blog.163.com/blog/static/1232562702009629102438544/

Launch power:

The size of the

transmission range is related to the transmitting power and the channel environment, and there is no direct connection between the transmission rate and the transmission range. Therefore, appropriately increase the transmission range. But there are certain restrictions. For details, please refer to the DataSheet.

In mac_radio_def.h, you can set it:




These are just an example to explain, the meaning of these parameters, and where to modify it in Z-Stack. There are many other parameters that can view related source files.


#define MAC_RADIO_SET_CHANNEL(x) st( FSCTRLL = FREQ_2405MHZ + 5 * ((x) – 11); )

#define MAC_RADIO_SET_TX_POWER(x) st( TXCTRLL = x; )

#define MAC_RADIO_SET_PAN_ID(x) st( PANIDL = (x) & 0xFF; PANIDH = (x) >> 8; )

mac_radio_def.h file position:

mac_radio.c location


MAC_INTERNAL_API void macRadioSetTxPower(uint8 txPower)



reqTxPower = pTable[index];

/* update the radio power setting */



MAC_INTERNAL_API void macRadioUpdateTxPower(void)


macPhyTxPower = reqTxPower;




#define MAC_RADIO_SET_TX_POWER(x) st( TXPOWER = x; )


and find a breakpoint running for the program and find that the transmitting power in ZSTACK is not set to the default value

The default value is defined in mac_radio_def.h:


but 0xd5 1 dbm ), that’s itWhere

What aboutSettings?

Studies discovered

The transmitting power is determined by Macradiosettxpower function parameter TXPOWER in mac_radio.c

Since we can’t see whether the function Macradiosettxpower is called there, the setting of the transmitting power in ZSTACK is not clear. I don’t know where to set TXPOWER to0xd5


The final solution ofis:

After the main function starts,

osal_start_system(); // No Return from here before

Settingstxpower = value you want, seeCC2530 Data Manual Page 21


Related Posts

mobile iOS keyboard to block the bottom input box problem perfect solution

zabbix email alarm

linux multi -threaded foundation 2

MyBatis-GENATOR reverse engineering generates Model Dao Mapping

jsp: usebean, jsp: setproperty Detailed explanation

Random Posts

Big Data CDH Cluster Construction

2021 CS Baoye Experience (2): Shanda CS Summer Camp, West Power CS Summer Camp Cyril

RTSP protocol video intelligent monitoring platform Easynvr uses mysql as a data source to start an error of the Unknow Driver “mysql”

Solving the IDEA intercourse error calling method [manageApp] occurs abnormalities, and error when starting the child level

Core thread of the pool pool pool