Solved

Make RS232 connection via COM1?

Posted on 2004-08-05
15
7,460 Views
Last Modified: 2007-12-19
Hi folks,

I am trying to connect a simple periferal device to my compaq nx9010 laptop (XP professional).  The periferal uses the RS232 standard and comes with a cable and the option of using a 25 pin (only 6 are used) or 9 pin plug (I think the 9 pin plug is a DB9P).  I have a socket in the back of my  laptop with 25 holes arranged in to rows (very standard).

The device has software which I have installed on my laptop and my desktop machine as well for the purpose of testing only.

On my desk top machine (Win98) the periferal works fine.

The software that comes with the periferal allows me to select the COM port to use; on my desktop I select COM1 and it works fine.

On the desktop, in device manager under Ports (COM & LPT), I have listed COM1, COM2 and LPT1, fine.

However on the laptop in device manager I only have a printer port LPT1, no COM ports.

I figure that I need to set up a COM port on my laptop to get the periferal working.

How do I make a COM1?

Thanks,

Chris.
0
Comment
Question by:DevonportA1
  • 5
  • 4
  • 2
  • +3
15 Comments
 
LVL 57

Expert Comment

by:Pete Long
ID: 11725154
can you hyperterminal into it?

HyperTerminal & XP


To save you going all round the houses for a solution, go straight here,
http://www.hilgraeve.com

And use their HyperTerminal instead.
0
 

Author Comment

by:DevonportA1
ID: 11725714
Thanks but the idea is I don't have to use the Hyperterminal.  Hyperterminal was used in the old version of the software.  I should be able to connect directly as I do on my desktop machine
0
 
LVL 10

Expert Comment

by:snerkel
ID: 11726213
The problem is probably that nearly all modern laptops no longer have a com port. You need to purchase a USB to RS232 adaptor, this will allow most devices that require a com port to work, In the UK such an adaptor can be purchased for a few £

The 25 pin socket you refer to on the laptop is a parallel port for connecting a printer and is refered to as LPT1.

0
 
LVL 10

Expert Comment

by:snerkel
ID: 11726289
Further to my advice this is the sort of device you require http://www.ebuyer.com and do a search for 40608
0
 

Author Comment

by:DevonportA1
ID: 11726669
Ok,  how can I check if my machine has a com port or not.
0
 
LVL 10

Expert Comment

by:snerkel
ID: 11727256
Laptops by virtue of size generally only use a 9-pin D therefore if you do not have a 9-pin male socket on the back of the laptop then you don't have a com port. You would recognise the socket instantly as it is the male version of the cable of the device you are attempting to connect.

I assume the laptop is a recent model as very few recent models have a com port built-in. The trend to drop the com port started about 3 years ago, and now seems to be almost universal.
0
 

Expert Comment

by:kronos540
ID: 11728816
snerkel is right on this one .. go and get the usb to rs232 adapter they are very inexpensive.. around $20.00 .. That's what I have to use on my laptop when connecting
to the console port on Cisco Routers.

0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 31

Expert Comment

by:rid
ID: 11729244
Depending on what kind of "simple periferal device" we're dealing with here you may also consider looking into PCMCIA adapters with COM ports. USB is not always "the" solution (lots of drivers/software involved) for situations calling for real hardware ports.
/RID
0
 

Expert Comment

by:kronos540
ID: 11730019
Good point some software doesn't call on windows api's for comport communications ..it try's to access the hardware directly.. wich is not allowed in the XP OS.. What ever the choice a comport is needed and the laptop doesn't have one ...

0
 

Author Comment

by:DevonportA1
ID: 11733660
Ok folks, thanks for all the advice.

I will get a usb-rs232 converter, no problem.

However:

The software that I currently use with the device wants to open up a COM port not a USB port?

The procedure that I use is to open up the port (by using a MS excel add-in actually) and then press a "send" button on the device; the data streams into an excel worksheet.  I then manually close the port again.

If I push a usb-rs232 adaptor into the back of my laptop what tells the usb port that it should now act like a com port, how can my excel add-in find it.  After all the VBA code in the excel add-in is only trying to open a simple COM port?

Are  their drivers to make the COM port act like a USB port?
0
 
LVL 31

Assisted Solution

by:rid
rid earned 100 total points
ID: 11733832
What you need is a driver or other software to create a virtual COM port that pipes the data through the USB port and the USB - RS232 adapter. I don't know that this exists, but it may do. It is much the way that an internal software modem ("winmodem") would behave; those exist on the system as virtual COM ports (COM5 or something) and are software based. Such software might come with the USB - RS232 adapter.

A PCMCIA COM port adapter is more intended towards giving you an actual RS232 port, which may or may not be important, depending on the requirements of your setup. As an example, a true PC-Card modem will exist as an additional COM port (COM 3 or something) with a modem attached to it. Once the Card and Socket services for PCMCIA are loaded, this COM port (and the modem) is accessible even in DOS. It all depends on how your software can cope with a communications channel that is not really there (no actual hardware COM port).
/RID
0
 
LVL 10

Expert Comment

by:snerkel
ID: 11734396
The USB adaptor will be supplied with a driver, the driver will create a com port entry, you just select the com port number just as if it was a real com port.

A PCMCIA type RS232 port will STILL require drivers that will be supplied with the card, my own experience is that devices that don't work with a USB adaptor don't work with a PCMCIA adaptor either, the PCMCIA card will likely cost 10x the price of a USB adaptor.

I have found that out of all the serial devices I have, only one industrial unit won't work with a USB adaptor, nor will it work with a PCMCIA adaptor.
0
 

Author Comment

by:DevonportA1
ID: 11752520
Well things are going ok.

I am the lucky owner of a USB - COM converter which is installed just fine on my laptop (it came with a driver).

The device (when I look in device manager) is allocated to COM6.  When I move it around to the other USB ports on my machine the allocation changes to COM7 and then COM8.  This is fine but the software that controls my device (an excel add-in) will only work with COM1, COM2, COM3 or COM4.  Typical isn't it.

I have done some hunting and it seems that XP professional comes with a command line utility called "change port" and it seems to me that with:

C:\>change port com6=com4

or something similar I should be able to get the port mapped to where I want.  Only trouble is that my system doesn't recognise change port.  Either I do not have it installed on my machine or I can not invoke it from C:\> (maybe I need to change to another directory or edit the PATH variable)

How can I check if I have this utility (change port) and how can I get it to work.

Maybe their is another way to change port that I am unaware of,

Thanks
0
 
LVL 10

Accepted Solution

by:
snerkel earned 150 total points
ID: 11752582
This is easy...

Go in to device manager, in ports section select properties for your USB device, click port settings tab, select advanced and at the bottom left you can select any com port you like.

If your laptop has a built in modem it will be worth avoiding that com port (usually 3), and also avoid 1 and 2, so 4 would seem a logical choice.

You can do the same as you plug it into other USB ports and select the same port number for all of them.
0
 
LVL 8

Expert Comment

by:holger12345
ID: 12017935
Your laptop doesn't have a COM-port! As you already mentioned, it only shows up a LPT1, and as this is a 25-pin connector, it's definitely the one on the back of your laptop.
The point why modern laptops don't support COM-specification any more is: Bill Gates (or whoever is responsible) has defined a standard portable PCs where the COM-port is somewhere not state-of-the-art (I dont know the whole answer any more, sorry). As the COM is too much user-definable/programmable, they wanted to prevent influence on the System.

However, I have a usb-com converter myself ;-)

regards Holger
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now