maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Fahrplan for N900 now supports Translink in Queensland, Australia (https://talk.maemo.org/showthread.php?t=99029)

jonwil 2017-03-02 23:01

Fahrplan for N900 now supports Translink in Queensland, Australia
 
2 Attachment(s)
Since the current version of Fahrplan (at https://github.com/smurfy/fahrplan) no longer supports the N900 and since plans to mate the backend part of that with a N900 compatible frontend seem to have died (Halftux posted an unfinished binary back in 2015 with no source code being posted and no further updates), I have taken the version of Fahrplan in extras-devel and added support for Translink here in Queensland, Australia.

It works by making the same HTTP POST requests as the journey planner web page that's built into the official Translink app for Android (at https://app.jp.translink.com.au/plan...ourney-planner) and parsing the JSON you get back.

GPS lookups (i.e. find the location closest to your current GPS coordinates) are supported as well as looking up by string (e.g. type "Beenleigh" and get "Beenleigh Station", "Beenleigh Mall", "Beenleigh Library" etc back for you to pick the one you want)

I have attached a source tarball with all my changes in it plus a binary .deb package.
Running it will require libqjson0 0.8.1 from extras-devel (http://repository.maemo.org/extras-d...tle0_armel.deb) to be installed on your phone and compiling it will require that plus libqjson-dev 0.8.1 from extras-devel (http://repository.maemo.org/extras-d...tle0_armel.deb) to be installed in your dev environment. Everything else is the same as stock Maemo.

Please let me know what you think (e.g. are there things I can do better/differently, things that dont work or information I should be displaying but don't)

jonwil 2017-03-02 23:15

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
2 Attachment(s)
Just made a small fix, now it should work properly.

Halftux 2017-03-03 08:45

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
Quote:

Originally Posted by jonwil (Post 1524636)
Since the current version of Fahrplan (at https://github.com/smurfy/fahrplan) no longer supports the N900 and since plans to mate the backend part of that with a N900 compatible frontend seem to have died (Halftux posted an unfinished binary back in 2015 with no source code being posted and no further updates)

Yeah fahrplan is at the last position on my priority list. I will only working on it if all other projects are finished and I fear this will never happen. My personal interest is very low because I never take the train. I am a car driver. The application still needs some love. At the moment no GPS, no Calendar support and the gui need some polishing. However the backend is much better than fahrplan1.

Packed what I found on my hdd into a zip:

https://www.file-upload.net/download...plan2.zip.html

jonwil 2017-03-03 09:17

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
What libraries are required for this code? Do I need anything beyond the standard QT libraries that are included on the N900? (and if so, what package(s) do I need to install and where do I get them from)

Halftux 2017-03-03 10:22

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
Quote:

Originally Posted by jonwil (Post 1524656)
What libraries are required for this code? Do I need anything beyond the standard QT libraries that are included on the N900? (and if so, what package(s) do I need to install and where do I get them from)

You will need qtmobility12 from extras at least I wanted to use it for the calendar and gps things and the project file is configured to use it.
The project file needs to be cleaned, if you want compile it for all supported targets, furthermore I not removed the qml fremantle stuff what was already there.

jonwil 2017-03-04 05:04

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
At this point I am going to stick with the existing Fahrplan code rather than trying to get the incomplete Farhplan2 Fremantle UI working.

There is one more feature I would like to add if I can figure out how, namely being able to click on a leg of a journey and have a map be displayed.

Firstly I have to figure out how to make the items for each leg clickable (dont know enough about QT to do that yet), secondly I have to figure out how to trigger microb to open and display a web URL (since implementing my own internal browser widget to display the maps is out of the question) and thirdly I need to figure out what sort of map to display.

Do I display the existing Google static maps image URLs (which aren't the best in terms of size or usefulness) I get back in the JSON Translink sends me? (e.g. something like this https://maps.google.com/maps/api/sta...sITUCziNZXiow= )

Do I figure out the mess of how to get an API key, figure out how to keep it secret (despite this program being 100% open source and despite reverse engineering Maemo apps being trivial) and somehow generate my own static maps URLs with better parameters (e.g. larger size image, different zoom level etc) all the while trying to figure out how not to exceed the limit on the number of static map requests you can get from Google before you have to start paying?

Do I try and somehow open Nokia Maps and display something there?

Do I find another web-based mapping solution that doesn't have the limits of Google?

jonwil 2017-03-08 12:33

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
2 Attachment(s)
Just fixed an issue with time conversion where times between 12:00 and 1:00 (AM or PM) would not convert properly and would return wrong results.

Still trying to figure out what, if anything, I want to do about maps and things.

Halftux 2017-03-10 08:58

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
Uploaded fahrplan 0.0.35 to extra-devel.

- changed app version in mainwindow.h
- added pkgconfig in pro for qjson
- added Jonwil to the author list

Selecting Translink and do a search was working tested nothing more.
Well done jonwil.

jonwil 2017-03-18 02:36

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
2 Attachment(s)
I have fixed another issue where it was displaying "-1 transfers" in the case where the journey only had a single walking leg and no actual transport journeys.

I am so glad I found that the Translink journey planner website had a nice clean JSON backend I could take advantage of :)

Still not sure what to do about the maps though, at this point I am thinking that if I can figure out how to make the individual legs of the journey clickable I will make it open the Google Maps Static Map URL that comes in the JSON response data in the microb browser (at least that would display something useful-enough to e.g. see where you need to walk for a walking leg)

jonwil 2018-05-05 13:38

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
I have just fixed Fahrplan on Translink, turns out Translink started using a DDOS protection service that means the SSL connection now needs the correct Server Name Indication value.
Backported the SNI support from QT 4.7.8 and made the necessary change to Fahrplan to use the support and now it works again.

The QT source change/backport has been committed to https://github.com/community-ssu/qt-x11-maemo

If you want to run the new Fahrplan you need to be running the latest CSSU-testing (with e.g. libqt4-core_4.7.4~git20110505+cssu12 installed) then install the new libqt4-network from https://drive.google.com/file/d/1L7T...ew?usp=sharing
and the new Fahrplan from https://drive.google.com/file/d/1gP7...ew?usp=sharing

The Fahrplan source code is available at https://drive.google.com/file/d/1O-u...ew?usp=sharing
(files were too big to attach to the post so I put them on Google Drive instead)

If you want to rebuild the new Fahrplan with the changes, you will need to grab the QT4 repo with the patches in it, build that and install the relavent bits into your SB repository then build Fahrplan.

Oh and obviously if you have other patches to QT such as the ones for supporting TLS 1.2 (or are running some other version of QT that doesn't include the SNI support) you will need to make the changes yourself)

But for someone who just wants to be able to do journey planning for Translink SE QLD on their N900, install the 2 new deb files and everything will work again :)

EDIT: I should probably have bumped the version number and updated the changelog but I just wanted to get it working as fast as possible :)

Halftux 2018-05-05 15:01

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
@jonwil bumping up the version would be better also maybe use the latest source code for your patches. In the repositority there is already a version 0.0.37.

jonwil 2018-05-05 20:27

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
What repository?

pichlo 2018-05-05 22:11

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
Quote:

Originally Posted by jonwil (Post 1543988)
What repository?

The repository?

jonwil 2018-05-06 07:11

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
Thanks, I wasn't sure if you were talking about a Git repo or something or the maemo apt repository.
I will do some more work on it soon (including bumping the version number on QT and uploading the packages for it to community-devel just to make it easy for people to grab them)

jonwil 2018-05-07 06:37

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
1 Attachment(s)
I have released another new version, this time with proper changelogs and stuff.
I bumped the version number on qt4-x11. The source can be found at https://github.com/community-ssu/qt-x11-maemo and the binaries I compiled can be found at http://maemo.merlin1991.at/cssu/comm...ree/q/qt4-x11/ (I stuck them in cssu-devel as an easy way to share them all without needing to find some file space that could hold all those large files and yes I know CSSU is basically dead at this point)

The latest Fahrplan source code (which requires the new QT version given above to be installed into your build environment in order to compile) is at https://github.com/jonwil/fahrplan and the binary is attached to this post. To make it work you need the new QT bits given above plus the QJson bits linked elsewhere in this thread. You may need other upgraded things from CSSU as well, I dont know for sure what might be needed, if anything (I am running the latest version of cssu-testing and all the packages contained therein)

The changes made since the last version I posted are:
Bump the version number to 0.37
Update the changelog
Update the dependencies so Fahrplan depends on the new QT version
Include the "Fixed parsing DB detail view when flaparrow is closed" change from the Fahrplan version in extras-devel.

I would still like to figure out something useful to do with maps but otherwise I have no plans to do anything more to Fahrplan at this time (if someone else wants to make further changes to it for whatever reason, I am happy to include those into my git repository if need be)

jonwil 2018-06-13 04:33

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
Released another update to Fahrplan to support TLS 1.2 in the Translink parser and update the journey planner URLs to the new ones.
Source is at https://github.com/jonwil/fahrplan and binary is attached to this post.

You will need the new OpenSSL (source is at https://github.com/jonwil/openssl/ and binaries are at http://maemo.merlin1991.at/cssu/comm...ree/o/openssl/ ) and the new QT (source is at https://github.com/community-ssu/qt-x11-maemo and binaries are at http://maemo.merlin1991.at/cssu/comm...ree/q/qt4-x11/ ) plus the QJson bits linked elsewhere in this thread.

Unsure if you need any other bits from CSSU or not.

Its working on my own N900 as of now and I can properly journey plan with Fahrplan again.

sicelo 2019-09-01 22:05

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
@jonwil, https://mg.pov.lt/maemo-irclog/%23ma...09-02T00:34:23

TLDR; with this qt version, cutetube2 cannot perform searches, even with updated qyoutube binaries that work fine for the previous qt4 versions. Further investigation may be needed to find out what the real cause is.

Halftux 2019-09-02 10:33

Re: Fahrplan for N900 now supports Translink in Queensland, Australia
 
Quote:

Originally Posted by sicelo (Post 1559802)
@jonwil, https://mg.pov.lt/maemo-irclog/%23ma...09-02T00:34:23

TLDR; with this qt version, cutetube2 cannot perform searches, even with updated qyoutube binaries that work fine for the previous qt4 versions. Further investigation may be needed to find out what the real cause is.

Have you tried cutetube2 from my recompiled versions with qt cssu15 and the latest qyoutube and libsoup from freemangordon?


All times are GMT. The time now is 16:20.

vBulletin® Version 3.8.8