Sending GPS coordinates through GPRS - Windows Mobile Software Development

Hello all,
I have a HTC p3600i (Trinity) and I would like to create a program which would send coordinates detected with the built in GPS via GPRS to a server. This is actually my final year project, and it should be done in Java.
I have never programmed for windows mobile before so hopefully someone could assist me with this project. I have a few questions:
1) Is it necessary for me to upgrade my ROM first before I could use the built in GPS on my Trinity? I just got this phone today, so I'm not really sure about this. It has a GPS navigation software installed (mapking), does this mean it's ROM has been upgraded?
2) What are the tools that I need? I currently have Java ME installed on my laptop, should this be enough or do I need any other applications for this project?
3) Could someone point me in the right direction, as to where I can get the related API to program this or even maybe a guide? Right now I don't know where to start.
I hope I didn't ask too many questions for a newbie
I really appreaciate all help!
Thanks!

It might be worth having a look at Microsoft's Intermediate GPS device driver.
http://msdn.microsoft.com/en-us/library/bb202086.aspx
This stuff is in GPSAPI.DLL which should already be in your device but it is a hidden file.
You use the GPSOpenDevice, GPSGetPosition, and GPSCloseDevice functions to get it to work. These are 'C' type function calls.
To go lower than this you will have to open the COM port of the GPS device, read the data from the port and then parse the NMEA strings yourself, and then do whatever with the values returned. A complete pain in the backside!
GPSGetPosition will fill a GPS_POSITION structure with the values you need.
Good luck!

stephj said:
It might be worth having a look at Microsoft's Intermediate GPS device driver.
http://msdn.microsoft.com/en-us/library/bb202086.aspx
This stuff is in GPSAPI.DLL which should already be in your device but it is a hidden file.
You use the GPSOpenDevice, GPSGetPosition, and GPSCloseDevice functions to get it to work. These are 'C' type function calls.
To go lower than this you will have to open the COM port of the GPS device, read the data from the port and then parse the NMEA strings yourself, and then do whatever with the values returned. A complete pain in the backside!
GPSGetPosition will fill a GPS_POSITION structure with the values you need.
Good luck!
Click to expand...
Click to collapse
Hey, thanks for the reply. Will look into it. How bout sending out the data through GPRS? Any ideas?

Don't know exactly. I have only ever written .NET CF C# code to drag data from the net, never to put it back. I assume that many of the SYSTEM.NET namespace objects could be used to transfer data over to a server.
You can push data directly using the WebClient class methods OpenWrite(), UploadData(), UploadFile(), and UploadString().
UploadFile would be used as a Batch Job to push a series of saved values at once.
These functions will use whatever path is available to send the data. Wifi, LAN or GPRS. If you are out in the field, it should start the GPRS connection automatically in order to complete the WebClient transaction.
To use the .NET objects you will have to code it in C# or VB, unless you can access them in Java. Any clues anyone? The GPS stuff can be accessed from .NET by declaring it as a P/Invoke function.

Related

SMS NMEA String plotted on TomTom map?

I have a tracking unit in my car. I can send it an SMS message from my XDA and it will return a full GPS NMEA string with a header. Can anyone tell me the feasability of writing an application that could post this incoming data directly to the TomTom maps program and display the vehicles exact position at street level.
The GPS application supplied with TomTom maps can obviously do this with streaming NMEA strings through the serial port.
If this application is possible I think there is a lot of potential. I am in the telematics business and I know that the majority of tracking devices work the same way.
John Bateman
[email protected]
JohnB said:
[...] Can anyone tell me the feasability of writing an application that could post this incoming data directly to the TomTom maps program and display the vehicles exact position at street level. [...]
Click to expand...
Click to collapse
Very feasable. The only possibly tricky thing would be to write a fake serial driver to present a "serial port" to TomTom. Then you'd probably want a little bit of GUI to help you send these SMSs, and turn the result over to TomTom.
In this software, you would also want some easy kind of controls for playing back historic data from multiple vehicles. And maybe you would also want to incorporate a list of GPS positions for cities and towns in the target area, so you wouldn't need to resort to TomTom to get a general idea.
Three or four days of work for a good coder, the serial port stuff being the only unknown.
I've been working on a similar problem for the last 3 weeks... First you need to purchase the tomtom SDK (which is about 200 $). This SDK contains a DLL and a library/header file that provides your software access to tomtom navigator. After including these files in your project you are able to send direct commands out of your software directly to tomtom. The SDK can be used with c++ and VB. You can get the manual from the tomtom homepage. This PDF is for free and gives you a picture of the possibilities and limits of this solution.
Receiving an SMS is the second task. A good example for sending an SMS can be found on this board, but unfortunately receiving an SMS seems to be a little more tricky (I'm at this point at the moment...).
t_lex
I hadn't even seen TomTom has an SDK. The SDK aproach is, most certainly, preffered over a silly serial port hack...
Very feasable. The only possibly tricky thing would be to write a fake serial driver to present a "serial port" to TomTom. Then you'd probably want a little bit of GUI to help you send these SMSs, and turn the result over to TomTom.
Click to expand...
Click to collapse
I found this one, but is very expensive: http://www.mks.zp.ua/vspdce.php

Direct Access to the internal GPS ??

Hello there,
Did anybody find out how to access the internal GPS of the HTC P3300 without using the GPSID (GPS Intermediate Driver)?
Although the internal GPS works fine for me with many programs (TomTom, Pathaway, Fugawi, VisualGPSce, etc.) I did not find a way to program the internal GPS using any of the common GPS tools (such as SirfTech, Aplsirf, CeMonitor, GPSTweak, etc.). In particular I'm very interested in enabling/disabling the SN and the SBAS Mode.
I'm guessing that programming the internal GPS via the GPSID is not possible (or not supported) while it might be possible by accessing the hardware GPS directly. However, I don't know how to do so...
During my investigations I found out the following details:
Based on the MS GPSID Reference the HTC P3300 must have a plug'n'play based internal GPS receiver, as there's no valid registry key found in the corresponding HKLM/System/CurrentControlSet/GPS Intermediate Drivers section.
Looking into the HKLM/Drivers/Active section for a suitable pnp GPS driver I only found COM3 (SerialGPS.dll) which for me seems to be the corresponding hardware driver for the internal GPS. However, accessing COM3 always fails for me with any program.
Does anybody know how to get COM3 (SerialGPS) to work?
Or does anybody know how the GPSID talks to the internal GPS and why I can't do it directly (or how I can do it directly too)?
Any help and discussion is higly appreciated.
Thanks, GeenZ.
Have you tired to delete the gps driver in registry, and after a softreset tried to access direct on com 3 ?
pklein90 said:
Have you tired to delete the gps driver in registry, and after a softreset tried to access direct on com 3 ?
Click to expand...
Click to collapse
I already have tried disabling the GPSID. This can be done either by the GPS control panel or directly in the registry by setting the key HLKM/System/CurrentControlSet/GPS Intermediate Driver/IsEnabled to "0".
The effect was that the virtual GPS COM port from the GPSID (COM4) was no longer available, but COM 3 still did not work.
Does deleting and softreseting make a difference to disabling?
How could I "completey delete" the GPSID in the registry?
Thanks, GeenZ
I'm interested in this too since I've found reading from COM4 using CF 2 is really buggy and hangs the device. I wanted to see if talking directly to the GPS instead of the intermediate driver would speed things up a bit.
Hi,
As I reported in this Thread I did not find any solution to get direct access to the GPS port.
GeenZ
indiekiduk said:
talking directly to the GPS instead of the intermediate driver would speed things up a bit.
Click to expand...
Click to collapse
it would also probably solve the problem of M650 users stucked with a different firmware version of this internal GPS which doesn't work under wm6
If you would take a look at my following thread
it explains the problem.
Alot of people think they cant connect to the GPS device, but actually it is connection but just nog receiving data the right way.
Slovek said:
If you would take a look at my following thread
it explains the problem.
Alot of people think they cant connect to the GPS device, but actually it is connection but just nog receiving data the right way.
Click to expand...
Click to collapse
Thanks Slovek
Should we Thank HTC for this great feature ?!
Already had contact with them, initially they put this up as a 'feature' but about a month ago i received a short list of questions regarding the GPS module. so i hope their going to change this.
Hope so
at least for the "perennity" of this device !

WM6 and Linux - Bluetooth issue

I am trying to get my laptop running linux to use my hermes as a modem over bluetooth. So far I am not succeeding, I have paired the phone and the laptop, but no services show up to share. I have sent files over bluetooth to the laptop and that is just fine.
Has anyone else done this? I really don't want to change my laptop back to windows just so I can surf the net using my phone.
Thanks
What distribution of linux and what window manager do you use?
And does the file transfer work both ways? (to the phone and from it).
I might help you a little
Using Ubuntu - Edgy Eft and Gnome.
I don't have a way for files to be sent from the latop, I am using the blue tooth file sharing program - which seems to be one way only.
I did this a long time ago, so I might have forgot something, but let's give it a try.
First check if you have a rfcomm device in /dev/, there should be something like rfcomm0.
And this is there if you have edited and paired your phone correctly!
(you should add your device to /etc/bluetooth/rfcomm.conf)
Try Gnome-PPP, it's a very good program for dialup rutines ^^
Code:
sudo apt-get install gnome-ppp
The gnome-ppp should be run in root mode because rfcomm device has no privileges, or then you could just chmod it.
But anyways, I've made a script for myself to turn on BT and start gnome-ppp, to run it with root privileges with the following command
Code:
gksudo -u root gnome-ppp
after that you see a window with username password etc.
press setup and put in the following config..
Setup
Now we need a init string! I have no idea what is your provider and what init string is needed for it.
In the Setup window press Init Strings...
And in the first place you set the string.
With Saunalahti as a provider I have a init string of:
AT+CGDCONT=1,"IP","internet.saunalahti"
notice that internet.saunalahti is the APN name for my providers internet gprs connections! So replace this with yours, or then contact your provider and ask for that info
Now back to the first window.
My ISP doesn't require any username but you can't connect without them so put in whatever you like for example
username: none and password: none
or
if you need username and password for your providers GPRS, then add them here
For the phonenumber set the number: *99#
Nothing else, that should be it then if I got it all and remember correct
Then just connect (notice that on TyTN there isn't any "connecting to GPRS" popups when you use a PPP from linux).
in WM6, the phone internet sharing no longer behaves like a modem. not sure how to get it working with Linux
joej said:
in WM6, the phone internet sharing no longer behaves like a modem. not sure how to get it working with Linux
Click to expand...
Click to collapse
what do you mean, the "Wireless Modem" program that you can find in the Programs folder?
I never used that, there's no need of it.
In fact, don't use it, propably wont work with it.
StewartG said:
I am trying to get my laptop running linux to use my hermes as a modem over bluetooth. So far I am not succeeding, I have paired the phone and the laptop, but no services show up to share. I have sent files over bluetooth to the laptop and that is just fine.
Has anyone else done this? I really don't want to change my laptop back to windows just so I can surf the net using my phone.
Click to expand...
Click to collapse
I've been successfully using my Wizard and Hermes as BT modems for GPRS/EDGE/UMTS connections, but only with WM5 (check out my tutorial here: http://klamstwo.org/evad/archives/20 ). After upgrading Hermes to WM6 I am no longer able to create rfcomm device, and I don't know why.
However, it is still possible to use GPRS/UMTS connection under Linux! I've managed to get it working through Bluetooth PAN profile. I'm planning to write some kind of tutorial on my blog pretty soon, but in meanwhile have a look here: http://bluez.sourceforge.net/contrib/HOWTO-PAN - this HOWTO describes quite comprehensively BT PAN usage under Linux.
Basically, you need to set up Internet Sharing via BT on your Hermes, and then connect from your Linux using pand daemon. Check out HOWTO, give it a try, if nothings comes up - feel free to ask here. Good luck.
Btw, my distro is FC6.
gvoima said:
what do you mean, the "Wireless Modem" program that you can find in the Programs folder?
I never used that, there's no need of it.
In fact, don't use it, propably wont work with it.
Click to expand...
Click to collapse
In WM5 it didn't work even with Windows (or I didn't know how to set it up properly). WM6 brings completely new Internet Sharing application which is accessible from Linux without big problems via Bluetooth PAN profile - check out my post above.
I'm planning to try connecting to internet through Hermes/WM6 via USB cable. I guess it's just a matter of installing some usb-driver. It's worth to try, as UMTS/HSDPA connection together with BT drains battery really (I mean REALLY) fast, and also - USB cable offers higher speeds than BT...
Nice to know, i'm using WM5 atm, waiting the official WM6 release from sweden (I live in finland and tried to contact finnish HTC regarding that matter), then I might look into it more.
eva_d said:
I've been successfully using my Wizard and Hermes as BT modems for GPRS/EDGE/UMTS connections, but only with WM5 (check out my tutorial here: http://klamstwo.org/evad/archives/20 ). After upgrading Hermes to WM6 I am no longer able to create rfcomm device, and I don't know why.
However, it is still possible to use GPRS/UMTS connection under Linux! I've managed to get it working through Bluetooth PAN profile. I'm planning to write some kind of tutorial on my blog pretty soon, but in meanwhile have a look here: http://bluez.sourceforge.net/contrib/HOWTO-PAN - this HOWTO describes quite comprehensively BT PAN usage under Linux.
Basically, you need to set up Internet Sharing via BT on your Hermes, and then connect from your Linux using pand daemon. Check out HOWTO, give it a try, if nothings comes up - feel free to ask here. Good luck.
Btw, my distro is FC6.
Click to expand...
Click to collapse
I see your point now, I upgraded to a new ROM and AKU, now the wireless modem is gone and I cannot connect to a rfcomm device anymore. But there is the Internet Sharing application, I'm going to try your tutorial in a moment
What about USB modem?
eva_d said:
[...]I'm planning to try connecting to internet through Hermes/WM6 via USB cable. I guess it's just a matter of installing some usb-driver. It's worth to try, as UMTS/HSDPA connection together with BT drains battery really (I mean REALLY) fast, and also - USB cable offers higher speeds than BT...
Click to expand...
Click to collapse
Hi all,
It's my first post on this forum. But I'm looking forward to finding a way to use my HTC Wizard has a USB modem...
I've seen on another forum that configuring this device as an USB modem can be quite easy done on Windows. So it would be nice to have this working for Linux
joej said:
in WM6, the phone internet sharing no longer behaves like a modem. not sure how to get it working with Linux
Click to expand...
Click to collapse
You can get it working as modem the same way you could do it in WM5 - using the "internet sharing " application.
The problem described here is that when you do
$ sdptool browse <bluetooth_mac_address>
you see no services.
I have the same problem with ubuntu.
When I browse the services of another phone - a nokia for example - I see all of them .
However I had this problem with ubuntu even before upgrading to WM6.
So it seems the problem is in the bluez version delivered with ubuntu.
What I am going to try the next few days is to uninstall the ubuntu release of bluez and build the source code and install.
I had an issue with synce also with ubuntu - not working. So I downloaded synce 's sources and everything works now.
deyanmf said:
You can get it working as modem the same way you could do it in WM5 - using the "internet sharing " application.
The problem described here is that when you do
$ sdptool browse <bluetooth_mac_address>
you see no services.
I have the same problem with ubuntu.
When I browse the services of another phone - a nokia for example - I see all of them .
However I had this problem with ubuntu even before upgrading to WM6.
So it seems the problem is in the bluez version delivered with ubuntu.
What I am going to try the next few days is to uninstall the ubuntu release of bluez and build the source code and install.
I had an issue with synce also with ubuntu - not working. So I downloaded synce 's sources and everything works now.
Click to expand...
Click to collapse
This is mainly because the connection method has changed in WM6.
In WM5 it was done via DUN (Dialup Networking Profile). WM6 Internet Connection Sharing does not utilise or advertise this profile when in place, but sets up a PUNU (Personal Area Network) profile, basically turning the Hermes into a router with dhcp services.
I followed the referenced howto and was able to get my laptop running FC6 connected to the Hermes and auto-assigning an IP address. Unfortunately, though, the connection was not stable and disconnects not long after it was established.
I'll have another read at the howto as I've noticed persistent connection flags that should force reconnection, however if I'm connected to the Company VPN, then I suspect that will continually drop also.
Can anyone post any success stories and configuration/command output that they used to create a stable connection?
Ta
Darren
numanoids said:
Can anyone post any success stories and configuration/command output that they used to create a stable connection?
Click to expand...
Click to collapse
Check out my solution: http://klamstwo.org/evad/archives/40
It actually works stable, however I have never used single connection for more than like 30-60 minutes, yet - I guess.
Btw, works also with Fedora 7.

Garmin GPS Unlocked on PPC - Complete Guide

First of all I want to thank all the members on different forums, who posted suggestions and files. I just read read and read for 3 days trying to make it work on my TYTN II. I finally did it and wanted to combine all the info in one post so lots of other members can benefit from it.
So here we go, please follow all the steps carefully and slowly….
1. Get “Garmi Mobile XT V4PPC” from mininova.
2. Remove any previous garmin installations completely from your ppc.
3. Download A. GarminMobileXTforPocketPcwithGPS10_4100wBeta.exe
B. GarminMobileXTforWindowsMobile_41040w.exe
4. From pc install A to ppc and DO NOT install or run on ppc when a window appears to do so.
5. From pc install B to ppc and install and run when window appears on ppc. When program runs , it will start looking for gps device. Cancel it, go to Settings then to About and write down your 10 digit Device ID.
6. Run GarmiMobile XT V4PPC key generator on pc and put your device id and generate SW key and Map Key ( Garmin city navigator nt 2008 ).
7. Open note pad. Copy and past both keys one by one and save them as SW.UNL and GMAPSUPP.UNL.
This is a critical point. In your windows explorer uncheck HIDE FILE EXTENSIONS. NOW MAKE SURE THAT BOTH FILES DO NOT HAVE txt EXTENSION AT THE END. THEY HAVE TO BE UNL FILES.
8. Transfer these UNL files to your ppc in Garmin folder.
9. Now run Garmin from your ppc, it should be able to detect your GPS now. You do not have to be outside at this point.
Installing the Maps.
1. Download Garmin City Navigator North America NT 2008 from piratesbay. Install on your computer and run. It will ask for the unlock code, put GNG55-L8WSA-S7YET-9U246-GJFQT.
2. That should unlock the mapsource. Select your maps to be transferred, save it on desktop on pc.
3. Name newely made map file GMAPSUPP.IMG ( no txt extensions ).
4. Delete GMAPSUPP.UNL and GMAPBMAP.IMG from your ppc in Garmin directory and load new GMAPSUPP.IMG from your pc to ppc.
That’s it guys you should be able to use the maps now.
Thanks once again to all the kind souls out there who made it possible.
I cannot seem to find the file from mininova. Can someone contact me so that I can get it and host it for others?
Was able to find all files and trying to install now.
Good luck guys guys. File should be on mininova.....
IT WORKS! But I had to leave GMAPSUPP.UNL on my ppc or Garmin Mobile XT would say that it could not unlock the map. Thanks for the instructions Tararura!
BTW: Im using it on a hw6955.
Good job coolcut....
Can you post
Hey,
I would like to thank you, thats amazing i have been trying to make this work for a while. I do have a suggestion though why down you post the files all togther for everybody to have. including the instructions that you have provided.
I have tried to search for the files but i can not seem to find them.
Thanks again...
The Files
Hi guys
Carry on................
This is Warez talk. This is NOT allowed on this forum.
Sorry about that. I didn't know that. You can probably delete this post.
thanks
tararura said:
Sorry about that. I didn't know that. You can probably delete this post.
thanks
Click to expand...
Click to collapse
He/she is a senior member of respect but he/she cannot delete the whole thread and only moderator has the power to do that. You may consider to delete the content of your #8 above so that nobody can understand your post #1. It will wither and die naturally!
Thanks SamNC
Done.......
Garmin Vs TomTom Vs iGuidance
How do you compare them especially on accuracy of routing and maps? Had used a friend's iGuidance 4 on X51v with WM6 briefly, I like its easy to use and the Text to Speech function but routing accuracy was poor in a lot of places since version 1.1. I have used TT6 for over a year now, generally routing is acceptable though its not optimal routing all the time. Between the 2, I opted for routing accuracy and map accuracy.
I have never used Garmin before, so how is its routing and map status. How old or how update is Garmin map. I need more information before I shell out $140 for the Garmin map.
HI there
I have TT and Garmin installed right now on TYTN II . I also used Mio/iGo on TYTN II. The best of all is Garmin. Its accuracy is the best. Graphics are not that great like TT. Garmin tells you if the destination is on Left or Right when you are close to reaching it. TT is not that accurate, once it told me that my address was still 2 blocks away when I already had reached it.
Another cool thing in Garmin is that once you set the addresses in Garmin for your Contacts. You can open contacts in your phone and then you have an option to route to it through Garmin.
Menus are simple in Garmin than TT. and Garmin has more POI like I could not find Tim Hortons in TT but Garmin was showing all of them.
Personally I like Garmin very much for its accuracy
I like TT6 because of better routing accuracy not destination accuracy as it does not matter too much for me if I am a house or 2 away. I bought GPS navigation softwares starting from 2001, none was satisfactory and I found TT6 had slightly better routing (sometimes I got wrong routing from TT6 as well but comparatively less than other software I owned). I settle for TT6 as a compromise, it lacks of storage capacity for Favorites.
It seems that you are quite happy with Garmin. I will problly try Garmin.
Yes try it , you will like it better.
what is the coverage for europe (countries, %)
Don't know but there are some European maps you can download for it.
i am using artemis, and i have copied sw.unl to garmin folder,.
when the device try to search, he try to search on my com port (com 4) but nothing happend, the satellite was not found (keep searching),.
any ideas???
thanks b4
this soft works in a HTC TyTN 2?

Bluetooth API?

Hey,
i want to start programming an app for my HD2 which should connect one of my bluetooth devices by starting it. I only know a bit about programming under desktop-windows. Where do I find a reference for the programmers api on WM6.5 / where can i look for the commands i need?
//Edit: The functions i found in the MSDN are for connecting - communicating - closing in this way, but i only want to connect a profile (serialport for tmc) and end.
Hope you can help. Thanks.
125
Found the 32Feet.net SDK but still i can't get the procedures i need.
Nobody with information on programming bluetooth apps?
Somebody must have down something similiar in the past or?
These?:
http://www.codeproject.com/KB/windows/BluetoothDevicesDiscovery.aspx
http://www.mobile-soft-dev.blogspot.com/2010/03/c-wrapper-for-nearby-bluetooth-devices.html
Thanks for the links. Ok that is how to enumerate the devices and i could do a connection over winsock, but still i can't find information on not really do a connection but only pair the bt device so other applications can use it afterwards. Damn
(More Information: App should be used on WIDCOMM stack to connect tmc and start navigation after that to get rid of the annoying selector window which disappears to quick)

Categories

Resources