Per process routing take 2: using cgroups, iptables and policy routing

In a previous article we saw how it’s possible to do per process routing using namespaces. In this one we will achieve the same by using cgroups, iptables and policy routing. Perhaps the user case is a bit marginal (see the introduction in the mentioned article) but this article is a tribute to the extreme flexibility of cgroups.
Continue reading

Posted in Linux desktop | Tagged , , , | 2 Comments

YAACA new release and ASI low level driver

Here you can download the latest version .deb release of yaaca for i386 and amd64. Source code is on github.As far functionality is concerned there are not big news. The biggest enhancement is the fix of debayer for the MC camera. Continue reading

Posted in Astronomy | Tagged | Leave a comment

YAACA for multiple and monochrome cameras.

An update to this article is available!

The version here available better supports monochrome cameras (tested with the AS120MM). It’s also possible to have multiple cameras. Continue reading

Posted in Astronomy | Tagged | Leave a comment

New release of YAACA and pyasicam

An update to this article is available!

A new version of yaaca is available. Source code is now on github. Continue reading

Posted in Astronomy | Tagged | 7 Comments

Open PHD for the ZWO ASI 120MC

An update to this article is available!

Here you can find the driver for the ZWO ASI 120MC astronomical camera for the Open PHD auto guiding software. Please start from the following check-out version from Open PHD Subversion repository: Continue reading

Posted in Astronomy | Leave a comment

YAACA-0.1: Yet Another Astro Cam Application

An update to this article is available!

This is the first release of the YAACA Linux application. It’s an application written and tested on the ZWO ASI120MC astronomical color camera. I written this application to be able to test all the features of the camera and, of course, to take some cool astronomical pictures. It was developed and tested on Debian 6.0 Squeeze and depends on GTK2. It’s rather simple and should run on most recent Linux systems. You can download the source code and an executable compiled on 32-bit Debian 6.0 Squeeze. Of course you will need the ZWO SDK for compiling and at least the somewhere in your library path to run the executable. They can be get from the ZWO user group forum (you have to register to have access to the Linux beta SDK). Continue reading

Posted in Astronomy | Tagged | 2 Comments

Using Linux Network Namespaces for per processes routing

The use case for this article may seem a bit strange in year 2013 but I swear it’s real. I have a (relatively) fast connection but I have a traffic cap on it and a (really) slow one which is flat. I would like to run not interactive task like “aptitude safe-upgrade” on the slow one but the bulk of my connections should go through the fast one. The work is done on a Debian Wheezy system, check that the “ip” command is not too old and lacks network namespace support.
Continue reading

Posted in Linux desktop | Tagged , , , , | 15 Comments

Linux benchmark on Xilinx Spartan-6 LX45 (SP605 evk)

I was asked to give at least a generic insight of “how fast” would Linux run in a Microblaze soft-CPU running on a Spartan-6 LX45 processor (specifically on the SP605 evaluation kit). Of course it has to be clear that the usage of such a processor/environment cannot focus on pure performance reasons, as you usually choose a FPGA for other reasons. For pure performance there are much better solutions (hardware based CPUs indeed) or if you need also the FPGA advantages processors with both a FPGA part and a hardware CPU, such as the Zynq family processors for example.

Continue reading

Posted in Linux drivers, Linux embedded | Tagged , , , , , , | Leave a comment

TOR+Privoxy minimal setup for DGN2200v3/MIPS architecture

In a previous article I talked about how to customize the Linux based WLAN+ADSL Netgear DGN2200v3 router and prepared various binary packages ready for the device. In this short article I’m offering a small full setup that can be run on this router (and many other compatible ones and in general on any MIPS+uClinux hardware setup) to be able to use easily the TOR network to browser anonymously. In this way all the users behind the router can easily achieve anonymous surfing.

Continue reading

Posted in Linux desktop, Linux embedded, Security, Teaching Material | Tagged , , , , , , , , | Leave a comment

Command line PHP deobfuscation

Recently a customer asked me to debug some problems on their Joomla!/PHP site that had interoperability issues after some long time for unknown reasons. The site was using some commercial plugins which producer was long time gone and unreachable and worst of all they were all obfuscated. So even searching for some basic string that was displayed on the screen on error to understand what’s going on was not a straight forward exercise and going through the code was a mess.

Apart from changing the code in a logical way, for example by adding intermediate variables or splitting variable assignations into more operations and so on, the first most annoying part of PHP obfuscators is that they modify most of the characters in the strings values with their respective hexadecimal (format \xXX) or octal (\XXX) values and eliminate any line feeds or code structure. Once you get rid of this the code stays quite very messy but is, at least in the cases I analyzed, quite readable and just needs a little more bookkeeping with automatically named vars to go through.

Getting rid at least of this confusing representation is quite straightforward on the command line with a few tricks.
Continue reading

Posted in Linux desktop, Security, Teaching Material | Tagged , , , | Leave a comment

Linux iMX23 audio loop (or using the iMX23 as an amplifier)

As usual when working with embedded systems every component saved seems like gold to the HW guys (no matter how much software hassles or future limitations this may cause!) and in this context lately I’ve been working on the idea to use the Freescale iMX23 processor, that was anyway present in the project for other needs, as an audio amplifier to pilot a small speaker with no special volume requirements.
Basically the output of a GSM module (audio out) was connected to the MIC input of the iMX23 and then the output to the speaker, just with little strictly needed passive electronics in between. As by the datasheet the processor should be able to pull out till 1.9W at 4Ω and there were some interesting registers to play with, even if not documented so very clearly nor seemed to be used anyhow in the audio driver provided.
The software base used was the LTIB based BSP provided by Freescale, including their kernel patches for a 2.6.31 kernel.
Continue reading

Posted in Linux drivers, Linux embedded, Teaching Material | Tagged , , , , , , , | Leave a comment

pyargocat: Argo Navis Catalog manager in Python


pyargocat is a small simple Python script that can be used to program the catalogs of the  Argo Navis Digital Telescope Computer from a machine with a recent Python interpreter installed using the RS232 cable that you can either buy or easily construct yourself. pyargocat can manage, that is insert to the device, all three types of catalogs in the device (asteroids, comets and user defined objects), report the number of objects present, report available space and delete previously flashed catalogs. It can be used on any machine with a Python >= 2.7 installed and it has been tested on Linux and Windows machines.

The imported catalogs have to be in the standard format Argo Navis uses (please refeer to the Argo Navis manual for the details and for links to useful resources). As an example and as a possible useful addition for your advanced observing sessions you can download this sample file I created that I often use as a basis: fede-general.txt. (the file contains all the Abell planetaries, the complete ARP catalog of Peculiar galaxies, the Hickinson galaxy groups catalog, most of the PK Planetary Nebula catalog and a selection of particullar globular clusters such as the Palomars and Terzans). Also a comet database file is given as an example with the most interesting comet objects data at the time of writing: Comets.txt

Download: pyargocat-0.1.tar.gz.
Continue reading

Posted in Linux desktop, Science | Tagged , , , | 3 Comments