Estimating transmission time of a DecaWave DW1000 UWB transceiver frame

I like to share with you my C implementation for estimating the DecaWave transmission time because it has been created with help from the community and thus should be shared with it.

The DecaWave DW1000 is a versatile ultra-wideband transceiver that enables long range and fast communication. Due to its wide spectral width it is able to occupy a very narrow temporal with. Precise time-stamping then allows for estimating the time-of-flight which in turn can be used for determining the distance between two nodes.

Continue reading Estimating transmission time of a DecaWave DW1000 UWB transceiver frame

Form submission CSRF issues in Magento 1.9.2.2

Magento now includes CSRF (Cross-Site Request Forgery) protection on publicly available forms such as the new user registration form. The goal of this is to make it impossible for anyone to POST to an URL without first visiting the corresponding form page. A token is supplied on this page that is sent along with the rest of the form to the server. The server validates the correctness of the token and responds in a sensible way if the token is correct. If the token is not however, the server ignores the POST request.

Continue reading Form submission CSRF issues in Magento 1.9.2.2

Fix Magento 1.9.2.2 ‘Notice: Undefined variable: block in …/Template/Filter.php line 187’

This problem arose after upgrading to Magento 1.9.2.2. which is a patch release that patches a number of security flaws in Magento. After installation of the patch some parts of the front-end template stayed blank. Review of the exception.log file shows a number of exceptions that seem to occur from the template filter classes of Magento.

The error is:

Continue reading Fix Magento 1.9.2.2 ‘Notice: Undefined variable: block in …/Template/Filter.php line 187’

Overwrite Magento Core using a Module

The layout of Magento’s information, warning and error messages cannot be easily changed using layout and template files. The HTML generation is done from a Block PHP class (Mage_Core_Block_Messages). It is a very bad idea to overwrite any core element of Magento. Instead we are going to extend this core-block by creating a separate module.

Bootstrap Alerts in Magento
Messages are now Bootstrap compatible

My goal was to make the messages compliant with Twitter Bootstrap alerts but the following technique can be used for about anything.

Continue reading Overwrite Magento Core using a Module

RADIUS Authentication driver for Kohana 3.3

Lately I was in need for an authentication driver that supports RADIUS servers. Happily the Kohana Auth module supports easy development of custom authentication drivers by extending the Auth class holding abstract specifications of the required methods. I implemented these methods making use of the PHP Radius extension (which therefore is required). The driver is publicly available at GitHub.

I am planning on implementing a pure PHP Radius client to get rid of the requirement of the PHP Radius extension.

MySQLi Database Driver for Kohana 3.3

A couple of months ago I published my Kohana MySQLi database driver on GitHub. As the development of the framework came to a halt for the last few months the PHP team deprecated the support for the PHP MySQL extension on which Kohana’s default Database driver relies. This module is based on Kohana’s native implementation but uses the MySQLi extension.

A composer description is available in the repository so it can be easily installed using the package manager.