This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Including channel in advertisement

Hello,

I'm trying to include a byte in the advertised data that indicates on which channel the advertisement is being sent, 0 = channel 37, 1 = channel 38, 2 = channel 39.  Is there a way to get the channel from the SoftDevice and update the advertisement between transmission on each channel?  Or is it possible to force the advertisement to a known channel?

I'm trying to maintain a strict interval of 152.5 ms as stated by this page: https://developer.apple.com/library/archive/qa/qa1931/_index.html

Thank you.

Parents
  • I recommend to use the recommended advertising intervals, but don't modify the number of advertising channels.

    Reason is that if you only advertise on 1 channel you reduce the chance of being discovered, because the scanner will only be able to scan 1 channel at a time. Also have in mind that in BLE there is a 0-10ms random delay for each advertising interval according to BLE specifications, and I assume Apple are aware of that. Their scan window should thereby be broad enough to account for advertising on 3 channels and the random delay.

    All that said, here is an example on how to setup 1 channel:
    https://devzone.nordicsemi.com/f/nordic-q-a/38695/advertising-and-scanning-on-single-channel/149469#149469 

  • I would like to keep advertising on the 3 channels, but I would like to include the channel in the payload.  I'm guessing the channel is not available to the iPhone app, so it is included in the Manufacturer Data section of the advertisement.  

    Do you have any suggestion for putting the channel in the payload?

    Also, I noticed in Wireshark that the channels are always in the same order: 37, 38, 39.  Will this always be the case?  Is there a callback I can use to update the payload after each channel is transmitted?

Reply
  • I would like to keep advertising on the 3 channels, but I would like to include the channel in the payload.  I'm guessing the channel is not available to the iPhone app, so it is included in the Manufacturer Data section of the advertisement.  

    Do you have any suggestion for putting the channel in the payload?

    Also, I noticed in Wireshark that the channels are always in the same order: 37, 38, 39.  Will this always be the case?  Is there a callback I can use to update the payload after each channel is transmitted?

Children
  • jeg223 said:
    I would like to keep advertising on the 3 channels, but I would like to include the channel in the payload.  I'm guessing the channel is not available to the iPhone app, so it is included in the Manufacturer Data section of the advertisement.  

    Unfortunately it's not possible to update the advertisement dynamically the way you want. The only way would be to include manufacturer data and use one channel, and one channel is not recommended.  

    jeg223 said:
    Also, I noticed in Wireshark that the channels are always in the same order: 37, 38, 39.  Will this always be the case? 

    For nordic softdevice controller I expect this to always be the case. 

    jeg223 said:
    Is there a callback I can use to update the payload after each channel is transmitted?

    Sorry no, the softdevice controller does not allow to update the packet in the middle of a BLE event.

    Kenneth 

Related