發表文章

目前顯示的是 1月, 2015的文章

MAC OS X 10.10 minicom USB to serial 安裝

1. 下載 minicom 2.7 https://alioth.debian.org/projects/minicom/ 2.解開後 ./configure (我的安裝時說automake需要安裝Xcode,就安裝先囉) make sudo make install 3. 上usb-to-serial cable網站我的chip是PL2303 -> 系統偏好設定>安全性與隱私>允許安裝 查詢我的設備是tty.usbserial ls -1 /dev/tty .* /dev/tty.usbserial  4.執行minicom -s 設定> Serial port setup -> A - Serial Device: /dev/tty.usbserial -> F - Hardware Flow Control: NO 選: save setup as dfl  -> 發現錯誤 sudo mkdir /usr/local/etc -> sudo chmod 777 /usr/local/etc nailed it!!!

Linux VLAN 筆記

圖片
Linux VLAN 筆記  kernel 開啟802.1q功能後,便可以透過簡單指令,設定VLAN.  brctl delif br0 ath0 brctl delif br0 eth0 vconfig add ath0 555 vconfig add eth0 555 ifconfig ath0.555 up brctl addbr br555 brctl addif br555 ath0.555 brctl addif br555 eth0.555 ifconfig ath0.555 up ifconfig eth0.555 up ifconfig br555 10.0.0.11 up Wireless AP mode運作正常,抓無線封包有看到帶了VLAN ID 555. 不幸的是,我的Wireless STA,不能成功ping到我的AP,只好下去看程式,這邊有幾個部份要看.  1. Linux kernel 802.1q  2.Wireless driver.(我手邊的是Atheros proprietary LSDK driver,所以這部份內容都不會放上來)  3.hostapd跟wpa_supplicant.    Linux的net_dev是用一個list串起來,每個net_dev都有會呼叫ev_queue_xmit ->dev_hard_start_xmit ,去傳送封包至下一步。  vlan.c::vlan_proto_init()時會invoke,dev_add_pack(&vlan_packet_type);  static struct packet_type vlan_packet_type __read_mostly = {         .type = cpu_to_be16(ETH_P_8021Q),         .func = vlan_skb_recv, /* VLAN receive method */ }; vlan_packet_type()宣告了, type是8021q(0x8100)封包接收時是由它來使用vlan_skb_recv()處理。