This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

"Beacon Request" power transmission

Other Parts Discussed in Thread: CC2530, CC2591

Hi, I'm using the ZStack-CC2530-2.5.1 and I have an issue about the power transmission of the device during the association process. My device acts as router in a Smart Energy network.

As I know, I can modify the power transmission with ZMacSetTransmitPower() but when I see the "beacon request" frames with a sniffer, they are send with less power than other frames (application or link status).

Can I increase the transmission power of the "beacon request" frames?

Best regards

  • Hi,

    the API you are calling is the correct one.

    However, it may be that you are calling that API after the device has attempted to associate with a parent.

    Just as a test (not suggesting this as final solution), can you please try to change macPibDefaults.phyTransmitPower parameter in mac_pib.c to the desired value and see what happens?

    Thanks,

    TheDarkSide 

  • Hi,

    You're correct!


    Firstly, I used the API ZMacSetTransmitPower() in Zmain.c, then I've changed de macPibDefaults in mac_pib.c and everything runs as I want it. Now, the 'beacon requests' are transmitted with the maximun power as the other frames.

    Best Regards,

    Manuel

  • Hello Manuel. I have the same problem and i tried to do what you did. I also had in ZMain.c the ZMacSetTransmitPower(). What i wanted to ask you is what value did you put in the macPibDefaults struct for Tx Power? 0xF5 which is the cc2530 register value for 4.5 dbm OR TX_PWR_PLUS_4 which is the value from the enumeration that is used in ZMacSetTransmitPower?

    Thank you in advance,
    Nikos
  • Hi Nikos,

    I was using a CC2530 with LNA so I got more Tx Power.

    1. In ZMAC.h you can find this values:

    typedef enum
    
    {
    
     TX_PWR_MINUS_22 = -22,
    
     TX_PWR_MINUS_21,
    
     TX_PWR_MINUS_20,
    
     TX_PWR_MINUS_19,
    
     TX_PWR_MINUS_18,
    
     TX_PWR_MINUS_17,
    
     TX_PWR_MINUS_16,
    
     TX_PWR_MINUS_15,
    
     TX_PWR_MINUS_14,
    
     TX_PWR_MINUS_13,
    
     TX_PWR_MINUS_12,
    
     TX_PWR_MINUS_11,
    
     TX_PWR_MINUS_10,
    
     TX_PWR_MINUS_9,
    
     TX_PWR_MINUS_8,
    
     TX_PWR_MINUS_7,
    
     TX_PWR_MINUS_6,
    
     TX_PWR_MINUS_5,
    
     TX_PWR_MINUS_4,
    
     TX_PWR_MINUS_3,
    
     TX_PWR_MINUS_2,
    
     TX_PWR_MINUS_1,
    
     TX_PWR_ZERO,
    
     TX_PWR_PLUS_1,
    
     TX_PWR_PLUS_2,
    
     TX_PWR_PLUS_3,
    
     TX_PWR_PLUS_4,
    
     TX_PWR_PLUS_5,
    
     TX_PWR_PLUS_6,
    
     TX_PWR_PLUS_7,
    
     TX_PWR_PLUS_8,
    
     TX_PWR_PLUS_9,
    
     TX_PWR_PLUS_10,
    
     TX_PWR_PLUS_11,
    
     TX_PWR_PLUS_12,
    
     TX_PWR_PLUS_13,
    
     TX_PWR_PLUS_14,
    
     TX_PWR_PLUS_15,
    
     TX_PWR_PLUS_16,
    
     TX_PWR_PLUS_17,
    
     TX_PWR_PLUS_18,
    
     TX_PWR_PLUS_19,
    
     TX_PWR_PLUS_20
    
    } ZMacTransmitPower_t;  // The transmit power in units of -1 dBm.

    2. In mac_pib.c, you can find this:

    static CODE const macPib_t macPibDefaults ={
    
    .... 
    
    #if defined (HAL_PA_LNA)
    
    20, /* phyTransmitPower for CC2591 */
    #elif defined (HAL_PA_LNA_CC2590)
    11, /* phyTransmitPower for CC2590 */
    #else
    0, /* phyTransmitPower without frontend */
    #endif
    
    MAC_CHAN_11, /* logicalChannel */
    {0, SADDR_MODE_EXT}, /* extendedAddress */
    1, /* altBe */
    MAC_BO_NON_BEACON, /* deviceBeaconOrder */
    };

    In my case, I use 20 dBm (CC2591)

  • Now i saw that the tx power needs to be 3 and below because it is compared with the first element of the array below:

    const uint8 CODE macRadioDefsTxPwrBare[] =

    {

     3,  /* tramsmit power level of the first entry */

     (uint8)(int8)-22, /* transmit power level of the last entry */

     /*   3 dBm */   0xF5,   /* characterized as  4.5 dBm in datasheet */

     /*   2 dBm */   0xE5,   /* characterized as  2.5 dBm in datasheet */

     /*   1 dBm */   0xD5,   /* characterized as  1   dBm in datasheet */

     /*   0 dBm */   0xD5,   /* characterized as  1   dBm in datasheet */

     /*  -1 dBm */   0xC5,   /* characterized as -0.5 dBm in datasheet */

     /*  -2 dBm */   0xB5,   /* characterized as -1.5 dBm in datasheet */

     /*  -3 dBm */   0xA5,   /* characterized as -3   dBm in datasheet */

     /*  -4 dBm */   0x95,   /* characterized as -4   dBm in datasheet */

     /*  -5 dBm */   0x95,

     /*  -6 dBm */   0x85,   /* characterized as -6   dBm in datasheet */

     /*  -7 dBm */   0x85,

     /*  -8 dBm */   0x75,   /* characterized as -8   dBm in datasheet */

     /*  -9 dBm */   0x75,

     /* -10 dBm */   0x65,   /* characterized as -10  dBm in datasheet */

     /* -11 dBm */   0x65,

     /* -12 dBm */   0x55,   /* characterized as -12  dBm in datasheet */

     /* -13 dBm */   0x55,

     /* -14 dBm */   0x45,   /* characterized as -14  dBm in datasheet */

     /* -15 dBm */   0x45,

     /* -16 dBm */   0x35,   /* characterized as -16  dBm in datasheet */

     /* -17 dBm */   0x35,

     /* -18 dBm */   0x25,   /* characterized as -18  dBm in datasheet */

     /* -19 dBm */   0x25,

     /* -20 dBm */   0x15,   /* characterized as -20  dBm in datasheet */

     /* -21 dBm */   0x15,

     /* -22 dBm */   0x05    /* characterized as -22  dBm in datasheet */

    };

     

    but i think i don't see a big difference. Any hints?

  • You should use TX_PWR_PLUS_4 for 4.5 dbm.
  • Hello Manuel!

    Now i saw your response and thank you very much.

    So i use the values from (1 )for ZMacSetTransmitPower() and the values from (2) for the macpib struct? Is that correct?
    Thank you in advance
  • When I put "20" in macpib struct, it is equivalent to 20 dBm. But yes, you can try vary this value