2013年12月29日 星期日

藍牙無線滑鼠偶而無法使用 in ArchLinux

參考文件:https://wiki.archlinux.org/index.php/bluetooth

最近偶而會發現藍牙無線滑鼠沒有反應,研究出來原因是藍牙裝置沒有啟動。
先安裝bluez-utils套件後,可能會顯示藍牙裝置沒啟動如下。
[linus@arch-nb ~]$ sudo hciconfig
[sudo] password for linus:
hci0: Type: BR/EDR  Bus: USB
 BD Address: 24:0A:64:AD:5B:84  ACL MTU: 1022:8  SCO MTU: 183:5
 DOWN
 RX bytes:1094 acl:0 sco:0 events:54 errors:0

 TX bytes:768 acl:0 sco:0 commands:54 errors:0

啟動藍牙裝置:

[linus@arch-nb ~]$ sudo hciconfig hci0 up

此時應該就OK了。


ARCHLINUX:Errors and Solutions  of LinusHSAO#1

Error:
Bluetooth mouse sometime does not work。

Analyze:
first,install package"bluez-utils",then
[linus@arch-nb ~]$ sudo hciconfig
[sudo] password for linus:
hci0: Type: BR/EDR  Bus: USB
 BD Address: 24:0A:64:AD:5B:84  ACL MTU: 1022:8  SCO MTU: 183:5
 DOWN
 RX bytes:1094 acl:0 sco:0 events:54 errors:0

 TX bytes:768 acl:0 sco:0 commands:54 errors:0

This error maybe because of the bluetooth device hci0 is down.

Solution:
[linus@arch-nb ~]$ sudo hciconfig hci0 up


2013年12月23日 星期一

關於「SIOCSIFFLAGS: Operation not possible due to RF-kill」的解法

安裝了ARCHLINUX後對於她的簡潔哲學感到很欣賞,玩了幾天剛好手賤做了關閉WIFI的動作"#ifconfig wlp3s0 down"之後,竟然發現無法開啟無線網路介面,取而代之的是錯誤訊息"SIOCSIFFLAGS: Operation not possible due to RF-kill",之後幾天都無法使用無線上網。

遍查網路上相關的網友討論,得知這是NB的熱鍵切換功能導致,例如我的NB以FN+F2就能on/off無線網路介面的功能,而我做的動作"#ifconfig wlp3s0 down"等同於以熱鍵切換網卡至off。

查了一下才發現這問題國外網友也發生過不少同樣狀況,但他們的解法通常集中在移除無線網卡module,以rfkill去unblock,這方法對我的欣NB而言無效。我的想法是(1)軟體切換(2)讓該熱鍵切換的功能失效。最後終於找到這個網頁。

http://karim-ouda.blogspot.tw/2011/11/wifi-now-disabled-by-radio-killswitch.html

裡頭提到了我上述的第2種想法,直接disable掉熱鍵管理的功能。真的查到asu_wmi這個module的載入。不過網頁中所說的rmmod該模組對我來說因為相依性的關係所以無法移除。強制移除相關模組後以rfkill all檢查還是顯示hard:yes。最後參考他的作法,設定asus_wmi模組無效化,重新開機就成功了。

不過要注意的是如果直接依他的方式在/etc/modprobe.d/blacklist.conf裏面加入「blacklist asus_wmi」是無效的,因為還有其他module需要它所以還是會被載入,正確方式是讓他載入失效。也就是要在blacklist.conf裏面加上「install asus_wmi /bin/false」。

接著就#rfkill unblock all

相關說明https://wiki.archlinux.org/index.php/Kernel_modules

解決收工~

---------------

Errors and Solutions  of LinusHSAO#1

Error:

WiFi now disabled after "#ifconfig wlp3s0 down", "#rfkill unblock all" not work。


Analyze:

This error maybe because of the function"hotkey switch" of my asus laptop.

In this case you will get "Hard blocked: yes " when you execute this command

 rfkill list

0: tpacpi_bluetooth_sw: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
2: acer-wireless: Wireless LAN
    Soft blocked: yes
    Hard blocked: no3:
phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

I found "acer_wireless" ,this may be the reason.

Solution:

The solution is to do the following

1- sudo gedit /etc/modprobe.d/blacklist.conf

2- add the following line @ the end of the file .

install acer_wmi  /bin/false