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

Receive all BLE packets through USB/UART

Hello,

I am looking for some advices for a personnal project.

I would like to be able to receive all BLE packets (so all protocols (GATT, SM, LL) and not only GATT) that come from my nrf52840 Dongle through an UART or USB connection. The output I am expecting is raw packets which are displayed just like they are in Wireshark.

Actually, I have no idea how to do that and which sample I should use to start this project.

Do you have any idea how I can manage to do this ?

Thanks for your help.

Parents
  • Hello,

    Have you tried the nRF Sniffer for Bluetooth LE before? Is that something you are looking for, and that you can use, perhaps?

    Best regards,

    Edvin

  • Hello Edvin,

     

    Thanks for your answer.

    I have tried the nRF Sniffer example. However, it doesn’t match my expectation.

    Firstly, I do not want to sniff any traffic between two BLE devices but I want to have access to the packets that my Dongle is receiving. (Thus I’m sure that I don’t lose any packet and I’m then able to manage the packets that I am receiving directly with the Dongle firmware)

    I wanted to take a look at the source code of the sniffer sample, in order to adapt it but I only found the .hex file.

     

    Best regards,

  • Hello Edvin,

    Ok I understand, thanks for the answer !

    Do you have any hints to achieve « a bluetooth stack on my own » ?

    I wanted to be able to connect my dongle (that would simulate a BLE Device) to my phone through an application with SC pairing. I thought it was more convenient to analyze (and custom, if needed) packets that are sent/received to perform debugging.

     

    Best regards.

  • ENGLAB Dev said:
    Do you have any hints to achieve « a bluetooth stack on my own » ?

    Unfortunately, no. That is no simple task. To put it in perspective, we have a quite large group working on our Bluetooth Stack as their main job. I don't think that is really realistic. 

    If it is mainly for debugging, then I think I would start somewhere else (XY problem)

    Best Regards,

    Edvin

  • Hello Edvin,

     

    Okay thanks for your answer, I won't  continue further with the softdevice.

    I have read about the XY problem and I apologize if I wasn't explicit enough when I have exposed the problem. I hope you understood what I am trying to do with my last message  (ie : " wanted to be able to connect my dongle (that would simulate a BLE Device) to my phone through an application with SC pairing. "). As my project is growing, I might also be interested in reading/writting GATT characteristics when the pairing would be established.

     

    I started to take a look at the SC Multirole sample and Heart rate application where I wanted to customize the advertisement packet to match with the one from the BLE device, in order to pair the dongle with my phone through the application.

  • ENGLAB Dev said:
    wanted to be able to connect my dongle (that would simulate a BLE Device)

    If you are connecting to a dongle over BLE, then that would be a BLE device, not just a simulation, right?

    I don't see why you need to get access to the raw packets in order to do pairing. Are you saying that you want to intercept the connection between two other devices, and pretend that you are one of them? 

    It is perfectly possible to customize an advertising packet, and you can even scan for advertisement packets, and copy that into your own advertisements. However, if the two devices are bonded, then you will not have the correct encryption keys to pretend that you are one of the devices.

    So if what you want to do is to record the pairing/bonding and fetch the keys, then I am afraid that other than the sniffer FW (not open source), then we don't have anything that would follow two other devices entering a connection.

    BR,

    Edvin

  • f you are connecting to a dongle over BLE, then that would be a BLE device, not just a simulation, right?

    Indeed !

    However, what I meant is that the dongle would try to imitate the behavior of another BLE device (ie smartwatch, smart sensor …)                                                                                                                     

                                 

    I don't see why you need to get access to the raw packets in order to do pairing. Are you saying that you want to intercept the connection between two other devices, and pretend that you are one of them? 

    That's what I was trying to do earlier and it explains why I was expecting to send raw packets. I am now looking for another approach where my dongle would imitate a BLE smart device. The main purpose is to see what are the informations that goes from a device to another after the encryption started.

     

    Anyway, I have got the answer of my question and I will dug further into the SDK to find a sample that can achieve this !

     

    Thanks for all Edvin !

Reply
  • f you are connecting to a dongle over BLE, then that would be a BLE device, not just a simulation, right?

    Indeed !

    However, what I meant is that the dongle would try to imitate the behavior of another BLE device (ie smartwatch, smart sensor …)                                                                                                                     

                                 

    I don't see why you need to get access to the raw packets in order to do pairing. Are you saying that you want to intercept the connection between two other devices, and pretend that you are one of them? 

    That's what I was trying to do earlier and it explains why I was expecting to send raw packets. I am now looking for another approach where my dongle would imitate a BLE smart device. The main purpose is to see what are the informations that goes from a device to another after the encryption started.

     

    Anyway, I have got the answer of my question and I will dug further into the SDK to find a sample that can achieve this !

     

    Thanks for all Edvin !

Children
No Data
Related