Basic Bluetooth Communication

Hello developers,

I saw the process of bluetooth scanning from nordic infocenter. 

Scanning for advertisers performing legacy advertising

In this picture, I don't understand with the process.

App sends a message to SD to start scanning and SD returns success. After the success message, Advertiser sends a advertisement and SD sends this report without communication like that SD gets an advertisement, will send the information to App and App accept it. 

In the picture, SD sends just the report to APP and APP starts scanning again.

As my logic, SD should also send a message to the advertiser like whether SD got the advertisement well or not.

OR APP and SD should communicate after advertising whether the infomation is right or the scanning is failed.

Can you explain detail about it, if I understand wrong?

Parents
  • Hi

    As my logic, SD should also send a message to the advertiser like whether SD got the advertisement well or not.

    There is no acknowledge of advertise packets. Advertise packets are inherently asynchronous, and can be sent to any number of scanners at the same time, so it doesn't make sense to acknowledge them. 

    The only thing a scanner is allowed to send to an advertiser is a scan request or a connection request. 

    OR APP and SD should communicate after advertising whether the infomation is right or the scanning is failed.

    Not sure what you mean about the information being 'right'?

    All BLE packets include a 24-bit CRC code at the end to detect bit errors, and if the CRC check fails the packet will be ignored. 

    Best regards
    Torbjørn

Reply
  • Hi

    As my logic, SD should also send a message to the advertiser like whether SD got the advertisement well or not.

    There is no acknowledge of advertise packets. Advertise packets are inherently asynchronous, and can be sent to any number of scanners at the same time, so it doesn't make sense to acknowledge them. 

    The only thing a scanner is allowed to send to an advertiser is a scan request or a connection request. 

    OR APP and SD should communicate after advertising whether the infomation is right or the scanning is failed.

    Not sure what you mean about the information being 'right'?

    All BLE packets include a 24-bit CRC code at the end to detect bit errors, and if the CRC check fails the packet will be ignored. 

    Best regards
    Torbjørn

Children
  • Hi

    Not sure what you mean about the information being 'right'?

    I mean the return value like NRF_SUCCESS or other faults, whether APP got a correct information from SD.

    All BLE packets include a 24-bit CRC code at the end to detect bit errors, and if the CRC check fails the packet will be ignored. 

    As I understand, SD sends advertisement packets to APP and APP checks itself with CRC. If CRC fails, the packet won't be used. Then SD doesn't need reply or answer from APP. Am I right? 

    Best regards

    it0406

  • Hi

    it0406 said:
    Not sure what you mean about the information being 'right'?

    I mean the return value like NRF_SUCCESS or other faults, whether APP got a correct information from SD.

    On the scanner side you won't get any event unless the advertise packet was successfully received. In other words, the scan event is only triggered for correctly received advertise packets. 

    it0406 said:
    As I understand, SD sends advertisement packets to APP and APP checks itself with CRC. If CRC fails, the packet won't be used. Then SD doesn't need reply or answer from APP. Am I right? 

    The CRC check is handled directly by the Bluetooth link layer in the SoftDevice, and does not involve the app at all. If the CRC check fails the packet will be ignored by the SoftDevice, and the app will not get any information about it from the SoftDevice. 

    An important thing to understand about advertise packets is that there is always a lot of lost packets, since the advertiser and scanner is not synchronized. When sending advertise packets you should always assume that only a fraction of the packets you send are received by any one scanner. 

    Best regards
    Torbjørn

Related