Logging Communication between peripheral and central, nRF52832

Hello. 

I have a product that I am working on which a peripheral and it is able to communicate test data over BLE UART connection.  For development purposes, we have internally been an app such as Bluefruit from Adafruit to communicate back and forth with the device.  We are working on our own app.  I would like to test a handful of devices at the same time. 

I am looking for suggestions on the best way to allow the devices to connect to a central (or multiple centrals) that could potentially log incoming BLE UART messages. Is there anything off the shelf that I can buy that will allow me to connect to a PC and open a COM Port and then I can use a program like Putty to log the incoming messages to a text file?

I have a couple of nRF52DK boards.  I used the example \ncs\v2.5.1\nrf\samples\bluetooth\central_uart\ and I was able to load this onto a nRF52DK board.  With the nRF Connect for Desktop Bluetooth Low Energy Standalone app I was able to connect to the DK, scan for my device, connect to it and send a message. I can also see a response from the device.

Is it possible to type the commands in via ascii instead of hex? 

Also with the response, is there a way to see the data in ascii instead of hex?  I don

I did click on the open log data and does appear that the message came in but it is all in hex.  I would need to come up with some other method of decoding this.

I tried to run the example again and I had to erase the chip and reload the firmware.  I then tried to use the Standalone app, it told the device needed programming. 

I tried to my setup file that I used for the nRF5x (nRF52 DK).  Images attached of the setups.

2024-05-24T20_02_44.993Z-log_fromBLEStandaloneApp.txt

Attache is the log file from capturing incoming messages.

If anyone has any suggestions that would be quite helpful. 

Thanks.

  • Hello,

    The central UART will print whatever that is coming in via the UART TX characteristic on it's UART. I don't know if I got your question correctly, but you can then open a terminal, such as Putty, and log everything to a file if you like to:

    This is possible in most uart terminals. 

    I can also recommend the terminal "Termite" for simple UART communication. While it is possible to set up Putty for two way communication, this is default in Termite. Termite can also save to file.

    Ironically, if you use the nRF Connect for Desktop -> Bluetooth Low Energy application, and connect to a device running ncs\nrf\samples\bluetooth\peripheral_uart, this will actually take input/output in ascii, but I believe this is hard coded for that particular UUID. So it is not possible with a custom UUID, as far as I know.

    I suggest you check out the peripheral_uart and central_uart samples. Then if you want to print stuff from your own application with a custom UUID, then I suggest you modify the central_uart application to connect to and use that particular UUID instead.

    Best regards,

    Edvin

Related