Feb 282016
 
VW Golf, OBD2, Torque Pro

Since we have a new car (VW Golf 5 GT) which has an OBD2 connector, I was curious what it can do. So I bought myself an el cheapo ELM327 Bluetooth adapter and connect to it via Torque Pro and low and behold, it works and the data it can see and display looks good and matches what either the car dashboard shows or what is common sense.

It’s quite fun to watch the parameters as they change: gas pedal, oil temperature, turbo boost pressure. No real purpose, but technically interesting.

Once an error occurs, it’ll get more interesting: without diagnostic tool all you get is an “yellow motor error” light. Not much you can do here than go to a car repair shop. With software like Torque and OBD2 data, you possibly get the sensor which is either broken or shows bad data.

Feb 282016
 
SoftEther - Part 2

Wanted to put a VPN gateway into a Docker container. Turned out to be difficult since the container needs to accept ESP traffic for IPSec, which I could not make work.

However running a SoftEther VPN server turns out to be easier than expected: Have the binaries, and a vpn_server.config file, and off you go. To create the config file, use the Windows management utility.

On the client side it’s rather simple. Windows client software is neat and straightforward. Linux is not much harder:

# Download softether-vpnclient-v4.19-9599-beta-2015.10.19-linux-arm_eabi-32bit.tar.gz to e.g. /var/tmp/
cd /usr
tar xfv /var/tmp/ softether-vpnclient-v4.19-9599-beta-2015.10.19-linux-arm_eabi-32bit.tar.gz
cd vpnclient
make i_read_and_agree_the_license_agreement
./vpnclient start
./vpncmd
2 (Management of VPN Client)
ENTER (picks localhost)
NicCreate VIRTUALNIC (e.g. box2)
AccountCreate ACCOUNTNAME (e.g. box2)
vpn.domain.org:443 (VPN Server Host Name and Port Number)
VIRTUALHUBNAME (e.g. Box2Hub)
USERNAME (e.g. harald)
box2 (Virtual NIC)
#
AccountPasswordSet ACCOUNTNAME
PASSWORD (password for USERNAME)
PASSWORD (repeat)
standard (standard or Radius)
#
# Autostart:
AccountStartupSet ACCOUNTNAME
# Connect:
AccountConnect ACCOUNTNAME
# Check
AccountStatusGet ACCOUNTNAME

And that’s it. It’ll create a virtual NIC vpn_box2 and whenever you start vpnclient, it’ll create it and connect.

E.g. have this in /etc/rc.local:

( /usr/bin/vpnclient start ; sleep 10 ; ifconfig vpn_box2 192.168.30.51 netmask 255.255.255.0 up ) &

or alternatively if you can take any IP address:

( /usr/vpnclient/vpnclient start ; sleep 10 ; dhclient vpn_box2 ) &

In case of slow connection/computers, increase the 10s delay to more. I use 20s for my AllWinner A20 CPUs.