Virtual comport

Hi everyone,

We have cable counter and a sonar. We will use them simultaneous.

Our sonar’s UI has a cable counter connection. But only serial comport.

But our cable counter communicate with udp protocol.

How can I convert it to comport? Like do I have to create a virtual com port?

Any suggestion would help.

Thanks a lot!

Hi @ugurdemirezen,

Without more information on the cable counter and the sonar control software you’re using, it’s not clear whether they would be compatible even if you’re able to get and use a udp to virtual com port converter software - it’s very possible the sonar software expects communication over a specific protocol, and your cable counter may use a different one.

I would suggest you look into the communication protocol of the device, and the accepted communication protocol of the sonar software to see if they’re compatible. It may be worth contacting the sonar software provider to ask whether/how it’s possible to use your cable counter with their software :slight_smile:

// for Cable counter connection
UDP_IP = ""
    UDP_PORT = 1261
    sock = socket.socket(socket.AF_INET,  # Internet
    socket.SOCK_DGRAM)  # UDP
    sock.bind((UDP_IP, UDP_PORT))

Sonar’s cable counter input tab:

I would like to listen to your suggestions.


The only information that provides is confirmation that your cable counter uses UDP, and the sonar software expects serial - it doesn’t specify what kind of messages the counter sends, or what kind of messages the sonar software expects. UDP and serial are carrier/signal protocols - they specify how to send bits of data around, but have no understanding/restrictions on how the data is encoded or what it means.

To know whether the devices are compatible requires knowing the communication protocols they use - i.e. what kind of data they send, and how it’s encoded into messages.

As an example, our Ping360 can communicate using RS-485 (serial), USB (serial), and Ethernet (UDP), but it sends and receives the same actual information on all of them, which is encoded using our ping-protocol message format.

Different devices and softwares may use different communication protocols, to send different information - even if they use the same signal protocol to transport the information.