Google 工程師在 Amazon 上對 Type C USB 線的評論

先前提到「Google 工程師在 Amazon 上留下對 USB-C 線的精彩評價...」,後來這位工程師 Benson Leung 寫了更多的評價出來,在「Amazon.com: Profile for Benson Leung」這邊可以看到。

可以看到大量的線被打了兩顆星,不過還是少數有幾條線測過了:

35 條只過了 6 條,看起來狀況不太好啊 XDDD

Benchmark DAC2 HGC 在 Ubuntu 14.04 LTS 下使用 USB 沒有聲音的問題

記得剛買來的時候是有聲音的,後來突然有一天沒聲音... 試了一堆方法都沒用 (換 kernel 版本、禁用 xHCI、換 USB 線、...),最後是在「Benchmark DAC2 HGC impressions (and Linux setup notes)」這邊看到方法。

這邊有幾個重點:

DAC2's USB 1.0 mode doesn't work with Linux kernel 3.8.x, but USB 2.0 does. So switch it to USB 2.0 and forget about it. Next, I figured that the audio was simply being muted in some instances. The solution is to open a terminal window, run AlsaMixer, hit F6 to configure the DAC 2. Even though their levels cannot be altered (they're fixed at 00), the first two items must be unmuted in order to get any sound:

如同文章裡說的,USB 1.0 模式 (會抓到「Benchmark DAC2 USB Audio 1.0」) 是不會動的,而 USB 2.0 可以 (會抓到「Benchmark DAC2 USB Audio 2.0」),但播放時沒有聲音。

解法則是使用 alsamixer,進入後按 F6 選 Benchmark DAC2,將前面兩個用 m 給 unmute 掉就好了:

為此學到一堆底層看 USB 的工具...

為 Open Source Hardware 發放 USB Product ID 的 pid.codes

pid.codes 的說明就很清楚了:「Welcome to pid.codes」。

由於 USB-IF 對每個 vendor 收 USD$5000,而且不可以跟其他單位共用:

If you’re a maker, hobbyist, or startup company producing your own USB device, you’ve probably discovered that you need a USB Vendor ID and Product ID to uniquely identify your device to computers. The USB-IF’s position is that the only way to do this is for each organisation to pay $5000 for a unique Vendor ID, which they may not share with other individuals or organisations.

所以就造成很多人惡搞 Vendor ID 與 Product ID:

For many makers and small companies, this is a prohibitive amount of money, and forces them to resort to workarounds, such as using other organisations' VIDs without permission, or simply making up a VID and PID. These solutions make things worse for everyone, by damaging the assumption that a VID/PID combination is unique to a given device.

而他們尋求解決方案,取得了一份在 USB-IF 禁止共用前的 Vendor ID,從而解決這個問題:

pid.codes seeks to solve this issue for anyone producing open-source hardware. We have been gifted a Vendor ID by a company that was issued one by USB-IF and has since ceased trading; they obtained the Vendor ID before the USB-IF changed their licensing terms to prohibit transfers or subassignments.

對 Tor 的攻擊開始了...

先前幾天 Tor 官方才猜測會被攻擊 (Tor 官方預測將會被攻擊),在今天的 Hacker News Daily 就看到有機器被扣:「[tor-talk] Warning: Do NOT use my mirrors/services until I have reviewed the situation」。

Tonight there has been some unusual activity taking place and I have now lost control of all servers under the ISP and my account has been suspended. Having reviewed the last available information of the sensors, the chassis of the servers was opened and an unknown USB device was plugged in only 30-60 seconds before the connection was broken. From experience I know this trend of activity is similar to the protocol of sophisticated law enforcement who carry out a search and seizure of running servers.

偵測到機器被打開,並且插入 USB device,接下來失去對機器的控制權。

很特別的 Side-channel attack 方法以取得 RSA 與 ElGamel 的 private key

在「A new Side channel attack-how to steal encryption keys by touching PCs」這邊看到一種很特別的 side-channel attack:(直接先看圖)

引用說明:

The signal can also be measured at the remote end of Ethernet, VGA or USB cables.

方法愈來愈特別了 XDDD

GPS logger:環天的 DG-100...

24h 上買了這顆「DG-100 GPS 數據紀錄器」,然後在 VirtualBox 裡吃鱉了好幾次,所以還是整理一下,讓之後的人比較好辦事 XD

用過的兩顆 GPS logger 都是用 Prolific 的 PL2303 系列晶片,透過 Serial port 的架構溝通,所以 Ubuntu 下會抓到 /dev/ttyUSB0 這種界面。

由於我的目的比較簡單,只要可以抓 gpx 資訊給我就好,後來在 OpenStreetMap 的 wiki 上找到「Globalsat」的資訊,發現了 GPSBabel 這個軟體可以直接在 Mac OS XLinux 下抓 DG-100 的資料:

gpsbabel -i dg-100,erase=0 -f /dev/ttyUSB0 -o gpx -F "track.gpx"

(話說 GPSBabel 的網站感覺回到十年前...)

看指令,如果指定 erase=1 的話就會清掉記錄?另外在 Mac OS X 下則是指定 /dev/cu.PL2303 開頭的 device。

抓下來以後丟到 Dropbox,然後到世界迷霧裡更新,發現就算是已經跑到爛掉的路線,GPS logger 仍然可以記錄到 iPhone 記錄不到的...

差點重灌 Ubuntu...

UbuntuUnity 在 11.04 很不穩,常常跑一跑就自己變得很慢,或是當掉... 在公司裡蠻多用 Ubuntu 的人是不用 Unity,不過我還是堅持用,反正也用習慣了...

剛剛又變得很慢,於是就把 browser 關一關重開機,結果重開機後進入登入畫面就當住了,滑鼠與鍵盤都沒反應... XD

多重開幾次後發現只要碰到 keyboard 就會當,滑鼠的部份沒問題。先懷疑是 keyboard 硬體有問題,換成 ACK-230 後還是一樣,跑 memtest86+ 半輪也沒問題 (8GB RAM 跑起來還真久,跑到 43% 沒問題就不想測了),於是就試著 recovery mode 看看,發現鍵盤是正常的...

然後就試著死馬當活馬醫,先 dpkg -l | grep usb 把所有 usb 相關的套件全部用 apt-get install --reinstall 重裝,然後再把 gdm 也重裝進去,順便跑 fsck 清一下,重開後居然活過來了...

也不知道問題到底是出在哪裡... :o

Ubuntu 上跑 VirtualBox 連接 USB 裝置...

Ubuntu 10.10 系統內的 VirtualBox 是 OSE 版本 (Open Source Edition),先到 VirtualBox 官方網站下載對應的 deb 檔:「Download VirtualBox for Linux Hosts」,像我的電腦是跑 10.10 amd64 版本。

接下來是把系統內的 VirtualBox 移除:

apt-get purge virtualbox

移除完畢以後將剛剛下載的 deb 檔安裝進系統:(後面的檔名自己變更)

dpkg -i virtualbox-4.0_4.0.4-70112~Ubuntu~maverick_amd64.deb

然後把自己加到 vboxusers 這個 group 內 (我是直接改 /etc/group),改完後重新登入,然後:

  • 在 Guest OS 關機狀態下,設定允許讓 Guest OS 使用的 USB 裝置。
  • 將 Guest OS 內的 Windows XP 開機後,安裝 VirtualBox 提供的 Guest Additionals。

接下來就可以用 IE 到網路銀行安裝 ActiveX,然後測試讀卡機是否正常運作...