Friday, July 27, 2012

Dynamic Kernel Module Support  (DKMS)


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


https://wiki.kubuntu.org/Kernel/Dev/DKMSPackaging

dkms.png


看來 Dell 在這方面跟Canonical已經做了不少努力 http://linux.dell.com




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
Devices:
 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
Bluetooth http://www.bluetooth.org/Building/HowTechnologyWorks/
Bluetooth http://www.dziwior.org/Bluetooth/index.html 
SUSE LINUX Bluetooth  http://www.novell.com/documentation/suse91/suselinux-adminguide/html/ch08s04.html

Bluetooh Testing
BlueTooth要怎麼進測試模式要怎麼搞-3 http://ggyytony0921.blogspot.tw/2011/09/bluetooth-3.html
Bluetooth HCI Data format http://kunyichen.wordpress.com/2006/11/28/bluetooth-hci-data-format/


Upstart

Ubuntu把init換成upstart已經一段時間了...

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:


http://upstart.ubuntu.com/cookbook/
https://wiki.ubuntu.com/ReplacementInit
https://help.ubuntu.com/community/UbuntuBootupHowto
http://netsplit.com/2006/08/26/upstart-in-universe/

其他相關project Mac OSX Launchd http://launchd.macosforge.org/trac/
Fedora systemd http://www.freedesktop.org/wiki/Software/systemd/
OpenRC (Gentoo/BSD) http://www.ohloh.net/p/openrc
Sabayon Linux http://en.wikipedia.org/wiki/EINIT

Why systemd? http://0pointer.de/blog/projects/why.html