參考文件: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月29日 星期日
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
遍查網路上相關的網友討論,得知這是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
2013年11月5日 星期二
Thunderbird的Lightning同步Google Calendar的問題
這是前陣子發生的事情,印象中是某次更新後,就無法由Lightning裡面管理行事曆的新增/移除。除此之外還會不斷的要求輸入帳號密碼。解決方式很簡單,直接將Lightning移除/Thunderbird重開/重新安裝Lightning就好了。
2013年3月28日 星期四
SOCKS4 Server安裝方式 in Debian(Howto for SOCKS4 Server in Debian)
因為需要架設socks4的server(在公司電腦需要轉接才能連接網際網路),網路上可以找到的資料很少再加上看到這篇的
關係(要閱讀socks設定的文件對新手而言是有困難的不是嗎?),就研究了一下相關資料。其實以前曾找過但放棄了(socks主機大概很少人需要,相關
資料太少),這次再嘗試終於成功了。我測試過的套件有tsocks
、socks4-server、dante-server。其中設定檔看來最簡單的是socks4-server,只可惜無法成功,最後反而是看來設定檔
比較複雜的dante-server成功了。以下是相關步驟及說明:
1.安裝dante-server
#apt-get install dante-server
2.編輯設定檔
#vi /etc/danted.conf
我成功運作SOCKS4 Server的設定檔如下,以刪除多餘#標記起來的說明以利閱讀。範例中我的Server有兩個ip分別負責接受連線(192.168.1.78)以及往外連線(192.168.1.9)。
# the server will log both via syslog, to stdout and to /var/log/lotsoflogs
#logoutput: syslog stdout /var/log/lotsoflogs
logoutput: stderr
# The server will bind to the address 10.1.1.1, port 1080 and will only
# accept connections going to that address.
#internal: 10.1.1.1 port = 1080
# Alternatively, the interface name can be used instead of the address.
#logoutput: syslog stdout /var/log/lotsoflogs
logoutput: stderr
# The server will bind to the address 10.1.1.1, port 1080 and will only
# accept connections going to that address.
#internal: 10.1.1.1 port = 1080
# Alternatively, the interface name can be used instead of the address.
#設定socks主機對內接受連線之網卡的ip及port
internal: 192.168.1.78 port = 1080
# all outgoing connections from the server will use the IP address
# 195.168.1.1
internal: 192.168.1.78 port = 1080
# all outgoing connections from the server will use the IP address
# 195.168.1.1
#設定主機對外連線往網際網路之網卡的ip
external: 192.168.1.9
# list over acceptable methods, order of preference.
# A method not set here will never be selected.
#
# If the method field is not set in a rule, the global
# method is filled in for that rule.
# methods for socks-rules.
method: none #rfc931
# methods for client-rules.
clientmethod: none
# when doing something that can require privilege, it will use the
# userid:
user.privileged: proxy
# when running as usual, it will use the unprivileged userid of:
user.notprivileged: nobody
# If you compiled with libwrap support, what userid should it use
# when executing your libwrap commands? "libwrap".
user.libwrap: nobody
# This is identical to above, but allows clients without a rfc931 (ident)
# too. In practise this means the socksserver will try to get a rfc931
# reply first (the above rule), if that fails, it tries this rule.
external: 192.168.1.9
# list over acceptable methods, order of preference.
# A method not set here will never be selected.
#
# If the method field is not set in a rule, the global
# method is filled in for that rule.
# methods for socks-rules.
method: none #rfc931
# methods for client-rules.
clientmethod: none
# when doing something that can require privilege, it will use the
# userid:
user.privileged: proxy
# when running as usual, it will use the unprivileged userid of:
user.notprivileged: nobody
# If you compiled with libwrap support, what userid should it use
# when executing your libwrap commands? "libwrap".
user.libwrap: nobody
# This is identical to above, but allows clients without a rfc931 (ident)
# too. In practise this means the socksserver will try to get a rfc931
# reply first (the above rule), if that fails, it tries this rule.
#設定內部網路可連線socks主機的ip及port
client pass {
from: 192.168.1.0/24 port 1-65535 to: 0.0.0.0/0
}
# everyone from our internal network, 10.0.0.0/8 is allowed to use
# tcp and udp for everything else.
client pass {
from: 192.168.1.0/24 port 1-65535 to: 0.0.0.0/0
}
# everyone from our internal network, 10.0.0.0/8 is allowed to use
# tcp and udp for everything else.
#設定內部網路可連接socks主機的ip及協定
pass {
from: 192.168.1.0/24 to: 0.0.0.0/0
protocol: tcp udp
}
pass {
from: 192.168.1.0/24 to: 0.0.0.0/0
protocol: tcp udp
}
將上述設定檔完成後,重新開啟dante-server(#/etc/init.d/danted restart)就可以接受連線了,像我的Bitcoin錢包的軟體就設定成socks4連線方式是:
- IP:192.168.1.78
- port:1080
- socks協定版本:4
寫完收工~
Because the need to set up the socks4 the server (on company my computer needs an adapter to connect the Internet)and Novice reading the configuration is more difficult is not it?, i studied the relevant information. Previously actually looked, but gave up (probably very few people need information related to) this attempt finally succeeded. I tested the package tsocks, socks4-server, dante-server.socks4-server's configuration file seems to be the easiest , but unfortunately can not be successful, last but seems more complex configuration dante-server successful. The following is the relevant steps and instructions:
1.install dante-server
#apt-get install dante-server
2.edit configuration
#vi /etc/danted.conf
SOCKS4 Server successful operation the following profile, to facilitate the reading to remove the extra # mark up. Example my Server the two ip responsible accept connections (192.168.1.78) out connections (192.168.1.9).
# the server will log both via syslog, to stdout and to /var/log/lotsoflogs
#logoutput: syslog stdout /var/log/lotsoflogs
logoutput: stderr
# The server will bind to the address 10.1.1.1, port 1080 and will only
# accept connections going to that address.
#internal: 10.1.1.1 port = 1080
# Alternatively, the interface name can be used instead of the address.
#logoutput: syslog stdout /var/log/lotsoflogs
logoutput: stderr
# The server will bind to the address 10.1.1.1, port 1080 and will only
# accept connections going to that address.
#internal: 10.1.1.1 port = 1080
# Alternatively, the interface name can be used instead of the address.
#Set internal NIC connections of socks host ip and port
internal: 192.168.1.78 port = 1080
# all outgoing connections from the server will use the IP address
# 195.168.1.1
internal: 192.168.1.78 port = 1080
# all outgoing connections from the server will use the IP address
# 195.168.1.1
#Set host foreign connection to the Internet NIC ip
external: 192.168.1.9
# list over acceptable methods, order of preference.
# A method not set here will never be selected.
#
# If the method field is not set in a rule, the global
# method is filled in for that rule.
# methods for socks-rules.
method: none #rfc931
# methods for client-rules.
clientmethod: none
# when doing something that can require privilege, it will use the
# userid:
user.privileged: proxy
# when running as usual, it will use the unprivileged userid of:
user.notprivileged: nobody
# If you compiled with libwrap support, what userid should it use
# when executing your libwrap commands? "libwrap".
user.libwrap: nobody
# This is identical to above, but allows clients without a rfc931 (ident)
# too. In practise this means the socksserver will try to get a rfc931
# reply first (the above rule), if that fails, it tries this rule.
external: 192.168.1.9
# list over acceptable methods, order of preference.
# A method not set here will never be selected.
#
# If the method field is not set in a rule, the global
# method is filled in for that rule.
# methods for socks-rules.
method: none #rfc931
# methods for client-rules.
clientmethod: none
# when doing something that can require privilege, it will use the
# userid:
user.privileged: proxy
# when running as usual, it will use the unprivileged userid of:
user.notprivileged: nobody
# If you compiled with libwrap support, what userid should it use
# when executing your libwrap commands? "libwrap".
user.libwrap: nobody
# This is identical to above, but allows clients without a rfc931 (ident)
# too. In practise this means the socksserver will try to get a rfc931
# reply first (the above rule), if that fails, it tries this rule.
#Set intranet connections socks host ip and port
client pass {
from: 192.168.1.0/24 port 1-65535 to: 0.0.0.0/0
}
# everyone from our internal network, 10.0.0.0/8 is allowed to use
# tcp and udp for everything else.
#Set the internal network can be connected the socks host ip protocolclient pass {
from: 192.168.1.0/24 port 1-65535 to: 0.0.0.0/0
}
# everyone from our internal network, 10.0.0.0/8 is allowed to use
# tcp and udp for everything else.
pass {
from: 192.168.1.0/24 to: 0.0.0.0/0
protocol: tcp udp
}
SOCKS4 Server successful operation the following profile, to facilitate the reading to remove the extra # mark up. Example my Server the two ip responsible accept connections (192.168.1.78) out connections (192.168.1.9).
- IP:192.168.1.78
- port:1080
- socks protocol :4
Finish...
bitcoin:1CFLQP293jMDd2PJfaAnzQQHvdMD7oAB1J
bitcoin:1CFLQP293jMDd2PJfaAnzQQHvdMD7oAB1J
2013年3月24日 星期日
使用PDF creator將多個檔案合併成一個PDF的教學
需下載PDFCreator(http://sourceforge.net/projects/pdfcreator/)
因為有不少朋友問道如何將數個PDF合併成一個或是如何將不同檔案轉成一份PDF,眾所皆知的最方便的是以Adobe
Acrobat standard來作(reader不行),但畢竟一般人並不需要那麼多功能且得花上不少錢,最後我都是建議朋友用PDFCreator來作。PDFcreator安裝完後會
產生一台虛擬印表機PDFCreator,選擇該印表機後按照正常方式按列印就會出現對話視窗,下面連結是我幫朋友做的教學,需要的請下載。
教學文件請按此下載 。
訂閱:
文章 (Atom)