PPC is hanging after switching GPS on/off

BerndB

Member
Licensed User
FS Loox 720
GPS CF-Card: SysOnGPS
WM 2003 SE

GPS using Serial2.dll + optimized compilation is very unstable with my device.:sign0137:

When switching GPS on/off several times, the PPC is hanging not later than after the 3rd time.

It hangs after either PortOpen = true while starting GPS
or PortOpen = false when deactivating GPS.

It happens with the GPS CF-Card as well as if I take an emulation of a GPS-Log with the Serilot Port splitter. ( So I think it's not a problem of the CF-Card).

There is NO problem with the same "GPS-Code" when using SerialDevice.dll and NOT optimized compilation.

And there is NO problem with PortOpen and Serial2.dll in an other App without GPS but IR as serial input.

Does anybody else have problems like that?
Or does anyone even has a solution:sign0085:

I'd rather like to use the optimized version.
But it's not possible if it hangs again and again:sign0161:

Thanks a lot,
Cheers
Bernd


B4X:
Sub Globals
  'Declare the global variables here.

End Sub

Sub App_Start
  Form1.Show
  Serial.New2(4,4800,"N",8,1)
  GPS.New1
  timer1.Interval=1000
  timer1.Enabled=false
End Sub


Sub gpsON_Click
   Serial.PortOpen = true
   gpsON.Enabled = false
   Form1.Refresh
   Timer1.Enabled = true
   gpsOFF.Enabled = true
   Form1.Refresh
End Sub
Sub gpsOFF_Click
   Timer1.Enabled = false
   gpsOFF.Enabled = false
   Form1.Refresh
   If Serial.PortOpen Then Serial.PortOpen = false
   gpsON.Enabled = true
   ListBox1.Clear
   Form1.Refresh
End Sub

Sub Timer1_Tick
   If Serial.InBufferCount>0 Then 
   gps.GPSStream(Serial.InputString)
   End If
End Sub

Sub GPS_GPSDecoded
      ListBox1.Clear
      ListBox1.add("status: "& gps.status)
      ListBox1.Add("Number Of Satellites: " & gps.NumberOfSatellites)
      ListBox1.Add("Time: " & gps.UTCTime)
End Sub
 

BerndB

Member
Licensed User
Hi Erel,
thanks for taking care.

What is the value of Serial.PortOpen after trying to close it?
I can't access its value, because the PPC hangs.
So the last value displayed is TRUE
from before Serial.PortOpen=false
B4X:
Sub gpsOff_Click
   ListBox1.Add("Off")
   Timer1.Enabled = false
   ListBox1.Add(Serial.PortOpen)
   Form1.Refresh
   Serial.PortOpen = false
   ListBox1.Add(Serial.PortOpen)
   Form1.Refresh
End Sub

Can't you avoid closing and opening the port several times?
While having rests on hiking or cycling tours I need to shut off the PPC because of battery saving.
Apart from that it would love to have it stable.;)

regards
Bernd
 

BerndB

Member
Licensed User
Are you using .Net Compact Framework 2.0 SP2 (2.0.7045)
in Basic4ppc about it says

.Net Version: 2.0.7045

But I will reinstall and tell what happens.


Edit:
I deleted Net CF2.0 on the device and reinstalled the new downloaded one.

But sadly nothing changed.
 
Last edited:
Top