I have a requirement where I'm using a .NET-based test adapter that communicates using the Modbus protocol over a serial (COM) port.
Now, I want to develop a BLE Central device using the nRF52840 Dongle (PCA10059), which will communicate with other BLE Peripheral devices. The idea is to send Modbus commands from the .NET test adapter (via COM port) to the nRF52840 dongle, and the dongle will handle BLE operations accordingly.
At the same time, I want to be able to view log outputs from the dongle in parallel (e.g., to another COM port).
My Questions:
-
Is it possible to achieve Modbus communication and logging simultaneously using the nRF52840 dongle without any hardware modifications (e.g., without soldering to UART pins)?
-
If yes, could you please guide me on how to implement this? Specifically:
-
How to expose two virtual COM ports over USB (e.g., using two USB CDC ACM instances)?
-
How to route one COM port for Modbus commands and another for logs (e.g., using
LOG_INF()
). -
Any example project or modifications to existing samples to support this use case.
-
SDK: nRF connect SDK v2.9.0
Toolchain : nRF connect SDK Toolchain v2.9.0
Board target : nrf52840dongle/nrf52840
Selected Nordiac SoC
zephyr version was v2.9.0
Looking forward to your guidance.
Thank you!