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.

Where in code can I get ownAddress to update scanRspData

Hi I'm modifing the scanRspData by updating ownAddress in the Manufaturer Specific Payload.

I am modifing the SensorTag example

The problem is that I get a all 00 own address in the very first advertise.

I try the update the scanRspData in several places:

 -at the end of the SensorTag_init().

-at SensorTag_processStateChangeEvt() in the case GAPROLE_STARTED and in the case GAPROLE_ADVERTISING

-at the end of sensorTag_updateAdvertisingData()

but I allways get 00's for the first time, then I get the correct bdAddress

Can you help me with this?

Thanks

joseleno

  • Hi,

    The SensorTag will be passed the BD_ADDR from the stack after the GAPRole has started see
    GAPRole_GetParameter(GAPROLE_BD_ADDR, ownAddress);
    within the case GAPROLE_STARTED.

    You should be able to set the data with ownaddress here. Can you try this?
  • Sean2:

    Thanks for your response, but I already try it, also in:

    at the end of the SensorTag_init().

    -at SensorTag_processStateChangeEvt() in the

    -----case GAPROLE_STARTED and in the

    -----case GAPROLE_ADVERTISING

    -at the end of sensorTag_updateAdvertisingData()

    As I said it only happens the first time, may be is a bug?