RS232 cable attached to COM1

G

GraemeR

Continuing from my previous thread I think taht this is the question that I
need answering.

I have an RS232 cable connected to COM1 on an iPAQ3870.
When connecting on the PC the cable shows a red light (LED when the port is
open and ready to accept data.

How do I connect with OpenNetCF?

This is the code to date:

' Module level
Private mbps As OpenNETCF.IO.Serial.BasicPortSettings
Private WithEvents mprtCOM As OpenNETCF.IO.Serial.Port

Private Sub openPort()

mbps = New OpenNETCF.IO.Serial.BasicPortSettings

mbps.BaudRate = OpenNETCF.IO.Serial.BaudRates.CBR_4800
mbps.Parity = OpenNETCF.IO.Serial.Parity.even
mbps.ByteSize = 8
mbps.StopBits = OpenNETCF.IO.Serial.StopBits.two

mprtCOM = New OpenNETCF.IO.Serial.Port("COM1:", mbps)

mprtCOM.Open()

End Sub

I think that this code is not working since when I connect to serial port on
desktop PC and run code from
http://www.codeworks.it/net/VBNetRs232.htm (no .Not CF code) a light shows
on the cable. My code does not show light.

Any help greatly appreciated, Graeme
 
G

Guest

You can allways do it with api functions imported from coredll.dll:
CreateFile,WriteFile,ReadFile,SetCommTimeouts,GetCommState,SetCommState...
 
P

Peter Foot [MVP]

I don't know if this affects your iPaq but we have found that with some
devices the hardware serial port is in use unless we disabled the Start >
Settings > Connections > Beam > Receive all incoming beams setting.

Peter
 
A

Alex Feinman [MVP]

I know this is true for monochrome Symbol 2800. Quite possibly for some
others
 

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