Tuesday, January 10, 2006

AVR-USB stack from Objective Development

Objective Development Software GmbH develops USB stack for AVRs. It is an Open-Source project, with free avr-gcc.

AVR-USB is a firmware-only implementation of a USB 1.1 compliant low-speed device for Atmel's AVR microcontrollers. It runs on any AVR microcontroller which has at least 2 kB of Flash memory, 128 bytes RAM and can be clocked at 12 MHz. No UART, timer, input capture unit or other special hardware is required (except one edge triggered interrupt).
AVR-USB can be licensed freely under an Open Source compliant license or alternatively under a pay-per-unit commercial license.

They also give project-examples. I think this is cool: Wireless thermo- and hygrometer with up to 16 sensors and a central logging facility accessible via WWW.

Sunday, January 08, 2006

Google Adsense

I searched information about Google Adsense and I decided to apply.
I think Adsense program is very interesting. We can get money from our pages while we were sleeping.. cool!.
That's what I've been looking for whole of my life.. just kidding :)

Think of security

Category: Funny Things






Source: This picture was taken from Computer Shopper Magazine 2005. It is IBM ThinkPad Ads.

Red with Hat

Category: Funny Things


Source: Underwater Photography 2003

Wednesday, January 04, 2006

Say Hello to vi and gcc

Category: Linux Redhat9 Tips

The following is very basic introduction to use gcc (GNU C Compiler) using vi as editor.

On shell prompt type this:

$ vi [ENTER]

The opening vi screen will be showed.
Type [INS] button to start editing.

Type these lines:

#include <stdio.h>

int main(void) {
printf("Hello World\n");
}


Type [ECS] to enter command mode (on the bottom of screen)
To save file:
:w test.c [ENTER]
To quit from editor:
:q [ENTER]

To compile, on shell prompt:
$ gcc test.c -o test [ENTER]

To run the program:
$ ./test [ENTER]

Result:
$ Hello World

see u..:)

Tuesday, January 03, 2006

Copying Device Content with dd

Category: Linux Redhat9 Tips

Linux/Unix has a program called dd (device dump?). dd does low-level data transfer. It doesn't care of the file-sytem of source and target devices.
That's why this program mostly used for duplication or imaging storage-devices.
Since dd will replace any existing data on target device, you must use this usefull tool very carefully.

I show you some example below.
Please do not run those commands, unless you know exactly what you do.

To duplicate hda(harddisk1) to (harddisk2)
$ dd if=/dev/hda bs=4k of=/dev/hdb

To make image file of hda(harddisk1) to /mnt/myfolder/myimagedisk.img
$ $ dd if=/dev/hda bs=4k of=/mnt/myfolder/myimagedisk.img


For me, dd is regularly used for imaging my SanDisk FlashDisk. It is a nice tool!
Before you use dd, please read man dd or info dd first.

p.s.: I am learning using mail-to-blogger facility. Not smooth.. so I repost through web..:(

Monday, January 02, 2006

Wireless Trafic

Category: Funny Things


Wireless Traffic


Source: This picture was taken from BusinessWeek Magazine 2005. It is SUNGARD ads.

Giving root access via sudo

Category: Linux Redhat9 Tips
I wrote this post using wbloggar. Thanks wbloggar..:)

In some cases we should give root aceess to regular user. For example, when you as administrator is sleeping in your home at night, one of on duty officer of your company call you, telling there is a problem. After a litle analizing, suppose you know the TCP server daemon you created is not working. It should be restated by root. What should you tell to the officer? Give your root password? I do not think so.

Sudo (Superuser Do) was there to overcome this kind of problem. With sudo, you can give root access to specific user to run specific programs.

There are 3 files of interest:
  • /etc/sudoers configuration file, containing the role of access.

  • visudo program, to edit sudoers file.

  • sudo program, to run program/script with root level access.

For example, you want to give acces to user regular_user to run /bin/program_required_root_aceess.
Edit /etc/sudoers and add lines below root ALL=(ALL) ALL:

[root@kedip]# visudo
...
root ALL=(ALL) ALL
regular_user ALL= /bin/program_required_root_aceess
...
Save the file. That's all!

Regular user will run sudo like this:

[regular_user@kedip]$ sudo /bin/program_required_root_aceess
Password: <- password of regular user
...
...

When user run sudo, sudo will send notification mail of this event to administrator.

This is only introduction. There is much more you can get. Read man sudoers.

See u..

Happy New Year

*~...HaPy neW YeAR ...~*