devolo-dlan-cockpit-5.2.0.185 with gentoo

One year ago I have posted a gentoo ebuild for the devolo dlan cockpit software in the article devolo-dlan-cockpit-5.1.6.2 with gentoo. In the meanwhile Devolo has published a newer version. The new version 5.2.0.185 feels more or less the same as the old one, but most probably some bugs have been fixed.

The main purposes of devolo-dlan-cockpit are:

  • Firmware upgrades for the network adapters
  • Monitoring the performance
  • Configuring the network adapters

Firmware upgrades are more or less plug and play. One has to click the Updates-Button and everything else happens automagically. Monitoring the network performance with devolo-dlan-cockpit is of major interest, since it allows one to try out different wall sockets for better performance with nearly zero effort. If one gets poor performance it can be of major impact just to use another wall socket in the same room.

Dlan-cockpit is available for most common operating systems. However, the only Linux distribution, Devolo supports right now is Ubuntu Linux. Most probably, the package will also work with Debian. Allthough these are binary packages, the application can also be used with Gentoo Linux. For this two binaries have to be executed /usr/bin/devolonetsvc, the service daemon and /opt/devolo/dlancockpit/bin/dlancockpit, the frontend application which depends on the service. Usually devolonetsvc is being started by an initrd script, but the one included in the package is not going to work with gentoo, so just start it manually as root user. If one really needs it that often, an own startup script or systemd configuration can be written. Below you can see a screenshot of the application.

Screenshot of devolo dlan-cockpit 5.2.0.185

The Gentoo way

For gentoo users here is my overlay including the updated devolo-dlan-cockpit ebuild: devolo-dlan-cockpit-5.2.0.185_overlay.tar.gz (111 downloads ) . It also contains an adobe-air-runtime ebuild as necessary dependency. The adobe-air-runtime ebuild has been taken from steam-overlay. Download the overlay and extract it in /var/db/repos/local. Be sure to include a file local.conf in your /etc/portage/repos.conf directory with the following content:

[local]
location = /var/db/repos/local

Then emerge devolo-dlan-cockpit and configure your dlan adapters using your gentoo box.

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

devolo-dlan-cockpit-5.1.6.2 with gentoo

Quite a while ago I have posted a gentoo ebuild for the devolo dlan cockpit software in the article devolo-dlan-cockpit-4.2.3 with gentoo. After having purchased some devolo Magic 2 PowerLan adapters to extend the existing Devolo dlan 1200 network, I have found out that the old version 4.3.3 of devolo-dlancopit does not support the new Magic 2 adapters. The Magic 2 adapters turned out to be incompatible with the dlan 1200 adapters anyway, but that is a different story. Looks like replacing the existing adapters is the next step. At least the newer version of devolo-dlan-cockpit supports both adapter types.

Devolo offers the application devolo-dlan-cockpit for download. The main purposes of devolo-dlan-cockpit are:

  • Firmware upgrades for the network adapters
  • Monitoring the performance
  • Configuring the network adapters

Firmware upgrades are more or less plug and play. One has to click the Updates-Button and everything else happens automagically. Monitoring the network performance with devolo-dlan-cockpit is of major interest, since it allows one to try out different wall sockets for better performance with nearly zero effort. If one gets poor performance it can be of major impact just to use another wall socket in the same room.

Screenshot of devolo dlan-cockpit 5.1.6.2

Dlan-cockpit is available for most common operating systems. However, the only Linux distribution, Devolo supports right now is Ubuntu Linux. Most probably, the package will also work with Debian. Allthough these are binary packages, the application can also be used with Gentoo Linux. For this two binaries have to be executed /usr/bin/devolonetsvc, the service daemon and /opt/devolo/dlancockpit/bin/dlancockpit, the frontend application which depends on the service. Usually devolonetsvc is being started by an initrd script, but the one included in the package is not going to work with gentoo, so just start it manually as root user. If one really needs it that often, an own startup script or systemd configuration can be written. Below you can see a screenshot of the application.

The Gentoo way

For gentoo users here is my overlay including the updated devolo-dlan-cockpit ebuild: devolo-dlan-cockpit-5.1.6.2_overlay.tar.gz (408 downloads ) . It also contains an adobe-air-runtime ebuild as necessary dependency. The adobe-air-runtime ebuild has been taken from steam-overlay. Download the overlay and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then emerge devolo-dlan-cockpit and configure your dlan adapters using your gentoo box.

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

iptables mirror target for linux kernel 5.4

After my last kernel upgrade I tried to build the iptables mirror target that I have published the last time here. The iptables mirror target takes the packet sent to your machine and returns the same packet to the machine the packet came from. Thus, let’s say someone tries to scan your machine or tries an attack he would scan his own machine or even attack his own machine.

When I tried it with kernel version 5.4, it did not build anymore with the current linux kernel. This time there has been a API change in kernel 5.0. Thus I had to replace the call to skb_make_writable() with a call to skb_ensure_writable. Furthermore a call to dst_neigh_output() had to be replaced by a call to neigh_output(). Also a small Makefile change has been necessary. Starting with kernel 5.4 the outdated SUBDIRS=$(PWD) argument gets ignored and M=$(PWD) has to be supplied instead. You can download the newer release for kernel version 5.4 and probably future kernels here:

MIRROR.5.4.tar.gz (644 downloads )

The kernel module has been tested with kernel version 5.4.15-zen1. To build the module, boot the kernel you want to use the module with. Afterwards unpack the archive and run the compile.sh script to build the module. Then run the install.sh script for installing the compiled module into the /lib/modules directory for your kernel. Unfortunately the mirror target does not work with iptables version 1.6 and newer due to removal of the ipt_MIRROR extension (libipt_MIRROR.so). To use the MIRROR target one has to use iptables 1.4.21 or below.

Now you may use the mirror target in place of the REJECT or DROP target in the INPUT, FORWARD and PREROUTING chains, like this in your firewall script:

$IPTABLES -A INPUT -j MIRROR

Beware: The use of the mirror target may lead to strange results, in example if you want to connect to an iptables protected machine which uses the mirror target, you may end up connecting to the local machine without recognizing it. It also may use much bandwith. The worst case occurs if you have two machines using the module. These machines may end up playing ping pong. So you have been warned, use with caution and at your own risk. For more information see: MIRROR target.

Downloads for older kernel versions are below. Notice the version numbering 2.6.25 works for kernels up to 2.6.27. 2.6.28 also works for 2.6.29 and 2.6.30 kernels. The 2.6.13 version of the module should work up to kernel version 2.6.16.

MIRROR.2.6.13.tar.gz (3776 downloads )
MIRROR.2.6.24.tar.gz (4465 downloads )
MIRROR.2.6.25.tar.gz (3985 downloads )
MIRROR.2.6.28.tar.gz (3952 downloads )
MIRROR.2.6.31 (3799 downloads )
MIRROR.2.6.35.tar.gz (3708 downloads )
MIRROR.2.6.36.tar.gz (3799 downloads )
MIRROR.2.6.37.tar.gz (3571 downloads )
MIRROR.3.0.7.tar.gz (3223 downloads )
MIRROR.3.1.0.tar.gz (2913 downloads )
MIRROR.3.3.0.tar.gz (2929 downloads )
MIRROR.3.6.0.tar.gz (2674 downloads )
MIRROR.4.10.tar.gz (1420 downloads )

regards
Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

Avoid message loops with FHEM2FHEM

Multiple instances of the open source server for house automation FHEM running on different machines can communicate using the FHEM2FHEM¹ module. Unfortunately one runs into big trouble when trying to use the module bidirectionally. FHEM2FHEM reads events from a remote FHEM instance. When using declarations like the following on both sides this results in an event loop because instance1 reads an event from instance2 and generates a new event on instance1. This event then gets read by instance2 again and so on…

define instance2 FHEM2FHEM instance2:7072 LOG:.*

fhem.cfg on instance1

define instance1 FHEM2FHEM instance1:7072 LOG:.*

fhem.cfg on instance2

Eventually this results in an event loop consuming all available CPU power and freezing FHEM.

One could simply prevent this situation by not forwarding all events by using a regular expression filtering the events instead of using LOG:.* . This also means one has to know which event gets received best by which instance. For example for simple radio temperature sensors this is hard to tell. Also one might want to have all sensor data available on all instances. This can be achieved by preventing FHEM from processing events, that got received from a remote instance a second time.

My modified version of 93_FHEM2FHEM.pm does exactly this, when a remote event gets read an additional flag (DISABLEEVENT) is being set. When the event afterwards gets processed a second time it gets discarded and the flag gets removed, so that usual message handling for the device can continue. This might not be the most sophisticated solution for the problem, but at least it prevents FHEM from freezing.

To prevent FHEM from freezing in the bidirectional setup, download the modified version of 93_FHEM2FHEM.pm (490 downloads ) and replace the original file in the folder /opt/fhem/FHEM for both instances. Then edit the file fhem.cfg for both instances and add the attribute avoidMsgLoop to the FHEM2FHEM device, like in the following example. To get useful states for some devices, like CUL_TCM97001 sensors one still has to add the addStateEvent attribute.² Without this, for example plots would not work properly.

define instance1 FHEM2FHEM instance1:7072 LOG:.*
attr instance1 avoidMsgLoop 1
attr instance1 addStateEvent 1

With this modification it should be possible to set up a “cluster” of FHEM instances that can operate independent from each other but have the same data available. Thus the failure of one instance has less impact and the range of most radio devices can be extended transparently.

For completeness and in case someone wants to include this or an improved variant into FHEM the diff is available from here: 93_FHEM2FHEM-avoidMSgLoop.patch (383 downloads )

Update (08/11/2021): This approach is outdated. Better use the new loopThreshold³ parameter from now on.

Jürgen

References:
1. fhem.de
2. forum.fhem.de
3. forum.fhem.de

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

iptables mirror target for linux kernel 4.10

After my last kernel upgrade I tried to build the iptables mirror target published the last time here. The iptables mirror target takes the packet sent to your machine and returns the same packet to the machine the packet came from. Thus, let’s say someone tries to scan your machine or tries an attack he would scan his own machine or even attack his own machine. When I tried it with kernel version 4.12 , it did not build anymore with the current linux kernel. This time a struct changed in kernel 4.10 and some functions have got renamed in the kernel 4.11. Thus I had to update the ip_direct_send and ipt_mirror_target functions. You can download the newer release for kernel version 4.10 and probably future kernels here:

MIRROR.4.10.tar.gz (1420 downloads ) gplv3-127x51

The kernel module has been tested with kernel version 4.12.12-gentoo. To build the module, boot the kernel you want to use the module with. Afterwards unpack the archive and run the compile.sh script to build the module. Then run the install.sh script for installing the compiled module into the /lib/modules directory for your kernel.

Now you may use the mirror target in place of the REJECT or DROP target in the INPUT, FORWARD and PREROUTING chains, like this in your firewall script:

$IPTABLES -A INPUT -j MIRROR

Beware: The use of the mirror target may lead to strange results, in example if you want to connect to an iptables protected machine which uses the mirror target, you may end up connecting to the local machine without recognizing it. It also may use much bandwith. The worst case occurs if you have two machines using the module. These machines may end up playing ping pong. So you have been warned, use with caution and at your own risk. For more information see: MIRROR target.

Downloads for older kernel versions are below. Notice the version numbering 2.6.25 works for kernels up to 2.6.27. 2.6.28 also works for 2.6.29 and 2.6.30 kernels. The 2.6.13 version of the module should work up to kernel version 2.6.16.












gplv3-127x51

regards
Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

devolo-dlan-cockpit-4.3.3 with gentoo

Recently I have found out, that the version 4.2.3 of devolo-dlancopit, for which I have posted a gentoo ebuild in the article devolo-dlan-cockpit-4.2.3 with gentoo, does not work fully anymore. It fails  downloading firmware updates for the Devolo dlan 1200 PowerLAN adapters. Most probably the download urls for firmware updates have changed recently.

Devolo offers the application devolo-dlan-cockpit for download. The main purposes of devolo-dlan-cockpit are:

  • Firmware upgrades for the network adapters
  • Monitoring the performance
  • Configuring the network adapters

Firmware upgrades are more or less plug and play. One has to click the Updates-Button and everything else happens automagically. Monitoring the network performance with devolo-dlan-cockpit is of major interest, since it allows one to try out different wall sockets for better performance with nearly zero efforts. If one gets poor performance it can be of major impact just to use another wall socket in the same room.

Dlan-cockpit is available for most common operating systems. However, the only Linux distribution, they support right now is Ubuntu Linux. Most probably, the package will also work with Debian. Allthough these are binary packages, the application can also be used with Gentoo Linux. For this two binaries have to be executed /usr/bin/devolonetsvc, the service daemon and /opt/devolo/dlancockpit/bin/dlancockpit, the frontend application which depends on the service. Usually devolonetsvc is being started by an initrd script, but the one included in the package is not going to work with gentoo, so just start it manually as root user. If one really needs it that often, an own startup script or systemd configuration can be written. Below you can see a screenshot of the application.

screenshot

Screenshot of devolo dlan-cockpit 4.3.3

The Gentoo way

For gentoo users here is my overlay including the updated devolo-dlan-cockpit ebuild: [download#99]. It also contains an adobe-air-runtime ebuild as necessary dependency. The adobe-air-runtime ebuild has been taken from steam-overlay. Download the overlay and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then emerge devolo-dlan-cockpit and update your dlan adapters again using your gentoo box.

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

devolo-dlan-cockpit-4.2.3 with gentoo

Recently I have started using Devolo dlan 1200 PowerLAN adapters. With these one can get a network with up to 1Gbps without having to install additional wires by using the power lines. Of course the 1Gbps are optimum values under perfect conditions. Practically one gets 100 Mbps to 600 Mbps, but this is enough for most purposes.

Devolo offers the application devolo-dlan-cockpit for download. The main purposes of devolo-dlan-cockpit are:

  • Firmware upgrades for the network adapters
  • Monitoring the performance
  • Configuring the network adapters

Firmware upgrades are more or less plug and play. One has to click to click the Updates-Button and everything else happens automagically. Monitoring the network performance with devolo-dlan-cockpit  is of major interest, since it allows one to try out different wall sockets for better performance with nearly zero efforts. If one gets poor performance it can be of major impact just to use another wall socket in the same room.

Dlan-cockpit is available for most common operating systems. However, the only Linux distribution, they support right now is Ubuntu Linux. Most probably, the package will also work with Debian. Allthough these are binary packages, the application can also be used with Gentoo Linux. For this two binaries have to be executed /usr/bin/devolonetsvc, the service daemon and /opt/devolo/dlancockpit/bin/dlancockpit, the frontend application which depends on the service. Usually devolonetsvc is being started by an initrd script, but the one included in the package is not going to work with gentoo, so start just start it manually as root user. If one really needs it that often, an own startup script or systemd configuration can be written. Below you can see a screenshot of the application.

screenshot

Screenshot of devolo dlan-cockpit

The Gentoo way

For gentoo users here is my overlay including the devolo-dlan-cockpit ebuild: devolo-dlan-cockpit-4.2.3_overlay.tar.gz (1914 downloads ) . It also includes an adobe-air-runtime ebuild as necessary dependency. The adobe-air-runtime ebuild has been taken from steam-overlay. Download the overlay and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then emerge devolo-dlan-cockpit and monitor your network nodes using your gentoo box.

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

siteinfo

Translator