What COM port uses my CF card for serial communication

G

Graham McKechnie

Lonifasiko,

I'm not so sure I understand your question. I remember from a previous post
that you are aware of SerialPort.GetPortNames(). Why would it matter which
port that the CF card is using, it should be one of them returned by
GetPortNames().

You can always go through the list of ports testing each one until you find
the one that is receiving data.

Graham
 
G

Guest

It may be fixed at a high number, or it might allocate the next available
and therefore be different for different devices. Check the registry to see
where it put it. HKLM\Drivers\Active

-Chris
 
L

Lonifasiko

Ok. But I see you're sure it's not COM1.

I finally achieved serial communication over ActiveSync serial cable
with a null modem adaptor. That's surely uses COM1.

Should I also need the null modem adaptor for CF card? This morning I
checked the registry and tried with all the possible ports there COM3,
COM2, COM9, COM5, COM8, but I did not see any CF indication in the
registry in an specific port. In other words, I had no success.

Nevertheless, I think I should try again my CF card with all ports in
the registry and with the null modem adaptor.

Thanks.
 
P

Paul G. Tobey [eMVP]

It could be COM1; it just depends on how the device manufacturer sets up the
registry and what the installation of the CF card does to it.

There's absolutely no reason to try all possible COM ports! As Chris said,
read that branch of the registry and find which COM ports are active. You
may be able to tell, based on the driver name associated with them, which is
the one for your card, also. If you have at most two ports, then you could
try both of those, but it's a silly waste of time to try five ports, if
there are only two valid COM names in the registry.

Generally speaking, all serial ports are going to just have receive and
transmit lines at their outputs in default locations (pins 2 and 3, if I
remember right). Whether you need a null modem cable or not depends on what
each device actually does. *We* can't tell you without physically reading
the manual for your card, for the device at the other end of the cable, etc.

Paul T.
 
C

Chris Tacke, MVP

No, I'm not sure of anything. You have the device, not me. Look in the
registry - the system can tell you what drivers it have available
(HKLM\Drivers\BuiltIn) and which are active (HKLM\Drivers\Active). That's
like me asking you specific info about my hardware.

-Chris
 
D

Dick Grier

Hi,
Should I also need the null modem adaptor for CF card? This morning I
checked the registry and tried with all the possible ports there COM3,
COM2, COM9, COM5, COM8, but I did not see any CF indication in the
registry in an specific port. In other words, I had no success.
<<

You would not use a null-modem adapter with the CF card, unless you are
connecting to another PC or PPC. If connecting to some other equipment
(such as a laboratory instrument) you would just connect using the supplied
cable without an adapter.

Every Compact Flash serial adapter that I have used (several different
vendors) assigned Com4 to that port.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition, ISBN 1-890422-28-2, Mabry Publishing (391 pages, includes CD-ROM).
July 2004.
See www.hardandsoftware.net for details and contact information.
 
M

Markus Humm

Graham said:
Lonifasiko,

I'm not so sure I understand your question. I remember from a previous post
that you are aware of SerialPort.GetPortNames(). Why would it matter which
port that the CF card is using, it should be one of them returned by
GetPortNames().

You can always go through the list of ports testing each one until you find
the one that is receiving data.
Hello,

this would be silly, because

a) the other device might just not send data -> so you'll never know

b) it takes time to detect that

c) what do you do if different devices send data to different com ports
parallel? Like a handy via IrDa and another device via Bluetooth and
then the RS232 device?

Greetings

Markus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top