Resolving USB Conflicts with Virtual COM Ports

If you run multiple USB devices that operate as virtual RS232 COM ports (the ubiquitous serial port standard) on Windows, you may have run into problems with conflicts between devices. An application may connect to the appropriate device when it’s the only one connected, only to “get confused” if there is another device sharing the PC. Happily, there are a few simple things you can try that will often resolve the problem.

9103s and Arduinos Playing Nice Together

9103 and Arduino USB Devices

A 9103 Picoammeter and Arduino

To most Windows applications, virtual COM ports (VCPs) all look the same. An application can open a port and and attempt to communicate with the connected device, but since there’s no fixed protocol – each device speaks its own “language”, any message sent can have undetermined effects if the device you’re communicating with is not the one your were expecting. Some applications simply connect to the first COM port available, other’s may provide a way to select the COM port your device is connected to – but you’re still responsible for figuring that out.

When manufacturers produce hardware for PCs they can apply for unique vendor ad product IDs for their device, and there are ways for applications to safely query these. But that only solves part of the problem. Many devices use third-party USB chips and drivers from companies like FTDI, so they share the same IDs. These devices look the same to a Windows client application, or to a person perusing the Device Manager in Control Panel.

RBD’s own 9103 Picoammeter utilizes FTDI’s popular USB VCP chips, as do many versions of the popular Arduino microcontroller boards, so these two sets of devices can be confused by client applications when used on the same PC. And s it turns out, they are often used together. Here are a few tricks for getting these device to play nice together.

Solution 1: Connect Each Device and Run Each Client in Order

Many applications require you to specify the port for the selected device. Others (like Actuel for the 9103) poll the COM ports in numerical order and check and connect to the first available. If these devices first check the vendor and product ID (like the 9103), they will at least skip ports that do not match. But they cannot distinguish between two devices using the same USB chip (like FTDI’s). Setting up a device connection / application order can solve this.

In the case of a 9103 / Arduino conflict, remove all other devices, then plug in the 9103 and power it on. Next run the Actuel software. The software will find and take control of the 9103 port, and once assigned, you can safely plug in the next device and run its client.

Another order might make more sense for your particular application. Experiment with your configuration, and there are more than two devices, try getting two working first. Document the process and just make sure it’s followed anytime you reboot / power-on.

Solution 2: Change the COM Port Number for a Particular USB Port

You can force Windows to use a different COM port number than the one automatically assigned. This may help with applications that select the lowest numbered port.

For example, if the 9103 is connected to COM4 and another FTDI device is on COM3, the 9103 client software may incorrectly select the device on COM3. Setting the 9103 to COM2 may allow you to now connect the devices and run the client applications in any order, depending on how those other devices / applications behave. Some experimentation may be necessary.

With the 9103 connected and turned on, run Control Panel / Device Manager, and find the selection for “Ports (COM and LPT)”, click and you should see an entry for “USB Serial Port (COM4)” (the COM# may be different of course). Double-click for properties.

The COM port settings for the 9103 USB VCP

The COM port settings for the 9103

Now select the “Port Settings” tab, and click the “Advanced…” button. From this window you can select a new COM port assignment:

Choosing a COM port for the 9103

Choosing a COM port for the 9103

Keep in mind that plugging a device into different USB port will change the COM port assigned to it.

More Info

Of course, you’ll want to ensure you have the latest drivers installed. For FTDI, they can be found here:

http://www.ftdichip.com/FTDrivers.htm

If you’re thinking of programming your own serial port application, here’s a quick tutorial at the API level. Many popular languages include code for VCP programming, and third-party libraries are available:

http://xanthium.in/Serial-Port-Programming-using-Win32-API

 

New AugerScan Feature – Automatic Marking of Multiple Element Peaks

A new feature has been added to AugerScan – the option to automatically mark all the peaks of a particular Auger element when marking the primary peak. With this feature you can mark an element’s primary peak and AugerScan will automatically mark the rest of the element’s peaks and select the primary for atomic concentration.

An Example Using Copper (Cu1)

AugerScan
AugerScan – Marking multiple peaks for copper (Cu1)

In the example above, we’ve selected the carbon (C1), oxygen (O1) and copper (Cu1) peaks. AugerScan automatically marked the additional copper peaks (Cu2, Cu3, and Cu4). When performing an atomic concentration calculation, only the Cu1 peak is selected.

You can of course easily change which peaks are selected for atomic concentration by clicking the “Markers” command from the “Edit” menu. You can also remove selected markers from peaks using this dialog.

AugerScan

AugerScan – Marker Selection Dialog

To turn this feature on/off, choose the “Options…” command from the “Data” menu, and select/deselect the checkbox labeled “When Marking and Element, Mark all of its Peaks”.

AugerScan

AugerScan – Marking all Peaks Option

(This feature was originally developed for CMapp, RBD’s software for the microCMA Compact Auger Analyzer)

AugerScan Version 3.3.1

The latest version of AugerScan is available for download. In addition to this new feature, this release includes some bug fixes and improved compatibility with high-dpi displays and Windows 10.

Running AugerScan and AugerMap on Windows 7 – 10

AugerScan and AugerMap are “legacy” software applications originally developed for Windows 95 and 98, however they have been and continue to be updated for bug fixes, additional features, and operating system compatibility. Both applications (and the systems they run) are still going strong and support Windows 7 – 10.

While many customers are still content running their RBD-upgraded PHI systems on Windows XP (or 95-98!), Microsoft no longer supports those operating systems, making upgrading the OS or replacing those PCs inevitable. There are a few areas where the transitions is not as smooth as we’d yet like, and those are driver support and the legacy help system.

Drivers

RBD provides drivers for older Windows XP systems as well as drivers that are fully compatible with Windows 7 – 10. However, none of these drivers are currently digitally signed. Depending on your operating system, providing the rights to run unsigned drivers may be necessary upon installing the drivers and/or running the software.

Some of the errors you may encounter are cryptic, such as the following sometimes seen when installing unsigned drivers on Windows 10: “The hash for the file is not present in the specified catalog file”.

Driver Error

Thanks for the clarity, Microsoft!

 

The good news is that you should only have to take care of the issue once, not every time you are running the software. The bad news is the methods are different for each operating system version, and even different for the same exact operating system depending on the date it was installed and the PC BIOS.

For most versions of Windows, disabling driver signature enforcement can be accomplished easily by one of these methods.

For Windows 10 PCs that were installed (not updated) with build 1607 (Anniversary Edition), the Secure Boot feature of the BIOS must be turned off.

Help

The original Help system (largely unchanged since Windows 3.1) was phased out in Windows Vista. The context-sensitive help – also known as “what’s this?” or “right-click” help cannot be replaced (this was the information you would typically see for each field in a dialog box, for example). However, for Windows Vista through 8.1, Microsoft does provide separate downloads for the legacy help system; it’s just no longer installed in the operating system.

You can find most of those files on this Microsoft support page (scroll down to “Resolution”) For security reasons, Microsoft no longer supports this help format at all in Windows 10, and there are no third-party solutions available.

However, we’ve translated most of RBD’s help to HTML for both AugerScan and AugerMap. In each case, simply  unzip the file to a convenient folder and run “index.html” in your browser.