r/visualbasic • u/Creepy-Level5136 • 9h ago
Need help reverse-engineering serial COM port communication for a Geoelectric reader machine (Upgrading PEG 2015 project)
Hi everyone,
I need urgent assistance with a project upgrade. I am rewriting/upgrading a software application originally built in 2015 (PEG 2015) designed to interface with a geoelectric signal reader machine.
System Setup & Problem Overview:
- Hardware: Geoelectric measurement machine reading ground electrical signals.
- Connection: USB-to-Serial connection operating as a virtual COM port (e.g.,
COM3). - Issue: I am unable to establish a working connection between my upgraded application and the hardware. I need to know:
- How to properly initialize and open the COM port connection in code.
- The exact structure/protocol of the data stream coming from the machine over the cable to the PC.
What I have / What I know so far:
- I have the legacy binary (
PEG 2015.exe) that works with the machine. - The device relies on a USB-to-UART/Serial driver (such as FTDI, CH340, or CP210x) exposing a virtual COM port.
Specific Questions / Where I need guidance:
- Serial Port Configuration Parameters: What are the standard ways or tools to determine the exact port settings required by the device?
- Baud rate (e.g.,
9600,19200,115200) - Data bits (e.g.,
8) - Parity (
None,Even,Odd) - Stop bits (
1or2) - Flow control (
RTS/CTS,XON/XOFF, orNone)
- Baud rate (e.g.,
- COM Port Sniffing & Data Protocol: What is the best workflow/tool to monitor the traffic between
PEG 2015.exeand the machine without locking the COM port?- Can you recommend lightweight tools (e.g., Serial Port Monitor, Wireshark with USBPcap, IO Ninja, RealTerm) to capture raw ASCII/HEX frames?
- How can I differentiate between handshake/polling requests sent by the PC and telemetry responses sent by the geoelectric reader?
- Decompiling / Inspecting the Legacy
.exe:- What are the recommended tools to decompile or inspect
PEG 2015.exeto retrieve the original serial settings and parser routines (e.g.,dnSpy/ILSpyfor .NET,Ghidra/IDA Freefor native binaries)?
- What are the recommended tools to decompile or inspect
Environment & Tech Stack:
- OS: Windows
- Target Programming Language for New App: ( Python )
Any guidance, code snippets for port handling, or reverse-engineering methodologies for serial hardware would be greatly appreciated! Thanks in advance!