bleprofile_notifyAdvPacketTransmissions doesn't work.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello, this is Taka.

I am making a broadcaser and have seen the sample of mybeacon.

But the "advertisement_packet_transmission" doesn't work in my code.

The SDK is 2.1.1 and Tag board.

When I write the mybeacon sample, the call back works.

I did,

1) Make a project.

2) Add following in the make file.

APP_PATCHES_AND_LIBS += additional_advertisement_control.a

3) Add these in the create()

bleprofile_notifyAdvPacketTransmissions(&advertisement_packet_transmission, 2500);

blecm_startAdv(

            HCIULP_ADV_NONCONNECTABLE_EVENT,                // non-connectable undirected advertisement

            160,                                            // adv interval 100 msec

            HCIULP_ADV_CHANNEL_MAP_MASK,                    // all channels

            HCIULP_PUBLIC_ADDRESS,                          // int advAdrType,

            HCIULP_ADV_FILTER_POLICY_WHITE_LIST_NOT_USED,   // int advFilterPolicy,

            HCIULP_PUBLIC_ADDRESS,                          // int initiatorAdrType,

            NULL);

4) Comment out the this,

//    bleprofile_Discoverable(HIGH_UNDIRECTED_DISCOVERABLE, NULL);

5) Make the callback like this.

void advertisement_packet_transmission(UINT8 type)

{

  ble_trace0("p1\n");

  if (type == 0)

    {

  ble_trace0("p2\n");

    }

}

Then write the program and advertisement starts. But the "advertisement_packet_transmission" is not occure.

What should I do for this? or, is there a sample code for broadcaster?

I just want to add a sensor data in the advertisement packet. Ofcourse, the sensor data is changing everytime in the packet.

1 Solution

There was a bug in the additional_advertisement_control.a library. This has been fixed in SDK 2.2.1. Please upgrade to this release.

View solution in original post

18 Replies