Archive

Archive for the ‘linux’ Category

How to build your own kernel for Fedora 14

February 2nd, 2012 No comments


Building a custom kernel is one of the most important rites of passage for advanced Unices users. This process, while time consuming, will provide many benefits to your system. Unlike the GENERIC kernel, which must support a wide range of hardware, a custom kernel only contains support for your PC's hardware. This has a number of benefits, such as:

  • Faster boot time. Since the kernel will only probe the hardware you have on your system, the time it takes your system to boot can decrease dramatically.

A pseudo serial sniffer for RS232 communications

January 30th, 2012 No comments

All electronic devices, computers and  micro controllers need to exchange data with other devices. One of the most used  way, since 1969, is the serial transmission using the RS232 standard when the EIA defined it. Serial transmission is commonly used with modems and for non-networked communication between computers, terminals, printers and other devices It is  useful for debugging purpose in embedded system. In the following paragraphs we describe the serial transmission in the two forms: Synchronous and Asynchronous. 

How to select odd (or even ) raws from a text file using the bash

January 27th, 2012 No comments

Yesterday I had to select some raws (1, 5, 9, ….) from a text file.

This has been a hard job because I was trying to solve the wrong problem……

Really, before coding you should analyze deeply your problem and then you should think which tool you need to use.

However, come on and see my experiments:

First of all we need a test file, I'll use the following:

How to solve “libssl.so.10: cannot open shared object file: No such file or directory” error in Ubuntu 9.10

January 23rd, 2012 No comments

During my experiments with LTIB I've encoutered the following error

 

Processing: gettext

=====================

Build path taken because: no prebuilt rpm, 

Testing network connectivity for gpp

OK GPP: is available

Try gettext-0.15.tar.gz.md5 from the GPP

How to install minicom on Mac OS X – Snow leopard

January 16th, 2012 No comments

Minicom is a text-based modem control and terminal emulation program for Unix-like operating systems, originally written by Miquel van Smoorenburg, and modeled after the popular MS-DOS program Telix. Minicom includes a dialing directory, ANSI and VT100 emulation, an (external) scripting language, and other features. Minicom is a menu-driven communications program. It also has an auto zmodem download.

3 ways to remove duplicate lines from a text file

December 27th, 2011 No comments

 

One of the more diffcult job, while using the shell, is working with text files to filter their content.


In the following few lines you will find 3 different ways to remove all the duplicate lines from a text file.


First of all, I'll introduce three commands that are available on almost all of the linux distributions, and maybe in all Unix dialects:

uniq

Discard all but one of successive identical lines from INPUT (or standard input), writing to OUTPUT (or standard output).

 

Practical subjects for the Arduino and Freeduino microcontrollers

December 19th, 2011 No comments

… an evolving index of practical subjects for the Arduino and Freeduino microcontrollers, as found in the Arduino site, Playground wiki, forum and that big WWW thing. Everything you read here will work on Arduino, the many versions of Freeduino, the Barebones and RBBB, the Boarduino, the iDuino and MAXserial, the eauDuino, the Jeenode, the many Arduino-compatible boards listed below, and of course the new-kids-on-the-block, the Sanguino, the Freeduino EPIC and the Arduino MEGA. Because of the different hardware layouts of these boards, slight modifications will occasionally be required between physical platforms.

How to install Twidge on centos

December 12th, 2011 No comments

Last week I needed to install twidge on a centos 5.7 server.

Truly, twidge is very simple to install into debian (or derived) linux distribution, but I found some problems while installing it into my centos server. 

First of all you shall download the twidge binaries from here:

https://github.com/jgoerzen/twidge/downloads

the twidge binary requires libcurl-gnutls

simply type the following command:

Temperature sensor and real time clock for Arduino

December 2nd, 2011 No comments

 

This simple board has been developed to work together with an arduino board, but it can be used in conjunction with every other boards with an I2C bus and a power suplly into the range [2.7..5]V.


The schemathic for this board is shown in the following picture:

Avoid the use of multiplies to optimize your code for speed (C/C++).

November 25th, 2011 1 comment

If it is possible you should use constant increments instead of multiplies.

#include <stdio.h>

#include <stdlib.h>

int main(void)
{
    int i, j;
    for(i=0; i<10; i++)
    {
        j=i*10;
    }
}

int main1(void)
{
    int i, j;
    for(i=0; i<100; i+=10)
    {
        j=i;
    }
}

Statistical data collected by Statpress SEOlution (blogcraft).