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

Android nRF Connect not logging what is sent to peripheral

If I use nRF Connect to connect to the Peripheral and the Subscribe to Notification Characteristic I can see in the "Enabling notifications" in the log (however no notifications are sent).

If instead I connect to the peripheral with the app (FitShow from Google Play) and follow the Android Notification from nRF Connect to start logging, I do not see the "Enabling notifications" in the log and yet it starts receiving the notifications. 

The problem is that I believe the app is setting a Characteristic Value (there is one which is Write, No Response)  and this seems to trigger the sending of the notifications from the peripheral.

I need to know what the Characteristic is set to so I can get teh peripheral to start sending the notifications.

Thanks

 

Parents
  • Hi

    Which example or project are you running on the peripheral side? 

    Do you know which BLE service(s) it is using?

    Also, which SDK version are you using?

    Any characteristic that supports notifications will implement what is called a CCCD (client characteristic configuration descriptor), and the client (phone in this case) needs to write to the CCCD to enable notifications. 

    If you have multiple characteristics that support notifications you need to make sure you set the CCCD for all of them (or at least the ones you want to receive notifications from). 

    Best regards
    Torbjørn

  • On the peripheral side there is a rowing machine performance monitor. 

    The BLE service is a Custom GATT service. It's because it is Custom rather than FTMS that I am trying to reverse engineer it so that I can translate it to FTMS.

    I am not using an SDK, just trying to sniff the BLE traffic.

    Yes, when  I use nRF Connect to subscribe to notifications ,I can see from the log that a write is made to the CCCD. However, if I use the FitShow app that connects to the peripheral, I do not see it writing to the CCCD. 

    It appears that when nRF Connect is logging the BLE traffic it does not log what is done by the FitShow app running on the phone, it only logs what the App receives (the actual notifications).

  • Hi

    I don't think the nRF Connect app will have visibility into all the activities done by the FitShow app, for security reasons. 

    I think you would be better off sniffing the BLE communication using some kind of Bluetooth sniffer, such as the nRF Sniffer we provide for running on a standard Nordic devkit or dongle. 

    Then you can see the exact packets sent back and forth between the BLE central and peripheral. 

    Best regards
    Torbjørn

  • I wondered if that would be the case.

    I have played around with BLE GATT services before, but I'm new to sniffing.

    Can you tell me whether using nRF52840 Dongle (PCA10059) with the nRF Sniffer application would allow me to intercept the BLE traffic between my phone and the peripheral even though they are not connected to the dongle? I want to make sure that I don't somehow have to set it up as a "Man in the Middle" to intercept the traffic.

    Thanks

  • Hi 

    The sniffer dongle won't have to be connected to your devices to sniff the traffic, but if the link between the two devices 'under test' is encrypted then you might not be able to sniff the communication. 

    The older pairing modes introduced by Bluetooth 4.0 can usually be sniffed, as long as the sniffer is active when the devices under test do the pairing and bonding stage. 

    If on the other hand they use the improved LESC pairing mode introduced in Bluetooth 4.2, then the sniffer will not be able to sniff the communication after they encrypt the link. 

    In order to force the peripheral to use a simpler pairing scheme it should be sufficient to use a central device (phone) that doesn't support Bluetooth 4.2 or later. 

    Best regards
    Torbjørn

Reply Children
No Data
Related