KW36 directed Advertising

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KW36 directed Advertising

753 Views
tanghui
Contributor I

Hi NXP official,
I have configured it completely according to the parameter settings you gave me. I used the SDK's "Bluetooth"_ W_ uart_ FreeRTOS ", I specially looked at the Bluetooth address of my mobile phone. Then I configure the code as shown below, but my mobile phone can't find the directional broadcast device.Could you take time to look at this problem for me? Thank you very much.

My mobile device is Xiaomi 10, Bluetooth address is:e0:cc:f8:a2:5a:3a 。

 

/*! Minimum advertising interval (20 ms) */
#define gGapAdvertisingIntervalRangeMinimum_c 0x0100 //0x0020 @DAdv
/*! Default advertising interval (1.28 s) */
#define gGapAdvertisingIntervalDefault_c 0x0800
/*! Maximum advertising interval (10.24 s) */
#define gGapAdvertisingIntervalRangeMaximum_c 0x0800 //0x4000 @DAdv

 

gapAdvertisingParameters_t gAdvParams =
{
/* minInterval */ gGapAdvertisingIntervalDefault_c,
/* maxInterval */ gGapAdvertisingIntervalDefault_c,
/* advertisingType */ gAdvDirectedHighDutyCycle_c, //gAdvDirectedLowDutyCycle_c
/* addressType */ gBleAddrTypeRandom_c,
/* directedAddressType */ gBleAddrTypePublic_c,
/* directedAddress */ {0xE0, 0xCC, 0xF8, 0xA2, 0x5A, 0x3A}, //Address for ADV
/* channelMap */ (gapAdvertisingChannelMapFlags_t) (gGapAdvertisingChannelMapDefault_c),
/* filterPolicy */ gProcessAll_c

 

Gap_SetAdvertisingData(NULL,NULL);//(&gAppAdvertisingData,&gAppScanRspData); //@DAdv

0 Kudos
4 Replies

700 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @tanghui,

I am checking this. I will get back to you as soon as possible.

Regards,

Mario

0 Kudos

743 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @tanghui,

Please try to change the order of your bd address.

/* directedAddress */ {0x3A, 0x5A, 0xA2, 0xF8, 0xCC, 0xE0}, //Address for ADV

Also, be sure that the sniffer is capturing this packet.

Regards,

Mario

 

0 Kudos

713 Views
tanghui
Contributor I

 HI,@mario_castaneda
First of all, I'm very sorry that I didn't follow up because of the project. I have done it exactly according to your method, but I still haven't got the result I want to see. I used BLE Sniffer to capture the data, and did not see any broadcast package about directional broadcasting. I saw that there were some problems about NXP directional broadcasting on the NXP forum, which was almost the same as the situation I met, but they did it according to the official requirements, and almost did not get the desired results. Could the official help to verify the implementation of Bluetooth directional broadcasting Is that right? be deeply grateful.

Tags (1)
0 Kudos

683 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @tanghui,

Please look at the next parameters for the Directed Advertisement.

const gapAdvertisingParameters_t gAppAdvParams = {
    /* minInterval */         800 /* 20 ms= 16*1.25ms */, \
    /* maxInterval */         1600 /* 40 ms = 32*1.25ms */, \
    /* advertisingType */     gAdvDirectedLowDutyCycle_c, \
    /* addressType */         gBleAddrTypePublic_c, \
    /* directedAddressType */ gBleAddrTypeRandom_c, \
    /* directedAddress */     {0x11,0x22,0x33,0x44,0x55,0x66}, \
    /* channelMap */          (gapAdvertisingChannelMapFlags_t) (gAdvChanMapFlag37_c | gAdvChanMapFlag38_c | gAdvChanMapFlag39_c), \
    /* filterPolicy */        gProcessAll_c \
};

Regarding the parameters, you need to set in the directed advertising. You need to be careful about configuring direct advertising. Remember that using the High Duty Cycle parameter would require to have a small advertising interval per the specification.

Please refer to the Bluetooth Specification v5.0 -> Vol 6 -> Part B -> 4.4.2.4.3 High Duty Cycle Connectable Directed Advertising.

However, the phone is not capturing the advertisement because of the random address that the phone is using. This is possible but you would need to get the identity key from the phone. In other words, when you are using a random address, this means that you are enabling privacy in your devices. Hence, in order to have a connection with a device using a random address, you would require to bond with such a device and share the identity key (IRK) to be able to resolve the addresses. 

Once devices are bonded, you would need to identify what random address is being used by the phone and set such an address in the directed advertising address.

Another way to do it is by knowing the phone's random address in advance and set the random address into the direct advertising parameters. Just had in mind that phone random address is changing periodically, thus, at some point, the phone random address will be different, thus, you would need to update advertising parameters accordingly. 

Regards,

Mario

0 Kudos