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

Sunday, December 13, 2009

新出爐的好物-pitz (issue tracker)

如果你用過ditz,又信大蟒教...
那一定覺得缺了點什麼,沒錯...
可以參考 Ditz versus bugs everywhere 跟 分布式缺陷跟踪系统Bug Everywhere,修正并打包版 , 這兩篇的比較
剛好都是跟Bugs Everywhere比...

但是Matt Wilson 太神了..
比著比著就自己寫一套出來啦 pitz

就...本人的開箱經驗(2hr)
功能性還蠻完整的
be 有一個自己的libbe+turbogears的web ui 也是用python的,但不知道為什麼就是慢的離譜
pitz 更神 藉由ipython 讓一個task就是一個object, web 也差不多了,
有互動介面CLI可以使用,也有類似git pitz-xxx 一堆的指令可以用
看名字就知道 仿 ditz 很兇, 以YAML為底,另外搭配了許多現成的專案,
mock, clepy, IPython,PyYAML,sphina,nose,jinja2,Tempita,

不過目前似乎 似乎還不多人用
整體架構相當不錯...推

如果問我為什麼不用trac就好...除了 Distributed 的優點不說...
trac實在太慢了...慢到都不想發issue了...

Tuesday, May 20, 2008

USB 開機

原來設定UUID 很簡單嘛...
有了UUID 隨身碟隨便插,才不會混亂
稍微計一下吧...
下面那篇文章,從debootstrap 整個USB 的開機都寫的很詳細

http://www.debian-administration.org/users/figjam/weblog/3

Monday, November 12, 2007

小白來啦...再見了小黑

自從小黑被聯想併購以後,
就不是很想買小黑...
雖然還是很不錯...

最近eee pc出來以後...
就一直有衝動,要買一台來玩...

恩...小白...應該說小小白...
實在太小了...
滿足我愛小台機的需求...

如果你說螢幕太小,趕快接上一顆外接螢幕,外接鍵盤,外接滑鼠
運算太慢,可以搭配remote來用
硬碟太小,趕快使用sshfs來搭配,簡單又方便,安全又沒顧慮

還有...skype linux版終於可以用webcam了...
在用eee pc的webcam時候後記得先
sudo echo 1 > /proc/acpi/asus/camera
不知道為什麼華碩要預設關起來...
可能為了省電吧...:)

Tuesday, October 23, 2007

令人感動得雙螢幕

之前一直以為是我driver的問題...
自從換了ubuntu之後,真的太讚了...

在一開使設定的時後可能會有一些問題
因為預設的 screen 不夠大,
所以必須在 xorg.conf 中加上


SubSection "Display"
Viewport 0 0
Depth 24
Virtual 2560 1024
EndSubSection

> xrandr --output DVI-0 --right-of DVI-1
> xrandr: screen cannot be larger than 1280x1200
> (desired size 2304x1024)

xrandr --output VGA-0 --mode 1280x1024 --right-of LVDS

把新的畫面接到 右邊

Tuesday, October 16, 2007

是開始美麗還是開始哀愁

再一次聽qerter講latex,
雖然他一再強調他不是基本教義派
卻再次燃燒我學latex的心情,

最主要看到latex有很強的include功能,
這樣可以減少我寫文章copy來copy去的問題...
沒錯,事情可以如果做的好,做一次做很久是值得的...
如果同樣一件事要做很多次,那就不符合懶的標準

呼,寫一些小script,看起來latex挺perfect的..:)

話說...我用powerdot,不知道為什麼,pdf出來就是變一半,
qerter 給我一句使用Open Source的忠言,其實只有一個字
"等"

沒錯,就是他,
但是...我想我應該沒時間等了,所以我就挑了另外一套叫做beamer的
也參考http://yhsung.tw/wordpress/tag/beamer/
做了一個屬於lab meeting的template,其實也不算template
應該算基本的layout...

往BIBTEX邁進

Thursday, September 13, 2007

XD 我被r00ted了

打ls出現這個

ls: unparsable value for LS_COLORS environment variable

先把coreutils重裝

糟糕...還是不知道有沒有防掉

http://www.anqn.com/article/a/2007-07-21/a0984277-2.shtml

Monday, September 10, 2007

咖啡罐通訊協定 ? (HTCPCP)

真妙的協定,基於HTTP1.1
http://www.ietf.org/rfc/rfc2324.txt

Hyper Text Coffee Pot Control Protocol
還1998年就出來了耶
(主要以HTTP實做類似SNMP的協定)

只是不知道有沒有廠商支援...:p

Saturday, September 8, 2007

原來HTTP還能這樣跑

有關Persistent Connections部份的資料

HTTP 連線管理
http://ihower.idv.tw/blog/archives/1517

Managing TCP Connections under Persistent HTTP
http://www8.org/w8-papers/5c-protocols/policies/policies.html

part of Hypertext Transfer Protocol -- HTTP/1.1
RFC 2616 Fielding, et al.
8 Connections
http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html

Wednesday, July 4, 2007

rst2latex 暴力法中文輸出

docutils真是不錯用的東西,
rst2latex可以輸出成latex,再轉成pdf

然而,latex的中文一直困惑著我...
到現在還是搞不清楚怎麼加字型或是其他比較炫的功能
我只好用簡單的rst轉latex,真的很暴力...

哈哈...真是救我一命

下面有輸出的效果http://140.130.25.161/hg/book/rst2latex_zh/raw-file/33e3319ba149/README_zh.pdf

暴力法程式下載
http://140.130.25.161/hg/book/rst2latex_zh/archive/tip.zip

Monday, June 25, 2007

好像可以拿來當WebCam Streaming

之前chihchun有用過IceCast 可以好像只有聲音,嗯...太久了我也忘了

一直想找東西來做Streaming 似乎 VideoLAN 可以做到
先記起來,有空再來弄

http://www.videolan.org/doc/vls-user-guide/en/index.html
http://www.linux.com/base/ldp/howto/VideoLAN-HOWTO/x1074.html

Tuesday, June 19, 2007

Vim reStructured Text

看來真是不賴的東西
用vim來編rst

http://skawina.eu.org/mikolaj/vst.html
http://edt1023.sayya.org/vim/vst/

文件裡面又有介紹轉html,pdf,latex等

Saturday, June 9, 2007

有趣的webcam

這兩天都在玩webcam
發現有幾隻好玩的應用

amsn與kopete 這兩個我應該不用介紹了
就是玩msn有影像的

但是lab這支Logitech似乎與他們的顯示模式不合
amsn有看到但是黑白
kopete則是雜訊

gnomemeeting的表現不錯,不過windows的不知道好不好設定

還有webcam,呵呵我是用來傳圖的,可以設定秒數傳圖到主機




昨天跟老弟有聊到

他說他們隔壁lab有人專門在做
用攝影判斷影像
然後說可以判斷到比賽得分之類的好神呀
嗯嗯...有下面這個程式有機會做到那樣...

http://motion.sourceforge.net/

Friday, June 8, 2007

webcam起來吧

呼...連試了兩隻webcam
兩隻都把driver弄起來
但...影像咧= =

一隻UMAX,sonix 小辛他們家的晶片
小辛說這個版本的不是他做的
阿阿阿,我要寫小辛寫的...:p
感覺上很多人用,也進到kernel裡面了

http://www.linux-projects.org/modules/news/
http://www.linux-projects.org/modules/mydownloads/viewcat.php?cid=2
目前已經出到 sn9c1xx-1.46 看起來也蠻活躍的

一隻是INTOPIC是Ali 的晶片
在 https://sourceforge.net/projects/m560x-driver/

至於...我什麼時候可以把webcam弄起來
ㄜ...加油吧...:p

Wednesday, June 6, 2007

用rst寫論文

不知道哪根經想到突然很想用docutils/ReStructuredText 來寫論文跟技術文件
用一用發現很直覺
XD不知道是不是自己笨還是懶,latex想學卻一直弄不起來
還有rst,呼...終於有機會不用word寫論文
不然我看我要用word寫論文應該會死的很難看吧

docutils 文件也很豐富 step by step 做沒什麼大問題

http://docutils.sourceforge.net/docs/index.html

再搭配http://gpl.internetconnection.net/vi/
javascript vi,那還需要wiki嗎? :p

Wednesday, May 30, 2007

終於又可以 hibernate 了

記得去年很得意的跟黃大哥炫耀我的hibernate後,
由於之前的suspend2都需要patch kernel

kernel 2.6.17後 有另外一個userspace 的解決方案
http://suspend.sourceforge.net/
讚的啦....

當然還要做 initramfs
mkinitramfs -o ~/tmp/initramfs-$(uname -r)
呼...比起去年實在太簡單了

我愛OpenSource

Truly delete

昨天立達報告 emulab
這篇論文 An Experimentation Workbench for Replayable Networking Research
裡面有提到 emulab,目前計畫將Experimentation可以重製化

在裡面立達提到以Truly delete 來刪掉這些重製化的動作
當然emulab團隊使用的是subversion來處理這件事

不過立達這個講法,讓我想到,對呀...版本控制裡面真正刪除也是很重要的
哈哈...果然水銀沒讓我失望
有個Extension purge
試試他吧PurgeExtension

哈哈...該不該跟emulab團隊說,換掉subversion,用mercuial吧...:p
mercuial 95% 用python寫,對於模組化的使用應該很有幫助
阿咧,不過我應該是打打嘴砲啦...

Mercurial的權限問題

老實講這不算問題,
對於我用Mercurial目前幾乎都是在單人的情況下
但是其實要變成多人很簡單
可以靠 SSH / HTTP / File
當然核心是File ,
設為是同一個群組,File你必須使用chmod -R g+ws .hg
將.hg 裡面的data改變為群組可寫

還有一個很重要的觀念
基本上mercurial以pull為主
push基本上為centralize的觀念

mercurial wiki裡有提到pull為主的好處為
  • it's easier to review the work that's being pulled in before merging
  • it's easier to time or reorder merges for testing or deployment
  • no concept of permissions is needed
  • everything is atomic, no need to wait for locks

細節在下面
http://www.selenic.com/mercurial/wiki/index.cgi/MultipleCommitters?highlight=%28Permission%29

http://kalug.linux.org.tw/~shawn/notes/hg-quickstart/Mercurial.html