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

Advertising Device not showing up in Wireshark nrFSniffer toolbar Device Drop down list

I am using a raspberry pi that is running a NUS service. The PacketList in Wireshark shows the advertising packets from the device, but the device is not showing up in the Wireshark nRFSniffer toolbar Device drop down list.

The PDU type is ADV_IND which I though would flat the device to be in the drop down list. However, I did notice in the Advertising Data, there is no flag element (AD Type 0x01).

Is this element required in order for the nRF sniffer to monitor a connection? 

Packet Info in Packet List

No. Time Source PHY Protocol Length Delta time (us end to start) RSSI (dBm) Info
968 3.983 Raspberr_68:97:12  LE 1M LE LL 9 939 -45

ADV_IND

The Packet Details are

Frame 967: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0
    Interface id: 0 (\\.\pipe\wireshark_extcap_COM4_20181107122233)
    Encapsulation type: Nordic BLE Sniffer (186)
    Arrival Time: Dec 31, 1969 16:00:04.579066000 Pacific Standard Time
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 4.579066000 seconds
    [Time delta from previous captured frame: 0.002663000 seconds]
    [Time delta from previous displayed frame: 0.002663000 seconds]
    [Time since reference or first frame: 3.981319000 seconds]
    Frame Number: 967
    Frame Length: 35 bytes (280 bits)
    Capture Length: 35 bytes (280 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: nordic_ble:btle:btcommon]
	
Nordic BLE Sniffer
    Board: 4
    Header Version: 1, Packet counter: 2961
        Length of header: 6
        Length of payload: 28
        Protocol version: 1
        Packet counter: 2961
        Packet ID: 6
    Length of packet: 10
    Flags: 0x01
        .... ...1 = CRC: OK
        .... ..0. = Direction: Slave -> Master
        .... .0.. = Encrypted: No
        .... 0... = MIC: Only relevant when encrypted
        .000 .... = PHY: LE 1M (0)
        0... .... = RFU: 0
    Channel: 38
    RSSI (dBm): -49
    Event counter: 0
    Delta time (µs end to start): 3606
    [Delta time (µs start to start): 3982]
	
Bluetooth Low Energy Link Layer
    Access Address: 0x8e89bed6
    Packet Header: 0x0900 (PDU Type: ADV_IND, ChSel: #1, TxAdd: Public)
    Advertising Address: Raspberr_68:97:12 (b8:27:eb:68:97:12)
    Advertising Data
        Tx Power Level
            Length: 2
            Type: Tx Power Level (0x0a)
            Power Level (dBm): 12
    CRC: 0x61e561

Parents
  • I did find what appears to be the criteria for adding a device to the Device list in SnifferCollector.py

    It seems that packet.blePacket.advType is used for the criteria to add to device list. There is no description of the instance variable , but based upon the position in the PacketList it appears to be the PDU type for an advertising packet. 

    if self.state == STATE_SCANNING:
                            if                 (packet.blePacket.advType == 0 
                                            or packet.blePacket.advType == 1 
                                            or packet.blePacket.advType == 2 
                                            or packet.blePacket.advType == 4 
                                            or packet.blePacket.advType == 6
                                            ) and (packet.blePacket.advAddress != None
                                            ) and (packet.crcOK and not packet.direction):
                                
                                newDevice = Devices.Device(address=packet.blePacket.advAddress, name=packet.blePacket.name, RSSI=packet.RSSI, txAdd=packet.txAdd)
                                self._devices.appendOrUpdate(newDevice)

    ADV_IND is 0x0000 so this condition seems to be met.

    However, the CRC and the Direction are specified in the Flag Element of the Advertising Data  (AD) , and this doesn't exist, so CRC okay will be false.   

    I am making a lot of assumptions based on this snippet of code,but

    It appears that a FLAG element (AD Type 0x01) is necessary for the device to be added to the Device List. 

    Is this correct? can I just go in and change the condition in SnifferCollector.py to allow the device to be added to the Device list drop down?

Reply
  • I did find what appears to be the criteria for adding a device to the Device list in SnifferCollector.py

    It seems that packet.blePacket.advType is used for the criteria to add to device list. There is no description of the instance variable , but based upon the position in the PacketList it appears to be the PDU type for an advertising packet. 

    if self.state == STATE_SCANNING:
                            if                 (packet.blePacket.advType == 0 
                                            or packet.blePacket.advType == 1 
                                            or packet.blePacket.advType == 2 
                                            or packet.blePacket.advType == 4 
                                            or packet.blePacket.advType == 6
                                            ) and (packet.blePacket.advAddress != None
                                            ) and (packet.crcOK and not packet.direction):
                                
                                newDevice = Devices.Device(address=packet.blePacket.advAddress, name=packet.blePacket.name, RSSI=packet.RSSI, txAdd=packet.txAdd)
                                self._devices.appendOrUpdate(newDevice)

    ADV_IND is 0x0000 so this condition seems to be met.

    However, the CRC and the Direction are specified in the Flag Element of the Advertising Data  (AD) , and this doesn't exist, so CRC okay will be false.   

    I am making a lot of assumptions based on this snippet of code,but

    It appears that a FLAG element (AD Type 0x01) is necessary for the device to be added to the Device List. 

    Is this correct? can I just go in and change the condition in SnifferCollector.py to allow the device to be added to the Device list drop down?

Children
Related