Easy ways to debug BLE connectivity issues

Are there any convenient ways to debug BLE connectivity issues? I have the service up and running but the connection on nRFConnect App doesn't quite go through: it remains stuck on "Connecting" state.

It was working all fine until of a sudden and I can't seem to figure out what went wrong

  • Hello,

    The most convenient way of debugging connectivity issues is to use the nRF Sniffer tool - are you already familiar with this? It is a powerfull tool to wield when developing and debugging with BLE, since it lets you monitor the on-air traffic.
    It does however require an extra piece of hardware to act as the sniffer - you can see a list of supported devices in the sniffer's documentation.

    Best regards,
    Karl

  • Alright. It gets frustrating at times when you try to follow along and still don't make it through. I programmed the nRF Sniffer firmware but in wireshark, I don't see the nRF Sniffer COM PORT showing up. Plus I can't seem to get the interface toolbar as shown in the screenshot here. I also have the nRF Sniffer API folder which has a bunch of python files but the link you shared doesn't seem to talk about it. 

    Also, in my case, BLE doesn't even connect. Do you still think nRF Sniffer tool would be useful? Can I not use nRF Connect on my desktop? Scan devices option is greyed out let alone any scanned devices


    Any quick support is appreciated

  • morpho said:
    Alright. It gets frustrating at times when you try to follow along and still don't make it through. I programmed the nRF Sniffer firmware but in wireshark, I don't see the nRF Sniffer COM PORT showing up. Plus I can't seem to get the interface toolbar as shown in the screenshot here. I also have the nRF Sniffer API folder which has a bunch of python files but the link you shared doesn't seem to talk about it. 

    Could you confirm that you completed the step of the installation that concerns the python files and dependencies?

    morpho said:
    Also, in my case, BLE doesn't even connect. Do you still think nRF Sniffer tool would be useful? Can I not use nRF Connect on my desktop? Scan devices option is greyed out let alone any scanned devices

    Yes, if you are able to scan and connect to the device you could use nRF Connect to test that the device works as expected. However, when debugging connection issues the nRF Sniffer is better suited since you may then monitor exactly what is being transferred and negotiated between the two devices.

    I notice that you are having some issue with the BLE application of nRF Connect also. Which device are you using for the nRF Connect here? Are you getting the prompt to re-program it when you select it in the drop-down menu?

    Best regards,
    Karl

  • Yes. Running the script in wireshark/extcap folder does seem to run fine as well. Refreshed the interfaces in Wireshark and still don't see nRF interface showing up.

     ./nrf_sniffer_ble.sh --extcap-interfaces
    extcap {version=3.1.0}{display=nRF Sniffer for Bluetooth LE}{help=https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE}
    
    
    
    
    control {number=0}{type=selector}{display=Device}{tooltip=Device list}
    control {number=1}{type=string}{display=Passkey / OOB key}{tooltip=6 digit temporary key or 16 byte Out-of-band (OOB) key in hexadecimal starting with '0x', big endian format. If the entered key is shorter than 16 bytes, it will be zero-padded in front'}{validation=\b^(([0-9]{6})|(0x[0-9a-fA-F]{1,32}))$\b}
    control {number=2}{type=string}{display=Adv Hop}{default=37,38,39}{tooltip=Advertising channel hop sequence. Change the order in which the siffer switches advertising channels. Valid channels are 37, 38 and 39 separated by comma.}{validation=^\s*((37|38|39)\s*,\s*){0,2}(37|38|39){1}\s*$}{required=true}
    control {number=3}{type=button}{role=help}{display=Help}{tooltip=Access user guide (launches browser)}
    control {number=4}{type=button}{role=restore}{display=Defaults}{tooltip=Resets the user interface and clears the log file}
    control {number=5}{type=button}{role=logger}{display=Log}{tooltip=Log per interface}
    value {control=0}{value= }{display=All advertising devices}{default=true}
    

    I notice that you are having some issue with the BLE application of nRF Connect also. Which device are you using for the nRF Connect here? Are you getting the prompt to re-program it when you select it in the drop-down menu?

    I'm using a Mac, and trying to connect to the BLE profile (similar to how I connect using nRF Connect using a phone app). Trying to see i there's something wrong with the phone app

  • morpho said:
    Yes. Running the script in wireshark/extcap folder does seem to run fine as well. Refreshed the interfaces in Wireshark and still don't see nRF interface showing up.
    morpho said:
    I'm using a Mac, and trying to connect to the BLE profile (similar to how I connect using nRF Connect using a phone app). Trying to see i there's something wrong with the phone app

    Thank you for clarifying.
    It seems I was not explicit enough in my previous comment, my mistake, I meant to ask which device you are using for your connectivity device. I.e which device are you using to do the BLE scanning in the nRF Connect desktop application, or which device have you programmed with the sniffer's connectivity hex

    morpho said:
    the BLE profile (similar to how I connect using nRF Connect using a phone app). Trying to see i there's something wrong with the phone app

    Are you trying to connect your nRF Connect desktop application to your nRF Connect smartphone application?
    I have not personally tried this before, but you would then have to set the smartphone to act as a peripheral (GATT server) and have it advertise so that it is connectable for the nRF Connect for desktop application.
    Is this what you meant, or might I have misunderstood you?

    Best regards,
    Karl

Related