This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Scan request packet

Can I modify Scan request packet at application layer?

  • I'm not sure what you mean by application layer. You can create a scan request packet just like you create an advertising packet and put any data in it as long as the stack can encode it properly.

  • Edited:

    Yes, once you have created the scan response packet, you can change it again any number of times.

  • Here Application layer means user code.My question is with respect to Central. The central runs a active scanner so the Advertising packets are received and SCAN_REQUEST is sent and SCAN_RESPONSE is received from peripheral and then the data is sent to the application. Can we modify SCAN_REQUEST packet sent by central or it is totally handled by softdevice.

  • My question is with respect to Central. The central runs a active scanner so the Advertising packets are received and SCAN_REQUEST is sent and SCAN_RESPONSE is received from peripheral and then the data is sent to the application. Can we modify SCAN_REQUEST packet sent by central or it is totally handled by softdevice.

  • SCAN_REQUEST is totally handled by central as the SCAN_REQ PDU has only two fields. copy paste from the spec

    "The Payload field consists of ScanA and AdvA fields. The ScanA field shall
    contain the scanner’s public or random device address as indicated by TxAdd.
    The AdvA field is the address of the device to which this PDU is addressed.
    The AdvA field shall contain the advertiser’s public or random device address
    as indicated by RxAdd.
    

    Note: This packet does not contain any Host Data." you can change ScanA field by changing device address of central but nothing more. What are you trying to achieve by wanting to modify scan request PDU?

Related