Beginner trying to troubleshoot Cochran EMC-16 connection

25 views
Skip to first unread message

Kitty

unread,
Jan 4, 2021, 1:43:41 AM1/4/21
to Subsurface Divelog
Greetings - I'm trying to connect my Cochran EMC-16 to a Windows 10 PC for the first time and recently discovered Subsurface (v. 4.9.10). Apologies in advance if this type of question has been answered elsewhere; a few hours of browsing the forum hasn't solved my problems. 

The error "Unable to open COM6 Cochran (EMC-16)" tells me that the EMC-16 isn't communicating with my PC and/or Subsurface. From Appendix A of the user manual and other sources I understand this could be a problem with (1) the USB cable (2), the Cochran USB interface adapter, (3) the EMC-16 is not set to PC Communication mode, (4) a driver, or some other issue I'm not yet aware of. 

Regarding (1) the USB cable - I've tried two different printer cables, as they fit the Cochran adapter. (The adapter and EMC-16 didn't come with a cable.) When connected, the Cochran adapter shows up in the device manager as a USB device called "Cochran USB module".

Regarding (2) the Cochran adapter - As the PC seems to recognize it as a Cochran device, I assume it's working properly. When I strap it to the EMC-16, a tiny red light on the adapter flashes at about 1x/sec, which I assume means the contacts are making a sufficient connection.

Regarding (3) PC Communication mode - I can't find any information in the EMC-16 user manual about how to set this. I've turned the unit on and tried scrolling through the various menu screens, stopping on each one and trying the Subsurface import command, but I get the above error message (or no option to connect to the Cochran adapter, at all). 

Regarding (4) a driver - After reading about Zadig on this forum I tried installing each driver it provides (WinUSB, libusb-win32, libusbK, USB Serial [CDC]), each time looking to see if a port for the Cochran adapter/EMC-16 appears in the "Device or mount point" drop-down menu of the "Download from dive computer" dialogue window of Subsurface. The USB Serial (CDC) driver DOES make a new COM port appear, and I've verified in the device manager that this port is the Cochran adapter. I've tried assigning it to several different COM ports, each time restarting Subsurface, setting it to the new COM port, and trying the download command again, but I only get the "Unable to open" error. 

Log file contents from one of these tries:

Subsurface: v4.9.10, built with libdivecomputer v0.7.0-devel-Subsurface-NG (e58a5866bbd6d12fba7b3482c11d0ae2bed2e1c4)
[0.000000] INFO: Open: name=COM5
[0.000534] INFO: Configure: baudrate=9600, databits=8, parity=0, stopbits=2, flowcontrol=0
[0.001867] ERROR: A device attached to the system is not functioning (31) [in /__w/subsurface/libdivecomputer/src/serial_win32.c:494 (dc_serial_configure)]
[0.001872] ERROR: Failed to set the terminal attributes. [in /__w/subsurface/libdivecomputer/src/cochran_commander.c:308 (cochran_commander_serial_setup)]
[0.002643] ERROR: A device attached to the system is not functioning (31) [in /__w/subsurface/libdivecomputer/src/serial_win32.c:378 (dc_serial_close)]

I'll be really happy if I'm missing something basic, like an "on" switch, as my shots in the dark haven't worked. Thanks to anyone who takes the time to read this and perhaps can offer enlightenment.

Kitty 

Dirk Hohndel

unread,
Jan 4, 2021, 11:47:36 AM1/4/21
to Subsurface Divelog, jo...@vanostrand.com, Jef Driesen
Serial communication on Windows... definitely not the best topic for me to help you with.
I changed the subject line, hoping that maybe that will get someone with experience in that mine field to jump in.

I also copied John who wrote the Cochran support and might be more familiar with dive computer specific pitfalls. And Jef who is the main author of libdivecomputer and knows everything there is to know about all the ways in which Windows makes communication with devices "entertaining".

Thanks

/D

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/cb6f11f2-6b9e-4517-abd7-a494e1eed3feo%40googlegroups.com.

Jef Driesen

unread,
Jan 4, 2021, 1:04:34 PM1/4/21
to Dirk Hohndel, Subsurface Divelog, jo...@vanostrand.com
On 4/01/2021 17:47, Dirk Hohndel wrote:
> Serial communication on Windows... definitely not the best topic for me to help
> you with.
> I changed the subject line, hoping that maybe that will get someone with
> experience in that mine field to jump in.
>
> I also copied John who wrote the Cochran support and might be more familiar with
> dive computer specific pitfalls. And Jef who is the main author of
> libdivecomputer and knows everything there is to know about all the ways in
> which Windows makes communication with devices "entertaining".

This is the relevant part:

>> [0.000000] INFO: Open: name=COM5
>> [0.000534] INFO: Configure: baudrate=9600, databits=8, parity=0, stopbits=2,
>> flowcontrol=0
>> [0.001867] ERROR: A device attached to the system is not functioning (31) [in
>> /__w/subsurface/libdivecomputer/src/serial_win32.c:494 (dc_serial_configure)]

The serial port (COM5) was opened successfully, but trying to configure it
failed with ERROR_GEN_FAILURE (31). That means the device is at least recognized
by the OS and a driver is present. Otherwise opening would already fail. The
fact that configuring fails is most likely either a problem with the driver, or
the hardware itself. At this point we haven't even tried to communicate with the
dive computer. We're still setting up the serial port.

The other strange thing is that the dc_serial_configure function first retrieves
the current serial port settings, and then applies the new setting. The first
step appears to work just fine, it's the updating that failed. So that means the
driver (or the OS) fails to apply those settings. Those two stopbits is not a
very common configuration, but it's also used by a few other (older) dive computers.

I don't know about the Cochran, but some dive computers need to be put manually
into download mode. I doubt that's the problem here, because then I would expect
it to fail later when starting the communication, and not during configuration
of the serial port.

@Kitty: Have you tried downloading with the Cochran application? Does that work?

You mention you tried installing several drivers with zadig. Did it already fail
before you tried that? Because that could be part of the problem. Those WinUSB,
libusb-win32 or libusbK drivers are only needed for accessing the device with
the libusb library. If you install those, the normal driver will be replaced,
and without the virtual serial port, subsurface won't be able to connect at all.
There is a possibility that you somehow broke the driver. I suggest to uninstall
those drivers, and then install the original driver again. The easiest solution
is often to re-install the official application of the manufacturer, because
that typically contains the correct driver. (I never had physical access to a
Cochran, so I don't really know.)

Jef

Kitty Currier

unread,
Jan 4, 2021, 2:13:05 PM1/4/21
to subsurfac...@googlegroups.com, Dirk Hohndel, jo...@vanostrand.com
Dirk, Jef, thanks for your quick replies.

I've never actually used the Cochran application, as the disks that came with the EMC-16 can't be read by the one PC I've tried (the PC thinks they're blank). Given your diagnosis, though, I'll put more effort into figuring out how to access their contents. 

Before I did anything with Zadig, I tried just plugging the EMC-16 into my PC. In the Subsurface download window, neither of the "Device or mount point" options that appeared were related to the Cochran USB adapter, and that's what sent me on the hunt for a driver, hoping I could find something online that would work. Sounds like my best (only?) option is to get it off the Cochran disks. Thanks again for your help!

Kitty

--
You received this message because you are subscribed to a topic in the Google Groups "Subsurface Divelog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/subsurface-divelog/9qz14vd_gvM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/9beef477-de5e-fc11-fc9c-364bfc19a8ab%40libdivecomputer.org.

Apostolos Kefalas

unread,
Jan 4, 2021, 3:56:35 PM1/4/21
to subsurfac...@googlegroups.com
On Sun, 2021-01-03 at 22:43 -0800, Kitty wrote:
>
>
> The error "Unable to open COM6 Cochran (EMC-16)" tells me that the EMC-16
> isn't
......

> Subsurface: v4.9.10, built with libdivecomputer v0.7.0-devel-Subsurface-NG
> (e58a5866bbd6d12fba7b3482c11d0ae2bed2e1c4)
> [0.000000] INFO: Open: name=COM5
>

Which on is the correct one, COM6 or COM5???


BR
Apostolos

Jef Driesen

unread,
Jan 5, 2021, 11:14:15 AM1/5/21
to subsurfac...@googlegroups.com, Kitty Currier, Dirk Hohndel, jo...@vanostrand.com
On 4/01/2021 20:12, Kitty Currier wrote:
> Dirk, Jef, thanks for your quick replies.
>
> I've never actually used the Cochran application, as the disks that came with
> the EMC-16 can't be read by the one PC I've tried (the PC thinks they're blank).
> Given your diagnosis, though, I'll put more effort into figuring out how to
> access their contents.

I still have a copy. You can download it here:

https://libdivecomputer.org/tmp/AnalystDemoSetup.exe

No idea which version that is, but it's worth trying.

> Before I did anything with Zadig, I tried just plugging the EMC-16 into my PC.
> In the Subsurface download window, neither of the "Device or mount point"
> options that appeared were related to the Cochran USB adapter, and that's what
> sent me on the hunt for a driver, hoping I could find something online that
> would work. Sounds like my best (only?) option is to get it off the Cochran
> disks. Thanks again for your help!

Which driver you need depends on which usb-serial chipset is used in the
interface. There are many different ones (FTDI, Prolific, Silicon Labs, etc).
CDC-ACM, which you mentioned earlier is also possible. I believe you don't need
a separate driver for CDC-ACM, because it's built-in.

A tool like USBDeview can help to identify the type of usb device:

https://www.nirsoft.net/utils/usb_devices_view.html

Jef

Jef Driesen

unread,
Jan 5, 2021, 11:48:41 AM1/5/21
to subsurfac...@googlegroups.com, Apostolos Kefalas
Kitty experimented with different drivers. The port can change because of such
changes.

Jef

Kitty Currier

unread,
Jan 5, 2021, 11:19:27 PM1/5/21
to Jef Driesen, subsurfac...@googlegroups.com, Dirk Hohndel, John Van Ostrand
I still have a copy. You can download it here:

https://libdivecomputer.org/tmp/AnalystDemoSetup.exe

Thanks Jef. After downloading and installing this, I started to get excited when the Cochran USB module showed up in the Device Manager as a USB Serial Converter, manufacturer FTDI. Unfortunately, I did this on an old laptop running Win XP, and when I tried installing the AnalystDemo on my Win 10 laptop (after uninstalling every driver related to the Cochran USB module I had tried with Zadig), no such device appeared in Device Manager. Instead, the Cochran still appears under "Other devices", showing no driver available. 

As it happened, the old XP laptop was able to read my original Cochran disks. They contained an installer for AnalystPro, which turned out to be useless, because it had to be registered with the (now defunct) company to work. The disks also included a promising "USBDriversInstall" executable, which I tried running on the Win 10 machine, but again, it didn't seem to work, i.e. it appeared to run, but no drivers for the Cochran USB module appeared. (BTW, on the Win 10 machine I used the "Compatibility mode" to install both the software and driver files under the Win XP profile that matched the old laptop, but this didn't make a difference.)
 
A tool like USBDeview can help to identify the type of usb device:

https://www.nirsoft.net/utils/usb_devices_view.html

Out of curiosity I tried running this, too, on the Win 10 machine and found that most of the fields were blank when I viewed the Cochran USB module. I didn't see anything about FTDI, though if I understand correctly, this is the manufacturer that appeared in the device properties on the XP machine after the drivers had installed correctly.

I think my next step will be to see if I can find a Win 7 machine that will both run Subsurface and install the Cochran drivers correctly. Thanks, again, for the help.

Kitty   

Kitty Currier

unread,
Jan 10, 2021, 10:00:33 PM1/10/21
to Jef Driesen, subsurfac...@googlegroups.com, Dirk Hohndel, John Van Ostrand
I think my next step will be to see if I can find a Win 7 machine that will both run Subsurface and install the Cochran drivers correctly.

In case this is useful for any other EMC-16 users, my problem was solved by downloading and installing the appropriate Virtual COM Port drivers from https://www.ftdichip.com/Drivers/VCP.htm (I downloaded the setup executable, following directions in the Windows 10 installation guide available from  from https://www.ftdichip.com/Support/Documents/InstallGuides.htm). After that, Subsurface had no trouble downloading dives from the EMC-16.

Thanks to Jef and Dirk for explaining/getting me to this point.

Kitty
Reply all
Reply to author
Forward
0 new messages