Saturday, May 31, 2008

4G

4G (also known as Beyond 3G), an abbreviation for Fourth-Generation Communications System, is a term used to describe the next complete evolution in wireless communications. A 4G system will be able to provide a comprehensive IP solution where voice, data and streamed multimedia can be given to users on an "Anytime, Anywhere" basis, and at higher data rates than previous generations.

As the second generation was a total replacement of the first generation networks and handsets; and the third generation was a total replacement of second generation networks and handsets; so too the fourth generation cannot be an incremental evolution of current 3G technologies, but rather the total replacement of the current 3G networks and handsets. The international telecommunications regulatory and standardization bodies are working for commercial deployment of 4G networks roughly in the 2012-2015 time scale. At that point it is predicted that even with current evolutions of third generation 3G networks, these will tend to be congested.

There is no formal definition for what 4G is; however, there are certain objectives that are projected for 4G. These objectives include: that 4G will be a fully IP-based integrated system. This will be achieved after wired and wireless technologies converge and will be capable of providing between 100 Mbit/s and 1 Gbit/s speeds both indoors and outdoors, with premium quality and high security. 4G will offer all types of services at an affordable cost.[1]

Many companies have taken self-serving definitions and distortions about 4G to suggest they have 4G already in existence today, such as several early trials and launches of WiMax, which is part of the formal ITU standard for 3G. Other companies have made prototype systems calling those 4G. While it is possible that some currently demonstrated technologies may become part of 4G, until the 4G standard or standards have been defined, it is impossible for any company currently to provide with any certainty wireless solutions that could be called 4G cellular networks that would conform to the eventual international standards for 4G. These confusing statements around "existing" 4G have served to confuse investors and analysts about the wireless industry.

Objectives

4G is being developed to accommodate the quality of service (QoS) and rate requirements set by forthcoming applications like wireless broadband access, Multimedia Messaging Service (MMS), video chat, mobile TV, HDTV content, Digital Video Broadcasting (DVB), minimal service like voice and data, and other streaming services for "anytime-anywhere". The 4G working group has defined the following as objectives of the 4G wireless communication standard:

  • A spectrally efficient system (in bits/s/Hz and bits/s/Hz/site),[2]
  • High network capacity: more simultaneous users per cell,[3]
  • A nominal data rate of 100 Mbit/s while the client physically moves at high speeds relative to the station, and 1 Gbit/s while client and station are in relatively fixed positions as defined by the ITU-R,[1]
  • A data rate of at least 100 Mbit/s between any two points in the world,[1]
  • Smooth handoff across heterogeneous networks,[4]
  • Seamless connectivity and global roaming across multiple networks,[5]
  • High quality of service for next generation multimedia support (real time audio, high speed data, HDTV video content, mobile TV, etc)[5]
  • Interoperability with existing wireless standards,[6] and
  • An all IP, packet switched network.[5]

In summary, the 4G system should dynamically share and utilise network resources to meet the minimal requirements of all the 4G enabled users.

[edit] Approaches

As described in 4G consortia including WINNER, WINNER - Towards Ubiquitous Wireless Access, and WWRF, a key technology based approach is summarized as follows, where Wireless-World-Initiative-New-Radio (WINNER) is a consortium to enhance mobile communication systems.[7][8]

[edit] Consideration points

  • Coverage, radio environment, spectrum, services, business models and deployment types, users

[edit] Principal technologies

  • Baseband techniques[9]
    • OFDM: To exploit the frequency selective channel property
    • MIMO: To attain ultra high spectral efficiency
    • Turbo principle: To minimize the required SNR at the reception side
  • Adaptive radio interface
  • Modulation, spatial processing including multi-antenna and multi-user MIMO
  • Relaying, including fixed relay networks (FRNs), and the cooperative relaying concept, known as multi-mode protocol

It introduces a single new ubiquitous radio access system concept, which will be flexible to a variety of beyond-3G wireless systems.

taken from :http://en.wikipedia.org/wiki/4G




Friday, April 25, 2008

Introducing Sysinstall

The sysinstall utility is the installation application provided by the FreeBSD Project. It is console based and is divided into a number of menus and screens that you can use to configure and control the installation process.

The sysinstall menu system is controlled by the arrow keys, Enter, Tab, Space, and other keys. A detailed description of these keys and what they do is contained in sysinstall's usage information.

To review this information, ensure that the Usage entry is highlighted and that the [Select] button is selected, as shown in Figure 2-5, then press Enter.

The instructions for using the menu system will be displayed. After reviewing them, press Enter to return to the Main Menu.

Figure 2-5. Selecting Usage from Sysinstall Main Menu

Selecting the Documentation Menu

From the Main Menu, select Doc with the arrow keys and press Enter.

Figure 2-6. Selecting Documentation Menu

This will display the Documentation Menu.

Figure 2-7. Sysinstall Documentation Menu

It is important to read the documents provided.

To view a document, select it with the arrow keys and press Enter. When finished reading a document, pressing Enter will return to the Documentation Menu.

To return to the Main Installation Menu, select Exit with the arrow keys and press Enter.

Selecting the Keymap Menu

To change the keyboard mapping, use the arrow keys to select Keymap from the menu and press Enter. This is only required if you are using a non-standard or non-US keyboard.

Figure 2-8. Sysinstall Main Menu

A different keyboard mapping may be chosen by selecting the menu item using up/down arrow keys and pressing Space. Pressing Space again will unselect the item. When finished, choose the [ OK ] using the arrow keys and press Enter.

Only a partial list is shown in this screen representation. Selecting [ Cancel ] by pressing Tab will use the default keymap and return to the Main Install Menu.

Figure 2-9. Sysinstall Keymap Menu

Installation Options Screen

Select Options and press Enter.

Figure 2-10. Sysinstall Main Menu

Figure 2-11. Sysinstall Options

The default values are usually fine for most users and do not need to be changed. The release name will vary according to the version being installed.

The description of the selected item will appear at the bottom of the screen highlighted in blue. Notice that one of the options is Use Defaults to reset all values to startup defaults.

Press F1 to read the help screen about the various options.

Pressing Q will return to the Main Install menu.

Begin a Standard Installation

The Standard installation is the option recommended for those new to UNIX® or FreeBSD. Use the arrow keys to select Standard and then press Enter to start the installation.

taken from:

http://www.freebsd.org/doc/en/books/handbook/using-sysinstall.html

installasi freebsd

Starting the Installation

Important: By default, the installation will not make any changes to your disk(s) until you see the following message:

Last Chance: Are you SURE you want continue the installation?

If you're running this on a disk with data you wish to save then WE
STRONGLY ENCOURAGE YOU TO MAKE PROPER BACKUPS before proceeding!

We can take no responsibility for lost disk contents!

The install can be exited at any time prior to the final warning without changing the contents of the hard drive. If you are concerned that you have configured something incorrectly you can just turn the computer off before this point, and no damage will be done.

Booting

Booting for the i386

  1. Start with your computer turned off.

  2. Turn on the computer. As it starts it should display an option to enter the system set up menu, or BIOS, commonly reached by keys like F2, F10, Del, or Alt+S. Use whichever keystroke is indicated on screen. In some cases your computer may display a graphic while it starts. Typically, pressing Esc will dismiss the graphic and allow you to see the necessary messages.

  3. Find the setting that controls which devices the system boots from. This is usually labeled as the “Boot Order” and commonly shown as a list of devices, such as Floppy, CDROM, First Hard Disk, and so on.

    If you needed to prepare boot floppies, then make sure that the floppy disk is selected. If you are booting from the CDROM then make sure that that is selected instead. In case of doubt, you should consult the manual that came with your computer, and/or its motherboard.

    Make the change, then save and exit. The computer should now restart.

  4. If you needed to prepare boot floppies, as described in Section 2.3.7, then one of them will be the first boot disc, probably the one containing boot.flp. Put this disc in your floppy drive.

    If you are booting from CDROM, then you will need to turn on the computer, and insert the CDROM at the first opportunity.

    If your computer starts up as normal and loads your existing operating system, then either:

    1. The disks were not inserted early enough in the boot process. Leave them in, and try restarting your computer.

    2. The BIOS changes earlier did not work correctly. You should redo that step until you get the right option.

    3. Your particular BIOS does not support booting from the desired media.

  5. FreeBSD will start to boot. If you are booting from CDROM you will see a display similar to this (version information omitted):

    Booting from CD-Rom...
    CD Loader 1.2

    Building the boot loader arguments
    Looking up /BOOT/LOADER... Found
    Relocating the loader and the BTX
    Starting the BTX loader

    BTX loader 1.00 BTX version is 1.01
    Console: internal video/keyboard
    BIOS CD is cd0
    BIOS drive C: is disk0
    BIOS drive D: is disk1
    BIOS 639kB/261120kB available memory

    FreeBSD/i386 bootstrap loader, Revision 1.1

    Loading /boot/defaults/loader.conf
    /boot/kernel/kernel text=0x64daa0 data=0xa4e80+0xa9e40 syms=[0x4+0x6cac0+0x4+0x88e9d]
    \

    If you are booting from floppy disc, you will see a display similar to this (version information omitted):

    Booting from Floppy...
    Uncompressing ... done

    BTX loader 1.00 BTX version is 1.01
    Console: internal video/keyboard
    BIOS drive A: is disk0
    BIOS drive C: is disk1
    BIOS 639kB/261120kB available memory

    FreeBSD/i386 bootstrap loader, Revision 1.1

    Loading /boot/defaults/loader.conf
    /kernel text=0x277391 data=0x3268c+0x332a8 |

    Insert disk labelled "Kernel floppy 1" and press any key...

    Follow these instructions by removing the boot.flp disc, insert the kern1.flpEnter. Boot from first floppy; when prompted, insert the other disks as required. disc, and press

  6. Whether you booted from floppy or CDROM, the boot process will then get to the FreeBSD boot loader menu:

    Figure 2-1. FreeBSD Boot Loader Menu

    Either wait ten seconds, or press Enter.

2.4.1.2 Booting for the Alpha

  1. Start with your computer turned off.

  2. Turn on the computer and wait for a boot monitor prompt.

  3. If you needed to prepare boot floppies, as described in Section 2.3.7 then one of them will be the first boot disc, probably the one containing boot.flp. Put this disc in your floppy drive and type the following command to boot the disk (substituting the name of your floppy drive if necessary):

    >>>BOOT DVA0 -FLAGS '' -FILE '' 

    If you are booting from CDROM, insert the CDROM into the drive and type the following command to start the installation (substituting the name of the appropriate CDROM drive if necessary):

    >>>BOOT DKA0 -FLAGS '' -FILE '' 
  4. FreeBSD will start to boot. If you are booting from a floppy disc, at some point you will see the message:

    Insert disk labelled "Kernel floppy 1" and press any key...

    Follow these instructions by removing the boot.flp disc, insert the kern1.flpEnter. disc, and press

  5. Whether you booted from floppy or CDROM, the boot process will then get to this point:

    Hit [Enter] to boot immediately, or any other key for command prompt.
    Booting [kernel] in 9 seconds... _

    Either wait ten seconds, or press Enter. This will then launch the kernel configuration menu.

2.4.1.3 Booting for Sparc64®

Most Sparc64® systems are set up to boot automatically from disk. To install FreeBSD, you need to boot over the network or from a CDROM, which requires you to break into the PROM (OpenFirmware).

To do this, reboot the system, and wait until the boot message appears. It depends on the model, but should look about like:

Sun Blade 100 (UltraSPARC-IIe), Keyboard Present
Copyright 1998-2001 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.2, 128 MB memory installed, Serial #51090132.
Ethernet address 0:3:ba:b:92:d4, Host ID: 830b92d4.

If your system proceeds to boot from disk at this point, you need to press L1+AStop+A on the keyboard, or send a BREAK over the serial console (using for example ~# in tip(1) or cu(1)) to get to the PROM prompt. It looks like this: or

ok         (1)
ok {0} (2)
(1)
This is the prompt used on systems with just one CPU.
(2)
This is the prompt used on SMP systems, the digit indicates the number of the active CPU.

At this point, place the CDROM into your drive, and from the PROM prompt, type boot cdrom.

Reviewing the Device Probe Results

The last few hundred lines that have been displayed on screen are stored and can be reviewed.

To review the buffer, press Scroll Lock. This turns on scrolling in the display. You can then use the arrow keys, or PageUp and PageDown to view the results. Press Scroll Lock again to stop scrolling.

Do this now, to review the text that scrolled off the screen when the kernel was carrying out the device probes. You will see text similar to Figure 2-2, although the precise text will differ depending on the devices that you have in your computer.

Figure 2-2. Typical Device Probe Results

avail memory = 253050880 (247120K bytes)
Preloaded elf kernel "kernel" at 0xc0817000.
Preloaded mfs_root "/mfsroot" at 0xc0817084.
md0: Preloaded image 4423680 bytes at 0xc03ddcd4

md1: Malloc disk
Using $PIR table, 4 entries at 0xc00fde60
npx0: on motherboard
npx0: INT 16 interface
pcib0: on motherboard
pci0: on pcib0
pcib1: at device 1.0 on pci0
pci1: on pcib1
pci1: at 0.0 irq 11
isab0: at device 7.0 on pci0
isa0: on isab0
atapci0: port 0xe000-0xe00f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0 port 0xe400-0xe41f irq 10 at device 7.2 on pci
0
usb0: on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr1
uhub0: 2 ports with 2 removable, self powered
pci0: (vendor=0x1106, dev=0x3040) at 7.3
dc0: port 0xe800-0xe8ff mem 0xdb000000-0xeb0003ff ir
q 11 at device 8.0 on pci0
dc0: Ethernet address: 00:04:5a:74:6b:b5
miibus0: on dc0
ukphy0: on miibus0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ed0: port 0xec00-0xec1f irq 9 at device 10.
0 on pci0
ed0 address 52:54:05:de:73:1b, type NE2000 (16 bit)
isa0: too many dependant configs (8)
isa0: unexpected small tag 14
orm0:

Check the probe results carefully to make sure that FreeBSD found all the devices you expected. If a device was not found, then it will not be listed. A custom kernel allows you to add in support for devices which are not in the GENERIC kernel, such as sound cards.

For FreeBSD 6.2 and later, after the procedure of device probing, you will see Figure 2-3. Use the arrow key to choose a country, region, or group. Then press Enter, it will set your country and keymap easily. It is also easy to exit the sysinstall program and start over again.

Figure 2-3. Selecting Country Menu

Figure 2-4. Select Sysinstall Exit

Use the arrow keys to select Exit Install from the Main Install Screen menu. The following message will display:

                      User Confirmation Requested
Are you sure you wish to exit? The system will reboot
(be sure to remove any floppies/CDs/DVDs from the drives).

[ Yes ] No

The install program will start again if the CDROM is left in the drive and [ Yes ] is selected.

If you are booting from floppies it will be necessary to remove the boot.flp floppy before rebooting

taken from:

http://www.freebsd.org/doc/en/books/handbook/install-start.html

Saturday, April 19, 2008

Testing Link Status from the Command Line

Both the mii-tool and ethtool commands command will provide reports on the link status and duplex settings for supported NICs.

When used without any switches, the mii-tool gives a very brief report. Use it with the -v switch because it provides more information on the supported autonegotiation speeds of the NIC and this can be useful in troubleshooting speed and duplex issues.

The ethtool command provides much more information than mii-tool and should be your command of choice, especially because mii-tool will be soon deprecated in Linux. In both of the following examples the NICs are operating at 100Mbps, full duplex and the link is ok.


Link Status Output from mii-tool

[root@bigboy tmp]# mii-tool -v

eth0: 100 Mbit, full duplex, link ok
product info: Intel 82555 rev 4
basic mode: 100 Mbit, full duplex
basic status: link ok
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
link partner: 100baseTx-HD

[root@bigboy tmp]#

Link Status Output from ethtool

[root@bigboy tmp]# ethtool eth0

Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: g
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes
[root@bigboy tmp]#
taken from :
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch04_:_Simple_Network_Troubleshooting


UNIX Tutorial One

1.1 Listing files and directories
ls (list)

When you first login, your current working directory is your home directory. Your home directory has the same name as your user-name, for example, ee91ab, and it is where your personal files and subdirectories are saved.

To find out what is in your home directory, type

% ls

The ls command lists the contents of your current working directory.

Unix Terminal - running the ls command

There may be no files visible in your home directory, in which case, the UNIX prompt will be returned. Alternatively, there may already be some files inserted by the System Administrator when your account was created.

ls does not, in fact, cause all the files in your home directory to be listed, but only those ones whose name does not begin with a dot (.) Files beginning with a dot (.) are known as hidden files and usually contain important program configuration information. They are hidden because you should not change them unless you are very familiar with UNIX!!!

To list all files in your home directory including those whose names begin with a dot, type

% ls -a

As you can see, ls -a lists files that are normally hidden.

Unix Terminal - running the ls command

ls is an example of a command which can take options: -a is an example of an option. The options change the behaviour of the command. There are online manual pages that tell you which options a particular command can take, and how each option modifies the behaviour of the command. (See later in this tutorial)
1.2 Making Directories
mkdir (make directory)

We will now make a subdirectory in your home directory to hold the files you will be creating and using in the course of this tutorial. To make a subdirectory called unixstuff in your current working directory type

% mkdir unixstuff

To see the directory you have just created, type

% ls
1.3 Changing to a different directory
cd (change directory)

The command cd directory means change the current working directory to 'directory'. The current working directory may be thought of as the directory you are in, i.e. your current position in the file-system tree.

To change to the directory you have just made, type

% cd unixstuff

Type ls to see the contents (which should be empty)
Exercise 1a

Make another directory inside the unixstuff directory called backups
1.4 The directories . and ..

Still in the unixstuff directory, type

% ls -a

As you can see, in the unixstuff directory (and in all other directories), there are two special directories called (.) and (..)
The current directory (.)

In UNIX, (.) means the current directory, so typing

% cd .

NOTE: there is a space between cd and the dot

means stay where you are (the unixstuff directory).

This may not seem very useful at first, but using (.) as the name of the current directory will save a lot of typing, as we shall see later in the tutorial.
The parent directory (..)

(..) means the parent of the current directory, so typing

% cd ..

will take you one directory up the hierarchy (back to your home directory). Try it now.

Note: typing cd with no argument always returns you to your home directory. This is very useful if you are lost in the file system.
1.5 Pathnames
pwd (print working directory)

Pathnames enable you to work out where you are in relation to the whole file-system. For example, to find out the absolute pathname of your home-directory, type cd to get back to your home-directory and then type

% pwd

The full pathname will look something like this -

/home/its/ug1/ee51vn

which means that ee51vn (your home directory) is in the sub-directory ug1 (the group directory),which in turn is located in the its sub-directory, which is in the home sub-directory, which is in the top-level root directory called " / " .

Unix File structure
Exercise 1b

Use the commands cd, ls and pwd to explore the file system.

(Remember, if you get lost, type cd by itself to return to your home-directory)
1.6 More about home directories and pathnames
Understanding pathnames

First type cd to get back to your home-directory, then type

% ls unixstuff

to list the conents of your unixstuff directory.

Now type

% ls backups

You will get a message like this -

backups: No such file or directory

The reason is, backups is not in your current working directory. To use a command on a file (or directory) not in the current working directory (the directory you are currently in), you must either cd to the correct directory, or specify its full pathname. To list the contents of your backups directory, you must type

% ls unixstuff/backups


~ (your home directory)

Home directories can also be referred to by the tilde ~ character. It can be used to specify paths starting at your home directory. So typing

% ls ~/unixstuff

will list the contents of your unixstuff directory, no matter where you currently are in the file system.

What do you think

% ls ~

would list?

What do you think

% ls ~/..

would list?
taken from :
http://www.ee.surrey.ac.uk/Teaching/Unix/

Building a Bluetooth network with Linux

 

About this document

Building a Bluetooth wireless network with Linux is easier than it may seem. This document is about connecting several computers in a TCP/IP network; it does not talk about other devices as phones, PDAs or printers.

Hardware

As a difference from WiFi hardware, where Linux support is a nightmare (blame the hardware companies, that keep their crappy specifications as military secrets), Bluetooth hardware support is pretty complete; you have a plethora of cheap and easy to find hardware in its USB or PCMCIA variants. See the complete list.

In my particular case, I've bought two Conceptronic CBT100U USB dongles (the ones with a little antenna), and a Conceptronic CBT100C PCMCIA card. All of them are on the Class1 family, with a maximum range of 100 meters; more than enough for my home.

I wanted to connect just two machines, a headless server and a laptop; I suppose this document applies to networks having more nodes (didn't try).

Software

The server runs Debian Linux with a 2.4.x kernel, and the laptop, Debian Linux with a 2.6.x. I compiled all Bluetooth options in the kernel as modules, and installed the following packages on both machines:

 bluez-hcidump - Analyses Bluetooth HCI packets
bluez-pcmcia-support - PCMCIA support files for BlueZ 2.0 Bluetooth tools
bluez-pin - Bluetooth PIN helper with D-BUS support
bluez-utils - Bluetooth tools and daemons
libbluetooth1 - Library to use the BlueZ Linux Bluetooth stack
bluez-firmware - Firmware for Bluetooth devices

Configuration

As a first step, I tried with the CBT100C USB dongles. Just by inserting them, hotplug detected them and loaded all the appropriate modules; after that, I could run the hcitool scan command on either system, and in some seconds both found each other.

The PCMCIA was a bit more complicated; this particular model needs the hciattach command to be ran after the serial_cs module from pcmcia tools is loaded, but the bluez-pcmcia-support Debian package didn't have the necessary information for it to work. So, after a bit of investigation, I needed to add the following to the /etc/pcmcia/bluetooth.conf file:

 card "Conceptronic CBT100C Bluetooth"
version "PCMCIA", "Bluetooth Card", "", ""
manfid 0x0279, 0x950b
bind "serial_cs" class "bluetooth"

This way, the pcmcia stack can recognize the card as a Bluetooth one, and run the /etc/pcmcia/bluetooth helper script.

But this was not sufficient; though correctly detected, the command didn't work as expected. Digging in the http://www.bluez.org mailing list archives (a very interesting source of information), I got the exact arguments to add to hciattach, so I patched the /etc/pcmcia/bluetooth script substituting the line

    /usr/sbin/hciattach $DEVICE $MANFID 

with

    sleep 5 ; /usr/sbin/hciattach $DEVICE bcsp

I found the 'sleep 5' also necessary; don't know of a good reason.

Running a TCP/IP stack over this mess

All this work is just to stablish a link layer; over that, we have to create a TCP/IP stack to use our favourite programs.

Bluetooth networks are structured in a similar manner as the WiFi ones; there are ad-hoc (point to point) and access point / clients topologies. See the Personal Area Network HOWTO for all the gory details. I decided to run my server as a NAP (Network Access Point) and my laptop as a PANU (PAN User).

The daemon that builds an interface (that will be managed by good old ifconfig) is called pand. On Debian, you can tweak /etc/defaults/bluez-utils to select running pand on startup; I configured it on my server this way:

 /usr/bin/pand -s -M --role=NAP

And on my laptop:

 /usr/bin/pand --role PANU --search --persist --encrypt

I found the --persist necessary; the connection between pairs is slow (almost one minute) and, without that argument, pand surrenders in a short number of seconds.

When the connection is stablished, pand creates the bnep0 interface. You can use ifconfig to configure that interface the same as eth0 and friends, so you can manually set IPs to each one, and after that, you have a working TCP/IP network.

I found rather tricky to make this network to correctly configure on startup; I filled a 'stanza' in /etc/network/interfaces for each one but, whenever the pand daemons in both machines made the connections, the interfaces didn't automatically go up. Finally, I found somewhere on the Internet the solution; when pand decides the bnep0 is ready, it executes the /etc/bluetooth/pan/dev-up script, that didn't exist on my system. I created it with the following:

 #!/bin/sh
ifup bnep0

And now everything sets up automatically.

Authorization and encryption

Bluetooth allows traffic to be encrypted and connections be established using a rudimentary, PIN based authorization. When asked for authorization and encryption, the whole system (as installed from Debian) didn't work reliably; sometimes, an X11 window was popped up asking me for the PIN; other times, it failed miserably without warning. Though I always have an X11 session opened, I don't like spurious windows popping up asking me for passwords; it seems to me like an invitation to security intrusions. Fortunately, the bluez people added a hook to change the PIN requester program; what I wanted, and probably everyone of you do, is to store the PIN to connect to your server somewhere and feed it to the underlying system whenever needed. So, I modified the /etc/bluetooth/hcid.conf config file this way:

 
# PIN helper
# pin_helper /usr/bin/bluez-pin;
pin_helper /usr/local/sbin/mypin

and created /usr/local/sbin/mypin, containing

 #!/bin/sh
PIN=`cat /etc/bluetooth/pin`
echo "PIN:$PIN"

This is only needed on the client; the server seem to find the PIN in /etc/bluetooth/pin without problems. Also, and though you'll see in examples everywhere 4 number PINs, it seems they can be arbitrarily long, so use longer strings.

Now all that I want is to get rid of the mandatory bluez-pin Debian package, that carries all X11 libraries and crappy GNOME stuff into my headless server for a /usr/bin/bluez-pin program that will never be called.

I don't know if Bluetooth encryption is really secure or is a joke; I don't even know if network packets are really travelling encrypted. But the line of faith must be drawn somewhere.

Hack to serve DHCP to Bluetooth clients

DHCP leases are useful from a sysadmin point of view: you can forget about maintaining boring lists of IPs and make interfaces configure themselves. Bluetooth networks aren't different, so you can set your dhcpd to serve IPs for your bnep clients (if authorization is active, they are served only to PIN-authenticated clients, so you can feel relatively safe). One caveat; bnep0 does not exist until a connection is established, and dhcpd refuses to monitor interfaces that don't exist. Even more, if the interface disappears because of a connection loss, dhcpd surrenders and stop listening to it. So, I had to add this hack to /etc/bluetooth/pan/dev-up in my access point server, that also serves as DHCP server:

 #!/bin/sh
ifup bnep0

# hack to force dhcpd to serve IPs on bnep0
/etc/init.d/dhcp3-server restart 2>&1 > /dev/null

Hope it's obvious; when the interface appears, the dhcp3-server is restarted so it always find a usable network interface to serve DHCP leases on.

taken from :
http://triptico.com/software/bluetooth.html


UNIX Introduction

What is UNIX?

UNIX® License PlateUNIX is an operating system which was first developed in the 1960s, and has been under constant development ever since. By operating system, we mean the suite of programs which make the computer work. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops.

UNIX systems also have a graphical user interface (GUI) similar to Microsoft Windows which provides an easy to use environment. However, knowledge of UNIX is required for operations which aren't covered by a graphical program, or for when there is no windows interface available, for example, in a telnet session.
Types of UNIX

The Linux PenguinThere are many different versions of UNIX, although they share common similarities. The most popular varieties of UNIX are Sun Solaris, GNU/Linux, and MacOS X.

Here in the School, we use Solaris on our servers and workstations, and Fedora Linux on the servers and desktop PCs.
The UNIX operating system

The UNIX operating system is made up of three parts; the kernel, the shell and the programs.
The kernel

The kernel of UNIX is the hub of the operating system: it allocates time and memory to programs and handles the filestore and communications in response to system calls.

As an illustration of the way that the shell and the kernel work together, suppose a user types rm myfile (which has the effect of removing the file myfile). The shell searches the filestore for the file containing the program rm, and then requests the kernel, through system calls, to execute the program rm on myfile. When the process rm myfile has finished running, the shell then returns the UNIX prompt % to the user, indicating that it is waiting for further commands.
The shell

The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password, and then starts another program called the shell. The shell is a command line interpreter (CLI). It interprets the commands the user types in and arranges for them to be carried out. The commands are themselves programs: when they terminate, the shell gives the user another prompt (% on our systems).

The adept user can customise his/her own shell, and users can use different shells on the same machine. Staff and students in the school have the tcsh shell by default.

The tcsh shell has certain features to help the user inputting commands.

Filename Completion - By typing part of the name of a command, filename or directory and pressing the [Tab] key, the tcsh shell will complete the rest of the name automatically. If the shell finds more than one name beginning with those letters you have typed, it will beep, prompting you to type a few more letters before pressing the tab key again.

History - The shell keeps a list of the commands you have typed in. If you need to repeat a command, use the cursor keys to scroll up and down the list or type history for a list of previous commands.

Files and processes

Everything in UNIX is either a file or a process.

A process is an executing program identified by a unique PID (process identifier).

A file is a collection of data. They are created by users using text editors, running compilers etc.

Examples of files:

* a document (report, essay etc.)
* the text of a program written in some high-level programming language
* instructions comprehensible directly to the machine and incomprehensible to a casual user, for example, a collection of binary digits (an executable or binary file);
* a directory, containing information about its contents, which may be a mixture of other directories (subdirectories) and ordinary files.

taken from :
http://www.ee.surrey.ac.uk/Teaching/Unix/unixintro.html