BLUG*OS*CON

We are pleased to invite you to attend the Conference BLUG*OS*CON, to be held in the hall AN010 of Politehnica University of Bucharest.

An event dedicated to everyone who uses Software Open Source, beginners or advanced.

Free entrance!(free as in beer). The event is organized by BLUG.ro – Bucharest Linux User Group.

BLUG*OS*CON in a conference for truly Linux users, a conference just for fun,
Intrarea liberă! (free as in beer). Evenimentul este organizat de BLUG.ro – Bucharest Linux User Group, free from any influence in the IT industry, a kind of conference open source Do-It-Yourself. Free from prejudice, advertising and vanity. You are all welcome!

The schedule is rich and full of interest for everyone. You will be able to increase your knowledge for the Linux platform, whether you are a beginner (you have lots of tracks where you care improve yourself) or a true geek (the first in Romania). And last, but not the least, BLUG*OS*CON is a unique platform  for socializing Romanian FLOSS communities.

You can consult the full schedule at http://blugoscon.blug.ro/Main/ProgramulConferintei.

Communities in Romania will have their own stands where you can socialize heavily.

Who can participate:

  • novice Linux users
  • advanced Linux users
  • programmers
  • professors

Free entrance

MIME headers and how we add an attachment in an e-mail

The idea of this article is very simple. I will try to explain how it should be done, to be able to attach “manually” an attachment to an email . To those who have red and have asked themselves which is the purpose of some action, I strongly recommend not to continue with the lecture, because this article is not for them.

The applications for adding an attachment are enough, I will mention only one: creating those “corporate” footers with pictures and others wonders.

So, lets assume that we want to create a different kind of footer, in HTML, with a nice picture which should be representative for the emails send through the server we want to configure.

Strictly for the disclaimer / footer part, altermime can be used without any problem. The problem is that, if we want also, to add  an image (which will appear in footer), things will get complicated.

The solution is to modify the messages body and to add our attachment the way we wanted. Easy to say, but what happens, when we run across “Content-Type: multipart/mixed; boundary=”_004_A8EC770875E1AE4A84851C05B6F730038D98AEFF4A_””…?

Well, we have just meet MIME. I won’t get into unnecessary details, but I will sum up the essential. We are interested in that “boundary=”.  All that is between quotation marks after the equal sign represents an separator (unique for a message) which breaks the various attachments/ parts of the message. So “_004_A8EC770875E1AE4A84851C05B6F730038D98AEFF4A_” is that boundary which we should look for in the body of the message, to be able to add our attachment.

A MIME content area starts with two signs “-” and is succeeded by that boundary, like so

“–_004_A8EC770875E1AE4A84851C05B6F730038D98AEFF4A_” (of course without “).

The area lasts until the meeting  point with another same marking line or until the meeting point with the final line, formed of boundary succeeded by to signs “-“, like so:  “_004_A8EC770875E1AE4A84851C05B6F730038D98AEFF4A_–”

That’s pretty much about the structure of an email, at least that’s what interests us.

If you wonder how to add attachments however, now comes the answer:

Our attachment can be added just before the final mark we talked about. We will have an example at the end. What you should know is that an attachment from an email is encoded base64. So, if we want to add an JPEG file, we must converted first in base64 (uuencode -m, for example) and after that to add it, using a sequence like:

Content-Type: image/jpeg; name=”sign.jpg”
Content-Description: sign.jpg
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=”sign.jpg”
Content-ID: <sign.jpg@00000000>

After all of the above, next is base64 encoding for the sign.jpg file.

All of this achieved, we have a message to which we added the attachment and it could be very nicely displayed form footers HTML .

I2C Bus Protocol – General description

Protocolul I2C was developed to create a communication channel between integrated circuits. I2C  consists of two lines physically active and earthing connection. The lines are called SDA and SCL active, both lines are bi-directional. SDA is Serial Data Line and SCL  is Serial Clock Line.

Any device connected to bus has its unique address, no matter if it is MMU, driver LCD, memory or ASIC. Every one of these chips can receive and/or broadcast depending on the desired functionality. Obviously an LCD driver can only receive while a memory or an I / O device can receive and transmit data.

I2C is a bus multi-master. Thus, in I2C bus can be connected more integrated circuits able to initiate data transfers. I2C protocol specifies that the integrative which initializes the connection is considered Bus Master. Consequently the remaining circuits connected to I2C are regarded as Bus Slaves.

Cum Bus Master are microcontrolere(MCU), this is how a sequence of communication, looks like on I2C.

  1. MCU sends the sequence START . At this time all circuits on the bus switches to reception
  2. MCU sends the ADDRESS of the circuit, with which wants to communicate together with the flag operation ( READ / WRITE ) .
  3. Circuits compares ADDRESS with own address and if the message is not for it, waits for the STOP condition
  4. If one circuit has the ADDRESS desired by MCU, then the chip will make a message ACKNOWLEDGE.
  5. Then it moves to the data transfer. When data transfer has finished it is send the STOP sequence.