RS232 cable attached to COM1

  • Thread starter Thread starter GraemeR
  • Start date Start date
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
 
You can allways do it with api functions imported from coredll.dll:
CreateFile,WriteFile,ReadFile,SetCommTimeouts,GetCommState,SetCommState...
 
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
 
I know this is true for monochrome Symbol 2800. Quite possibly for some
others
 
Back
Top