PC Hacks 100 Industrial-Strength Tips and Tools Free Open Book

PC Hacks 100 Industrial-Strength Tips and Tools

Previous Section  < Day Day Up >  Next Section

Hack 77 Break the Rules with COM Ports

figs/moderate.gif figs/hack77.gif

Allow more than two COM ports to work simultaneously without conflicts.

We don't seem to use COM ports very much these days, but even new USB-connected devices emulate the tried-and-true methods of serial communications in today's technology. The plain old serial port is still imperative for communicating with most of the devices that make the Internet possible: modems, routers, switches, and headless servers.

In the design of the original PC, IBM created a deliberate conflict between COM ports that has never been resolved through any change of standards or design. The conflict is the IRQ assignments for COM1 and COM3, which both use IRQ4, and COM2 and COM4, which both use COM3. Apparently IBM never thought anyone would want to use more than two COM ports at the same time: you cannot use COM1 and COM3 at the same time, nor COM2 and COM4 at the same time.

This conflict came to light as early online pioneers started running bulletin board systems with multiple modems to allow multiple users access at the same time. Early communications software relied on the system BIOS for many hardware I/O functions, and serial communications was one of them. The BIOS, of course, was hard-coded to adhere to strict rules, and COM port configuration and IRQs were encompassed by them.

As time passed, developers determined the BIOS functions were not the only or best way to get the hardware to do what they wanted. Flexibility in software and hardware configurations came about to the advantage of users. They could work around the limitations of the BIOS by addressing system hardware directly, which worked well if it was certain that other hardware and software were not going to get in the way.

The first thing that got in the way of expanding the communications capabilities of the PC was the COM-port IRQ conflict. The conflict could only be resolved through some clever hacking of software and hardware to make things work. Software programmers had to know and provide for the many different addresses and IRQs that were likely to be available in the PC, and hardware makers or technically inclined users had to know how to get the hardware configured to their advantage.

Since the source of conflict with using multiple COM ports at the same time is the lack of a unique IRQ for each port, you need to scrounge for two more IRQ lines to give the COM3 and COM4 ports their own IRQs.

Even if you are not going to physically plug in additional COM ports, you may have to reconfigure the virtual COM ports created by USB-to-serial adapters and ensure that each has a nonconflicting setting to work with. See the steps at the end of this hack to make COM port settings changes.


Recovering an unused IRQ or two from one or more LPT ports [Hack #76] can be a rather fortunate coincidence. You can usually repurpose IRQ7 for one of the four COM ports. You may be able to repurpose IRQ5 as well, if a sound card or another device has not laid claim to it. With only IRQ 5, 9, 10, and 11 to choose from, you face another dilemma; most serial/COM port add-in cards use the 8-bit ISA bus form factor and thus lack any electrical connection or access to IRQs 8-15. This forces you to use IRQ5 for the fourth COM port expansion, which forces you to use a 16-bit ISA or a PCI-bus sound card.

Once you have determined that IRQs 5 and 7 are the only ones suitable and available to an 8-bit ISA serial/COM port expansion board, buy an expansion board that has jumpers or switches you can use to select these alternate IRQs, like the one shown in Figure 8-2.

Figure 8-2. A new COM port card with jumpers to set optional IRQs
figs/pchk_0802.gif


The card shown in Figure 8-2 is available from Startech.com as part number ISA2S550 and provides an extended connection into a 16-bit ISA slot to pick up IRQs 9, 10, 11, 12, and 15. Startech also offers PCI-based serial I/O and many other hard-to-find cards for many different types of PC expansion.

It is often suggested that using a USB-to-serial adapter is the way to solve COM port limitations and avoid IRQ constraints. However, USB adapters create virtual COM ports, which must in turn emulate real COM ports, up to and including using their hardware addresses and IRQ signals.

Additionally, many USB drivers create these virtual COM ports with nonstandard COM port numbers (anywhere from COM5 and much higher), which are not traditional port numbers and may not be recognized by the programs you use to communicate with a COM-port-connected device.

In a worst-case scenario, the USB-to-serial adapters, like those offered for handheld-to-PC synchronization, are known to change the COM port number they assign to themselves between reboots, leaving you to have to reconfigure the adapter or your applications to find the new randomly assigned port. Sometimes you need a real and stable COM port to get your work done.


Follow these steps to reconfigure address or IRQ settings in Windows to match the actual COM port device you are using—a physical port or a virtual one such as a USB-to-serial adapter:

  1. Right-click My Computer and select Properties.

  2. Select the Hardware tab, then click the Device Manager button.

  3. In Device Manager click on the plus (+) sign to the left of Ports (COM & LPT).

  4. Right-click the COM port entry and then select Properties.

  5. Select the Resources tab.

  6. Unselect the "Use automatic settings" checkbox.

  7. Double-click either I/O Range or IRQ to make changes to these values, then click OK.

  8. Select the Port Settings tab, then click the Advanced button to access the COM Port Number setting if you need to change the logical port number to suit the software you are using.

  9. Click OK to exit the dialogs, restart your PC, and your port is ready to go.

    Previous Section  < Day Day Up >  Next Section
    Index: [SYMBOL][A][B][C][D][E][F][G][H][I][J][L][M][N][O][P][Q][R][S][T][U][V][W][X][Z]


         Main Menu
    PC Hacks
    Table of Contents
    Copyright
    Credits
    Preface
    Chapter 1. Basic System Board Hacks
    Chapter 2. Basic System Board Setup
    Chapter 3. CPU Hacks
    Chapter 4. Memory Hacks
    Chapter 5. Disk Hacks
    Chapter 6. Disk Drive Performance Hacks
    Chapter 7. Video Hacks
    Chapter 8. I/O Device Hacks
    Introduction: Hacks #75-84
    Basic PC Configuration Rules
    Hack 75 Let Windows Tell You About I/O Card Conflicts
    Hack 76 Break the Rules with LPT Ports
    Hack 77 Break the Rules with COM Ports
    Hack 78 Rewire Your COM Ports
    Hack 79 Boost COM Port Performance
    Hack 80 New Uses for an Old Port
    Hack 81 Use USB for Peer-to-Peer Networking
    Hack 82 Get the Most out of USB
    Hack 83 Install the Driver Before You Install the Hardware
    Hack 84 Please Continue Anyway
    Chapter 9. Boot-Up Hacks
    Chapter 10. Configuring a New PC
    Colophon
    Index


    More Books
    PHP Hacks
    Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
    The Koran (Holy Qur'an)
    Macromedia Flash 8 Bible
    Search Engine Optimization for Dummies
    YouTube Traffic
    PHP 5 for Dummies
    Harry Potter and The Chamber of Secrets
    Harry Potter and the Sorcerer's Stone
    The Pilgrim's Progress
    Wireless Hacks
    Flash Hacks. 100 Industrial-Strength Tips & Tools
    PayPal Hacks. 100 Industrial-Strength Tips and Tools
    Amazon Hacks
    Pdf Hacks
    The Da Vinci Code
    Google Hacks
    The Holy Bible
    Windows XP For Dummies
    Harry Potter and the Half-Blood Prince
    Seo Book
    Upgrading and Repairing Networks
    Macromedia Dreamweaver 8 UNLEASHED
    Windows XP Annoyances
    Windows XP Hacks
    Microsoft Windows XP Power Toolkit
    Teach Yourself MS Office In 24Hours
    iPod & iTunes Missing Manual
    PC Hacks 100 Industrial-Strength Tips and Tools
    PC Overclocking, Optimization, and Tuning - 2th Edition
    PC Hardware In A Nutshell 3rd Edition
    PC Hardware in a Nutshell, 2nd Edition
    Upgrading and Repairing PCs
    Google for Dummies
    MySQL Cookbook
    Teach Yourself Macromedia Flash 8 In 24 Hours
    PHP CookBook
    Sams Teach Yourself JavaScript in 24 Hours
    PHP5 Manual
    Free Games Paper Airplanes
    500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele