Best way to receive data sent over BLE

Hello, 

I've been working on a project that uses an nRF52832 to send data over bluetooth. I'm sending large chunks of data, and I'm wondering what the best way to view this data is. When I connect with the nRF connect mobile app on my iPhone, I am able to receive data but don't see an option to display all sent data in file format. Is there a software that I could get on my laptop that is capable of connecting to a Nordic device and also outputting all sent data to a file, or at least a form that I could copy and paste? 

Thank you!

Parents Reply Children
  • Hello,

    Yes, I am using NUS to send data. Specifically, I am filling a Ring Buffer (uint32_t) with a large amount of data, which I then unpack into signed 16 bit integers and send over bluetooth. Once the data is sent, I collect more and fill up the buffer again, then send again, and so on. I am also making a custom circuit to run this code that uses the nRF52832 to collect and send data, and won't be able to physically connect to a laptop or phone. Ideally, I would like an application on my laptop that functions similarly to the nRF connect mobile app, but is able to output all sent/received data in a file format. I've heard that Wireshark might be an option, but before I went too deep I thought I would check and see if there are other suggestions.

    Thank you,

    Connor

  • connorshannon said:
    I've heard that Wireshark might be an option, but before I went too deep I thought I would check and see if there are other suggestions.

    Wise to check first!

    Wireshark is mainly a tool for looking at BLE data, and not for receiving it. For debugging and such.

    Instead, there are a lot of different ways to receive BLE data on a computer, so I will not be able to list all. The answer also depends on if you use Windows, Mac or Linux. Often, if users want to develop their own BLE application for a PC, we say that we do not provide anything, and that you have to find out how to make a generic BLE app for PC yourself.

    But for your use-case: Just finding a quick and out-of-the-box way to read NUS(specifically) data to a file, I recommend AuTerm.
    It has a specific NUS-mode and lets you write the log to a file:

    If you want to store binary data to a binary file, NUS is probably not the best way to send data, as this sends data in ascii form. BLE has other services that sends binary blobs, which technically would be more efficient. But if you already have an app and just want the data to a file now, then AuTerm is good enough Id say.

    Does this answer your question?

  • Yes, thank you. I will give AuTerm a shot, and if there are any issues I may reach back out in this thread.

  • Hello, I was able to get the bluetooth connection up and running using AuTerm, but I'm having some other difficulties. The main issue is that I do see data coming in and see it being outputted to a log file, but the format is unreadable and I'm not sure how to interpret the data. I'll attach a screenshot of both my terminal and the log file. I saw your comment about sending data in ASCII form, so I had assumed the log file would have it in that format. Do you have any advice here? Should I look into another software for this?

    Thank you for the help so far!

  • Another quick question: it seems like the terminal is still outputting data even when I'm not actually running the part of my code that sends data over bluetooth. Is AuTerm always trying to get data sent over bluetooth and outputting stuff to the terminal even when there is no data being sent from my chip/sensors?

Related