Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

PPC is hanging after switching GPS on/off

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-18-2008, 10:39 PM
Junior Member
 
Join Date: May 2007
Location: Germany
Posts: 45
Exclamation PPC is hanging after switching GPS on/off

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

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

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

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

Thanks a lot,
Cheers
Bernd


Code:
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
Reply With Quote
  #2 (permalink)  
Old 05-19-2008, 07:30 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

What is the value of Serial.PortOpen after trying to close it?

Can't you avoid closing and opening the port several times?
Reply With Quote
  #3 (permalink)  
Old 05-19-2008, 08:42 AM
Junior Member
 
Join Date: May 2007
Location: Germany
Posts: 45
Default

Hi Erel,
thanks for taking care.

Quote:
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
Code:
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
Quote:
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
Reply With Quote
  #4 (permalink)  
Old 05-19-2008, 09:20 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Are you using .Net Compact Framework 2.0 SP2 (2.0.7045) ?http://www.microsoft.com/downloads/d...displaylang=en
Reply With Quote
  #5 (permalink)  
Old 05-19-2008, 11:41 AM
Junior Member
 
Join Date: May 2007
Location: Germany
Posts: 45
Default

Quote:
Are you using .Net Compact Framework 2.0 SP2 (2.0.7045)
in Basic4ppc about it says

Quote:
.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 by BerndB : 05-19-2008 at 12:08 PM.
Reply With Quote
  #6 (permalink)  
Old 05-19-2008, 04:29 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Unfortunately there is not much to do. Serial2 is a simple wrapper around Microsoft SerialPort class.
Reply With Quote
  #7 (permalink)  
Old 05-22-2008, 09:32 PM
Junior Member
 
Join Date: May 2007
Location: Germany
Posts: 45
Default

Reply With Quote
  #8 (permalink)  
Old 05-23-2008, 07:59 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Have you tried optimised compile with the old SerialDevice dll? I haven't actually tried it but I think it should work - unless Erel knows different
Reply With Quote
  #9 (permalink)  
Old 05-24-2008, 02:39 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The SerialDevice dll doesn't work properly with .Net CF 2.0 so you can't use it with the optimized compiler.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fast user switching LineCutter Questions (Windows Mobile) 0 10-27-2008 10:37 PM
out-of-memory-error based on timer after switching to V6 Frank Questions (Windows Mobile) 2 01-17-2008 03:26 PM
Reactivate the CF GPS after switching on Scubaticus Questions (Windows Mobile) 6 10-25-2007 07:00 PM


All times are GMT. The time now is 09:32 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0