The “Mystery of the Shifting COM Port”

I had an interesting case this past week that while unique, might shed light on some problems. A researcher has been using a CompactFlash GPS card in a Recon handheld computer without problems for nearly a year now. He e-mailed me that the GPS was working, but was coming in on a different COM port. Well….that can’t happen! COM ports, or Communication Ports are the electronic version of docks. They allow for data to be exchanged and, like a real dock, only one ‘vehicle’ can be there at a time. All computers use COM ports. Some have designated COM port numbers but allow you to create virtual COM ports. On a PC, it is typical for a serial port or an SD slot to have a unique COM port. If you have an integrated GPS that has a designated COM port. Because USB ports are wired differently, they require a driver to convert them to COM ports. Once a port is identified as a COM port, it stays a COM port. That is, the numbers don’t shift! On the Recon, the serial port is always COM1, the CompactFlash (either slot) is COM2, and Bluetooth devices come in on either COM8 or COM9. In the case of the “Mystery of the Shifting COM Port”, the CompactFlash jumped from COM2 to COM3.

Knowing the COM port for a GPS is necessary to run any software to read the data stream coming from the GPS. Unfortunately, the program I wrote for the researcher was set for COM2 so he could not use COM3. (As a quick fix, I re-wrote the program for COM3, but that didn’t address why the port should change.) Many programs allow you to figure out which COM port the GPS is connected to before you begin to collect data.

Back to the mystery, there are three scenarios: 1) The GPS tortured the computer into shifting COM ports, 2) there was a hardware malfunction in the computer, or 3) there was a gremlin in the operating system of the Recon. GPS receivers don’t have the capability to shift COM ports so that was ruled out. I was hoping the computer didn’t fail because the researcher was in the field in South Africa. So, I settled on the operating system. His Recon has Windows Mobile 5 which has a cool applet that allows you to re-route the GPS from its incoming hardware COM port (in this case, COM 2) to any outgoing COM port. The benefit is that many programs can read a virtual COM port. The analogy is that you phone can only take one call, but many receivers in your house can listen in. We tried changing the parameters on the GPS applet but that didn’t work. Dang. It seemed the most likely scenario (and the cheapest) was that the operating system flaked out. With Recons, it is really easy to restore the operating system. You do a hard reset by holding down the power button for a few seconds. When the yelp of a rapid double beep occurs, simultaneously press the flying windows and enter buttons. This will restore the factory settings. Of course the factory didn’t put on any extra programs or data so if you try this yourself, BACK UP ANY FILES OR PROGRAMS YOU INSTALLED!!

The result? One e-mail later, the researcher restore the factory settings and the CompactFlash GPS is back on COM2. The “Mystery of the Shifting COM Port” is closed. The lesson is, if it seems like the operating system is tweaked, return to the factory settings before you toss the computer. Oh, and back up the files!

Explore posts in the same categories: Bluetooth, Communication, GPS, Mapping, software

Tags: , , ,

You can comment below, or link to this permanent URL from your own site.

Leave a comment