Unsuccessfull serial communication with CF 2.0

D

DickGrier

theme

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

DickGrier

BTW, did you set the RThreshold property to 1? I didn't see that in the
code that you posted. I also don't see the OnComm event code.

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

Lonifasiko

RThreshold property has changed to ReceivedBytesThreshold property, and
its default value is 1.
There is no OnComm event in CF 2.0 for SerialPort component.
I think the unique way of receiving data is using DataReceived
eventhandler.

Regards.
 
M

Markus Humm

Hello,

that standard HP cable is not only usefull for sync, it also provides a
standard COM1 on your device! The only problem for you: it has crossed
lines (Rx and Tx signal lines are crossed), which is necessarry for
connecting two PCs with each other or your PDA (which is like a PC) to a
PC. It's on the other hand useless for a direct connection to a
pheriperal device. But there is a solution to this: you need a thing
called "null modem gender changer". Most of them are male to female, so
you'd need another thing called "male to male adaptor", but look at
expansys, I think they sell a "null modem adaptor male to male". This is
what you need.

Greetings

Markus
 
M

Markus Humm

[snip]
You ask how to furnish power to your device using an external power supply?
This requires a little skill with a soldering iron, a suitable power supply,
and two diodes (IN4001 will surely work). Total, probably about $10 at
Radio Shack. You can contact me offline for more information -- I'd need to
know more about your device to offer any exact details.

Dick
Did you ever have the issue that the PPC doesn't seem to provide any
voltage level on the RS232? e.g. when the other device doesn't provide
one the communications doesn't work?

I have at least two PPC models with these simptoms and my application
works pretty well otherwise! One of these two can even power my rs232
device from the RS232, but then it seems to be short of power and the
communication fails.

Any hints on that?

Greetings

Markus
 
L

Lonifasiko

Hi guys,

I finally achieved serial communication between the device and PC (not
PDA) by code. It just was a necessary delay-time.
For sending "DM", it was necessary to send "D", wait for 200
miliseconds and the send "M" character. Incredible but true!
Seems like the electronic of the device is quite slow and antique.
That's the good notice.

Nevertheless, same code does not work between the device and the PDA,
that's why I resume again this thread.

Do you remember my hardware specifications?
I've got this cable to provide my PDA a serial port:
http://www.cablematic.com/index.php?_cl_id=1&fam=128&p=25&pp=&mode=1&id=90&fam=128&pag=2&p=25
The device I'm trying to connect to comes with an interface cable that
nds with a female 25 pin port. The I've got a 25 pin to 9 pin adapter
that makes possible the connection with the CF serial male serial port.

What do I exactly need? A female to male null modem adapter like this?

http://www.expansys.es/product.asp?code=NM-D9F-D9M

I don't think "male to male" would do it as long as the CF card that
provides me the serial port interface has got a male ending. Female to
male then?

That would be enough or do I have to provide my own voltage to the CF
card's serial port?

Thanks very much in advance.
 
G

Guest

A wait of 10 seconds shouldn't matter. You code should not assume that all
data is available when the first byte arrives, which it sounds like you're
doing. THat can lead to bugs on the PC as well, especially with slower data
rates and larger buffer sizes. Try running your existing PC code at 300
baud and see if it still works.

-Chris
 
M

Markus Humm

[snip]
What do I exactly need? A female to male null modem adapter like this?

http://www.expansys.es/product.asp?code=NM-D9F-D9M

I don't think "male to male" would do it as long as the CF card that
provides me the serial port interface has got a male ending. Female to
male then?
I think it would be worth a test. Depending of the device and the cable
a male to male one might be necessary as well (additionally to the null
modem adaptor mentioned by you).

Greetings

Markus
 
L

Lonifasiko

I've also tried with ActiveSync synchronization cable connected to COM1
port of my PC. I run the application from my PPC, send the commands and
I'm able to see these commands with HyperTerminal. Well, at least the
commands are being sent correctly over this cable.

If I just connect ActiveSync cable with the help of some converters to
my external device, I suppose commands are also sent, but device does
not switch on and does nothing.
I understand the problem is in the device.

What do you think guys?

Thanks.
 
L

Lonifasiko

I just forgot a couple of details:

The previous example was developed of course using COM1 port. I think
it's the unique valid port for serial communication over ActiveSync
cable. Am I correct?
What port should use the CF card I told you? I've also tried with COM7,
COM3, COM2, COM9, COM5 and COM8. These are the names of possible serial
ports that method GetPortNames() returns me. Could anybody deeply
explain me for what kind of communication is each port used?

Thanks again.
 
G

Guest

So if you connect with Hyerterminal you see readable data coming over? I
don't understand the problem any more.

-Chris
 
L

Lonifasiko

Hi guys,

Finally with a little help I build up a null modem adaptor (I don't
like HW definitively) and placed it between my device and the serial
cable coming from PDA's cradle.
Run the program and data is correctly received! Incredible but true!
All problems were because I needed a null modem adaptor, that indeed
was suggested to me here in this thread.

Therefore, I'm now using the ActiveSync serial cable for serial
communication and from now on I'll use it even more ;-) Thanks very
much for your help!

The other old problem: Do you remember my CF card providing my PDA a
serial port? What could I do with that? Should CF card use as well COM1
as AS serial cable does? I've also tried placing the null modem adaptor
between my device and the CF card's serial port but nothing occurs.
Seems like that serial port is not very reliable. What do you think
about?

Thanks very much.
 
C

Chris Tacke, MVP

Why is that incredible? You have to have the Rx on one end tied to the Tx
on the other for data transmission to occur - that's how hardware works.

-Chris
 
M

Markus Humm

Lonifasiko said:
I just forgot a couple of details:

The previous example was developed of course using COM1 port. I think
it's the unique valid port for serial communication over ActiveSync
cable. Am I correct?
What port should use the CF card I told you? I've also tried with COM7,
COM3, COM2, COM9, COM5 and COM8. These are the names of possible serial
ports that method GetPortNames() returns me. Could anybody deeply
explain me for what kind of communication is each port used?
Hello,

afaik these ports may all be different on different devices.
I don't know any standard for this. One might be the infrared one, one
might be bluetooth...but who knows which one?

Greetings

Markus
 
M

Markus Humm

Why is that incredible? You have to have the Rx on one end tied to the Tx
on the other for data transmission to occur - that's how hardware works.

Yes, but normally no manufacturer writes on the pacage or manual how the
RS232 cable from the PDA is wired and that one needs a null modem
adaptor for communication with devices other than PCs.

These silly manufacturers symply pull their own legs by assuming that
anybody buying a RS232 cable for a PDA wants to synchronize over it.
They mostly can't imagine that most customers buying such a cable have
other use for it!

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