顯示具有 Linux 標籤的文章。 顯示所有文章
顯示具有 Linux 標籤的文章。 顯示所有文章

2015年12月23日 星期三

Broadcom BCM943142HM Bluetooth A2DP on Ubuntu15.10

Wifi:
Just install the restricted drivers

Bluetooth:(Alternative Link)
Method 1.
                a. Download Bluetooth hcd
                b. sudo cp "xxx.hcd" /lib/firmware/brcm/BCM.hcd
                c. sudo modprob -r btusb
                d. sudo modprob btusb
Method 2.
                a. Try to get BCMxxx.hex from windows OS(C:\windows\system\driver)
                b. git clone git://github.com/jessesung/hex2hcd.git
                c. cd hex2hcd
                d. make
                e. ./hex2hcd BCMxxx.hex BCM.hcd
                f. sudo cp "BCM.hcd" /lib/firmware/brcm/
                g. sudo modprob -r btusb
                h. sudo modprob btusb


PS: 12/24  測試A2DP(參考),Ubuntu建議安裝blueman, pavucontrol
由於我是使用Ubuntu gnome以及Pulseaudio因此其他DM我不確定是否也能使用步驟2,3
1. sudo apt-get install blueman, pavucontrol

2. sudo vim /var/lib/gdm/.config/pulse/client.conf (沒有的話直接新增)
    然後將以下內容貼上:
    autospawn = no                                                       
    daemon-binary = /bin/true

3. sudo chown gdm:gdm /var/lib/gdm/.config/pulse/client.conf
    (看你用哪種DM就試試看改成你使用的(把gdm改掉))

4. sudo vim /etc/pulse/default.pa
    新增:
    load-module module-switch-on-connect

完成後一定要重新開機,並且使用blueman來連線,使用pavucontrol改聲音設定


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
另一個解法(source):
Edit the file:
/etc/pulse/default.pa
and comment out (with an # at the beginning of the line) the following line:
#load-module module-bluetooth-discover
now edit the file:
/usr/bin/start-pulseaudio-x11
and after the lines:
   if [ x”$SESSION_MANAGER” != x ] ; then
        /usr/bin/pactl load-module module-x11-xsmp “display=$DISPLAY session_manager=$SESSION_MANAGER” > /dev/null
    fi
add the following line:
    /usr/bin/pactl load-module module-bluetooth-discover
This way the Pulse audio’s Bluetooth modules will not be downloaded at boot time but after x11 is started.

2013年12月31日 星期二

使用no-ip申請域名讓浮動IP也能架設網站

一般架設網站使用固定IP可以減少很多不便,但是一般家庭網路如果再申辦網路的時候沒有特別要求,通常都會是浮動IP,這對於想在家中架設簡單的伺服器或是網站的時候回有許多的不便。

目前有許多網路公司有提供域名的服務,可以實現DDNS,不過大部分都是要付費的,在沒有經費許可下我選擇使用no-ip提供的免費域名將就使用。

Step1. 到no-ip網站註冊http://www.noip.com/

Step2.點選Host/Redirects增加一個域名

  • Hostname隨便打
  • Host Type 一般使用第一個
  • IP Address應該會自動偵測你所在的網路對外的IP


Step3.


  • 沒有IP分享器,或套件庫有noip2
如果網路環境是望路線直接連上internet可以參考這篇的作法(安裝noip2)
http://spyker729.blogspot.tw/2011/03/ubuntu-no-ip.html


  • 使用IP分享器(使用ddclient)
你所使用的IP分享器需要有支援DDNS的功能,而且還需要有支援no-ip的登入,如果沒有的話就試試Dyndns的方式登入。(我使用的是TP-link TL-WR1043)

本機電腦安裝ddclient

  • 設定ddclient
打開 /etc/ddclient.conf



# /etc/ddclient.conf

protocol=no-ip
use=web, web=checkip.dyndns.com/
server=dynupdate.no-ip.com
login=mylogin                      #輸入noip的帳號
password='mypassword'              #輸入noip的密碼
myhost.no-ip.biz                   #輸入預先設定的HOST全名
然後在命令列下
service ddclient restart重新啟動