- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone worked with sending only a fixed number of advertisement packets from the radio before?
I tried using the cypress function CyBle_GappSetNumOfAdvPkts(&cyBle_discoveryModeInfo,3) to send 3 packets, but it seems to only want to send one. Even trying to count the number of advertisement start_stop messages didn't work for manually sending each packet.
Does everyone use timers for advertising for a flat amount of time instead? I would think there is a way to do a fixed number of packets; e.g exactly 7 or something.
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi! The CyBle_GappSetNumOfAdvPkts() API sends a fixed number of advertisement packets. In your case, I believe you are advertising on all 3 channels: 37, 38, 39. Since, you have set the count to 3, the API will send 1 packet on these 3 channels in a single advertisement event and stop advertisement. If you see the air logs(using a sniffer), you will be able to see that there were 1 packet each on channel 37, 38 and 39.
I reckon you would want to use the count as 9 = 3 times * 3 channels, or you could choose to advertise only on a single channel.