Skip to content

Hack my Car – ODB and GPS

2019 April 23
by admin

I got myself a ‘ODB-diagnosegerät’ from China. Of course it didn’t work right away and I had to readz the internets for fixing. First I had to find a suitable driver. USB identifier was: Product ID: 0x7523 Vendor ID: 0x1a86. This looks like a CH340 / CH341 Serial / USB Chip. Luckily I found the drivers here:

http://0xcf.com/2015/03/13/chinese-arduinos-with-ch340-ch341-serial-usb-chip-on-os-x-yosemite/

VAG-COM 409.1 + Wine: https://appdb.winehq.org/objectManager.php?sClass=version&iId=33443
VAG-COM 409.1 + Win7: http://www.passatworld.com/forums/volkswagen-passat-b5-discussion/303177-vag-com-409-1-3rd-party-windows-7-64-bit.html

Kabel Fix:
http://www.sprinter-forum.net/archive/index.php/t-16816.html?s=431faad6d4d5c53154b970ef0d7a5d65
http://legacygt.com/forums/showthread.php/vag-com-cables-chipsets-ft232rl-ch340-214994p4.html
https://github.com/nodemcu/nodemcu-devkit-v1.0/issues/2
https://www.sgaf.de/content/vagcom-kabel-erkannt-412207

GuzziDag: http://www.von-der-salierburg.de/download/GuzziDiag/

Other Software:
https://www.blafusel.de/obd/obd2_soft.html

Other devices:
http://www.t4forum.de/wbb3/board19-technik-bereich/board120-umbauten-tuning/board8-tipps-und-tricks/173924-obd-diagnosegerät-aber-welches/

 

Next: get GPS Tracker.

Hope is to find my car, once it got stolen, but so far, it was more of a hack project :). I figured, the best opensource solution you currently get is traccar.org. Here’s how to set it up and dockerize: https://www.traccar.org/docker/

Alternatives:

https://shop.autoskope.de/geraete/1/autoskope-v2-starterset

Hacking mir:ror

2019 February 20
Comments Off on Hacking mir:ror
by admin

Finally! All of a sudden I got an evening with ccb23 to hack of lives away. This time: NFC like it’s 2009. Aka violet mir:ror.

Out of the blue we were brainstroming how to DYI hörbert, a smart mp3 player for our youngest. Here, a mp3 is selected via NFC sensor. O.T: “NFC sensor!? Wait, I remember having touch this years ago, lemme get the Nabaztag”. And indeed, along with the infamous Nabaztag IOT rabbit, violet released a side product called ‘mir:ror’ in 2009(?). It’s a NFC to USB device meant to showcase & utilize its capabilities. To bad official drivers were only released for WIN and discontinued with the bankrupt of violet. But opensource to rescue. We quick figure the device adheres to HID standard, so let’s get it working (on a mac/linux).

After confirming the device is recognised in MacOS X we got hooked. Next, with a quick google search we first discovered http://reflektor.sourceforge.net – an OOO implementation based on hidraw. too bad kernel extension is Linux specific, so next the HIDapi, an OS agnostic lib for general purpose use, felt promising. Indeed, we got the mir:ror up and running the first time on Mac, although reading was non blocking and we couldn’t really make sense out of it. After various back and forth, we jumped back to start: let’s check on linux first. So with virtualbox and ubuntu we were able to install reflektor and use it via hidraw. Worked like a charm! So next is porting this to MacOSX and getting deeper understand of mirware. What commands are supported? Modifying (or just turning off) the choreo would be a huge plus towards using mir:ror for our custom mp3 project. In anycase, this 10 years old device was way ahead of its time and still works like wooow!

Sources worth to check:

http://reflektor.sourceforge.net/links.php

http://arduino-projects4u.com/violet-mirror/

https://github.com/suan/mirlite

https://github.com/leh/ruby-mirror

MakerBall

2018 January 27
Comments Off on MakerBall
tags:
by admin

Very nice slick DYI Pinball Kit:

https://www.makerball.org/

Hacking Rainbowduino 2017 – now BLE support

2017 January 29
Comments Off on Hacking Rainbowduino 2017 – now BLE support
by admin

It’s 2017 and I finally wanted to get my hands dirty with some Bluetooth 4.0 LE gadget hacking.

Luckily I found this outdated project MacOSXVirtualSerialPort which gave me the final piece: Use socat to create two new serial ports which are innerconnected and send thier received data viceversa.

brew install socat

and exectue

sudo socat -d -d pty,link=/tmp/tty.ble,raw,echo=0,user=tobi,group=staff pty,link=/tmp/tty.serial,raw,echo=0,user=tobi,group=staff

Voila now we have one port /tmp/tty.serial where we connect mtXcontrol to and /tmp/tty.ble where we connect the simple noble service too.

Finally the data chain looks like:

mtXcontrol -> rainbowduino processing lib -> processing serial -> /tmp/tty.serial -> /tmp/tty.ble -> nodejs serialport -> nodejs noble -> HM-10 -> Rainbowduino Serial

Sources worth a read

2016 December 1
Comments Off on Sources worth a read
by admin

A couple of my bookmarks worth a read

API Design:
* Bad Oauth2: https://blog.teller.io/2016/04/26/tauth.html
* Hawk: https://alexbilbie.com/2012/11/hawk-a-new-http-authentication-scheme/
* Test Tools: http://www.techsling.com/2016/02/12-great-tools-web-services-testing/
* REST Design: http://restlet.com/blog/2015/11/16/the-never-ending-debate-on-rest-api-design/

Go:
* https://www.infoq.com/news/2016/03/go-patterns

Ruby:
*  ruby-install, chruby: https://medium.com/@heidar/switching-from-rbenv-to-postmodern-s-ruby-install-and-chruby-f0daa24b36e6#.hwo71ieyk
* Ruby -> Go: http://blog.parse.com/learn/how-we-moved-our-api-from-ruby-to-go-and-saved-our-sanity
* Ruby 2015: https://www.sitepoint.com/a-retrospective-on-ruby-in-2015
* Calling services: https://pawelniewiadomski.com/2016/08/29/calling-services-asynchronously-in-ruby

Learn:
* http://www.seamgen.com/blog/mentoring-junior-developers/
* http://play.elevatorsaga.com
* http://www.holacracy.org
* http://firstround.com/review/the-30-best-pieces-of-advice-for-entrepreneurs-in-2015/
* https://hbr.org/2004/01/what-makes-a-leader

Other:
* New Keyboard layout: https://colemak.com
* Docker, nginx, Stripe, MongoDB, CloudFlare, Xamarin, Mixpanel, DigitalOcean, Twilio:
http://www.inc.com/business-insider/companies-that-run-the-internet-besides-google.html
* https://www.techempower.com/benchmarks/
* A minimalist real-time framework: https://docs.feathersjs.com/

 

 

List of (my)SQL-Tutorials

2016 November 16
Comments Off on List of (my)SQL-Tutorials
tags:
by admin


I did an introduction to (my)SQL once. This were my sources:

MySQL for Absolute Beginners: http://www.elated.com/articles/mysql-for-absolute-beginners
Examples for Beginners: https://www3.ntu.edu.sg/home/ehchua/programming/sql/MySQL_Beginner.html

(My)SQL Cheat Sheet: http://cse.unl.edu/~sscott/ShowFiles/SQL/CheatSheet/SQLCheatSheet.html
Another one: https://en.wikibooks.org/wiki/MySQL/CheatSheet

My notes/write along: https://gist.github.com/rngtng/f2751a7c0f8b3106e0d9

Turtely Awesome – how we fixed weak flippers Data East TMNT Pinball

2016 November 16
Comments Off on Turtely Awesome – how we fixed weak flippers Data East TMNT Pinball
by admin

TL;DR; Always check fuses first!

We love to play our Data East TMNT Pinball, but unfortunately the ball got lost more and more often, due to weak flippers. The flippers did hold up, but one could easily push the down, and so did the ball. What’s the problem a big mystery! First, we thought it’s something mechanical and did rebuild the flippers – both side. For that we used the DA Flipper Rebuild kid from Pinball Center(?). The flippers got more precise, but kept on being weak. It had to be something electronic.

So we started to learn about Solid State Flippers, were the control unit is located and Diodes. We followed this great guide from Flipperwinkel, a lots of insights, but couldn’t spot any problem. So we started measuring volts and current. It turned out that one of the fuses was broken. Important part about this is, that the flipper controller has four fuses. One for each flipper to activate, and two to hold any flipper. Which means, even when one hold fuse is broken, the other still holds up. But only half the current, so the flippers results in being weak. We replaced the broken fuse, and the flipper work as strong as never before… check!

While doing the research, we found a good resource for Pinball hacks/repairs: http://pinballrehab.com/articles/solid-state-repair/tutorials/menu/page:2/

WG-Held – Hack the House project presentation

2016 May 5
Comments Off on WG-Held – Hack the House project presentation
by admin

Nice sum up on our HackTheHouse 2nd price.

https://www.youtube.com/watch?v=Ab0jpDIiOWg

Introducing: Vault Project or How to setup an Encryption Server

2016 April 1
Comments Off on Introducing: Vault Project or How to setup an Encryption Server

Let’s talk about credentials. Credentials! Who doesn’t work without any secret data which should never go public? Sure, sure, we’d never share those secrets public, but then there’s git, and github and.. BAAMM.. credentials exposed. Upps!

To avoid this, it’s common sense to NOT checkin any credentials. NEVER. EVER. We make use of .gitignore, cfg templates and placeholders. But nevertheless it’s a hassle, especially when working in a team, where a credential exchange is sometimes required. In past, I preferred the solution where an encryption server in a save environment took care about encrypting/decrypting data. Once the data is encrypted, it’s save to checkin, store and share in the same way like any other data. Only users (or systems) with access rights for the encryption server can decrypt the data. Instant WIN! But how to setup such a server?

Introducing: Vault Project

I recently came across the Vault Project which exactly meet all my needs. In addition, it’s open source, simple to use and comes with very good documentation and tutorials. Nevertheless, I couldn’t find all the steps required to setup an encryption server in one place, so here they are:

How to setup an Encryption server with Vault

First, setup a new vault server on a remote machine by following those steps:

    1. Create a config file docs

    touch vault.cfg

    For our case we just need a simple file backend and expose the vault via tcp

backend "file" {
  path = "/Users/<username>/.vaultstore"
}


listener "tcp" {
  address = "127.0.0.1:8200"
  tls_disable = 1
}

See the vault config docs for other options.

    1. Now start the server …

    vault server -config vault.cfg

    1. … and run the init procedure: docs

    vault init -address=http://127.0.0.1:8200

    This will output five keys and a root token. Make sure to keep those keys save, once lost you wouldn’t be able to unseal your vault, and therefore gain access. The root token is needed to authenticate against the server. To remove the need of passing in the host address all the time, you can set the value with VAULT_ADDR too: export VAULT_ADDR=http://127.0.0.1:8200

    1. Unseal vault docs

    On start, the vault is sealed, and can only be opened with the keys generated at the very beginning. Unseal is done with:

    vault unseal

    Execute this three times, and enter a different key each time.

DONE! Now the server is up and running and you can connect from you local machine to the vault.

    1. Authenticate with the server

    The vault only accepts authenticated connections, for that create a auth token with:

    vault auth

    Enter the root token-key obtained from step 1. Later, I’d strongly recommend to use a non-root token.

    1. Enable github auth backend docs

    In order to allow other people access to the vault and decrypt data, it’s the easiest to enable github authentication. In this case, every user part to a specific github team is able to obtain an auth-token themselves.

    Enable github auth:

    vault auth-enable github

    Register github org:
    vault write auth/github/config organization=<your org name>

    …and a team:
    vault write auth/github/map/teams/<your team name> value=root

    Now, any team member can get access to the vault with a github token:
    vault auth -method=github token=<github token>

    Whereas <github token> only requires the ‘read:org’ scope to be granted. Once auth is complete the actual vault token will be stored in ~/.vault-token and allows the user to connect to the vault.

  • 7.Enable transit backend docs

    Per default, vault stores data associated with a key. But for our case, we want to encrypt data on the fly and manage storage within our SCM instead. Encryption only is enabled with the ‘tranist backend’:

    vault mount transit

    Add a key name to generate an encryption key:

    vault write -f transit/keys/<key name>

    The actual encryption key can be retrieved via:
    vault read --format=json transit/raw/<key name>

DONE! Now the encryption server is ready to encrypt. For this I used json as response format and jq to extract the data.

  • 1.Encrypt:
echo -n "<your secret data>" | base64 | vault write --format=json transit/encrypt/<key name> plaintext=- | jq -r .data.ciphertext
  • 2.Decrypt:
vault write --format=json transit/decrypt/<key name> ciphertext=<your ciphertext> | jq -r .data.plaintext | base64 -D

Finally, let’s create some bash functions to make life easy:

export VAULT_ADDR="<you server IP:PORT>"
export VAULT_KEY="<key name>"

function _encrypt {
  base64 | vault write --format=json transit/encrypt/$VAULT_KEY plaintext=- | jq -r .data.ciphertext
}

function _decrypt {
  vault write --format=json transit/decrypt/$VAULT_KEY ciphertext=- | jq -r .data.plaintext | base64 -D
}

# encrypt data.
# Usage: encryptd "<data>"
function encryptd {
  echo $1 | _encrypt
}

# decrypt data.
# Usage: decryptd <ciphtertext>
function decryptd {
  echo -n $1 | _decrypt
}

# encrypt file. will overwrite existing ones! 
# Usage: encryptf <filename>
function encryptf {
  cat $1 | _encrypt > $1.enc
}

# decrypt file. will overwrite existing ones! 
# Usage: decryptf <filename>
function decryptf {
  cat $1 | _decrypt > `basename -s .enc $1`
}

# decrypt file and open for edit. on close encrypt changes.
# Usage: editcrypt <filename>
function editcrypt {
  cat $1 | _decrypt > $1.tmp && $EDITOR $1.tmp && cat $1.tmp | _encrypt > $1 && rm $1.tmp
}

Sweeeeeett!

On thing to mention is adding the non-encrypted files to you .gitignore. This ensures the file wont end up in your repo by accident:

$ cat .gitignore
# only checkin the encrypted version
/database.yml
/!database.yml.enc

I hope this helped setting up your own vault server. These are just the first rough steps. Vault allows way more, like very granular access management, various auth and storage backends etc. Again, I strongly recommend to check their docs https://vaultproject.io/docs and follow the interactive tutorial https://vaultproject.io/#/demo/0.c

Keep your data save!

[proofread by Daniel – thanks!]

Berlin Maker Fair 2015 – Findings

2015 November 28
Comments Off on Berlin Maker Fair 2015 – Findings
by admin

I went to Berlin Maker Fair 2015

Here some Projects which caught my attention the most:

Brick´R´Knowledge – https://www.brickrknowledge.de/en
– an innovative plug system which can be used to tranfer electronical knowledge very easily, fast and playfully

Seeedstudios RePhone – https://www.kickstarter.com/projects/seeed/rephone-kit-worlds-first-open-source-and-modular-p

VaiKai – http://vaikai.com
– intuitive connected toys for less screentime and more play.

TinkerBots – http://www.tinkerbots.com/de/
– a Lego ‘extension’ for smart senors and actor modules. Super simple to control and programm. For Kids starting from 6years!

ManuGoo – http://manugoo.de

OpenHive – http://www.open-hive.org/
– an open Source Bee Hive Monitoring Project