Tag Archives: HowTo

Balancing Traxxas LiPos

Olivers Traxxas Summit (which is a cool car, and an expensive one!) has two LiPo batteries which have a female Traxxas iD plug (TRX). And it has a balancing connection built in. Unfortunately, Traxxas chargers are horribly expensive, and we have a nice one. It just does not have a Traxxas iD plug for charging.

XH 3-poliger Stecker

Solder iron to the rescue, now we have a nicely working adapter. But all that aside, what was REALLY difficult to find out is the pin layout of the XT plug used for balancing of a S2 battery. So without further ado: This is the plug that goes into the balancing port of the charger:

Looking at the plug with the metal pins visible from the top from left to right:

  • Red cable: Minus
  • Black cable: Balancing
    (plus of 1. cell)
  • Yellow cable: Plus

(German keywords: Pinbelegung XT Balancing Stecker 2S)


It is great to use a phone that runs *real* Linux. (Although I do own the OpenMoko, and the Nokia N770 too :-)). Here are a few technical notes to myself how to tweak it:

#GNOME software daemon uses obscene amounts of memory and I update manually anyway 
rm /etc/xdg/autostart/gnome-software-service.desktop

Connecting Keepassxc Portable on Windows with Firefox

I am using the excellent KeepassXC on all my computers, it works on Windows (work-supplied laptop), Linux (home) and there are mobile clients too. On my Windows work laptop I am using the PortableApps version. The keepassxc devs offer a portable zip for download (KUDOS!) but I do like the seamless upgrades and the start menu the PortableApps platform offers. So far, so good.

However, I – seemingly like many others – have trouble to connect the portable version with the Firefox browser extension to enable autofill. After lots of trial and error and debugging attempts (debugging led to no more detail than “key exchange failed”, unfortunately), I have gotten it working. See below what I did, in the hope that it might be useful for others and for future reference to myself (I posted this in the portable app forum too -and- as the problem seems widespread as an issue in the keepassxc issue tracker. It was quickly closed there as the devs don’t want to support PortableApps versions, fair enough, but would perhaps saved them a few support requests if the information were to be find in their development wiki):

Initial Problem PortableApps Keepassxc (2.5.3)
Some things worked as intended:

  • I had a registry key under “Computer\HKEY_CURRENT_USER\Software\Mozilla\NativeMessagingHosts\org.keepassxc.keepassxc_browser”,
  • it pointed to the correct org.keepassxc.keepassxc_browser_firefox.json file
  • which pointed to a correct path “C:\Users\spaetz\bin\PortableApps\KeePassXCPortable\App\KeePassXC\keepassxc-proxy.exe”

When I started Firefox, I got a running keepassxc-proxy.exe process as a Firefox child process. However, trying to connect, all I got is a “key exchange failed” error. Turning on add-on debugging led to the same result and not more helpful information.
When I turned off the use of a proxy in the keepassxc settings (Browser integration -> Advanced), starting Firefox actually also started a keepassxc instance automatically, however all I still got was a “key exchange failed” error. NO combination of options, deleting of keepassxc and/or the browser extension, deletion of registry entries, or using a fresh Firefox profile helped.

Possible Solution

I noted that there are actually 2 binaries:
C:\Users\spaetz\bin\PortableApps\KeePassXCPortable\KeePassXCPortable.exe (248kb) and
C:\Users\spaetz\bin\PortableApps\KeePassXCPortable\App\KeePassXC\KeePassXC.exe (7094kb)

The latter is also the directory which contains the keepassxc-proxy.exe. The binary in the former directory is what is started when one starts keepassxc through the PortableApps menu.

IF I directly start the latter binary, the Firefox extension is able to connect to the running keepassxc. If I start the former, I will get a key exchange failed error. Somehow, in this case the proxy will probably try to talk to the wrong binary. (not sure what weird wrapper the first binary is).

I autostart BINARY2 now on system start (Hit WIN-R, type shell:startup and paste a “link” to the correct keepassxc.exe) and that seems to do the trick for me. I realize that this is not the fault of keepassxc, but given the multitude of reported errors and the unhelpful error message I think this might be of use for other users of the Portable Version. It might be useful on the wiki if confirmed by other users of the portable version on windows….

New Thunderbird plugins

The new world has arrived for Thunderbird 60, and many old plugins of mine stopped working. Here are the substitutes I found useful.

  1. I had been using “Nostalgy” to quickly file away messages from my INBOX into arbitrary folders. Unfortunately, Nostalgy has not survived the switch, so I use a combination of: Quick Folder move which enables the same functionality but uses SHIFT-M as hotkey and Dorando Keyconfig to keep using the old “S” from nostalgy for filing away things.
  2. I had been using the EWS Exchange plugin to connect to my employer’s Exchange server. And I use Cardbook to connect to my carddav/caldav server. Unfortunately, this has not seen an update for quite some time. I could test with the fork from here , however, I am now using a combination of TBsync which connects to both Exchange and Caldav/carddav servers, using this plugin. TBsync nicely works with CategoryManager. The one drawback of TBsync is that it does not synchronize shared calenders from EWS, apparently.

Home Assistent Pitfalls

I have been playing with Home Assistent. Yes, our home should be smart too :-). But I am not giving up my privacy, so only a local solution was considered! Here are a few pitfalls that I experienced when configuring Home Assistant, I hope they are useful to you too.

FritzBox device tracker:

I have a FritzBox from AVM, so I installed the “platform: fritz” module to track devices in our WLAN. However, that led to mysterious “Failed to establish connection to FRITZ!Box with IP:” errors. Debugging the underlying package “fritzconnection”, it turns out that you need to turn on “Zugriff für Anwendungen zulassen” AND “Statusinformationen über UPnP übertragen” in your Homenetwork->Network Settings, to make it work. This will turn on TR-64 and the transmission of the necessary status information. Error handling of this package could be a tad better….

FritzBox DECT switch (Fritz DECT 210):

the “platform: fritzdect” module is supposed to handle The Fritz DECT 210 remote switch. However, I still haven’t gotten it to work. I receive error messages in the form:

 File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/switch/f
ritzdect.py", line 157, in update
 self.state = actor.get_state()
 File "/home/hassio/.homeassistant/deps/lib/python3.6/site-packages/fritzhome/a
ctor.py", line 56, in get_state
 int(self.box.homeautoswitch("getswitchstate", self.actor_id))
ValueError: invalid literal for int() with base 10: 'inval'

Notifications via XMPP/Jabber:

I have managed to receive notification messages via XMPP when certain things happen. Now I need to come up with smart rules, to make things smart….


CIFS mount on Linux

If you start running into mysterious CIFS mount errors on a recent Debian (“mount error(95): Operation not supported“) or autofs stops working (“mount(generic): failed to mount // (type cifs) on /home/YYY”),

try to add “vers=2.0” (or vers=1.0) to your mount options. Recent kernels default to samba version 3, which apparently is not supported by many boxes (including my Synology)

Using an HTTP proxy when a VPN is used

Background: When I connect to my University’s VPN service I need to use a HTTP proxy in order to access the WWW. I use GNOME and Network-Manager. The Openconnect plugin manages to establish the VPN connection nicely, but previously I had to enable the proxy in Firefox manually afterwards. This is my solution on how to set GNOMEs http proxy settings automatically when a VPN connection with the name “UniiHH” is established and works by using a script in /etc/Network-Manager/dispatch.d.

This is my 10_enablevpnproxy (needs permission 755):

#!/bin/sh -e
# Script to set up the University of Hamburg web proxy when the Openconnect VPN connected
# credits to https://wiki.ubuntuusers.de/NetworkManager/Dispatcher/


# VPN connection started or stopped?
case "$2" in
    active_vpn=$(nmcli -t --fields NAME con show --active|grep "${VPN_CONNECTION_NAME}" -q)
    if $active_vpn; then
        # VPN to UNI HH was started
        #Irrelevant VPN started, do nothing
        exit 0
    # gsettings will fail if dbus is not launched with:
    # "dconf-WARNING **: failed to commit changes to dconf: Cannot autolaunch D-Bus without X11 $DISPLAY
    sudo -u "$USER" dbus-launch gsettings set org.gnome.system.proxy mode 'manual' 
    sudo -u "$USER" dbus-launch gsettings set org.gnome.system.proxy.http host 'proxy.uni-hamburg.de'
    sudo -u "$USER" dbus-launch gsettings set org.gnome.system.proxy.http port 3128
    ##gsettings set org.gnome.system.proxy.ftp host 'proxy.localdomain.com'
    ##gsettings set org.gnome.system.proxy.ftp port 3128
    sudo -u "$USER" dbus-launch gsettings set org.gnome.system.proxy.https host 'proxy.uni-hamburg.de'
    sudo -u "$USER" dbus-launch gsettings set org.gnome.system.proxy.https port 3128
    sudo -u "$USER" dbus-launch gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '', '', '', '' , 'fc00::/8' , '*.fritz.box' ]"
    # Disable all proxies on VPN shutdown, this might be to simple
    # for your case, it works for me.
    echo "VPN connection was stopped"
    sudo -u "$USER" dbus-launch gsettings set org.gnome.system.proxy mode 'none'
exit 0;

The script is run as root by network-manger so, I needed to hardcode the user whose proxy settings I want to modify in the script. And admittedly the part about calling sudo -u $USER dbus-launch multiple times is quite clumsy and should be solved more elegantly. The problem is that gsettings needs to a) run as the user whose values we want to change and b) needs access to a running dbus-session or it will spit out:

Cannot autolaunch D-Bus without X11 $DISPLAY

Helpful links were: https://wiki.archlinux.org/index.php/proxy_settings https://wiki.ubuntuusers.de/NetworkManager/Dispatcher/ http://askubuntu.com/questions/645968/error-cannot-autolaunch-d-bus-without-x11-display

P.S. Of course, sudo needs to be installed for this script.

Getting WiFi rtl8723be to work in Debian

After crashing my previous laptop, I bought a HP 15-ba055ng that contains a rtl8723be Wifi card. However, under Linux the connection would become instable after a short while and refuse to reconnect. I needed to do a series of things to fix this:

  1. Apparently only 1 antenna is connected to the card while the card is configured to use a different antenna slot, leading to an abysmal signal. A new parameter was introduced in kernen 4.0.7 (or so) that lets on select the antenna in the kernel module.
    Create a file /etc/modprobe.d/rtl8723be.conf and enter

    options rtl8723be ant_sel 1

    (the default is 0). This let to a much better signal reception (as visible by doing iwlist scanning). But it still did not help, connection got refused after a while.

  2. Some other options need to be changed to make it work. Most people say that disabling sleep parameter fwlps (FW control power save, default 1) helped. So, that would be adding fwlps=0 to the above line. I did that.In addition some claim, that setting ips=0 or msi=1 has helped them to get a better reception. Try it, I use ips=0, but msi=1 seemed not necessary, so that my current options look like this: options rtl8723be ant_sel=1 ips=0 fwlps=0
  3. Some claim that windows fasstboot mode needs to be disabled in order to make WiFi work reliably. (in case you dualboot) However, I have not tried that yet, nor found it necessary.

All this is on a Debian Jessie system. On a final note: I find it pretty sad that a laptop sold in 2016 has no 5Ghz capabilities. I did not even fact-check that before my purchase as it did not occur to me that this could be an issue.

Relevant links I used for trouble-spotting (plus a ton of other links I forgot about):

  • https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1461174/comments/35
  • https://unix.stackexchange.com/questions/229221/rtlwifi-rtl8723befw-bin-wireless-stop-working-then-laptop-needs-to-reboot-to
  • http://askubuntu.com/questions/635625/how-do-i-get-a-realtek-8723be-wireless-card-to-work
  • https://ubuntuforums.org/showthread.php?t=2304607&page=4
  • https://bugzilla.kernel.org/show_bug.cgi?id=83641#c1

Howto extract PDF pages on Windows and Linux

mutool is great. You can install it portable as regular user on Windows, for instance. If you need to extract a few pages from a long pdf you can use mutool clean. However by default, this will create a pdf that is as big as the original input file. To compact the resulting file, make use of the -g options. So this works great to extract pages 19-20:

mutool clean -ggg  input.pdf output.pdf 19,20

Ungültige Signatur in Windows

Ich benutze einige Portable Programme (wie z.B. emacs) auf meinem Windows-Arbeitsrechner. Leider gibt es dort diese hässliche Fehlermeldungen bei jedem Start: “Diese Datei verfügt über keine gültige Signatur…”. Mist, dachte ich. Allerdings ist Windows gar nicht so streng, es will lediglich alle aus dem Internet heruntergeladenen Programme signiert haben. Wenn man das Programm lokal “kreiert” dann läuft es auch ohne Signatur (eigentlich hirnrissig). Die Anleitung um den Fehler beim Starten wegzubekommen ist hier. (Danke)

UPDATE (Mar 2016:): Die Anleitung in Kürze: Mit “cat putty.exe > putty2.exe” ist die ausführbare Datei auf einmal “lokal” erzeugt und gilt nicht als unsichere heruntergeladene Datei. Dann klappts auch mit den Nachbarn.