Status serial2.dll + HTC + WM6?

Status
Not open for further replies.

Agrartec

Member
Licensed User
Since this problem happend to me at first, I want to give a little statement as well.

I don`t wanna blame anybody for this. Windows Mobile is much more individually programmed on the devices as normal Windows, so its impossible to get everything running perfectly.
My problem is as well that GPS-apps written with B4ppc only work with gpsgate on my device. Portsplitter (which is free) doesn`t work. Sadly that this happend as WM6 came up, but on WM5 it worked. :(

I stopped programming because of this problem. Since several month I take a look in this forum every week to check if somebody found a solution. It makes me a bit sad, because I have a lot of ideas which I would like to program, but it depends on the use of GPS. Visual Studio is too much and too expensive for me. I would like to write some apps and share them with others, but it is no use if I have to help everybody getting the app working or they would have to buy gpsgate.
As soon as this problem is solved, I will buy a new version of B4ppc.

So, please Erel, here are already a lot of people with this problem, do your best to help us. You gave us such a great way to bring our ideas on PPCs and GPS becomes more and more importance.
 

agraham

Expert
Licensed User
Longtime User
Visual Studio is too much and too expensive for me.
As I tried to point out above ALL the .NET languages suffer this problem as it is a .NET SerialPort class/HTC compatibility problem so Visual Studio would only help you if you could write native code in C++ and so avoid using the SerialPort class.
 

wolfgang

Member
Licensed User
Longtime User
HTC 3650 Cruise WM 6.0 Pro

Hi,
I have had the same problem with my HTC 3650 Cruise WM 6.0 Pro but it is solved now with the GPSINT lib from hsandy. The following code runs without any problem on my device.
B4X:
Sub Globals
   n = 0
End Sub

Sub App_Start
   Form1.Show
   hw.New1
   gpsint.New1
End Sub

Sub gpsint_GPSLocationChanged
   If gpsint.GPSValid = true Then
      n = n + 1
      label2.Text = gpsint.GPSUTCTime
      label6.Text = gpsint.GPSSpeed & " [knots]"
      [B]label4.Text = n[/B]
      Else
         label2.Text = "no fix, wait"
   End If
   hw.KeepAlive
End Sub

Sub btstart_Click
   If btstart.Text = "Start" Then
      gpsint.openGPS
      btstart.Text = "Stop"
      Else
         gpsint.closegps
         btstart.Text = "Start"
         n = 0
   End If
End Sub

Sub Form1_Close
   gpsint.closegps
   gpsint.Dispose
End Sub

The only thing I do not understand is that label4.Text = n displays only even numbers ( divided by 2 and everything is o.k.). The next HTC GPS problem is that the STATIC-MODE is turned on, which means that under a speed of 2 knots the speed and heading is frozen.

In case off all this problems I phoned with the German support and the answer was: “We do only support TomTom”.

So take care when you buy a HTC.
 

agraham

Expert
Licensed User
Longtime User
The only thing I do not understand is that label4.Text = n displays only even numbers
You may be getting two LocationChanged events each time and are being re-entered when you update the labels. You can check with some code like this.

B4X:
ReEntry = false ' in Globals
...
Sub gpsint_GPSLocationChanged
  If Not(ReEntry) Then
      ReEntry = true
      If gpsint.GPSValid = true Then
        n = n + 1
        label2.Text = gpsint.GPSUTCTime
        label6.Text = gpsint.GPSSpeed & " [knots]"
        label4.Text = n
      Else
        label2.Text = "no fix, wait"
      End If
      hw.KeepAlive
      ReEntry = false
  End IF
End Sub
 
Status
Not open for further replies.
Top