Using the nRF52840 dongle to write a text file to pc

Hello, I am pretty new to using the Nordic products and was wondering if there is a simply way to write a text file from the nRF52840 to a pc.  The system is required to log data such as voltage and temperature that will be received by the nRF52840 through ble.  I am exploring my options at the moment.  I have been looking into ways to be able to use built in python modules on the dongle but I have not been very successful in finding a method for that.   Thanks for any help!

Parents Reply
  • Thanks! I am unable to use nRF connect. The idea behind the project would be to plug the dongle into any pc and be able to log and save the data without installing and applications.  The USB CDC ACM example was one of the first examples I looked at when starting the project; however, it seemed to only write to the serial port instead of saving the data.  I guess that is were I am getting stuck, I am struggling to understand how to actually save the data from the serial port. 

Children
  • Hi,

    Joseph91 said:
    I am unable to use nRF connect.

    I see, so nRF5 SDK then (if you mant not able to use the nRF Connect SDK).

    Joseph91 said:
    The USB CDC ACM example was one of the first examples I looked at when starting the project; however, it seemed to only write to the serial port instead of saving the data. 

    Yes, we do not have any solution for you that will save the data on the PC. This is probably the best approach though as it gives you the data stream on the PC so that you can do whatever you want with it.

    Joseph91 said:
    I guess that is were I am getting stuck, I am struggling to understand how to actually save the data from the serial port. 

    You mentioned python before, so I would suggest that you make a small python script that interfaces with the COM port to receive the data and write it to a file. The pySerial module is nice for this.

  • Ok thank you! Writing a python script that interfaces with the COM port is something that my team has begun to consider, but is not an ideal solution because the idea is that we would be able to plug in the dongle to any computer and be able to save the data.  Going back to python, is there anyway to be able to bind python modules to the dongle?  I have started to look into pc-ble-driver-py. I know thats for python to be able to talk to the board, so I was hoping their might be someway to use that for my purposes.

  • Hi,

    Joseph91 said:
    the idea is that we would be able to plug in the dongle to any computer and be able to save the data. 

    I do not see how that is possible, without any user interaction. And we certainly do not provide anything that can be used to control a PC via USB in the SDK. Perhaps some forum members have some suggestions, though.

    Joseph91 said:
    Going back to python, is there anyway to be able to bind python modules to the dongle? 

    I am not sure exactly what you refer to here? But if you configure USB CDC ACM the dongle will be a COM port seen from the PC, and you can interface this with pySerial as suggested.

    Joseph91 said:
    have started to look into pc-ble-driver-py.

    This is for serializing the SoftDevice / bluetooth APIs. Is that what you want? Mu initial understanding was that you just want to log data from the dongle to the PC? If so, the pc-ble-driver is not what you want.

Related