PDA

Click to See Complete Forum and Search --> : Serial code kaput with new type PDA


irb4
Sep 11th, 2008, 08:54 AM
Guys

My evb3 code works fine for HP IPAQ HX2790, but when the code is used for the new HP IPAQ 212, it breaks down. I tuned the code everywhere, no work.
:eek: :sick:

The sensor data into the serial data is like this:

2008 09 11 18 36 48 -15.5 59.2 99.1 25.5 25.5 25.5 27 27 26 100 77.6 0.8 0.4 2.1 0.0 0.0 25.64 0.000 0.000 14.2 1.0 4.0 27 28 27

My code is like this:

Private Sub Comm1_OnComm()
Dim sTemp As String
Select Case Comm1.CommEvent
Case comEvReceive
sTemp = Comm1.Input
If Not (sTemp = "" Or IsNull(sTemp)) Then
Buffer = Buffer & sTemp
Timer1.Enabled = False
Timer1.Enabled = True
End If
End Select
End Sub

Private Sub Timer1_Timer()
If bFirstData = False Then
ProcessData
End If
Buffer = ""
bFirstData = False
Timer1.Enabled = False
End Sub

Private Sub ProcessData
label1.Caption = Buffer
End Sub

Begin CECOMMCtl.Comm Comm1
Left = 960
Top = 0
_cx = 1400
_cy = 1000
CommPort = 1
Settings = "9600,n,8,1"
InputLen = 0
InputMode = 0
NullDiscard = 0 'False
ParityReplace = "?"
RThreshold = 1
SThreshold = 0
Handshaking = 0
DTREnable = -1 'True
RTSEnable = -1 'True
End

Begin VBCE.Timer Timer1
Left = 1320
Top = 120
_cx = 847
_cy = 847
Enabled = 0 'False
Interval = 500
End

My codes used to work with the old IPAQ HX2790 but with the new IPAQ 212, it doesnt work anymore, the string obtained is short

and with inconsitent length like below:

2008 09 11 21 14 48 51 25.5 28 26 1 0.0 1.9 0.2 1.027

2008 09 11 21 15 03 -708 25.5 26 100.0 2.3 0.0 1.0

2008 09 11 21 15 13 -1085.5 25. 80.8 0.3 0.00 0. 4.0 26 27 27

2008 09 11 21 15 18 -171 25.5 27 26 1 0.0 1.00 0. 4.0 26 28 26
.
.
.

I adjusted comm1 properties everywhere, and adjusted timer1 from 200 to 1500ms but no help. It seems like I missed something.

What should I do, guys?:eek: :sick:

Advance thanks.

Hack
Sep 12th, 2008, 06:55 AM
My codes used to work with the old IPAQ HX2790 but with the new IPAQ 212, it doesnt work anymore.....What should I do, guys?:eek: :sick:Contact the company that makes the device and ask them for some suggestions.

irb4
Sep 17th, 2008, 02:49 AM
Contact the company that makes the device and ask them for some suggestions.

Thanks. I tried a sample serial port code from BASIC4PPC which uses the .NET version2 framework. Same problem of intermitently not receiving the serial string fully.

So I will ask the manufacturer.