10-28-2012, 05:35 AM | #1 |
Member
Posts: 17
Karma: 17948
Join Date: Oct 2012
Device: KT
|
Navit on Kindle Touch
Navit is an Open Source navigation software which also runs on Kindle Touch.
Due to the window title filtering of the KT windowmanager the ready-made version from Debian does not show up on the display. A lot of the Navit features are configurable in navit.xml. But the window title is hard coded. Therefore I recompiled a patched version of the current svn repo. The patch: Spoiler:
The window title is defined in windowtitle.h: Code:
#define WINDOW_TITLE "L:D_N:application_ID:navit" Spoiler:
Compiling directly on KT Debian I had some troubles with configure and needed to change config.h manually. Sry, no diff. But only two or three defines. Navit seems to have no multitouch capabilities and therefore pinch-zoom does not work. While riding/driving zoom buttons are easier to use. That and other options can be defined in the navit.xml. The following patch to navit.xml does not show color adjustments of the map. Spoiler:
I thought enabling the main menu button would disable the jump to main menu when touching the map at any place. But the does not help. TODO: * build a kernel with USB OTG support in order to connect a GPS receiver * disable jump-to-main-on-touch * configure map colors and text sizes for better readability. * get SDL framebuffer version running. Last edited by EternalCyclist; 10-28-2012 at 05:35 AM. Reason: typo |
10-28-2012, 06:18 AM | #2 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
SDL
Something you may or may not have noticed:
twobob has done a lot of work on getting SDL working on the Kindles here. |
Advert | |
|
10-28-2012, 10:14 AM | #3 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
for:
Adjusting window titles after creation. hiding the "main" home window dynamically. resizing and relayering... etc... Touch management bundle https://www.mobileread.com/forums/sho...d.php?t=194270 If you don't mind manipulating the touch UI with a few external tools then this is a helpful resource. Re: SDL FB version. I feel that just throwing it at buildroot (with the right Config) would just "make" the SDL FB version OOTB but I'd have to check the code. I recall someone putting a bluetooth attachment in place of the wifi card. that might be a very permanent solution Yup SDL FB does now start and run but the ordered dither still needs implementing properly for decent screen update speed. There is a few notes about likely places in the fbcon code to make insertions and amendments in the prboom thread and of course GM's graphics threads. This Lack of SDL FB ordered dither is now a bit of an Achilles Heel for many projects so perhaps it will escalate priority accordingly. I have had a read over the code and a few tests but it's on the edge of my understanding right now. feel free to dive in and help on that. I have a few bits of code that might help. I am having a hard time getting it "done". if by "disable jump-to-main-on-touch" you mean prevent the main process grabbing the input. Like prevent the "home" page grabbing clicks and stuff: a script like this: PHP Code:
(The opposite script and others are on the management page) also Code:
(Allow status bar optionally) wmctrl -r L:D_N:application_ID:navit -e 0,5,30,592,710 handy for making apps topmost (you are using the Dialog layer Title however so not needed but meh) wmctrl -r L:D_N:application_ID:navit -b toggle,above Quote:
Last edited by twobob; 10-28-2012 at 10:27 AM. Reason: layout was horrible |
|
10-28-2012, 12:29 PM | #4 |
Member
Posts: 17
Karma: 17948
Join Date: Oct 2012
Device: KT
|
Thank you, twobob. That was really helpful.
I just found out, that yifanlu's launcher renames the window title of navit, so that it is visible. But this does not work on all x-apps (i.e. xclock, xeyes,...). With wmctrl I can make everything visible. "jump-to-main-on-touch": I was refering to navit's internal behaviour. It switches to menu immediately when I touch the map. Shouldn't be difficult to fix. SDL and direct Touch-Managment is very interesting. But I need to get USB OTG to run first. While reconfiguring the kernel sources, I discovered that ehci-hcd is included as module. Code:
modprobe -l Code:
/lib/modules/2.6.31-rt11-lab126/kernel/drivers/usb/host/ehci-hcd.ko Code:
insmod ehci-hcd |
10-28-2012, 12:40 PM | #5 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Kernel changes
BIG NOTE:
If what you need can be done as an external module - You do not have to "reconfigure" (and re-build) the stock kernel - We (well, twobob) have been able to build kernel modules "missing" from the 'stock' kernel build. Yes, there are threads here on that (you might want to just search for and bookmark every thread here that twobob has ever started). (twobob does the real work, I just stand on the side and cheerlead.) |
Advert | |
|
10-28-2012, 03:22 PM | #6 |
Enthusiast
Posts: 29
Karma: 5000
Join Date: Jun 2012
Location: CZE
Device: Kindle Touch
|
by the way .. since OTG is a bit of longer run i've been thinking about hooking up the GPS receiver to the serial port inside kindle ... i guess there would have to be some atmel or similar chip to make it communicate with the port ...
|
10-30-2012, 02:48 PM | #7 |
Member
Posts: 17
Karma: 17948
Join Date: Oct 2012
Device: KT
|
@twobob: I had no deep look into your SDL postings yet. I have pygame (Debian) running on K4 and K5. Of course, I have to trigger screen redraw after every pygame.display.flip(). It works on K5 even with running Xorg and framework. Therefore I thought Navit could run almost out of the box on SDL. Maybe I have to do some SDL configuration. For pygame HWSURFACE|FULLSCREEN) seems to be needed.
@knc1: Building and copying only the few modified modules eases experimenting. Thanks. @aranwe: Initially I bought the Kindle(s) to use it as a display for some an AVR, MSP or ARM microcontroller. Serial port seems to be the easiest way. But I was hoping to be able to reconfigure the USB pins of the Kindle controller and do some bitbanging. But since I found this V-USB software-only-USB-library I am keen to get OTG running on Kindle. This also would allow to connect a memory stick and an USB mouse together with my AVR. Disabling "jump-to-main-on-touch" is possible in the navit.xml: Code:
<gui type="internal" enabled="yes" menu_on_map_click='0'> |
10-30-2012, 03:18 PM | #8 | |
Evangelist
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
|
Quote:
I built all the needed modules with otg support from amazon sources for K5. However it doesn't work. Kindle doesn't switch to host mode. Maybe I have wrong cable, but it's rather what Christian was writing about in his blog. I will have to look into his patches. |
|
09-11-2013, 06:07 AM | #9 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
AAAAAAAAAAAAaaaaaand this thread died.
Big shame. And so did Christians website. BIGGER shame |
09-11-2013, 11:24 PM | #10 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
An interesting read, thank you. Maybe I'll try it - I've not done any patching, so off to 'boldly go, to seek out'
|
09-19-2013, 05:12 AM | #11 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
I tried to follow all this - never did svn or patches or ... BUT FINALLY:
I was able to compile it using the configure script in the first post. For some reason, patching did not work (not exact file version??) so I edited the files manually (changing the - lines to the + lines). I'm very confident that this was done correctly. I attached the files for it all to be extracted to extensions. I included a complete log file of the startup from ssh. a snippet from the end: Code:
... Loaded symbols for /usr/lib/libffi.so.5 Reading symbols from /usr/lib/libglib-2.0.so.0...done. Loaded symbols for /usr/lib/libglib-2.0.so.0 Reading symbols from /lib/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libnss_files.so.2...done. Loaded symbols for /lib/libnss_files.so.2 0x400e6894 in ?? () from /lib/libc.so.6 #0 0x400e6894 in ?? () from /lib/libc.so.6 Cannot access memory at address 0x0 Detaching from program: /mnt/us/extensions/navit/bin/navit, process 8740 map_rect_new_textfile unable to open textfile /tmp/root/.navit/bookmark.txt. Error: No such file or directory |
09-19-2013, 07:24 AM | #12 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Dereferencing an Uninitialized Pointer maybe??
http://www.cprogramming.com/debugging/segfaults.html or... Run 2: segfaulter.c http://www.cs.swarthmore.edu/~newhal...howto_gdb.html 3/4 way down page. |
09-19-2013, 07:57 AM | #13 |
Evangelist
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
|
|
09-19-2013, 08:18 AM | #14 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
http://sourceforge.net/p/navit/code/.../navit/navit.c
Code:
navit_get_user_data_directory(int create) { char *dir; dir = getenv("NAVIT_USER_DATADIR"); if (create && !file_exists(dir)) { dbg(0,"creating dir %s\n", dir); if (file_mkdir(dir,0)) { dbg(0,"failed creating dir %s\n", dir); return NULL; } } return dir; } /* end: navit_get_user_data_directory(gboolean create) */ perhaps nose around in there a bit more and see if that (baf) error traces back to something obvious. does the file exist? http://wiki.navit-project.org/index....pment#Building for latestish building notes There are some successful build logs for various versions that might be worth a once over here: http://download.navit-project.org/logs/navit/ meh not so interesting Honestly though? I am just not sure. Last edited by twobob; 09-19-2013 at 08:51 AM. |
09-19-2013, 05:20 PM | #15 | |
Junior Member
Posts: 7
Karma: 27748
Join Date: Dec 2012
Location: Phoenix, AZ
Device: Kindle 3 Wi-Fi, Kindle Paperwhite
|
Quote:
https://github.com/BlueDragonX/xf86-...ster/README.md So I gather if you can redefine Navit's ZoomIN as BTN12 and ZoomOUT as BTN13, you might be in business. The keycodes for Navit's config files are all hardcoded in keys.h, some hackery will be needed to expose these extra X11 touch gestures. I've been riding bikes using Kindles with PDF maps & cuesheets. Navit with GPS would be the holy grail for long distance trips. Garmin's bike devices crash over very long routes and are generally fussy. I have a GPS chip (Fastrax UC430) that works over 1.8v TTL serial that I've been meaning to put inside my KPW, but I need to hack the bootloader to redirect the kernel console away from it. Last edited by TheWizard; 09-19-2013 at 05:33 PM. Reason: found where the zoom keys need to patched in navit |
|
Tags |
k5 tools |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Return Current Kindle Touch? New Kindle Touch Sep 6, 2012? | Ozonation | Amazon Kindle | 19 | 03-06-2013 10:15 PM |
Kindle Touch, Nook Touch or Kobo Touch? | tron_1970 | Which one should I buy? | 33 | 05-01-2012 12:15 PM |
Torn: Nook Simple Touch, Kindle Touch, Basic Kindle | dblb48 | Which one should I buy? | 12 | 12-13-2011 02:34 PM |
ConsumerReport: E-book readers: Nook Simple Touch tops Kindle Touch | afv011 | Barnes & Noble NOOK | 4 | 11-22-2011 03:39 PM |
Kindle 3, Nook Simple Touch, Kobo Touch and Libra Pro Touch | jbcohen | Which one should I buy? | 4 | 06-18-2011 07:58 PM |