2008-12-23

Traveling Salesman 0.8 with the OsmBin file-format version 0.9 and libOSM+OsmNavigation 2.3.9 released.

Hello everyone.
After a year of silence I found the SVN-Head to
be stable enough to relase
* version 0.8 of the Traveling Salesman -navigator and
* Verson 2.3.9 of the LibOSM and OsmNavigation -libraries
http://apps.sourceforge.net/mediawiki/travelingsales/index.php?title=Main_Page
(Note: The Java-Webstart -link will be updated to the new
version in a few days. I need to access my key-storage
on another computer first to create a signed jar.)

They are now using 0.9, the first non-draft -version of
my OsmBin file-format
http://wiki.openstreetmap.org/wiki/OSMbin(file_format)
as their new default-format.
I intend to finalize this file-format as a version 1.0 when API0.6
is public with a added version-numbers and small improvements.
Please give comments, so we can make this a better format
for indexed, mutable on-disk -storage with random access.

I also changed the default-renderer from the SimplePaintVisitor
to the much nicer OdrPainsVisitor after adding support for
different text-styles depending on zoom-level and way-type.

Please feel invited to comment on my file-format
and to file any bugs you encounter to
https://sourceforge.net/tracker2/?group_id=203597&atid=986231

Thank you.
Marcus Wolschon

2008-11-21

OutOfMemoryError und MappedByteBuffer in Java6

Für die Referenzimplementierung des OSMBin-Dateiformates habe ich
mich der Eifnachheit halber dazu entschlossen, die Dateien einfach per
FileChannel und MappedByteBuffer in den Speicher zu mappen.

Ergebniss: Bei Dateigrößen über 50MB gibt es einen OutOfMemoryError.

Warum? Anscheinend hat Sun ein verstecktes Limit von 64MB für MappedByteBuffer eingebaut.
Dieses läßt sich mit der nicht dokumentierten Option -XX:MaxDirectMemorySize=???M
erhöhen.
Weiterhin werden MappedByteBuffer nicht immer anständig garbage-collected, so daß man vorher manuell System.gc() aufrufen muss.

Fazit: Funktioniert etwas besser aber noch nicht ganz.

Für das Mappen von einmal 220 und einmal 154MB reicht ein Limit von 3 GIGABYTE nicht mehr aus. Mehr als 3GB gehen aber auf einem Atom N270 nicht, da dieser ja nur 3GB Adressraum hat. PECH. :(

Also: Alles neu programmieren ohne MappedByteBuffer. :( Für Datenbanken ist dieses Verfahren untauglich, wobei gerade diese die Parade-Disziplin sein könnten.

2008-11-18

Pago-Plugin für jGnucash veröffentlicht

Hallo

und wieder ist ein neues Plugin unter der GPL3 veröffentlicht um weitere, langweilige
Buchhaltungs-Aufgaben zu automatisieren.
Ein Plugin für Pago ist für jGnucashLib veröffentlicht:

https://apps.sourceforge.net/mediawiki/jgnucashlib/index.php?title=PagoPlugin

https://apps.sourceforge.net/mediawiki/jgnucashlib/index.php?title=Main_Page

Es kann automatisch alle noch nicht heruntergeladenen Abrechnungen
und Zusammenfassungen herunterladen für Kreditkarten-Akzeptanz via
Pago von der passwort-geschützten Website herunterladen
* Dann diese PDF-Dateien in Text konvertieren.
* Den Text parsen und die Disagio-Splits aus existierenden Transaktionen
überprüfen und bei Bedarf korrigieren. (z.B. wenn man beim Buchen noch nicht
wusste ob es Visa oder Mastercard ist mit ihren unterschiedlichen Disagio-Sätzen waren.)
* Jedes "TODO: Disagio" wird bei diesen Transaktionen aus dem Kommentar entfernt.
* Neue Dummy-Transaktionen mit dem korrekten Saldo für das Assets:..:Pago -Konto und das
Konto mit den Sicherheiten werden angelegt um auf einen Blick zu sehen ob alles stimmig ist.
* Diese Dummy-Buchung sagt auch ob alle Transaktionen der PDF gefunden wurden und welche fehlen.
* Und sie sagt wie weit das Saldo in Gnucash vom korrekten Wert entfernt ist. (Um schnell die fehlende oder
falsche Transaktion zu finden statt alles mühsam von Hand am Monatsende abzugleichen.)
* Die heruntergeladenen PDF-Dateien werden natürlich lokal archiviert.

Voraussetzungen:
* Funktioniert so natürlich nur für Gnucash-Nutzer, die ihre Kreditkarten-Akzeptanz über Pago machen,
kann aber als Vorlage zum Automatisieren ähnlicher Fälle dienen.
* Der Code hat nicht ganz die Qualität der HBCI-, Paypal,- und CSV-Plugins, da leider noch ein paar Konto-GUIIDs
für die Umsatzsteuer fest eincompiliert sind. Ist aber trivial an den eigenen Fall anzupassen.
* Ich habe leider mit etlichen Java-PDF-Bibliotheken (incl. dem Adobe PDF-Bean) kein Glück gehabt und musste
/usr/bin/pdftotext hardcoden. Sorry, der Rest lieferte einfach nur weiße Seiten oder Fehler.

Marcus Wolschon

Released Pago-Plugin for jGnucash

Hello everyone.

And again we have a major step in automating these boring finance-tasks...
Today I releases the Pago-plugin for jGnucashEditor under the terms of the GPL3:

https://apps.sourceforge.net/mediawiki/jgnucashlib/index.php?title=PagoPlugin

https://apps.sourceforge.net/mediawiki/jgnucashlib/

It can automatically download all not yet downloaded
account-statements and clearing-statements
for Pago credit-card acceptance from the password-protected website.
* Then it extracts these pdf-files and converts them to text.
* The text is then parsed and the transaction-splits for
disagio-values of existing transactions are checked and corrected if
needed.
* Any "TODO: Disagio" is removed from the comment of these transactions.
* new dummy-transactions are added showing the saldo for the received
payments and the security-deposit
* they also show if all stated transactions have been identified and
how many are missing
* they also show by how much the saldo in gnucash is off to make it
easy to find the missing or wrong transaction
* the pdf-files are archived in a local directory

Requirements:
* Obvisiously you need to have your credit-card-acceptance with Pago
but the code can easily be adapted to automate other, similar
situations.
* This code has not the same quality-level as the other plugins have.
There are some hardcoded-account-IDs that need changing (in the code
correcting the sales-tax on a disagio).
* I tried numerous java-pdf-libraries including the pdf-bean by Adobe
itself but none of them could properly parse the pdf-files
generated by Pago, so this code has /usr/bin/pdftotext hardcoded.
Sorry guys, first of all I needed this to work when I wrote it. Being
elegant and
clean was secondary to that.

Marcus Wolschon

2008-11-16

Traveling Salesman as GPSD for Windows

I was frustrated to not find a GPSD for Windows.
So I added a feature to Traveling Salesman to make
it act as a minimal GPSD-Server for JOSM.

The feature part of the SVN-Version. A new release
will follow soon.

https://sourceforge.net/svn/?group_id=203597

Usage:
* Checkout and compile libosm, osmnavigation and traveling salesman.
* start Traveling Salesman (the traveling_salesman.jar is executable)
* open "preferences"->"navigation"
* make sure "Port for gpsd-emulatio" is set to 2947
* set "get position from" to JGPSProvider (o GPXFileProvider for testing)
* for JGPSProvider set "JGPS com-port description" to
"COM5,19200,8,1,N" or similar.
* start JOSM and let LiveGPS connect.

Currently there is an "open in josm" -button in Traveling Salesman, to download
the latest josm (if not yet present) and open the currently visible area in it.
A new button "survey roads" that downloads and starts josm inclusing liveGPS
and Surveyor may follow soon.
This way you can start surveying with one click if you see a missing street
while navigating from A to B.

Marcus Wolschon

2008-11-09

Added Paypal-Importer as plugin for jGnucashLib

The financial automation -framework jGnucashLib is intended as a
companion for Gnucash
to handle bulk import and synchronization -tasks.
For this purpose it features a rich plugin-API and advanced scripting
abilities in all languages
supported by JSR223 (defaults to javascript but there are dozen other
languages to choose from).

The new release 2.0.8 now features a paypal-importer that synchronizes
an existing
gnucash-account with the transactions found in a paypal-account.
* existing, correct transactions are not touched
* existing transactions that are one or two days off are silently moved
* non-existing transactions are first checked with all existing
scripts if one exists to handle this kind
* if none is found the user may choose to either book this to a
default-account or open a
script-editor that already shows an easy to understand
example-script for the usual tasks and
offers to dry-run, save or cancel.

http://apps.sourceforge.net/mediawiki/jgnucashlib/index.php?title=Main_Page

The editor already includes a similar importer for your online-banking
via HBCI or FinTS
and an example-CSV-plugin. The wiki contains constantly growing
documentation for
writing scripts and plugins to automate your own, boring and
time-consuming accounting-tasks.
...it's all just electronic numbers anyway.

Marcus

2008-10-01

jGnucashLib - Java-Gnucash library, viewer and scriptable editor with Plugins

Hello,

it could be interesting for you, that version 2.0.0 of jGnucashLib is released.
(actually even 2.0.3)

http://apps.sourceforge.net/mediawiki/jgnucashlib/index.php?title=Main_Page

In prior GPL-versions you could only read gnucash-files with your own
java-programs.
Now you can do so much more:

* jGnucashLib can read and write and used the features of Java6.
(Use it to write your own programs that utilize gnucash-files)
Uppon chances in a gnucash-file everything else including line-breaks
is kept. The library has proven itself to be completely safe in years of
daily use.
If you don't trust it not to damage your data or want to debut sth.:
UnGZip the file before and after the change and do a diff. You'll
see meaningfull output.

* jGnucashViewer is a standalong viewer as a directly executable jar-file.

* jGnucasEditor is where it gehts interesting.
It is not a replacement for Gnucash but a simple editor acting as a frame
for plugins and scripts to automate accounting-tasks..
The most important plugin up to now is the HBCI-homebanking-plugin:

HBCI-transactions are not only booked in a gnucash-account representing your
bank-account and everything goes to "expenses-other", no. For repeated
types of transactions you can have regular expressions and scripts in any
of a large number of scripting-languages..

common things:
* Existing transactions that are simply a day or two off will be moved to when
the bank says they actually happened.
* Transactions that apear in the gnucash-file but not on your bank-account will
be marked with a TODO-comment.
* Transactions with a comment TODO, NAK, OK and unbalanced transactions
are highlighted in different ways to make them stand out.
* After every day that contains newly imported transactions a new, empty
transaction is added with a comment telling the account-saldo as the bank
says it is, as gnucash says it should be and the difference. (To
easy the manual work)
* Imported transactions contain the original-HBCI-data in an invisible attribute
that is not touched by Gnucash. This way they can be associated with
their hbci-
transaction in later HBCI-imports.

scripts:
* Every script has a regular expression and is run only on newly imported HBCI-
transactions that match thus expession.
(e.g. ".*ARAL.*" -> run script to book sales-tax and net-value to 2
acounts given in the script)
* For very easy cases you can just give an alternate target-account to
book the value to instead of
running a full script.
* Every of the numerous scripting-languages used by JSR223-scripting can be used
(defaults to Javascript but alsoPHP, Python, Perl, ... can be used).
* Scripts can access the gnucash-data and any external data with no limits
(e.g. to find out if and how much reserved have been booked for an order or
to set the status of a detected CoD-payment on an external web-site)

script-editor:
* There is a script-editor that openes if wanted to every time no
existing script is matching
and you choose to write a new one.
* The editor marks the regular expression depending of it matching the
current transaction
or not.
* The editor can test-run scripts on an empty gnucash-file while
implicitely creating any
account requested via getAccountbyID or getAccountbyName and show
resulting transaction(s)
the script generated.

examples for using the existing plugins:
* book known, repeated transactions with the correct sales-tax
* When financial authorities take tax-money from your account, split it
into the different taxes by parsing the description-text.
* Split payments to your insurance-companies the same way when they
have combined the payments for multiple insurances in one transaction,

examples for future plugins:
* parse PDF and text -invoices/paypal/ebay-emails, credit-card-statements,...
and book them with minimal human efford
* automatically book inventory-deviations
* automate payments for ebay-sales and associate them with the sale.


Have fun with it,
Marcus Wolschon

jGnucashLib - Java-Gnucash Bibliothek, Viewer und scriptbarer Editor mit Plugins

Hallo,

euch könnte interessieren, daß Version 2.0.0 von jGnucashLib fertig ist.
(eigentlich sogar 2.0.3)

http://apps.sourceforge.net/mediawiki/jgnucashlib/index.php?title=Main_Page

Früher konnte man mit der GPL-Version nur Gnucash-Dateien durch
eigene Java-Programme lesen. Jetzt gibt es wesentlich mehr:

* jGnucashLib kann lesen und schreiben und nutzt die Features von Java6.
(Um eigene Programme zu schreiben, die Gnucash lesen und schreiben sollen)
Bei Änderungen an einer Gnucash-Datei bleiben incl. Zeilenumbrüchen
alle nicht geänderten Teile erhalten. Die Bibliothek hat sich im
jahrelangen Einsatz
als sicher bewiesen.
Wer dem nicht traut: Ein Text-diff zwischen original und mit dieser Bibliothen
veränderter Datei (nach einem gunzip natürlich) ergiebt eine einfach
für Menschen
mit XML-Erfahrung verständliche Ausgabe.

* jGnucashViewer ist ein Standalone-Viewer als direkt ausführbare Jar-Datei.

* Bei jGnucasEditor wird es spannend.
Der Editor ist definitiv nicht als Ersatz für Gnucash gedacht sondern
als sehr grundlegender Editor, welcher eine Hülle für Plugins und Scripte
bietet um Fibu-Aufgaben zu automatisieren.
Das bisher wichtigste Plugin dafür ist das HBCI-Plugin:

HBCI-Buchungen werden nicht einfach nur auf ein Gnucash-Konto
eingetragen, welches das Bank-Konto representiert und gehen alle nach
"Ausgleichskonto-EUR" sondern man kann für wiederkehrende Buchungen
Reguläre Ausdrücke und Scripte hinterlegen.

Allgemeines:
* Bereits bestehende Buchungen, welche nur um 1-2 Tage zu früh oder spät
liegen, werden verschoben
* Buchungen, welche in Gnucash aber nicht auf der Bank auftauchen, werden
mit einem TODO in der Beschreibung markiert.
* Buchungen mit einem TODO oder NAK sowie mit OK und nicht ausgeglichene
Buchungen werden verscheiden markiert.
* Nach jedem Tag, für den Buchungen importiert wurden, wird eine leere
Buchung in das Ausgleichskonto eingefügt, welche in der Beschreibung das
erwartete Saldo laut HBCI, das tatsächliche Saldo laut Gnucash und die
potentielle Differenz nennt. (Zum einfachen Abgleich)
* importierte Buchungen tragen die original-Daten aus HBCI als nicht sichtbare
Attribute, so daß sie in einem späteren Import eindeutig einer Bank-Buchung
zugeordnet werden können. (Daten bleiben bei Bearbeitung mit Gnucash
erhalten.)

Scripte:
* Jedes Script hat einen regulären Ausdruck und wird für neu zu importierende
Buchungen angewendet, welche auf diesen Ausdruck passen.
(z.B. ".*ARAL.*" -> Buche Vorsteuer und Netto-Betrag auf 2 bestimmte Konten)
* Für ganz einfache Fälle kann man in einer Config statt einem Script
auch einfach
nur ein alternatives Ziel-Konto angeben.
* Jede der Unmengen an Script-Sprachen, welche Java mit JSR223 unterstützt
sind möglich. (Default ist Javascript aber auch PHP, Python, Perl, ...
geht alles)
* Scripte können uneingeschränkt auf die gnucash-Datei und externe
Daten zugreifen
(z.B. herausfinden ob und wie viel Rücklagen für eine Bestellung
gebildet wurden
oder bei einer erkannten Nachnahme-Zahlung auf externen Website den
Bestell-Status ändern)

Script-Editor:
* Es steht ein Script-Editor bereit, der auf Wunsch hoch kommt, wenn für eine
Buchung kein bestehendes Script passt und man wählt, daß man ein neues
erstellen möchte.
* Der Editor markiert den regulären Ausdruck farblich, je nachdem ob er zu der
aktuellen Buchung matched oder nicht
* Der Editor kann das Script Test-Laufen, d.h. auf einer leeren
Gnucash-Datei auf der
jedes Konto, welche das Script mit getAccountbyID oder getAccountbyName
holen will automatisch angelegt wird. Die Ergebniss-Buchungen erscheinen dann
neben dem Editor zur Kontrolle


Beispielanwendungen für bestehende Plugins:
* bekannte, wiederkehrende Ausgaben/Einnahmen-Buchungen gleich mit der korrekten
Umsatzsteuer buchen
* Abbuchungen des Fianzamtes entsprechend dem Buchungstext in
Einkommenssteuer, Umsatzsteuer und Soli aufspalten und als eine
Split-Buchung anlegen
(funktioniert hier super)
* Wiederkehrende Abbuchungen für Versicheurngen automatisch buchen
(incl. Aufteilung falls mehrere Versicherungen gesammelt abgebucht wurden)

Beispielanwendungen für geplante Plugins:
* hereinkommende PDF oder Text -Rechnungen, Paypal/ebay-Emails,
Kreditkarten-Abrechnungen,...
parsen und mit minimalem, manuellem Aufwand verbuchen
* Inventur-Differenzen automatisiert verbuchen
* den Fibu-Teil von Ebay-Bestellungen automatisieren


Viel Spaß damit,
Marcus Wolschon

2008-09-22

gmail und exe

"Die angehängte Zip-Datei enthält eine exe-Datei. Aus Sicherheitsgründen ist das Versenden dieses Datei-Typs über gmail nicht erlaubt".

Wie sehr kann man wohl noch seine Kunden bevormunden.

2008-08-18

NullPointer in HSQLDB

Gestern hat sich ein interessanter Bug in HSQLDB gezeigt:

stmt = conneciton.getStatement()
if (stmt == null) return;
if (stmt.getConnection() == null) return;
if (stmt.isClosed()) return;
stmt.execute(sql) <== wirft NullPointerException weil stmt.getConnection() == null

anscheinend wird in execute stmt.connection gelegentlich auf null gesetzt ohne eine sinnvolle Exception zu werfen.

OpenStreetMap und der Europapark

Auf dem Weg zum Europapark letztes Wochenende mussten wir feststellen,
daß da noch recht viel in OpenStreetMap fehlt.
Entsprechend habe ich das Bluetooth-GPS in der Tasche laufen lassen und
mit HDOP zwischen 1.2 und 0.8 erstmal die große Monorail um den Park
und dann noch (in eigenen Tracks) etliche Fußwege und einige der Bahnen
gemapped.
Wird die Tage eingetragen.
Leider kann ich mein GPS nicht wie einige der ublox-Geräte in einen 4Hz-Modus
schalten. Es gibt also auch auf schnellen Bahnen wie der Euromir nur einen
Punkt pro Hz.

Demnächst also vieleicht Fußgänger-Routing um Rides im verwinkelten Park zu finden
mit Traveling Salesman.

2008-08-01

Vmware: Beantworten von "Would you like to continue?" per ssh

Wer kennt es bei VMware nicht:

Temporary files for this virtual machine are stored in directory "/tmp/vmware-root", which is on an almost full filesystem. Please free some disk space.
Would you like to continue?
Select Retry to continue, Abort to terminate the session.


In einem anderen Blog, fand sich die Lösung: vmware-cmd -l und vmware-cmd $vmxfile answer.

Solche Fragen lassen sich in der Tat auch an der Komandozeile per SSH beantworten.

Für Pfade zu vmx-Dateien ohne Leerzeichen reicht hier:

for vm in `vmware-cmd -l` ; do echo "-----${vm}-----"; vmware-cmd "$vm" answer; done


Mit Leerzeichen muss das Escaping noch etwas angepasst werden:

vmware-cmd -l | while read vm ; do echo "-----${vm}-----"; vmware-cmd "$vm" answer; done

2008-05-19

Visual Editor mit Eclipse 3.3

Wer wie ich Probleme hat den VisualEditor unter dem aktuellen 3.3er Eclipse zum Laufen zu bringen...
Hier ist die Lösung,
die bei mir geholfen hat.

2008-05-14

Exchange Toshiba Bluetooth-Stack in Vista with Microsoft Stack to get ActiveSync / Mobile Device Center to work

ActiveSync or the new Vista "Mobile Device Center" does not seems to work with the Toshiba-Stack.
There are some aticles claiming it works if you change "HKEYLM\Software\Microsoft\Windows CE Services\" -> "SerialPort" from "Bluetooth" to "COM7" and have COM7 in ControlCenter "Bluetooth Local COM" as "LocalCOM-Server[SerialPort]" but this did not do the trick for me.

What worked was, to:

1. uninstall the Toshiba-Stack (ControlPanel->Software->Remove)
2. wait a few seconds, an "unknown device" will pop up.
3. search in "c:\Windows" (or whatever your %SYSDRIVE% is)
4. wait quite a while for the list of drivers in c:\Windows to be build
5. Deselect "Show compatible hardware"
6. Select the "Cambridge Silicon Radio Ltd." -> "Generic Bluetooth Radio" as described here (with screenshots.)

Then

7. go to mobility-center and active "connection settings"->"bluetooth"
8. now pair your mobile device to the laptop (initiate on the pda, not the laptop. This seems to nake a difference.
In the list of services you will no longer see "A2DP-audio" or "serial port" as with Toshiba
but only "ActiveSync".
9. open ActiveSync on the PDA and select "synchronize over bluetooth".

done.

2008-05-05

Java Code-Coverage -Tools

Ich bin gerade mittels eines guten Vergleiches von Java-Code-Coverage -Werkzeugen in einem Blog auf 2 interessante Tools als Alternative zu Clover gestoßen:


  • Emma und

  • ECLemma - dessen Eclipse-Plugin

  • maven-jcoverage-plugin für Maven-Builds



Gute, einfache Werkzeuge für das tägliche Unit-Testen mit Prüfung der Code-Coverage.

Im Vergleich wird auch etwas Ant-"Code" gezeigt um Emma in sein Build einzubauen:

von: Ricky Clarkson
A necessary taskdef:

<taskdef resource="’emma_ant.properties’" classpathref="’build.classpath’/">


We modified our test target. This part goes at the top to decorate the bytecode:

<property name="”coverage.dir”" value="”${basedir}/coverage”/">
<mkdir dir="”${coverage.dir}”/">
<emma enabled="”${emma.enabled}”">
<instr instrpathref="”classes.path”" destdir="”${out.instr.dir}”" metadatafile="”${coverage.dir}/metadata.emma”" merge="”true”">
<filter excludes=”Test,Mock”/>
</filter>
</instr>
</emma></mkdir></property>

We added these within the junit call:

<jvmarg value="”-Demma.coverage.out.file=">


We added this at the end of the test target for cleanup:

<emma enabled="”${emma.enabled}”">
<report sourcepath="”${basedir}/src”">
<fileset dir="”${coverage.dir}”">
<include name="”*.emma”/">
</include>
<txt outfile="”${coverage.dir}/coverage.txt”/">

</txt>
</fileset>
<delete dir="”${out.instr.dir}”/"></delete></report></emma>


And here’s another target that is used to turn emma on for testing:

<target name="”emma”" description="”turns">
<property name="”emma.enabled”" value="”true”/">
<property name="”out.instr.dir”" value="”${basedir}/outinstr”/">
<mkdir dir="”${out.instr.dir}”/">
</mkdir></property></property></target>

2008-04-21

"String-Theory"

Etwas für all die Hobby-Physiker da draußen.
...man kann einfach nicht aufhören damit zu spielen.

Die Welle

2008-04-20

OSM-Entwickler-Treffen in Karlsruhe

Das Taggen von Hausnummern in der OSM ist schon seit fast ewigen Zeiten ein Politikum.
Zahlreiche Vorschläge zu einem Schema wurden gemacht, alle verworfen. Entweder konnten sie nicht alle interlationalen und regionalen Besonderheiten abbilden oder die verursachten zu viel Arbeit für die Mapper, waren zu unverständlich, zu kompliziert mit den momentanen Editoren umzusetzen oder gefielen schlicht nicht.

Gestern trafen ich mich nun 7 OSM-Entwickler in der Geofabrik in Karlsruhe um einen neun Vorschlag im kleineren Kreis zu erarbeiten.
Vorgesehen als kurzes Brainstorming von 11-13, entwickelte es sich zu einem kleinen Programmier-Marathon bis weit nach 20 Uhr.
Das Ergebniss: Ein Karlsruher Schema als Testlauf für Hausnummern, eine Adress-Suche im Traveling-Salesman -Code, Unterstützung für die Darstellung in JOSM, gefälliges Rendering auf der Slippy-Map und ein erster Satz entsprechend getaggter Straßen mit den zu erwartenden Ausnahme-Fällen.

2008-04-16

ApacheCon

Die ApacheCon EU 2008 ist vorbei und so langsam findet sich Zeit darüber zu berichten.

Das 2-tägige "Everythibg Tomcat"-Training von einem der Tomcat-Entwickler selbst hat sich als sehr informativ herausgestellt.
Außer den Tomcat-eigenen Themen wie Clustering. Load-Balancing, NIO und den APR und NIO -non-blocking Engines sind auch
praktische Themen des Server-Betriebs wie fortgeschritenes Monitoring, viele Details zum Java-Speichermodell und welche
Änderungen sich wie auswirken (teilweise kann ein einfaches Vergrößern des -xmx auftretende OutOfMemoryExceptions sogar
erheblich verschlimmern statt zu verbessern) zur Sprache gekommen.

Die Vorträge in den folgenden 4 Tagen waren vom anspruch her gemischt und richteten sich zu großem Teil an fortgeschritteen Entwickler.
Der Querschnitt der Teilnehmer und ausstellenden Unternehmen wahr erstaunlich breit und die Gespräche überaus informativ.

Allgemein hat sich das Event zur eigenen Fortbildung und dem Knüpfen von Kontakten doch sehr gelohnt.

2008-03-06

OpenExpo 2008

Nächste Woche Mittwoch, werde ich auf der OpenEXPO
in Bern sein.
Ich besetze den OpenstreetMap-Stand und helfe evtl. zeitweilig am CACert-Stand aus.

Mit etwas Glück kann ich mein Traveling Salesman präsentieren.

2008-01-18

Hama DVB-T-Stick USB 2.0

How to get a "Hama DVB-T-Stick USB 2.0" or any other
af9015-based DVB-t -stick to work in linux.
(This howto was written 2007-01-18 and may no longer
be required by the time you read this if more then
a few month have passed.)


check the device-id
Let us see if this is really the device this howto talks about:
lsusb -v
This should show a device with device-id: 0x9015 or 0x9016
and AfaTech: 0x15a4 as the manufacturer-id.


# get v4l (latest version [2007-01-18])
# (does not include the 9015-driver)
hg clone http://linuxtv.org/hg/v4l-dvb

# get driver (this works but does not fit the current
# V4l-infrastructure anymore)
wget http://af.zsolttech.com/af901x-Taiwan.tar.gz
tar -xzf af901x-Taiwan.tar.gz

# copy driver into v4l
cp v4l-dvb-39c2d2041e6e/linux/drivers/media/dvb/dvb-usb/af901x* linux/drivers/media/dvb/dvb-usb/
cp v4l-dvb-39c2d2041e6e/linux/drivers/media/dvb/dvb-usb/MT2060* linux/drivers/media/dvb/dvb-usb/
cp v4l-dvb-39c2d2041e6e/linux/drivers/media/dvb/dvb-usb/mt_errordef.h linux/drivers/media/dvb/dvb-usb/
cp v4l-dvb-39c2d2041e6e/linux/drivers/media/dvb/dvb-usb/*biu_reg.h linux/drivers/media/dvb/dvb-usb/
cp v4l-dvb-39c2d2041e6e/linux/drivers/media/dvb/dvb-usb/usbdma_biu_reg.h linux/drivers/media/dvb/dvb-usb/
cp v4l-dvb-39c2d2041e6e/linux/drivers/media/dvb/dvb-usb/dummy_ram.h linux/drivers/media/dvb/dvb-usb/
cp v4l-dvb-39c2d2041e6e/linux/drivers/media/dvb/dvb-usb/error.h linux/drivers/media/dvb/dvb-usb/
cp v4l-dvb-39c2d2041e6e/linux/drivers/media/dvb/dvb-usb/define.h linux/drivers/media/dvb/dvb-usb/
cp v4l-dvb-39c2d2041e6e/linux/drivers/media/dvb/dvb-usb/tuner_init_Microtune*.h linux/drivers/media/dvb/dvb-usb/

# note: if an af9015.c or af901x.c already exits, just skip this and do only "make menuconfig && make && make install"
# because then this driver has been integrated into the stock v4l -tree.

# add driver to makefiles
vi linux/drivers/media/dvb/dvb-usb/Makefile
add:
dvb-usb-af9015-objs = af901x-core.o af901x-devices.o af901x-drv.o af901x-usb.o af901x-fe.o MT2060.o MT2060init.o MT2060M.o
obj-$(CONFIG_DVB_USB_AF9015) += dvb-usb-af9015.o

# add driver to config-dialog
vi linux/drivers/media/dvb/dvb-usb/KConfig
add:
config DVB_USB_AF9015
tristate "Afatech AF9015 DVB-T USB2.0 HDTV 1080i support"
depends on DVB_USB && EXPERIMENTAL
select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE
select DVB_TUNER_QT1010 if !DVB_FE_CUSTOMISE
help
Say Y here to support the Afatech AF9013/15 based receiver

# select multimedia devices->DVB-adapters->9015
make menuconfig
make && make install && tail -f /var/log/kernel
# now stick the device into the USB-slot...
you should see something like this:
kernel: input: Afatech DVB-T 2 as /class/input/input18
kernel: input: USB HID v1.01 Keyboard [Afatech DVB-T 2] on usb-0000:00:1d.7-1
kernel: AF901X: af901x_module_init
kernel: dvb-usb: found a 'Afatech USB2.0 DVB-T Recevier' in warm state.
kernel: dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
kernel: DVB: registering new adapter (Afatech USB2.0 DVB-T Recevier)
kernel: DVB: registering frontend 0 (AF901X USB DVB-T)...
kernel: dvb-usb: Afatech USB2.0 DVB-T Recevier successfully initialized and connected.
kernel: usbcore: registered new interface driver dvb_usb_af901x

Lets see TV now

# get the DVB-utils-package
apt-get install dvb-utils # (this is how it's done for debian)

# get all frequencies to scan
wget http://www.johannes-bauer.com/dvbt/dvbt-scanaid-0.03.tar.bz2 && tar -xjf dvbt-scanaid-0.03.tar.bz2 && cd dvbt-scanaid-0.03/ && dvbt-scanaid-0.03/
enter: "y" twice
# scan all these frequencies for transponders
scan Scanlist.txt > channels.conf
cp channels.conf ~/.mplayer/

now you can do: (ARD is the name of a found tv-station)
mplayer dvb://ARD
mencoder dvb://ARD -o recorded_news_without_header.avi -oac copy -ovc copy && mencoder recorded_news_without_header.avi -o recorded_news_final.avi -forceidx -oac copy -ovc copy



Links
http://www.johannes-bauer.com/dvbt/ (german)