Communication Serial API on WM6.0

A

Amirallia

Hi,

I developped an application with VS 2003 on CF1.1, This application
communicate with serial port with API like CreateFile, SetupComm,
WriteFile. All is ok with WM2003.

I installed my application on a WM6.0 device, my application runs
correctely but I have no communication with serial port. I try to
monitoring with a software(Docklight) the communication between my PC
and the device(PSION Workabout), so I send the data "123456" from my
device and I only read the character 7F on Docklight !!!

Any idea ?
 
A

Amirallia

Le 29.10.2008, Chris Tacke, eMVP a supposé :
Debug the code. The serial APIs haven't changed.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

I debug, but all is ok!
I try to send the bytes 65 and 66
When I call the API WriteFile(hPort, txBuffer, ptxBuffer, ref written),
the variable written returns 2, but in Dockloight I receive only 7F!

If I send you my code can you test it ?
 
P

Paul G. Tobey [eMVP]

So, you're sending the data to the wrong serial port. What's the surprise?

Paul T.
 
C

Chris Tacke, eMVP

No, I'm not going to debug your code for you.

You say you send a 65 and 66 (0x41 and 0x42) and on the other end you
receive a 0x7F? If the API says its sending sucessfully, but you're seeing
something different, it sure sounds like a port configuration (bit rate,
parity, stop bits, etc) mismatch to me.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
A

Amirallia

Paul G. Tobey [eMVP] vient de nous annoncer :
Wrong baud rate? Wrong data character size? Wrong parity?

Paul T.

I check the parameter's port and all is ok!
I have the same application on a WM2003 and on a WM6.0 device, in the
Docklight I receive the right response with device WM2003 but with
WM6.0 I receive only 3F
 
P

Paul G. Tobey [eMVP]

Since we don't really know anything about how you are making the connection
(it's a real RS-232 port? It's a Bluetooth serial port?), the best we can
do is guess. There is NOTHING different in the serial API in WM6, NOTHING.
If it doesn't work, your device is different or your means of debugging the
problem is wrong.

Paul T.

Amirallia said:
Paul G. Tobey [eMVP] vient de nous annoncer :
Wrong baud rate? Wrong data character size? Wrong parity?

Paul T.

I check the parameter's port and all is ok!
I have the same application on a WM2003 and on a WM6.0 device, in the
Docklight I receive the right response with device WM2003 but with WM6.0 I
receive only 3F
 
M

Markus Humm

Hello,

I have devices of a well known vendor which have a stupid bug about the
RS232 port which the vendor did turn down with "if ActiveSync doesn't
have a problem with this we won't do anything about it, 3rd party
software [like mine] is not supported".

The bug was, that the first time the port was opened after a device hard
reset (not a clear reset) it only sent garbade and always the same
garbage. Closing and repoening the port with the exact same parameters
resolved that issue, but it's a stupid workaround.

Greetings

Markus
 
M

Mehmet AVSAR

Change your cable to "null modem", which is used for connecting two dte
devices.
 
A

Amirallia

Markus Humm avait écrit le 31.10.2008 :
Hello,

I have devices of a well known vendor which have a stupid bug about the
RS232 port which the vendor did turn down with "if ActiveSync doesn't
have a problem with this we won't do anything about it, 3rd party
software [like mine] is not supported".

The bug was, that the first time the port was opened after a device hard
reset (not a clear reset) it only sent garbade and always the same
garbage. Closing and repoening the port with the exact same parameters
resolved that issue, but it's a stupid workaround.

Greetings

Markus

My problem is with a Psion workabout 7325!

Do you have same devices ?
 
A

Amirallia

Paul G. Tobey [eMVP] avait prétendu :
Since we don't really know anything about how you are making the connection
(it's a real RS-232 port? It's a Bluetooth serial port?), the best we can do
is guess. There is NOTHING different in the serial API in WM6, NOTHING. If it
doesn't work, your device is different or your means of debugging the problem
is wrong.

Paul T.

Amirallia said:
Paul G. Tobey [eMVP] vient de nous annoncer :
Wrong baud rate? Wrong data character size? Wrong parity?

Paul T.

Hi,

I developped an application with VS 2003 on CF1.1, This application
communicate with serial port with API like CreateFile, SetupComm,
WriteFile. All is ok with WM2003.

I installed my application on a WM6.0 device, my application runs
correctely but I have no communication with serial port. I try to
monitoring with a software(Docklight) the communication between my PC and
the device(PSION Workabout), so I send the data "123456" from my device
and I only read the character 7F on Docklight !!!

Any idea ?

I check the parameter's port and all is ok!
I have the same application on a WM2003 and on a WM6.0 device, in the
Docklight I receive the right response with device WM2003 but with WM6.0 I
receive only 3F

With the CFSerial DLL developped by Dick Grier, all is ok!

But with API, no communication
 
P

Paul G. Tobey [eMVP]

So, as expected, your code is wrong. Without seeing it, you can hardly
expect us to debug it...

Paul T.

Amirallia said:
Paul G. Tobey [eMVP] avait prétendu :
Since we don't really know anything about how you are making the
connection (it's a real RS-232 port? It's a Bluetooth serial port?), the
best we can do is guess. There is NOTHING different in the serial API in
WM6, NOTHING. If it doesn't work, your device is different or your means
of debugging the problem is wrong.

Paul T.

Amirallia said:
Paul G. Tobey [eMVP] vient de nous annoncer :
Wrong baud rate? Wrong data character size? Wrong parity?

Paul T.

Hi,

I developped an application with VS 2003 on CF1.1, This application
communicate with serial port with API like CreateFile, SetupComm,
WriteFile. All is ok with WM2003.

I installed my application on a WM6.0 device, my application runs
correctely but I have no communication with serial port. I try to
monitoring with a software(Docklight) the communication between my PC
and the device(PSION Workabout), so I send the data "123456" from my
device and I only read the character 7F on Docklight !!!

Any idea ?



I check the parameter's port and all is ok!
I have the same application on a WM2003 and on a WM6.0 device, in the
Docklight I receive the right response with device WM2003 but with WM6.0
I receive only 3F

With the CFSerial DLL developped by Dick Grier, all is ok!

But with API, no communication
 
A

Amirallia

Dans son message précédent, Paul G. Tobey [eMVP] a écrit :
So, as expected, your code is wrong. Without seeing it, you can hardly
expect us to debug it...

Paul T.

Amirallia said:
Paul G. Tobey [eMVP] avait prétendu :
Since we don't really know anything about how you are making the
connection (it's a real RS-232 port? It's a Bluetooth serial port?), the
best we can do is guess. There is NOTHING different in the serial API in
WM6, NOTHING. If it doesn't work, your device is different or your means
of debugging the problem is wrong.

Paul T.

Paul G. Tobey [eMVP] vient de nous annoncer :
Wrong baud rate? Wrong data character size? Wrong parity?

Paul T.

Hi,

I developped an application with VS 2003 on CF1.1, This application
communicate with serial port with API like CreateFile, SetupComm,
WriteFile. All is ok with WM2003.

I installed my application on a WM6.0 device, my application runs
correctely but I have no communication with serial port. I try to
monitoring with a software(Docklight) the communication between my PC
and the device(PSION Workabout), so I send the data "123456" from my
device and I only read the character 7F on Docklight !!!

Any idea ?



I check the parameter's port and all is ok!
I have the same application on a WM2003 and on a WM6.0 device, in the
Docklight I receive the right response with device WM2003 but with WM6.0
I receive only 3F

With the CFSerial DLL developped by Dick Grier, all is ok!

But with API, no communication

I don't think there is a bug because if I try to install this program
downloaded here
http://www.microsoft.com/downloads/...de-63ba-4e49-b9a3-2d3b9cef4aa5&displaylang=en,
on WM2003 ok but on WM6.0 same result than my program. The program I
have downloaded is developped by Microsoft!!!

Any idea ?
 
C

Chris Tacke, eMVP

Then you have something wrong in your code. Again, the APIs have not
changed.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Amirallia said:
Paul G. Tobey [eMVP] avait prétendu :
Since we don't really know anything about how you are making the
connection (it's a real RS-232 port? It's a Bluetooth serial port?), the
best we can do is guess. There is NOTHING different in the serial API in
WM6, NOTHING. If it doesn't work, your device is different or your means
of debugging the problem is wrong.

Paul T.

Amirallia said:
Paul G. Tobey [eMVP] vient de nous annoncer :
Wrong baud rate? Wrong data character size? Wrong parity?

Paul T.

Hi,

I developped an application with VS 2003 on CF1.1, This application
communicate with serial port with API like CreateFile, SetupComm,
WriteFile. All is ok with WM2003.

I installed my application on a WM6.0 device, my application runs
correctely but I have no communication with serial port. I try to
monitoring with a software(Docklight) the communication between my PC
and the device(PSION Workabout), so I send the data "123456" from my
device and I only read the character 7F on Docklight !!!

Any idea ?



I check the parameter's port and all is ok!
I have the same application on a WM2003 and on a WM6.0 device, in the
Docklight I receive the right response with device WM2003 but with WM6.0
I receive only 3F

With the CFSerial DLL developped by Dick Grier, all is ok!

But with API, no communication
 
C

Chris Tacke, eMVP

So you're saying the Microsoft never ships code with bugs? Why does Windows
Update seem to download fixes for me then? One again, the APIs have not
changed. There is a bug in your code. The best route to fixing it is
through a process that we in the industry call "debugging." A general
description of which can be found here:
http://en.wikipedia.org/wiki/Debugging


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com



Amirallia said:
Dans son message précédent, Paul G. Tobey [eMVP] a écrit :
So, as expected, your code is wrong. Without seeing it, you can hardly
expect us to debug it...

Paul T.

Amirallia said:
Paul G. Tobey [eMVP] avait prétendu :
Since we don't really know anything about how you are making the
connection (it's a real RS-232 port? It's a Bluetooth serial port?),
the best we can do is guess. There is NOTHING different in the serial
API in WM6, NOTHING. If it doesn't work, your device is different or
your means of debugging the problem is wrong.

Paul T.

Paul G. Tobey [eMVP] vient de nous annoncer :
Wrong baud rate? Wrong data character size? Wrong parity?

Paul T.

Hi,

I developped an application with VS 2003 on CF1.1, This application
communicate with serial port with API like CreateFile, SetupComm,
WriteFile. All is ok with WM2003.

I installed my application on a WM6.0 device, my application runs
correctely but I have no communication with serial port. I try to
monitoring with a software(Docklight) the communication between my
PC and the device(PSION Workabout), so I send the data "123456" from
my device and I only read the character 7F on Docklight !!!

Any idea ?



I check the parameter's port and all is ok!
I have the same application on a WM2003 and on a WM6.0 device, in the
Docklight I receive the right response with device WM2003 but with
WM6.0 I receive only 3F



With the CFSerial DLL developped by Dick Grier, all is ok!

But with API, no communication

I don't think there is a bug because if I try to install this program
downloaded here
http://www.microsoft.com/downloads/...de-63ba-4e49-b9a3-2d3b9cef4aa5&displaylang=en,
on WM2003 ok but on WM6.0 same result than my program. The program I have
downloaded is developped by Microsoft!!!

Any idea ?
 

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