cannot talk to dongle after connect

I connect to the nRF52840-MDK dongle thru the Serial Terminal (nRF52 Connectivity) it found the comm port and set the baudrate automatically. However, the terminal window constantly fills up the screen with ~/ characters. it repeats every 1 second. What I would like is detailed instructions on how to configure this dongle to be a BT 5 sniffer and read the Extended Advertising for any BT device near the dongle. It would also be helpful to filter the devices seen. Eventually I like to use Python to filter the choices and obtain the advertises data where I can parse the data received. I'm using Windows 10 pro.

Thanks.

Parents
  • Torbjorn,

    I started to look into this again. I modified your 'example_count_by_type_v2.py" to print out only selected mac addresses and the data in hex.

    I noticed at the top of this file you including SnifferAPI. Since I'm new to Python, I presume that you are including everything in the subfolder named SnifferAPI. I started looking into these files and found one named "Types.py".  I cannot find the type "AUX_SCAN_RSP" it seems that WireShark was able to extract the data I need using this type. Is it possible to include this type while scanning and see the data of this type? Let me know if this edit is simple you can send it to me or send me a new file.  

    Greatly appreciate it.

    FYI: I'll be out tomorrow (Wednesday)  and return on Monday.

    Jim D.

  • Hi Jim, 
    Yes, as far as I understand, you are looking for the AUX_SCAN_RSP (scan response) from the DUT. 
    For the DUT to send the scan response, you would need to have a scan request (AUX_SCAN_REQ).
    If you take a look at your screenshot or the one I sent you will see: 

    It starts with ADV_EXT_IND then AUX_ADV_IND, after that the phone send AUX_SCAN_REQ and then the device under test will send AUX_SCAN_RSP. 

    So you need to have a phone that scan and send scan request to be able to capture AUX_SCAN_RSP. 

    The problem is that the phone only scan for a short period of time (default 45seconds). You can increase that by going to Menu ->Settings -> Scanner->Scanning Period to increase that. 

    After you have that, make sure you have the phone scanning and then try to capture again. 


  • Wow, I did not know that. I did what you said and scanned. I took a picture of both the data before the utf-8 decoding and without...

    Do you have Python code (or snippet) that will send this request to the dongle? That is what I may be missing.

    Jim.

  • Hi Jim, 

    The dongle doesn't send anything. It's the sniffer. So it only scan for packets without interacting to the communication. 

    If you don't want to use the phone as the scanner you can write your own scanner and send the scan request packet. You use base your application on one of our sample to do so. 

    But my suggestion here is to use the phone as the scanner first. Then use the dongle to capture the AUX_SCAN_RSP. 

    Another thing you need to note is that you would need to follow the device for the sniffer to follow the AUX_SCAN_REQ. 

    I'm not familiar with the python code, but there must be a python API that you can call to follow a device (the same as when you select the device in the drop down list ).
    You need to call the function before you can get the AUX_SCAN_REQ. 

  • Sorry but I'm confused. Please be patient I'm trying to understand.

    You say that the dongle doesn't send anything but I thought it has to send AUX_SCAN_REQ. to get the extended advertising data.

    Is the extended advertising data always being sent without a request to send it?

    My setup...

    I have a number of our Bluetooth devices sending out advertised messages.  I have the Android phone scanning using your rfConnect application running on the phone. with a filter of G4.

    The data being captured by the phone is the snapshot of what I sent above. The data seen by the phone is what I like to capture.

    Confused.

    Jim

  • Hi Jim, 

    As with most of the sniffer, it doesn't send any packet. The job of a sniffer is to capture and analyse BLE communication of other devices around it.

    The  AUX_SCAN_REQ needs a request before it can be sent. So you need a device that send the scan request. As I can see in what you reported, your phone can do this job. 


    What you need to do is to have your phone (or other scanner) scans and send the scan request, then at the same time you run the sniffer /Python script on the dongle to scan for their communication. 
    The setup is depict in this figure: 
    https://infocenter.nordicsemi.com/topic/ug_sniffer_ble/UG/sniffer_ble/running_sniffer.html?cp=11_5_3

    You need to make sure the phone is scanning and sending when you are capturing with the sniffer. 

    If you want a device that can do scanning on its own, then the better solution is to use our central samples in nRFConnect SDK.  The central device will not be able to capture communication of other connections, but it can send request and receive the response. 

    If you want to go this direction, then I would suggest to get started with our nRF Connect SDK. We have several Academy courses for that
    - nRF Connect SDK fundamental: https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/

    - BLE fundamental course: https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/

Reply Children
Related