[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7480
  • Last Modified:

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.
0
DevonportA1
Asked:
DevonportA1
  • 5
  • 4
  • 2
  • +3
2 Solutions
 
Pete LongConsultantCommented:
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
 
DevonportA1Author Commented:
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
 
snerkelCommented:
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
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 5
  • 4
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now