Friday, July 27, 2012

Dynamic Kernel Module Support  (DKMS)

Dell有一個project 叫 Dynamic Kernel Module Support  (DKMS)
讓update module變得更簡單...


看來 Dell 在這方面跟Canonical已經做了不少努力

Wednesday, July 25, 2012

Bluetooh on Ubuntu

Bluetooth is a standard for the short-range wireless interconnection of cellular phones, computers, and other electronic devices. In Linux, the canonical implementation of the Bluetooth protocol stack is BlueZ.

BlueZ, included with the official Linux kernel distributions, initially developed by Qualcomm.

Host Controller Interface

Device address 
$ hcitool dev
 hci0 7C:E9:D3:B8:17:6E

Every Bluetooth device has a unique 48-bit BD_ADDR (Bluetooth Device Address), which is divided into three fields:
most significant
NAP(Non-significant Address Part),16 bits.}These 24-bits are the manufacturer's company_id / OUI (Organizationally Unique Identifier), allocated by the IEEE. For example, Rohde & Schwarz's is 0x0090B8.
UAP(Upper Address Part),8 bits.
LAP(Lower Address Part),24 bits.These 24-bits are a serial number assigned by the manufacturer.
least significant

service discovery protocol (SDP)

$ sdptool browse A8:6A:6F:04:21:2E

Logical link control and adaptation protocol (L2CAP)
$ l2ping A8:6A:6F:04:21:2E

Bluetooth Wireless Technology Profiles

At a minimum, each Bluetooth profile contains information on the following topics:
  • Dependencies on other profiles
  • Suggested user interface formats.
  • Specific parts of the Bluetooth protocol stack used by the profile. To perform its task, each profile uses particular options and parameters at each layer of the stack and this may include, if appropriate, an outline of the required service record.

Bluetooth Introduction
SUSE LINUX Bluetooth

Bluetooh Testing
Bluetooth HCI Data format



Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running.

基於NIH Utility Library來實作. libnih is a small library for C application development containing functions that, despite its name, are not implemented elsewhere in the standard library set.

Starting a Service
# Traditional:
/etc/init.d/myservice start
# Upstart
service myservice start

Stopping a Service
# Traditional: 
/etc/init.d/myservice stop
# Upstart
service myservice stop

Getting a list of Services
# Traditional:
ls /etc/init.d
# Upstart: 
service --status-all

Each job has a life-cycle which is shown in the graph below:

其他相關project Mac OSX Launchd
Fedora systemd
OpenRC (Gentoo/BSD)
Sabayon Linux

Why systemd?