วันศุกร์ที่ 28 กุมภาพันธ์ พ.ศ. 2557

File: build.txt

The Waf build system is used to build ns-3.  Waf is a Python-based
build system (http://www.freehackers.org/~tnagy/waf.html)

Note:  We've added a wiki page with more complete build instructions
than the quick ones you find below:
http://www.nsnam.org/wiki/Installation

=== Installing Waf ===

The top-level ns-3 directory should contain a current waf script, so
there is no need to have WAF installed in the system.  We are using
some extensions to WAF, which can be found in the 'waf-tools'
directory. The upstream location for these WAF extensions is:

    https://code.launchpad.net/~gjc/waf/cmd


=== Building with Waf ===

To build ns-3 with waf type the commands from the top-level directory:
 1. ./waf configure [options]
 2. ./waf

To see valid configure options, type ./waf --help.  The most important
option is -d <debug level>.  Valid debug levels (which are listed in
waf --help) are: "debug" or "optimized", with debug being default.  It is
also possible to change the flags used for compilation with (e.g.):
CXXFLAGS="-O3" ./waf configure.  By default, ns-3 is built as debug code,
with examples and tests disabled, and with python bindings enabled.

[ Note:  Unlike some other build tools, to change the build target,
the option must be supplied during the configure stage rather than
the build stage (i.e., "./waf -d optimized" will not work; instead, do
"./waf -d optimized configure; ./waf" ]

The resulting executables and libraries are placed in build/.

Other waf usages include:
---------------------------------------------------------------------

วันเสาร์ที่ 16 พฤศจิกายน พ.ศ. 2556

Install lte : ns2 simulator

Ubuntu 10.04.3 :
sudo apt-get install g++-4.1 
------------------------------------------------------------------
tar -xzvf ns-allinone-2.33.tar.gz
------------------------------------------------------------------

cd ns-allinone-2.33/tk8.4.18/
wget ftp://ftp.swin.edu.au/gentoo-portage/dev-lang/tk/files/tk-8.4-lastevent.patch

------------------------------------------------------------------
The program 'patch' is currently not installed.  You can install it by typing:

sudo apt-get install patch
------------------------------------------------------------------
&& patch -p0 < tk-8.4-lastevent.patch
&& cd ../  && export CC=gcc-4.1 CXX=g++-4.1

######################################
sudo apt-get install autoconf automake libxmu-dev
######################################

&& ./install

########################################
sudo gedit ~/.bashrc

------------------------------------------------------------------
Add these lines to your bashrc file. Replace “your directory” with the installation directory of your ns2 program.

############# NS2 ##########################################
#environment values for NS2/NAM
# LD_LIBRARY_PATH
OTCL_LIB=/home/ns2/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/ns2/ns-allinone-2.33/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/ns2/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/ns2/ns-allinone-2.33/bin:/home/ns2/ns-allinone-2.33/tcl8.4.18/unix:/home/ns2/ns-allinone-2.33/tk8.4.18/unix
NS=/home/ns2/ns-allinone-2.33/ns-2.33/
NAM=/home/ns2/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM
#########################################################

------------------------------------------------------
source ~/.bashrc
########################################

&& cd ns-2.33/ && mv ns ns233
&& make clean
&& mv Makefile Makefile.org

---------------------------------------------------------------------------------
sudo apt-get install subversion
--------------------------------------------------------------------------------

&& svn checkout http://lte-model.googlecode.com/svn/trunk/ lte-model-read-only && mkdir project && cd lte-model-read-only/
&& sh checkin
&& cd ../project/
&& ln -s ../lte-model-read-only/*.h .

-------------------------------------------------------------------------
.... Where the period ( . ) means the current directory.
-------------------------------------------------------------------------
&& ln -s ../lte-model-read-only/dlqueue.cc && cd ../  

Edit the new Makefile in ns-allinone-2.33/ns-2.33/ ,  lines 41, 67, 82 to actual location. ( I.e all : /root/ns-allinone.... to : <your-path>/ns-allinone.... ).( 8 times edit.) ... And lines 36 - 37 to :  CC = gcc-4.1 CPP = g++-4.1 
... And now you can run make in ns-allinone-2.33/ns-2.33/
, and hopfully get a workable 'ns' ( ns works OK here.) ( Better make a backup : cp ns ns-LTE ).  .
-------------------------------------------------------------------------

After that, use this command to list installed gcc in your Ubuntu:

ls /usr/bin/gcc*
and use this command to check which is default:

gcc -v
-------------------------------------------------------------------------


sudo gedit /etc/apt/sources.list
deb http://mirrors.us.kernel.org/ubuntu/ lucid main universe
sudo apt-get update

-------------------------------------------------------------------------
sudo apt-get install openssh-server

วันศุกร์ที่ 15 พฤศจิกายน พ.ศ. 2556

ASCII codes table - Format of standard characters



ASCII

Hex

Symbol

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
TAB
LF
VT
FF
CR
SO
SI

ASCII

Hex

Symbol

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US

ASCII

Hex

Symbol

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
(space)
!
"
#
$
%
&
'
(
)
*
+
,
-
.
/

ASCII

Hex

Symbol

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?

ASCII

Hex

Symbol

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O

ASCII

Hex

Symbol

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^
_

ASCII

Hex

Symbol

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F
`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o

ASCII

Hex

Symbol

112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F
p
q
r
s
t
u
v
w
x
y
z
{
|
}
~




INFO: http://ascii.cl/