That's fair enough. Will have a go at using the CAB and will report back.
Have you tried any other GPS Libraries (are there any other GPS Libraries)?
Printable View
That's fair enough. Will have a go at using the CAB and will report back.
Have you tried any other GPS Libraries (are there any other GPS Libraries)?
Just to confirm I get the same timeout error when trying to use the cab file on my HTC Touch HD.
As per my other thread it would be good to resolve this issue once and for all.
Woo hoo, I am not alone!!!! :)
Damn, you're not alone!!!! :(
Yes, there are other GPS libraries. There's one in the OpenNetCF library, it appears, that we could look at. I'm going to go through it soon and should have something ready this weekend, I hope.
Aside from that, I'm still sure there are more class libraries for this. Do post any you find.
Ha ha :)Quote:
Originally Posted by mendhak
Really sorry, haven't had a chance to look into any of this yet. With the weather the way it is here i spent most of the day in traffic, just really sitting down for the first time just now, so thought I would check what going on here. I am going to try to have a play over the weekend, but I think I am going to need to do some reading up on GPS. Have you got any good links?
Gary
Nothing specific to GPS... because when you read GPS data on a WinMo, it's just a matter of reading a COM port.
So I suppose you could go through these
http://msdn.microsoft.com/en-us/library/bb202097.aspx
http://msdn.microsoft.com/en-us/library/bb202033.aspx
http://msdn.microsoft.com/en-us/library/aa446565.aspx
You could even come up with your own test app, specific to your phone, in which you attempt to read from COM4! if you get the time of course,I know we're all busy at work. :)
Hey,
I don't know if you have already seen it, but I have just found a sample application which uses the GPS Library within the OpenNETCF, you can find it here:
http://www.opennetcf.com/downloads/a...px?s=GPSSample
I am going to try and have a play with this tomorrow night, but I just thought I would let you know about it just in case you get a chance to look at it.
Gary
Good news,
I have played with the OpenNetCF Serial class and have managed to open and serial port and receive data from my internal GPS device.
Attached if the source code and in the bin\debug direcory is the compiled app.
Copy the Exe and Dll files to your device and test.
Now to work on inserting this into my app. Of course if anyone improves on this, please let us know.
Cheers,
Paul.
You did not attach anything. :)Quote:
Originally Posted by MrRalphMan
I have no idea what you mean.... :)..Quote:
Originally Posted by dee-u
All I can say is DOH!!!!!
You did not include the attachment that you were referring to. Not you have edited it and included it. :)Quote:
Originally Posted by MrRalphMan
Hey Mendhak,
Looks like we could be onto a winner with the code that MrRalphMan posted, see attached screen shot.
Does it work for you on your phone? Is so, we might need to refactor GPSTracks code to use the OpenNetCF GPS Library.
Let me know what happens.
Gary
It's not the most pretty app, but it was just proof of concept.
Hey,
That's perfectly fine. Getting the GPS Data is the main thing, which you have been able to do, everything else is just aesthetics.
Gary
Wow! I was *JUST* (at this very moment) using the OpenNETCF library in a test form to see how it works.
I'm really glad you guys got it working and are at least getting some test data. I will scrub what I'm doing and use ralph's stuff now. Why reinvent the wheel? :)
Works! I guess all we need to do now is parse it.
I'm also going to look at the GPS class within the OpenNetCF class library, as it has events raised for position, etc.
BBL.
Hmm, found a bug in the OpenNetCF GPS class.
I changed that red apostrophe to a colon, not sure why an apostrophe was there. The GPS bits now work too, although they work in a separate thread, which means that we'll need to 'invoke' writing to a texbox or file.Code:private string[] devices()
{
// lists all modems on the device
ArrayList al = new ArrayList();
RegistryKey defkey;
string[] keyNames;
string keyvalue="";
string strport="";
// now get the active
defkey=Registry.LocalMachine.CreateSubKey(@"Drivers\Active");
keyNames =defkey.GetSubKeyNames();
foreach (string x in keyNames)
{
try
{
keyvalue=defkey.CreateSubKey(x).GetValue("Key").ToString();
strport=defkey.CreateSubKey(x).GetValue("Name").ToString();
// fudge to remove rubbish off the end of the string
strport = strport.Substring(0,strport.IndexOf("'"));
RegistryKey thekey=Registry.LocalMachine.CreateSubKey(keyvalue);
if (strport.StartsWith("COM"))
al.Add(strport);
}
catch
{
}
}
return (string[]) al.ToArray(typeof(string));
}
Making some progress. I'll check the code in in an hour or so and ask you to run it. Ralph might want to take a look at it too...
The OpenNetCF library is really fast, btw. So fast that when I tried going verbose, I couldn't click stop, because the textbox was filling up so fast. I had to introduce a 100ms delay between writes to the textbox in verbose.
Testing it out right now.
Ha ha, that sounds promising!!!
I am heading out this afternoon, but will definitely test it out once I get back in.
Excuse my absence. I was held captive by the local raging mooses during a stroll in the wilderness.
I'll update myself with all that has been going on in this thread after i have had my revenge on said mooses.
Guys, I've checked in the latest code.
Please re-download the app from here.
As usual, choose your port and click Verbose, if you get junk data, then you're at the right place. Then stop it and click 'start' and wait for it to start logging.
Exceptions should show up in the textbox too. Let me know how you get along. You're welcome to try it via source code too, change anything you please.
Good luck with the moose. I am sure that this re-download and retry will be worth the slaughter.
I've left in lots of commented code, we can clean up later. The important thing right now is that we get it working on your phones. I won't dwell on why the other class library didn't work.
Also, any help with the... UI would be great. You should also be able to flip the phone orientation and still have the app looking 'OK'.
Good show,
I even went back to the .net serialport and tried adding all the settings that work here, including the handshake one that got the OpenNetCF one working for me and it still didn't work.
Just adding this into my app now.
I cant find the instructions :cry:Quote:
Originally Posted by mendhak
Hey,
Once you have got the SDK installed, all you need to do is to deploy the the attached device, rather than the emulator.
This is done by first connecting your device through ActiveSync, which I will assume you are already doing, if not, let me know. Once that is done, select the Windows Mobile 6 Classic Device from the dropdown list, see attached screen shot, and the application should be deployed to the Device.
You might get some warning appearing on your phone, just acknowledge them, assuming you trust Mendhak :)
Hope that helps
Gary
Oh... i have to trust mendhak?... i dont know...
just kidding. Thanks for that information, I assumed that was all that had to be done, but I keep getting the error "No such interface supported" no matter what option I choose to deploy to (both emulators and real devices). I cant understand why.
Mendhak,
I was having a quick play with the code today, and it is looking a lot more promising. I had the textbox filling up with stuff when I hit Verbose. I only had a few minutes to play though, because I was wrestling with trying to get ActiveSync working, for some reason connecting my phone with the USB cable was causing a BSOD, so ended up connecting my phone using Bluetooth, which meant I had to wrestle with the Toshiba Bluetooth Stack....
Anyway, long story short, I can now deploy to my phone, and should be in a better position to have a look at this tomorrow.
I have some ideas for some UI changes as well, so I will try and get them incorporated as well.
Gary
Hmm, that sounds similar to some problems that I have seen in the past, and normally they have just sorted themselves out, never really found an "actual" solution.Quote:
Originally Posted by Atheist
What OS are you running on your desktop? What OS are you running on your Mobile? Are you able to establish an ActiveSync connection successfully? Can you sync data between phone and desktop?
Gary
Im running Vista Business 64 bit on my PC, Windows Mobile 6 on my mobile.
ActiveSync works like a charm. I have been able to use the device emulator to earlier, it suddenly all stopped working..
Hey,
I am running Windows XP Pro, so I think the extent of knowledge to help you is going to end. I know if XP Pro and you run the emulator through activesync you have to change a setting in ActiveSync to use a "DMA" port, and then you have to change it back again when using a physical device. I don't know if that sounds familiar to you, but if it does have you confirmed this setting?
The other thing that rings a bell, and it sounds ridiculous, but....
Can you establish an ActiveSync connection, and then open up Visual Studio. I seem to remember that this caused my problems before, and this was one way I could guarantee the connection.
Apart from that though, i have nothing. I know the connections in Vista are handled differently using the Mobile Device Center, and I have never played with it.
Gary
The guy in this Connect feedback seems to get the same error.
http://connect.microsoft.com/VisualS...dbackID=106030
Can you try a repair/reinstall like he did?
You can also try turning your device off and on again.
Atheist, can you try running the app as-is just to test if it's working in Verbose?
Gep, thanks again. Good to hear about Verbose.
I tried it on the other coworkers' phones and it worked fine, but the one problem that did crop up was that not every phone lets you write to \My Documents\GPSLogs... many of them will probably want to write to a storage card. So we should probably expose the folder path. Looks like the settings are taking up more and more space from that poor textbox :D
That was actually going to be one of the UI changes that I was going to make.
I was going to make another form that handled the settings. At the end of the day, you only really need to set them once, so no real need for them to be displayed on screen all the time.
Gary
Yeah good point. I guess I kept them in one place because in the beginning there were only two or three controls. Now it's... lots. :)
Hey,
Right, I decided to have a play with the code a little and I have come up with the following, and I thought I would get some thoughts before checking anything in, so here goes...
Main Form (all screen real estate is given to the TextBox):
Attachment 68973
About Form:
Attachment 68972
Settings Form:
Attachment 68974
I know there are two schools of thought on this, but I decided to only use one form and then multiple panels to create the different pages, this prevents the need to instantiate multiple forms, rather simply show and hide panels, this should keep the app responsive.
In the designer, this means it looks like this:
Attachment 68975
I have to play some more obviously with the Settings screen, I have a GroupBox Control that I want to use to group like settings. There isn't one be default in the Compact Framework, so I rolled my own in another project.
The usage of the form has changed slightly. Rather than having both a start button and a verbose button, you now either check or uncheck the verbose menuitem and then depending on the checked state you either start in normal mode or verbose mode.
Let me know what you think, and if you like it I can finish it off and then check in the changes.
Gary
Wow. I just woke up and I'm stunned, you've done so much.
I like your verbose check/uncheck idea. Dude, well done. Nice concept with the settings screen too.
:lol: @ about screen
Wait! Does it work for you then? Were you able to get GPX log files written? Was it able to find your position?
Oh, when you check it in, if you get unresolved conflicts, make sure you 'merge in merge tool' instead of getting it done automatically :D
Really nice work.
You would think that that would be something I would have checked by now wouldn't you, but I keep forgetting. I don't get a reliable GPS signal either at the office or at home, so I keep meaning to do it on the way to and from, but always seem to forget. I will "try" and remember today.Quote:
Originally Posted by mendhak
I will keep in mind what you say about the check in's. I should get everything checked in tonight.
Glad you like it.
Gary
If you feel a little restless before checking in, then you can also introduce a 'save to folder' path in there. If you don't do it, then I will. :)