navit-project.org

forum for navit navigation tool
It is currently 18 Nov 2017, 00:47
View unanswered posts | View active topics


All times are UTC


Forum rules


Feel free to ask anything here related to the development process - coding, creating new features, fixing bugs and custom changes of Navit.

Note: For reporting bugs, use the bug tracker.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: experiences with navit on TomTom one XL
PostPosted: 28 Jun 2015, 17:33 
Offline

Joined: 28 Jun 2015, 16:52
Posts: 5
First, it is possible to run Navit on a TT one XL with only 32m RAM.
It work well out of town, but in big city power and memory are missing.

Here how i did it:

Save Tomtom Content !!!!!!!!!!!
Get the building environment from http://opentom.free.fr
Compile like described and install on a empty card.

There are some issues:
Not all games and tools compile: disable in Makefile
glib don't compile: install a local libtool, edit source after patching
Navit patch don't match the actual version:I replaced the patch with a own (custom NLS)
32M RAM is not enough: Add swap partition on SD card, enable swap in the kernel and build busybox with swapon .
Swapon in start.sh
SD write boring slow: remount /mnt/sdcard -o remount,async in start.sh
Calculating a route ist very slow: reduce search depth : route_depth="4:15%,6:1%,8:10000,18:2000" and use cache_size="6000000"
espeak don'd work: Wrote a espeak wrapper which write direct to /dev/dsp

Gernot

espeakdsp.c
Code:
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/soundcard.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

#define IBUFFERLEN 1024
#define MAXARGC 30

int  main(int argc, char *argv[],char *envp[])
{
   int pipefd[2];
   pid_t cpid;
   char buf;
   int co,wp,l,fh;
   short bufi[IBUFFERLEN],bufo[IBUFFERLEN*2];   
   int rate=22050;

   char *newargv[MAXARGC+2];

   for(co=0;co<argc;co++)
   {
      if(co>=MAXARGC)break;
      newargv[co]=argv[co];
   }
   newargv[co++]="--stdout";
   newargv[co++]=NULL;

   if (pipe(pipefd) == -1)
   {
      perror("pipe");
      exit(EXIT_FAILURE);
   }

   if(setpriority(PRIO_PROCESS,0,-10))
   perror ("setpriority");

   cpid = fork();
   if (cpid == -1)
   {
      perror("fork");
      exit(EXIT_FAILURE);
   }

   if (cpid == 0)
   {    /* Child writes to pipe */

      close(pipefd[0]);          /* Close unused read end */
      dup2(pipefd[1],1);   
      execve("/mnt/sdcard/opentom/bin/espeak",newargv,envp);        
      perror("exec /mnt/sdcard/opentom/bin/espeak");   
      close(pipefd[1]);          /* Reader will see EOF */
      wait(NULL);                /* Wait for child */
      exit(EXIT_SUCCESS);

   } else { /* Parent read from  pipe */

      close(pipefd[1]);          /* Close unused write end */

      l=read(pipefd[0],bufi,64);
      if(memcmp(bufi,"RIFF",4))
      {
         while(l>0)
         {
            write(1,bufi,l);
            l=read(pipefd[0],bufi,IBUFFERLEN);
         }
         exit(EXIT_SUCCESS);
      }
      l=read(pipefd[0],bufi,IBUFFERLEN);
      if(l<500)
      {
         printf("espeakdsp: avoid noise speaking a empty string\n");
         exit(EXIT_SUCCESS);    
      }          
      usleep (50000);

      fh=open("/dev/dsp",O_WRONLY);
      if(fh<0)
      {
         perror("open /dev/dsp");   
         exit(EXIT_FAILURE);
      }
      ioctl(fh, SNDCTL_DSP_SPEED , &rate);
      ioctl(fh, SNDCTL_DSP_SYNC, 0);
      while(l)
      {
         for(co=0,wp=0;co<IBUFFERLEN;co++)
         {
            bufo[wp++]=bufi[co]; /* mono->stereo */
            bufo[wp++]=bufi[co];
         }
         write (fh,bufo,wp);
         l=read(pipefd[0],bufi,IBUFFERLEN);
      }
      ioctl(fh, SNDCTL_DSP_SYNC, 0);
      close(pipefd[0]);
      exit(EXIT_SUCCESS);
   }
}


 Profile  
 
 Post subject: Re: experiences with navit on TomTom one XL
PostPosted: 01 Jul 2015, 11:41 
Offline

Joined: 26 Jun 2015, 10:45
Posts: 2
Hi Gernot,

sounds good. As I am not a developer I only undertsand half part of your post.

But may be you can help me with my recent post.
TomTom One and Rider are pretty simmilar, so may be you can guide me.

viewtopic.php?f=17&t=566

thanks


 Profile  
 
 Post subject: Re: experiences with navit on TomTom one XL
PostPosted: 01 Jul 2015, 14:39 
Offline

Joined: 28 Jun 2015, 16:52
Posts: 5
Hi,

sorry, i cant help with this problem. Also my original TT freeze, but before it show the startscreen.

I use a full custom ttsystem with alternate kernel and busybox.
My system don't work with the original TomTom Navigation software.

If you have 46 MB netspace i can drop or mail the binarys or a cardimage for testing. You have to edit some text files because i only worked with 480x272 Displayresolution.

Be aware, it is not a consumer level system. Its more for testing, research and fun. Memory and CPU are the main problem.

Gernot


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Silver Orange 2.0.6 for IPB Designed by Skins and Hosting
Converted for phpBB3, based on Royal Blue template by BigB © 2007 2008 AEON KINGS