Home PageFacebookRSS News Feed
PocketGPS
Web
SatNav,GPS,Navigation
Brixly - Fast, Reliable, Secure UK Web Hosting
Pocket GPS World - SatNavs | GPS | Speed Cameras: Forums

Pocket GPS World :: View topic - Review Comments: Talking to TomTom Navigator via Perl
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in for private messagesLog in for private messages   Log inLog in 

Review Comments: Talking to TomTom Navigator via Perl
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Pocket GPS World Forum Index -> TomTom Software-Only Products
View previous topic :: View next topic  
Author Message
lbendlin
Pocket GPS Staff
Pocket GPS Staff


Joined: 02/11/2002 22:41:59
Posts: 11878
Location: Massachusetts, USA

PostPosted: Mon Oct 23, 2006 10:37 pm    Post subject: Reply with quote

- The call ends in V01 (not V1)
- the file should contain a zero delimited string. The hex 7C in front of it is the pipe | which can also be omitted.
- the "finished" file does not contain a period, only a line feed (hex 0A) and is zero delimited too.

In reality the "finished" file doesn't need to contain anything. Its only purpose in life is to signal that the command file or result file is ready for consumption.

I can post some code examples in C code to show how these files can be created.
_________________
Lutz

Report Map Errors here:
TomTom/TeleAtlas NAVTEQ
Back to top
View user's profile Send private message Send e-mail
captaincaveman
Occasional Visitor


Joined: Oct 23, 2006
Posts: 14

PostPosted: Mon Oct 23, 2006 10:56 pm    Post subject: Reply with quote

Thanks for the reply Rich, I gave the file creation a whirl. However, when the Perl script runs I get a few errors.

I ran the Perl script with the console showing so I could see what it was doing. It copies the files fine, but it has the line 'readline() on closed filehandle', and then also 'use of uninitialized value in...' The SDKFileCalls file just has 'finish.' in it.

It's more than probable that my attempt at the file creation went awry (I tried 2 versions of the 'message' file because even though you said "V1" in your post, your article shows "V01"). I am running TT6, but I hadn't actually planned a route when running this test, i.e. I hadn't attached a GPS device, could this cause the GetRouteInfo to return nothing?

Basically there are a number of things that I probably need to test and change but it could take me a while. As you requested, a link to the two files in question would be great for all interested. In the meantime I have pm'ed you my email address and would really appreciate if you could send them to me (so then at least know that part is correct). If you have any further instructions/ideas though then please reply on the thread for the benefit of all, although I'm sure you didn't need to be told that :D

Cheers.
Back to top
View user's profile Send private message
lbendlin
Pocket GPS Staff
Pocket GPS Staff


Joined: 02/11/2002 22:41:59
Posts: 11878
Location: Massachusetts, USA

PostPosted: Mon Oct 23, 2006 11:47 pm    Post subject: Reply with quote

Don't get your hopes up too high with TomTom 6. Seems to me that many of the API calls are not properly supported in build 7720.
_________________
Lutz

Report Map Errors here:
TomTom/TeleAtlas NAVTEQ
Back to top
View user's profile Send private message Send e-mail
rich_d_thomas
Occasional Visitor


Joined: Jan 25, 2004
Posts: 46

PostPosted: Tue Oct 24, 2006 12:19 am    Post subject: Reply with quote

Hi captaincaveman,

Oh yes, my mistake, the message files does indeed end in "V01", not "V1" like I posted earlier, thanks Lutz.

I've emailed you the SDK files, so hopefully you've got them by now.

Please could you try the following as a test:

1) Connect your PDA to your PC and make sure that ActiveSync can see it and "explore" to your PDA and then navigate to \TomTom\SdkFileCalls

2) Start up TomTom and use the "Advanced Planning" to navigate from your home to somewhere a long long way away. When it's calculated the route, tap on "Route", then "Show route demo". This should make TomTom pretend that you're actually driving the route.

3) Using you're ActiveSync "explore" window, copy the SDK.TomTomNavigationServer.1050229.1.message file to the "\TomTom\SdkFileCalls" folder on your PDA. Then wait for about 5 seconds and after that copy the SDK.TomTomNavigationServer.1050229.1.finished file into the same place on the PDA and hold your breath!


Wait for another 5 seconds and press F5 on your ActiveSync "explore" window and look to see if the files have changed.

What we are looking out for are TomTomNavigationServer.SDK files to be in the place where the SDK.TomTomNavigationServer files were.

If these new files don't appear, then it may well be down to a version 6 issue and I'm afraid that I don't know where to start on that.

If the files do appear, then I've got a bit of head scratching, but I'm sure I can figure it out.

Please let me know how you get on.

Cheers,

Richard
Back to top
View user's profile Send private message
captaincaveman
Occasional Visitor


Joined: Oct 23, 2006
Posts: 14

PostPosted: Tue Oct 24, 2006 9:37 am    Post subject: Reply with quote

Rich,

Some good suggestions there, I'll try them out when I get home tonight (can't get a GPS signal in the middle of my office!). I also received your files, much appreciated; they look just like the ones I created. Before I hit the sack last night I ran the Perl script when TomTom had a good signal and a route planned, but the console listed a whole bunch of 'closed filehandle' entries. Mind you the whole process was fiddly, and your suggestion about the activesync method is much better to test them.

I'm keeping my fingers crossed but I have build 7720, and as Lutz suggested the fear is starting to grow that it's a TT6 issue. I'll be gutted if it is! I'll let you know how I get on.
Back to top
View user's profile Send private message
NickG
Frequent Visitor


Joined: Nov 09, 2003
Posts: 357
Location: UK

PostPosted: Tue Oct 24, 2006 11:59 am    Post subject: Reply with quote

Would there be any way to implement this for the TomTom x10 series? I know you can write plugins, but is there a way to use the bluetooth data connection via the tomtom API? I seem to remember looking into this in the past and realising it wasn't possible but things might have changed since then.
Back to top
View user's profile Send private message Visit poster's website
rich_d_thomas
Occasional Visitor


Joined: Jan 25, 2004
Posts: 46

PostPosted: Tue Oct 24, 2006 1:40 pm    Post subject: Reply with quote

Hi captaincaveman,

You don't need a GPS signal to test this out.

By doing advanced planning on TomTom and getting it to show a demo of the route, it gives itself the GPS co-ordinates as if you are really driving along the route!

I'll be disappointed too if these API calls do not work on version 6.
Back to top
View user's profile Send private message
rich_d_thomas
Occasional Visitor


Joined: Jan 25, 2004
Posts: 46

PostPosted: Tue Oct 24, 2006 2:08 pm    Post subject: Reply with quote

Hi NickG,

As the x10 is an all one unit, then it may be possible, but by doing a few things differently.

I don't have an all in one unit yet, but if I had, I would be reading how to get into the O.S. of the unit by reading http://www.pocketgpsworld.com/insidetomtomgo910.php

Then I'd see if I could install PERL onto it and just altering the script to be suitable on that platform.

The other way is not use PERL as all and write a shell script to do the equivalent as the PERL script. That way, you wouldn't need to install PERL.

The solution working on the x10 is dependant on the following:

1) That you get "get in" to the x10, in a similar way to how Lutz did his 910 using Hypeterminal.

2) That you can run my PERL script or write your own shell script or application to do the same thing.

3) That you can provide the x10 with mobile internet connectivity.

4) That the x10 supports the API calls.

Hope this helps.

Richard.
Back to top
View user's profile Send private message
captaincaveman
Occasional Visitor


Joined: Oct 23, 2006
Posts: 14

PostPosted: Tue Oct 24, 2006 2:37 pm    Post subject: Reply with quote

Hi Rich.

Good news, it works on TT6! I was being an utter moron: The two files you kindly emailed to me were saved to my computer with a '.txt' extension!! So whenever they were copied the SdkFileCalls folder on my PDA they obviously weren't being processed by TT. I now get two nice new files, with the message one containing lots of lovely pipe-seperated numbers!

Now I have to do a full end-to-end test when I get home (I've spent too much of my company's time working on this already!). I already have my mobile phone setup to provide a bluetooth web connection, so I guess all that's left for me to do is to edit the FTP.pm file to enter my ftp location/logon details. Could you point me to the correct lines to edit in the FTP file??

I feel like christmas has come a bit earlier this year!!
Back to top
View user's profile Send private message
rich_d_thomas
Occasional Visitor


Joined: Jan 25, 2004
Posts: 46

PostPosted: Tue Oct 24, 2006 2:54 pm    Post subject: Reply with quote

Hi captaincaveman,

That's great news and such a relief that it's not a TT6 issue. Laughing Out Loud at your companies time!

You specify the FTP server, username, password and directory to upload to in the PERL script itself.

It all happens between lines 306 and 318:

Just replace yourserver, yourusername, yourpassword and yourfolder with the correct details for your FTP server.

The 3 edits shown on the review itself are on the .pm files and are necessary.

Happy early Christmas!

Please let me know how you get on.

Richard.
Back to top
View user's profile Send private message
captaincaveman
Occasional Visitor


Joined: Oct 23, 2006
Posts: 14

PostPosted: Tue Oct 24, 2006 2:59 pm    Post subject: Reply with quote

Right I'll go and make those changes. the webfile.txt also gets created fine. When I shut down TT I have a measage displayed on the today screen (from the PERL script I imagine) saying 'Cannot open \sd card\perl58m\unix /etc/services' why is it trying to open a unix folder, it doesn't appear to be in the script? and will it cause the script to halt?

ta!
Back to top
View user's profile Send private message
captaincaveman
Occasional Visitor


Joined: Oct 23, 2006
Posts: 14

PostPosted: Tue Oct 24, 2006 3:47 pm    Post subject: Reply with quote

Just discovered that the error message I get happens as soon as the PERL console reports that it is 'About to make FTP Connection', show it's a bit of a show stopper for me at the moment Crying or Very sad
Back to top
View user's profile Send private message
rich_d_thomas
Occasional Visitor


Joined: Jan 25, 2004
Posts: 46

PostPosted: Tue Oct 24, 2006 9:04 pm    Post subject: Reply with quote

Hi captaincaveman,

Aah, sorry, I completely forgot about this.

The unix directory is confusing, but I think that PERL sort of uses unix in some ways.

There are two files that need to be in the perl58m\unix\etc folder.

They are "hosts" and "services" and are in all internet capable Windows PC's!

So just copy them from your Windows PC to the perl58m\unix\etc\services folder.

You'll find them in C:\WINDOWS\system32\drivers\etc

Sorry for the oversight.

Richard.
Back to top
View user's profile Send private message
captaincaveman
Occasional Visitor


Joined: Oct 23, 2006
Posts: 14

PostPosted: Tue Oct 24, 2006 10:14 pm    Post subject: Reply with quote

Hi Rich,

You mentioned two different folders in your last post perl58m\unix\etc & perl58m\unix\etc\services, so I tried both of them. When I created the second folder and put hosts & services files in it, I got the same error message, but trying the first folder I didn't get the error message, but after the 'About to make FTP connection' it just goes back to 'sleeping for 10 mins' (with no error message). FYI my services file has lots of entries in it, but my hosts file is empty.

I had my PDA linked to my mobile, with an active GPRS web connection, and I can access websites on PIE via it, so that all seems ok. Any ideas??[/code]
Back to top
View user's profile Send private message
rich_d_thomas
Occasional Visitor


Joined: Jan 25, 2004
Posts: 46

PostPosted: Tue Oct 24, 2006 10:23 pm    Post subject: Reply with quote

Hi captaincaveman,

You're so close!

Sorry, I meant to quote only the "perl58m\unix\etc" folder in both places of my last post.

If you've created a folder called "services" in the folder above, then please remove it and then put the two files in "perl58m\unix\etc".

Those two files being "hosts" and "services".

Could you ensure you have the files set up this way.

Then it's a case of checking that there is no firewall software or hardware that may be preventing you access to your FTP server.

Please also check the address, username and password etc. that you have set up in the script.

Let me know how you get on.

Richard.
Back to top
View user's profile Send private message







Posted: Today    Post subject: Pocket GPS Advertising

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pocket GPS World Forum Index -> TomTom Software-Only Products All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Make a Donation



CamerAlert Database

Click here for the PocketGPSWorld.com Speed Camera Database

Download Speed Camera Database
22.044 (24 Apr 24)



WORLDWIDE SPEED CAMERA SPOTTERS WANTED!

Click here to submit camera positions to the PocketGPSWorld.com Speed Camera Database


12mth Subscriber memberships awarded every week for verified new camera reports!

Submit Speed Camera Locations Now


CamerAlert Apps



iOS QR Code






Android QR Code







© Terms & Privacy


GPS Shopping