2016年2月19日 星期五

CSThreshold, RXThreshold in ns2

複製下來當備份 XD
原文沒有斷行, 好難閱讀 QQ


from http://mailman.isi.edu/pipermail/ns-users/2004-June/043128.html

 
Well, it is actually the other way. RXthreshold and CSthreshold are inherent 
properties of the card (that depends on modulation/demodulation, among other 
things). So for usual commercial cards, CSThreshold is considered to be about
-90dBm (exact numbers are usually not released by the manufacturers). 
RXThreshold depends on the packet size. In my experience, -65 dBm is sufficient 
to decode very large packets (about 2000 byte) with very low probability of error; 
for very small packets, even -80 dBm may be enough. Also remember that these 
are not parameters of the card; meaning that you cannot control them. 
It just so happens that the card can reliably detect carrier only when 
the power is more than -90dBm; same with the packet.

threshold.cc actually calculates what should the RXThreshold be if you "want" 
the receive range to be 250m (or whatever is the distance). The same program 
will tell you what the CSThreshold should be if you want the carrier sense 
range to be 550m (which should be around -90 dBm). So it is simply provides 
a way to "cheat" in the simulation. In other words, if you want to simulate 
a situation where the RX-range is 400m and CSrange is 450m, using threshold.cc 
you can set the RXthresh_ and CSThresh_ appropriately, but that does not 
mean that there exists a physical card which will have those values of RX 
and CS thresholds.

2016年2月9日 星期二

用script 執行ns2 & 載入 lib

好難下標題&解說.....

就當作是給自己看的!? XDDD

好處就是可以在電腦上安裝多個不同版本的ns2


#!/bin/bash
export PATH=/bin:/sbin:/usr/bin:/usr/sbin

NS2_FOLDER=/ns2/ns-allinone-2.34.ubuntu

export PATH=$PATH:$NS2_FOLDER/bin:$NS2_FOLDER/tcl8.4.18/unix:$NS2_FOLDER/tk8.4.18/unix

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NS2_FOLDER/otcl-1.13:$NS2_FOLDER/lib

export TCL_LIBRARY=$TCL_LIBRARY:$NS2_FOLDER/tcl8.4.18/library

/ns2/ns-allinone-2.34.ubuntu/ns-2.34/ns $@



2016年2月8日 星期一

ns2 的 GOD

好像該開始學ns3了... (離題 XD)


在tcl裡, 會有這個參數
set god_ [create-god $val(nn)]

這邊的god全名是 General Operations Director

這個網頁有GOD的介紹
http://www.mathcs.emory.edu/~cheung/Courses/558/Syllabus/18-WirelessSim/intro.html

以下是那個網頁提到的內容 (貼過來順便當備份)

"God (General Operations Director) is the object that is used to store global information about the state of the environment, network or nodes that an omniscent observer would have, but that should not be made known to any participant in the simulation."
  • Currently, the God object stores:
    • the total number of mobilenodes
    • a table of shortest number of hops required to reach from one node to another.
  • The next hop information is normally loaded into god object from movement pattern files, before simulation begins.That is because calculating this on the fly during simulation runs can be quite time consuming.

2016年2月3日 星期三

ath9k_htc 的意思 XD

這個htc, 不是那個htc喔 XDDD

HTC - host target communications

Responsible for:
    Communication between host and target
    Registering services. For example WMI, RX, TX, Beacon...
    Routing messages to services
    credits system.


https://github.com/qca/open-ath9k-htc-firmware/wiki/HTC

2016年2月2日 星期二

用 curl 上傳資料到 ftp 裡面

本地端有一個 file5566.py
然後要上傳到 ftp 裡面的 /upload 裡面

語法:
curl -T file5566.py ftp://username:password@ftp.ip.address/upload/

2016年2月1日 星期一

用 command line 設定 wifi 密碼

最近都在用TTL控制PI, 不能使用圖形介面來設定wifi
 
後來發現其實也蠻簡單的(!?)
 
去修改 /etc/wpa_supplicant/wpa_supplicant.conf 這個檔案
然後再最後面加上這些  
 
network={
    ssid="your_AP_essid"
    psk="your_password"
}
 
修改完後, 再重新啟動網路
sudo /etc/init.d/networking restart

然後就連上了 XD
 
https://kerneldriver.wordpress.com/2012/10/21/configuring-wpa2-using-wpa_supplicant-on-the-raspberry-pi/