Wednesday, December 24, 2014

汽車音響破解 - 冒充六片式 CD 換片夾

舊式的汽車CD音響無法外接音源怎麼辦?
剛好我的是 Sony CD 音響,Google 一陣子之後,我發現 Sony CD 音響當初有配套措施可以外接CD換片夾或是外接音源 XDA-1000 , 不過都太貴,然後我發現一個專有名詞 Sony Unlink 線。
其實我有發現汽車音響背後有 Bus Audio In 的雙 AV 端子接頭,但是我插上 AV 端子轉耳機街頭,機上手機後卻無法播放手機的音樂,所以我推測這台 CD 音響需要某些控制訊息來告知。
 
所以我去買了 Sony Unlink 線,基本上就是欺騙 Sony CD 音響有接上CD換片夾,然後再透過 AV 端子轉耳機接頭,就可以從手機播放音樂了。
 
如果你的是其他廠牌的汽車音響,我想也有類似的破解線存在,等著你去找到它買回來用。
 

 

 
-Skyter


Sunday, January 26, 2014

Fedora 20 安裝筆記


Virtual Box

   Downloading the newest Virtual Box from offcial site, ex.VirtualBox-4.3-4.3.4_91027_fedora18-1.i686.rpm
    Run "rpm -ihv libpng15" before install

    Install kernel headers by the following
    Googling kernel-PAE-devel-3.11.6-301.fc20.i686.rpm (or run "uname -r" of the kernel to get version)

    Install "Software Development Group" packasges from Software center
    sudo yum groupinstall 'Development Tools

    rpm -ihv VirtualBox-4.3-4.3.4_91027_fedora18-1.i686.rpm
    I've meet Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again.  Stop    This is because lacks of kernel headers , you can run "ls -al /usr/src/kernels" to make sure kernel header location , then run
     "sudo KERN_DIR=/usr/src/kernels/3.11.6-301.fc20.i686+PAE/ /etc/init.d/vboxdrv setup"


    下載最新的 Virtual Box , 例如 VirtualBox-4.3-4.3.4_91027_fedora18-1.i686.rpm
    安裝前要先 rpm -ihv libpng15

    安裝 kernel headers
    網路上尋找 kernel-PAE-devel-3.11.6-301.fc20.i686.rpm (或是uname -r 對應的kernel 版本)

    安裝 Software Development Group 套件
    sudo yum groupinstall 'Development Tools

    rpm -ihv VirtualBox-4.3-4.3.4_91027_fedora18-1.i686.rpm
    我有遇過 Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again.  Stop
     這是缺少 kernel headers , 可以透過觀察 ls -al /usr/src/kernels 來確認 kernel header 的位置 , 確認後可以透過
     sudo KERN_DIR=/usr/src/kernels/3.11.6-301.fc20.i686+PAE/ /etc/init.d/vboxdrv setup


VMware Player
    After downloading vmware player, you need
         sudo yum groupinstall 'Development Tools

VLC

    關閉防火牆, 暴力法
    iptables -F
    iptables -F -t mangle
    VLC
    sudo rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
    sudo yum install vlc
    sudo yum install mozilla-vlc
    播放超過 2048x1536 Rtsp Stream MJPEG 會出現 XVideo 的警告訊息是正常的


Wireshark

    sudo yum install wireshark wireshark-gnome
    Wireshark 會擷取系統網路卡封包, 所以會使用到 root 才有的權力. 解決方式是透過
    sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/sbin/dumpcap
    以及把 加進 wireshark group, 因為 Fedora 19 的帳號設定被簡化了, 所以要另外安裝套件來設定使用者
    yum install system-config-users ,執行後選擇對應帳號的<屬性> -> <群組>,勾選 wireshark.

    
    記得系統一定要重開機再執行 wireshark -> capture interfaces 才會列出可選擇的網路卡, 因為不曉得如何登出 Fedora , 所以只能重開機.

Minicom

    請參考 Ubuntu 那篇


Synergy

    要在防火牆內打開 24800 port, 不過既然我已經 iptables -F and iptables -F -t mangle (Flush all rules) , 那就別管了.

HC-05 藍牙 COM 配對
    光是用控制台裡面的藍牙配對, 他並不會幫你新增 COM Port , 我在這邊是參考 Ubuntu 新增 HC-06 的文章
    先新增 bluez.i686 : Bluetooth utilities 套件,才會有 /etc/bluetooth/rfcomm.conf 可以修改
    sudo yum install -y bluez
    以及這篇
    sudo yum install -y gpsd gpsd-clients
    之後可以先在控制台新增 HC-05 以便觀察紀錄 MAC 位址,或者是
    hcitool scan
    有機會看到
    vim /etc/bluetooth/rfcomm.conf 新增下列
rfcomm0 {
# Automatically bind the device at startup
bind yes;

# Bluetooth address of the device
device 00:00:09:11:02:55;

# RFCOMM channel for the connection
channel 1;

# Description of the connection
comment “HC-05 Com Port”;
}
    重開機無效,所以手動新增
    rfcomm  bind rfcomm0 00:00:09:11:02:55
    然後用 minicom -D /dev/rfcomm0 -b9600  -c on -m 開啟
     另一邊用 sudo minicom -D /dev/ttyUSB0 -b9600 -c on -m 開啟

 

遠端 VNC 遙控

You need to install vino to enable Desktop Sharing.
yum install vino
Desktop Sharing can be configured by running Desktop Sharing Preferences or start vino-preferences as a normal user.
By default vino will run on port 5900. Don't forget to allow vnc-server in the firewall configuration.
Update for Fedora 20: screen sharing can be enabled at System Settings > Sharing.
The port can be changed by running dconf-editor as a normal user, browse to org > gnome > desktop > remote access. Here you can enter an alternative port at alternative-port and check use-alternative-port.
Again don't forget to allow the ports in the firewall configuration. I find it the easiest to edit vnc-server service and add the appropriate ports.


3D Printing

yum install
RepetierHost
slic3r
cura
inkscape
openscad
meshlab
blender

rpm -ihv 
netfabb



Arduino

yum install arduino

YouTube

You have to google:youtube html5 in your firefox browser, and setup to use HTML5 instead, otherwise the full screen mode doesn't work (Due to crapped flash plugin).

 

NVidia Display Card

My card is NVS 295, from the supported list the driver 331 should support this card, but after tested, I found only 304 driver supproted.
I also reference this article to install nvidia driver
So I use the following command to install driver (it's tricky to pick the right kmod correponding to kernel version).

  #yum install kmod-nvidia-304xx-3.12.10-300.fc20.i686+PAE xorg-x11-drv-nvidia-304xx-libs

The articale mentions grub2 gfx mode and plymouth theme, these were not needed to be installed.

Blender

Why I change to use NVidia driver instead of original nouveau is because:
Blender for Fedora under nouveau, the face selection is wrong, blender will pick random wrong face, the ticket ID is here, object selection wrong face


VNC

Disable require-encryption key, otherwise iPad app Jump Desktop can't connect with.
gsettings list-recursively|grep -i Vino
gsettings set org.gnome.Vino require-encryption false
It's obviously Jump Desktop can't support security type = 18 (TLS), so after manually disable require-encryption, Jump will use security type 1 to connect(I guess plaion text).


winetricks


#wget http://winetricks.org/winetricks
#chmod 755 winetricks
#mv winetricks /usr/bin/
#sudo vim /usr/share/zenity/zenity.ui
Goto line 1021
Adding the '+' line
in
+ True
 
From the bug commit page, the zenity ui settings is needed to be patched, otherwise the winetricks vertical rows were not expanded. 
https://git.gnome.org/browse/zenity/commit/?id=80bc8ce643979fec201c4ebd5cd6405b6310357f