Ericsson H5321gw modem to ifup/down

December 14, 2016

My Lenovo T430s laptop has build-in a Ericsson H5321 modem as illustrated underneath

 In order to get it working, I copied as root

 check if your version match the output from lsusb and issue a 'service udev reboot'. Then create /etc/network/scripts/ Please mind that the h5321 expect one to read the return thus a simple 'echo -e "AT*ENAP=1,1\r" > /dev/ttyACM1 did not work for me. Using two-way serial communication in sh (dash) was a little tricky for which reason I used python.

 And finally add the script in /etc/network/interfaces

Start it using 'ifup wwan0' command. Suspend/sleep etc. somehow shutdown the wwan0's current connection but debian's netmanager is not informed. Using acpid you can create the a file /etc/acpi/events/lidbtn-wwan0

 and /etc/events/sleepbtn-wwan0

 to issue the ifdown automatic.

 Sadly, wicd (wicd-cursor) does not support wwan cards. If you have a suggestion to an alternative (n)cursor network manager please write to me

APC Smart-UPS SUA2200RM2 dead and beep fix

Just replaced batteries on your good old APC UPS; it starts but five days later it just turn off and constantly beeps as posted at youtube? Well, it is most suddenly the same issue as I had and it can be fixed!

apc2200Poop the hood and check for short circuit and eventually replace the 1A/100V Schottky diode (and consider replacing the low volt switch mode capacitors at the same time) as illustrated.


Adding CUPS to OpenWRT v15.05.1

November 26, 2016

You will find the cups package in the 'oldpackage' git package. However, I realized that the p910nd is the solution!



Issue with Linux/Debian's resume from disk

October 17, 2016

If you are having issues with resuming your laptop e.g. during boot it stalls for a loooong time and finally reporting, that it can not find your resome device - then the solution is quite simple. In my case, I use encrypted swap partition to store the resume disk but initrd was somehow confused and pointed at wrong partition. Simply ensure that /etc/uswsusp.conf points to your swap partion

 Then update initramfs

 If you receive a issue regarding multi resume devices, then ensure that '/etc/initramfs-tools/conf.d/resume' points at sda6_crypt also.

Riverbed SteelHead 250 dmesg

May 19, 2016


Incremental backup of synology users' home folder

February 21, 2016

create group named 'snapshot_homes' using either synology's online tool or commands like:

synogroup --add snapshot_homes

synogroup --descset snapshot_homes [activate snapshots in user's homedir]

create script /opt/sbin/ with the following script

 Warning: I have used it for a long time but I should still be considered experimental!

Todo: choose a logging method e.g. email.

Add something like this to the roots cron script by running 'crontab -e' as root and add:

Add any user to the group "snapshot_homes" and they should get the _snapshot directory automatically. Use a test users for start due to the experimental script!

 Now I hope it works for you.

Adding secondary battery to i3 status bar

... it so easy! Just edit /etc/i3status and add

test by running i3status in you command promt.

dual datetime plot using matplotlib

February 5, 2016

script emails from synology nas using postfix and gmail aka. postfix as null client

January 6, 2016

Quick and simple using Synology mail server

Simply follows this guys guide.

TIp: I set FQDN to "localhost" and used synology's firewall to block port 25 (SMTP).

Complex but less disk activity

Synology's included email server starts both dovecot, postfix's modules, syno_mail and more which will write/read to your /volume1 every 10 seconds. In my case this would interrupt disk hibernation but underneath solution is not that demanding..

ipkg install postfix

add to /etc/passwd and /etc.default/passwd

mail:x:27:27:Postfix user:/nonexist:/sbin/nologin

maildrop:x:28:28:Postfix user:/nonexist:/sbin/nologin

add to /etc/group and /etc.default/group



Change some permissions

chown -R mail /opt/var/spool/postfix

chgrp -R maildrop /opt/var/spool/postfix/public

chgrp -R maildrop /opt/var/spool/postfix/maildrop

chmod g+s /opt/var/spool/postfix/public

chmod o+t /opt/var/spool/postfix/maildrop

vim /opt/etc/postfix/sasl_passwd

... and make sure not to leave any empty lines

postmap hash:/opt/etc/postfix/sasl_passwd

chmod 600 /opt/etc/postfix/sasl_passwd*

vim /opt/etc/postfix/

 vim /opt/etc/postfix/

 create a ramdisk for postfix diskactive spool e.g. 'mkdir /mnt/postfixspool'

edit /opt/etc/init.d/S69postfix and make it look like this:

start postfix using /opt/etc/init.d/S69postfix

test postfix's 'pickup' by using sendmail e.g.

echo -e "Subject: Test mail\n\nThis is a test \"message\"." | sendmail your@email

test postfix's smtp using mini_sendmail e.g.

echo -e "Subject: Test mail\n\nThis is a test \"message\"." | mini_sendmail -f"ds410j@localhost" your@email

you might have to add /opt/sbin to your PATH in /root/.profile in order for testing.

Last but not least you might want to change synology's own notification setting e.g.


TODO: Updating Synology own firmware will delete the /mnt/* folders hence above startup script willl fail.

Reference: - basic configuration - relay example - postfix overview picture

periodic scubbing/smarttest with synology nas

January 4, 2016

Perodic reading all data (including parity data) is a good way to keep track of a RAID's health. This underneath script uses bootstrap and crontab

Create /opt/sbin/ with the following script

chmod 664 /opt/sbin/ Add to cron by running 'crontab -e' as root

Also, I have used the synology own task schedule to make daily smart tests.