Link to home
Start Free TrialLog in
Avatar of DevonportA1
DevonportA1

asked on

Make RS232 connection via COM1?

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.
Avatar of Pete Long
Pete Long
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
Avatar of DevonportA1
DevonportA1

ASKER

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
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.

Further to my advice this is the sort of device you require http://www.ebuyer.com and do a search for 40608
Ok,  how can I check if my machine has a com port or not.
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.
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.

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
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 ...

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?
SOLUTION
Avatar of rid
rid
Flag of Sierra Leone image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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