TELKOM
NIKA Indonesia
n
Journal of
Electrical En
gineering
Vol.12, No.5, May 2014, pp
. 3578 ~ 35
8
5
DOI: http://dx.doi.org/10.11591/telkomni
ka.v12i5.4916
3578
Re
cei
v
ed O
c
t
ober 2
4
, 201
3; Revi
se
d Decem
b
e
r
16, 2013; Accept
ed Ja
nua
ry 5,
2014
A Networking and Data Transmission Mode of Mobile
Seismic Station
Junlei Song
*
, Ying Chen, Dianhon
g Wang
F
a
cult
y
of Mechan
ical & El
ectronic Informati
on,
Chi
na U
n
iv
ersit
y
of Geosc
i
enc
es, W
uhan
, China
*Corres
p
o
ndi
n
g
author, e-ma
i
l
: junl
eiso
ng@
gmail.c
o
m
A
b
st
r
a
ct
T
he netw
o
rkin
g an
d data tra
n
smissi
o
n
mo
de of the fi
eld
mo
bil
e
seis
mi
c station i
n
vol
v
es su
c
h
matters as ric
h
ness, real-ti
m
e
and effectiv
en
ess of se
is
mic
data. In this p
aper, w
e
pro
p
o
se a n
e
tw
orking
and d
a
ta tran
smiss
i
on
mo
d
e
w
i
th CAN bus and e
m
be
dde
d techn
o
lo
gy. In light of the effectiven
ess,
distanc
e, cost
and c
onstructi
o
n
rel
a
ting t
o
da
ta trans
mi
ssi
on
in the fi
el
d env
iron
me
nt, CAN
bus w
a
s util
i
z
e
d
to conn
ect the
scattered seis
mic c
o
ll
ection
nod
es, and th
e
embed
de
d
mi
croproc
essor
ARM w
a
s use
d
to
ma
na
ge
col
l
ect
i
on
no
des
w
i
thi
n
a
certa
i
n sc
o
pe. In
ad
diti
on,
both
the
multi
p
le
task
oper
ating
syste
m
Lin
u
x
and application fram
ework Q
t
were em
ploy
ed to construct a
s
e
is
m
i
c
net
work local
m
a
nagem
ent
system,
w
h
ich si
gnific
antly si
mplifi
e
d the
man
a
g
e
ment task
o
f
mo
bil
e
stati
on. Suc
h
n
e
tw
orking
and
dat
a
transmissio
n
mo
de sh
ow
s such features
as low
e
r co
st, easy construction, an
d hi
gher re
lia
bil
i
ty an
d
instanta
n
e
i
ty, also en
abl
es the
possib
ility of construc
tin
g
a mo
bil
e
col
l
ecti
on station w
i
th
larg
er scale.
Ke
y
w
ords
: sei
s
mic d
a
ta trans
miss
ion, CAN
bus, field co
mmu
n
ic
ation, AR
M, Linux
Copy
right
©
2014 In
stitu
t
e o
f
Ad
van
ced
En
g
i
n
eerin
g and
Scien
ce. All
rig
h
t
s reser
ve
d
.
1. Introduc
tion
At pre
s
ent, the ea
rthq
ua
ke predi
ction i
n
form
atio
n is mainly ba
se
d on th
e
sei
s
mic d
a
ta
acq
u
ire
d
by widely scattered sei
s
mi
c ob
servat
io
n stat
ions. With the
developme
n
t and expan
si
on
of
sei
s
mi
c ob
servatio
n stat
ion,
de
mand
for
real
-time perfo
rman
ce
and data qua
ntity
beco
m
e
s
highe
r a
nd hi
gher.
The
r
e
are
many m
o
bile ob
se
rvati
on
station
s
i
n
the field, i
n
addition
to t
h
e
fixed ones. M
obile ob
se
rva
t
ion station i
s
mainly
desi
g
ned for inte
nsive data ob
se
rvation withi
n
a
certai
n
peri
o
d of time and
a certai
n
regi
on
for
the purpose
of enhancing
moni
toring ability
and
anomaly traci
ng ability, a
s
well a
s
fo
r
co
llecting va
rio
u
s
kind
s
of p
h
ysical qu
anti
t
ies an
d fee
d
ing
them back to the netwo
rk
center [1]. In such a
ca
se, a
mobile statio
n woul
d alwa
ys be depl
oyed
with a
large
n
u
mbe
r
of
disp
ersed
coll
ecti
on n
ode
s.
While, on
the ot
her
han
d, ho
w to tran
smit
the
data from
su
ch scattered
collectio
n no
d
e
s to the
se
is
mic n
e
t
w
o
r
k i
s
on
e of
t
he
cru
c
ial f
a
ct
o
r
s t
o
the field mobi
le observatio
n
techn
o
logy.
In the compl
e
x field environment, it is unable to access ea
ch
colle
ction no
de to the
netwo
rk sepa
rately an
d the
gen
eral
ap
proach i
s
to
gat
her th
e
sam
p
l
i
ng n
ode
data
to the m
obile
station, an
d t
hen a
c
ce
ss to the n
e
two
r
k in
a
central
i
zed
way. Va
riou
s tra
n
smi
ssi
on m
ode
s
are
available for l
o
cal d
a
ta, so
the choice d
epen
ds
on
such fa
ctors a
s
the distan
ce, convenie
n
c
e,
reliability and cost. In this
paper, a control area network
(CAN) was employed as the
transmissio
n mode for sei
s
mic d
a
ta from mobile
o
b
se
rvation st
ation,
which coul
d meet the
requi
rem
ent of networkin
g comm
uni
cation for scat
tered colle
ction nod
es in
a relatively wide
scope.
2. Sy
stem Frame
w
o
r
k
Since
there a
r
e l
a
rg
e n
u
m
bers
of field
collect
io
n n
o
d
e
s
and
the
in
stallation
lo
ca
tions
are
quite scattered,
directly constructin
g
lo
cal
netwo
rk
conne
ction
be
tween
such
collectio
n no
d
e
s
and m
obile
station, no m
a
tter in
what
netwo
rki
ng m
ode,
will me
an mo
re i
n
ve
stment of l
a
b
o
r
force
a
nd
m
a
terial
re
so
urce
s a
s
well
as
heavie
r m
anag
ement
b
u
rde
n
on
th
e
mobil
e
station.
Therefore, b
a
s
ed
on the th
eory of relay station,
data
of colle
ction
node
s in a
certain a
r
e
a
a
r
e
gathered in t
he main
con
t
roller th
roug
h the bus m
ode, and the
n
tran
smitted
to the mobile
station,
with
system struct
ure as
sh
own in Fig
u
re 1
.
By using th
e dist
ribute
d
way, the
co
st of
con
s
tru
c
ting
netwo
rk fo
r colle
ction no
des i
s
re
d
u
ced. In addition, the main
controll
er
can
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
A Netwo
r
ki
ng
and Data T
r
a
n
sm
issi
on Mo
de of Mobile
Seism
i
c Station (Junlei So
ng)
3579
sup
p
lant pa
rtial function
s of the mobile stat
ion, man
age and mo
nitor coll
ectio
n
node
s in the
LAN, whi
c
h facilitates the construction
of
field mobile station of larger scale.
Figure 1. System
Structure
Diagram
The Controll
er Are
a
Network
(CA
N
) empl
oyed i
n
the sy
ste
m
is an IS
O se
rial
comm
uni
cati
on p
r
oto
c
ol,
can
effectivel
y sup
p
o
r
t th
e
dist
ribute
d
t
y
pe real-tim
e
co
ntrol
of
hi
gher
safety level.
Relative to
ot
her
bu
se
s, CAN bu
s
sh
o
w
s such a
d
vantage
s
as l
onge
r di
stri
b
u
tion
distan
ce, fa
ster
spee
d, automatic retran
sm
i
s
sion, and n
on-d
e
st
ru
ctive bus a
r
bit
r
ation
mechani
sm. The
protocol
is of
short frame st
ructure
with hi
gh anti-interference ability and
reliability, which can automatica
lly disconnect wrong
nodes from bus without affecting other
node
s o
n
the
bus [2, 3], a
pplicable to
the no
-ma
nne
d field e
n
viro
nment. In a
d
d
ition, CA
N b
u
s
just req
u
ire
s
simple tra
n
smissi
on medi
a so that
the bus ca
n be conve
n
iently wire
d with lo
we
r
co
st in the field.
3. CA
N Com
m
unication f
o
r Collection
Nodes
C54
se
ries
DSP from TI is sele
cted a
s
the main
cont
rol chip for
collectio
n nod
es. CA
N
comm
uni
cati
on nod
es
sh
o
u
ld be d
e
si
gn
ed on
DSP platform si
nce t
he chi
p
ha
s
no CA
N co
ntrol
port.
3.1. Design
of DSP-b
ase
d Transmiss
i
on Node
The in
depe
n
dent controlle
r MCP
251
5
with SPI port
is
sele
cted
a
s
the
bu
s co
ntrol e
nd.
The b
u
s tran
sceiver A
D
M
3054
is
utilized a
s
the
tra
n
sceiver.
The
chip
directly
integrates
b
o
th
the three
-
cha
nnel isolator
and the tran
sceiver,
therefore the co
upli
ng i
s
olati
on between
the
controlle
r a
n
d
tran
sceive
r is
sp
are
d
a
n
d
the vo
lta
g
e
level mat
c
hi
ng p
r
obl
em b
e
twee
n them
is
unde
r co
ntrol
[4], which in turn si
mplifies
the perip
heral
circuit desi
g
n
,
with its desi
gn diag
ram a
s
sho
w
n in Fig
u
re 2. A cry
s
tal oscillator
with stabl
e p
e
rform
a
n
c
e
must be p
r
ov
ided to en
sure the
reliability of bus communication.
Figure 2. Sch
e
matic Di
ag
ram of CAN B
u
s Node
TX
C
A
N
1
RX
C
A
N
2
C
L
KO
UT
3
TX
0
R
T
S
4
TX
1
R
T
S
5
TX
2
R
T
S
6
OS
C
2
7
OS
C
1
8
VS
S
9
RX
1
B
F
10
RX
0
B
F
11
IN
T
12
SC
K
13
SI
14
SO
15
CS
16
RE
S
E
T
17
VD
D
18
U1
M
C
P
251
5
1
2
Y1
C2
C1
R1
3V
3D
TX
C
A
N
RX
CA
N
S
P
IM
IS
O
SP
I
M
OS
I
SP
I
C
L
K
IN
T
SP
I
C
S
H
1
L
2
J1
LI
N
K
_
C
A
N
NC
1
GND
1
2
GND
1
3
VDD
2
S
NS
4
RX
D
5
TX
D
6
VDD
1
7
GND
1
8
GN
D2
9
VR
E
F
10
CA
N
L
11
CA
N
H
12
VD
D2
13
NC
14
NC
15
GN
D2
16
U2
A
D
M
305
4
TX
C
A
N
RX
CA
N
3V
3D
5V
D
C4
C5
C3
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 12, No. 5, May 2014: 3578 – 35
85
3580
DSP multi-channel buffered seri
al port
(McBSP) i
s
configured into SPI com
patible
mode, and e
a
ch fram
e ha
s fixed length
under t
he m
ode. While, si
nce the MCP
2515 SPI con
t
rol
comm
and le
n
g
th is not unif
o
rm, a comp
romise
solutio
n
is sel
e
cte
d
to configu
r
e
serial po
rts
with
the longe
st comman
d
digit
s
, namely 32
bits ea
ch fra
m
e.
Operation time matchin
g
is very important
durin
g communi
catio
n
in SPI mo
de. Since
DSP ha
s
a
work
clock freq
uen
cy far ab
ove SPI’s
tra
n
smi
ssi
on
clo
c
k fre
quen
cy,
suffici
ent d
e
l
a
y
is
req
u
ire
d
to
be a
dde
d d
u
ring
read
o
peration. Bo
th th
e pi
cture
(a)
and
(b
) in
Fig
u
re
3
sh
ows t
h
e
testing
by u
s
ing
the l
o
o
pba
ck mo
de
of
controlle
r: the tra
n
smi
tted 8-byte d
a
ta is
store
d
in
DataSen
d
digit group,
wh
ile the
value
acq
u
ire
d
by
SPI read
receive data
reg
i
ster is sto
r
e
d
in
Re
cvBuff digi
t grou
p. Fig
u
r
e 3
(
a
)
sho
w
s the
re
ad
o
peratio
n
with
out ad
ding
sufficient d
e
la
y,
rep
r
e
s
ente
d
in the dotted box, in which,
the read o
p
e
r
ation is
subj
ect to time warpin
g, pra
c
tically
the data sent
back by abo
ve comman
d
is read in cu
rre
nt read o
p
e
ration. Whil
e in Figure 3
(
b),
time corre
s
po
nden
ce i
s
achieved an
d the corre
c
t data
is read afte
r addin
g
suffici
ent delay.
3.2. Communication Str
a
teg
y
for Nod
e
s
CAN p
r
oto
c
ol complete
s add
re
ss co
ding fo
r me
ssag
es, fa
cilit
ates th
e ad
d
i
tion and
deletion of n
o
tes on the
bus. As ea
ch
node can o
n
ly commu
ni
cate with the
main cont
rol
l
er,
therefore CA
N message frame ID co
de
is utilized in this paper to
unify the identification code o
f
transmit fram
e, the nod
e a
nd of re
ceivin
g filter
at the
node, for i
n
st
anc
e, the me
ssage
se
nt b
y
No.01 n
ode
has th
e me
ssag
e identification co
de
0
1
, receiving t
he me
ssage
with identifica
t
ion
cod
e
0
1
o
n
ly. In additio
n
,
no me
ssag
e
filtering i
s
p
r
ovided
at the
main
co
ntrol
l
er. It is able
to
determi
ne wh
ich n
ode the
messag
e co
mes from by
readi
ng the
ID of the re
ceived me
ssa
ge,
with the co
mmuni
cation
strategy u
s
ed as
sh
own
in Figu
re
4. Such a d
e
sig
n
ha
s in
fact
conve
r
ted th
e bu
s to
polo
g
ical
structu
r
e into th
e
star-li
k
e
topol
o
g
ical
structu
r
e, facilitating
the
manag
eme
n
t and control of
all node
s.
Figure 3. Re
sult of Continu
ous
Rea
d
Op
erati
on
(a)
without Del
a
y (b
) with Sufficie
n
t Delay
Figure 4. Co
mmuni
cation
Strategy
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
A Netwo
r
ki
ng
and Data T
r
a
n
sm
issi
on Mo
de of Mobile
Seism
i
c Station (Junlei So
ng)
3581
Unli
ke many
MCUs, C5
4 seri
es
DSP has t
he minim
u
m length of stora
ge cell of 16-bi
t
[5]. When the
8-bit CA
N protocol i
s
u
s
e
d
for dat
a tra
n
smi
ssi
on, th
e necessa
ry data cutting
will
be re
qui
red.
Takin
g
the flo
a
ting-p
o
int nu
mber
as
an e
x
ample, the floating-
point n
u
mbe
r
is
store
d
by using 32
-b
it data, accou
n
ting for 2 memory ce
ll
s i
n
DSP, and 4 CAN co
ntroll
er data cells
are
requi
re
d for
storage,
a
s
sh
own
in
Figu
re 5. T
her
efore, the hi
ghe
r 8 bit
s
and
lo
wer 8
bits da
ta
sho
u
ld b
e
sel
e
cted
re
spe
c
t
i
vely, meanwhile re
co
mb
in
ing the d
a
ta
at the re
ceivi
ng termi
nal i
n
to
32-bit floating
-
point nu
mbe
r
.
Figure 5. Floating-p
o
int Transmi
ssion M
ode
4. Design of
Main Con
t
rol
l
er Node
Relative to collectio
n nod
es
with sim
p
l
e
tasks li
ke a
c
qui
sition a
n
d
pro
c
e
s
sing,
the main
controlle
r ha
s mo
re fun
c
tions, incl
udi
ng monito
rin
g
node, receiving and
d
i
spat
chin
g d
a
ta,
stora
ge,
h
u
m
an-com
puter intera
ction an
d
commu
ni
ca
ting with t
he
host
com
pute
r
, whi
c
h
is qu
ite
compl
e
x if si
ngle-ta
sk M
CU i
s
used,
while
be
co
mes
relativel
y
simple fo
r the multiple
task
operating
system. The
r
efo
r
e, em
bed
de
d micro
p
ro
ce
ssor A
R
M1
1
is
sele
cted
a
s
the
ha
rd
wa
re
platform of
main
controll
er. ARM
wit
h
ri
ch p
e
rip
h
e
ral inte
rfa
c
e
s
an
d ide
a
l
real
-time
con
t
rol
perfo
rman
ce
is su
pe
rior th
an the ordina
ry singl
e chi
p
machi
ne in t
he add
re
ssin
g spa
c
e
and
the
pro
c
e
ssi
ng p
e
rform
a
n
c
e, ideally se
rv
ed
as the sm
all control ce
nter.
4.1. CAN Ne
tw
o
r
k Dev
i
ce
Driv
er under Linux
The ke
rn
el of Linux 3.0.1 versio
n is tra
n
spl
anted to
the system a
s
the syste
m
platform
for software operation, whi
c
h w
ill provide a uniform interface fo
r dri
v
er. CAN equipments are not
simply define
d
as the character
d
e
vice
but the netwo
rk eq
uipm
ent
in the kern
el, more simil
a
r
to
the fact that CAN i
s
a LA
N. T
herefore, Socket may be used to
op
erate
CAN e
q
u
ipment, al
so
the
high-cla
s
s ne
tworking p
r
ot
ocol a
nd qu
e
ue provid
ed b
y
the kernel
can be u
s
ed.
In orde
r to i
m
pleme
n
t an
d reali
z
e th
e
hard
w
a
r
e
pl
atform, the
drive file M
C
P251
5
provide
d
with
ke
rnel
shou
ld be
modifi
ed. A
ll of th
e equi
pme
n
ts a
r
e
und
er
manag
eme
n
t by
defining the
mcp2
51x_p
ri
v struct
u
r
e, a
s
sh
own in Figure 6.
Figure 6. The
mcp25
1x_p
ri
v Structure
The
drive
r
m
odule
of n
e
twork e
quipm
en
t inclu
d
e
s
fou
r
laye
rs:
net
work p
r
oto
c
ol i
n
terface
layer, netwo
rk device inte
rface l
a
yer, d
e
vice
drive
r
functio
n
layer and the net
work devi
c
e
and
medium laye
r [6]. See Figure 7 for the
structu
r
al
relati
onship of ea
ch module i
n
the ke
rnel. Th
e
hard
w
a
r
e
lay
e
r
ope
ration
i
s
a
c
hi
eved
b
y
usin
g SPI
subsy
s
tem. Th
e b
r
idge
b
e
tween th
e n
e
twork
st
ru
ct
mcp
2
5
1
x
_priv
{
st
ru
ct
ca
n_p
ri
v
can;
stru
ct net_de
vice *net;
st
ru
ct
spi
_de
v
i
ce *spi;
……
};
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 12, No. 5, May 2014: 3578 – 35
85
3582
device a
nd S
P
I device is t
he drive
r
fun
c
tion laye
r, by which th
e u
nderlyin
g ha
rdwa
re o
peration-
interface function of network devic
e is provided to the uppe
r layer.
Whe
n
loadi
n
g
the drive
r
module, the
initia
lization f
unctio
n
call
s up the re
gi
stration
function
to
perfo
rm
regi
stration
a
n
d
initializ
ation
ope
ratio
n
f
o
r
251
5’s driver. Initialization
operation
will
not allow f
o
r inte
rru
pt appli
c
ation,
since it would
wa
ste the l
i
mited interru
p
t
resou
r
ces, un
favorable fo
r the reali
z
atio
n
of interrupt sharin
g me
cha
n
ism [7].
Figure 7. Driv
er Stru
cture
Relatio
n
Diag
ram
Both the “to
p
half” a
nd
“bot
tom half”
me
chani
sm i
s
u
s
ed to h
andl
e
with the i
n
terrupt and
solve the tim
e
-con
sumi
ng
probl
em e
n
c
ou
ntere
d
while re
ad
-writing SPI in the interrupt. S
u
ch
mech
ani
sm
s
allow the i
n
te
rru
pt p
r
og
ram
takin
g
a lo
ng
time to
op
erate in
a
safe
r pe
riod
so a
s
to
let the syste
m
timely respon
se to oth
e
r inte
rru
pt reque
st [7]. Therefo
r
e, the
work q
ueu
e
of
pro
c
e
ssi
ng fu
nction
in th
e
interrupt fun
c
tion is
only a
w
a
k
en
ed,
wh
ile allo
w the
true
processin
g
prog
ram o
p
e
r
ate in the work que
ue to en
sure the re
al-time perform
ance of syste
m
.
For o
p
e
r
ating
the drive
r
, th
e ne
ce
ssary
hard
w
a
r
e i
n
fo
rmation
sh
oul
d be
provid
ed
for the
kernel, therefore such hardware platform in
form
ation as the oscilla
tor frequency, SPI bus
numbe
r, hard
w
are interrup
t number
sho
u
ld be re
gi
ste
r
ed in the
kernel, among
which the d
e
vice
name mu
st b
e
identical to that defined
in the driv
er,
or the kern
el
woul
d be un
a
b
le to tran
sm
it
su
ch informat
ion to the driver.
4.2. Dev
e
lop
m
ent of
Con
t
rol Applica
t
ion Program Bas
e
d on Qt
Applicatio
n p
r
og
ram
in th
e mai
n
controller is
critical for
realizing
all cont
rol
fu
nction
s,
also the hu
man-com
pute
r
intera
ction
pla
tform. A good appli
c
ation frame
w
ork
can p
r
o
v
ide
desi
r
abl
e hu
man-com
pute
r
intera
ction
perform
an
ce, therefore, the cro
s
s-platform C++
appli
c
ation
d
e
velopme
n
t framework
Qt i
s
utili
zed
i
n
t
h
is pape
r
to
develop grap
hic user
i
n
terf
ace
prog
ram b
e
cause of its ideal
ada
ptabili
ty and portabi
lity.
Qt libra
ry of 4.8.0 versi
o
n
is tran
spl
ant
ed
in the
sy
stem, a
s
sho
w
n in Fi
gu
re
8. The
major a
ppli
c
a
t
ion frame
w
o
r
k is
con
s
tru
c
t
ed by usi
ng
wind
ow
widg
et class Q
W
i
dget. In additi
on,
to make the i
n
terface more intuitive, th
e prog
ram i
s
design
ed to
supp
ort the label form cl
ass
QTab
Widg
et. Meanwhile,
Socket CAN co
mmuni
ca
tion is re
ali
z
ed by multi
-
thre
ad si
nce
the
multi-thread mechani
sm will
not
a
ffect the response of user in
terface whil
e Qt program is
operating se
veral blo
cki
n
g
or rep
e
titive tasks.
The
child thre
ad
class Re
cv
Thrd i
s
main
ly
respon
sibl
e for monito
ring
CAN po
rt, tran
smitting d
a
ta to the main thre
ad via signal
- sl
ot
mech
ani
sm, and the ne
w thread ta
sk
may be load
ed ju
st by re
writing virtual
member fun
c
tion.
Similar to oth
e
r n
e
two
r
k protocol
ope
rat
i
ons,
So
cket CAN su
ppo
rts su
ch
maj
o
r
ope
ration
s a
s
so
cket esta
bl
ishme
n
t, bind
ing po
rt and
monitori
ng,
while the difference bet
wee
n
them is th
at
CAN
com
m
u
n
icatio
n requi
res no
conne
ction
with
the
partn
er,
with
major imple
m
entation m
o
del
as sho
w
n in
Figure 9.
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
A Netwo
r
ki
ng
and Data T
r
a
n
sm
issi
on Mo
de of Mobile
Seism
i
c Station (Junlei So
ng)
3583
Figure 8. Application F
r
am
ewo
r
k Stru
ctu
r
e
Figure 9. Major Impleme
n
tation Model o
f
Socket CA
N
As sh
own in
Figure 10
(b),
to displ
a
y the r
eal
-time dyn
a
mic d
a
ta curve and
coo
r
di
nate in
the child
win
dow Graph, t
he d
r
a
w
ing
class QPai
nter sh
ould
be
u
s
ed. T
o
d
r
a
w
the
coo
r
din
a
t
e
curve,
chan
g
e
the positio
n of the origi
n
of
coordin
a
tes first by usin
g the wi
ndo
w co
nversion
function
of Q
P
ainter, si
nce
the default p
o
sition
of t
he origin of
drawing
coor
dinat
es i
s
lo
cated
at
top left corne
r
of the scre
en, not in lin
e with
mo
st use
r
s’ habit. The
dyna
mic
curve, whi
c
h
is
dra
w
n
with b
r
oke
n
line
s
, wi
ll make
a left-ward sh
ift wh
en its
width b
e
yond a
ce
rtain value. Thi
s
pape
r is n
o
t intende
d for some spe
c
ific
data, t
herefo
r
e, the scale
and uni
t of coordi
nate i
s
not
defined in the
figure, just fo
r refe
ren
c
e.
In the network, the colle
ction node n
u
m
ber i
s
subj
ect to the manag
ement o
f
windo
w
widg
et Q
C
o
m
boBox. The
nod
es can
be dyn
a
mical
l
y adde
d to t
he li
st by u
s
i
ng the
mem
ber
function
addIt
e
m. Since th
e spe
c
ifically
defined
data
type is
used
in Qt, the
co
nventional
da
ta
type used in
C must b
e
co
nverted befo
r
e use
d
and di
splaye
d by Qt.
Qt mainly u
s
es
QFile fo
r fi
le man
agem
e
n
t and
strea
m
ope
ration
QTextStream
for read-
write. Th
e re
aso
n
for
not read-writ
e file
s by di
re
ctly usin
g sy
stem
call i
s
that u
s
ing
syste
m
call
s
freque
ntly would in
crea
se the p
r
og
ra
m run
n
i
ng ti
me, while
th
e stream o
p
eration
ca
n
both
effectively re
duce the
nu
mber
of sy
stem calls
and
improve
ru
n
n
ing
spe
ed. I
n
additio
n
, re
ading
files by usin
g strea
m
ope
ra
tion can p
r
ev
ent occup
a
tio
n
of sub
s
tanti
a
l memory by
the prog
ram.
5. Testing an
d Resul
t
After
cross compiling,
Qt appli
c
ation can
be
downl
oade
d to ARM platform to
gene
rate
the tab
window as
shown i
n
Figu
re 10(b). A message
box as
shown in Fi
gu
re 10(a) will
pop out
whe
n
the ma
in threa
d
det
ects
out ne
w colle
ction
n
o
des. Acco
rdi
ng to the u
s
e
r
inst
ru
ction, the
prog
ram
will
sele
ct an
d a
dd the
new n
ode
“NO.04”
to the devi
c
e
list of ea
ch
child
win
d
o
w
, as
sho
w
n in Fi
g
u
re 1
0
(b
), or
being a
ban
do
ned. Failu
re to make com
m
and p
r
o
c
e
s
sing in time
would
lead to the
condition a
s
shown in Figu
re 10
(c).
The
prog
ram
det
ected
out ne
w nod
e in
se
veral
void Rec
v
Thrd :: run( )
{
rv
_s
k=
so
c
k
et
(PF_CA
N,SO
CK_RA
W
,
CAN_
RA
W);
recv_
add
r.ca
n_family = AF
_CAN;
recv_
add
r.ca
n_ifindex = 0;
b
i
n
d
(
r
v
_s
k
,
(str
u
c
t so
ck
ad
dr
*
)
&r
ec
v_
ad
dr
, le
n
)
;
recvfrom(rv_sk, (void *)&
r
e
c
v_fram
e,
sizeof(stru
c
t can
_
fram
e), 0,
(struct socka
ddr *)
&
r
e
c
v_a
ddr, &len);
……
}
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
0
46
TELKOM
NI
KA
Vol. 12, No. 5, May 2014: 3578 – 35
85
3584
times a
nd th
en ad
ded th
e sa
me ID
n
u
mbe
r
. The i
n
trodu
c
tion
o
f
mutex mechani
s
m in
Qt will
effectively prevent su
ch case.
(a)
(b)
(c
)
Figure 10. Ne
w No
de Pro
c
essing
After c
l
ic
k
i
ng Info interfac
e, it is allo
wed to
to b
r
owse
re
co
rd
ed data,
sel
e
ct th
e
corre
s
p
ondin
g
sam
p
ling n
ode an
d ch
eck box, also vi
ew the data
stored at different node
s
in
SD
card, as
sho
w
n in Figu
re
11.
Figure 11. Da
ta Browse
The ma
nag
e
m
ent interfa
c
e Man
age
ca
n be
used to
sen
d
the m
a
n
a
geme
n
t com
m
and to
the co
rre
sp
o
nding
sei
s
mi
c coll
ectio
n
node by con
s
tru
c
ting a n
e
w Socket
CAN. Figure 1
2
(a
)
displ
a
ys th
e
feedba
ck inf
o
rmatio
n afte
r succe
s
sful
sen
d
ing
of comman
d
s,
a
nd Fig
u
re 12
(b)
sho
w
s
the a
c
tually sent CA
N
data frame info
rma
t
ion outputte
d via seri
al
port, both
are
con
s
i
s
tent wit
h
each other.
(a)
(b)
Figure 12. Send the Com
m
and
The test
sh
ows that, the main
cont
rolle
r ba
sed
on ARM pl
atform is
ca
pable o
f
perfo
rming
several ta
sks su
ch a
s
da
ta receiving
and di
spat
ch
ing, real
-time
display, no
des
monitori
ng a
n
d
an
omaly re
cord. It ca
n e
ffectively perf
o
rm
huma
n
-compute
r
inte
raction
and
re
al-
time co
ntrol
without
affect
ing its comm
unication
with seismi
c
col
l
ection
nod
es, serve
s
as the
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
A Netwo
r
ki
ng
and Data T
r
a
n
sm
issi
on Mo
de of Mobile
Seism
i
c Station (Junlei So
ng)
3585
relay
station
i
n
the
wh
ole
o
f
netwo
rk
syst
em, thu
s
fa
cili
tating the
con
t
rol a
nd m
ana
gement
by th
e
mobile statio
n of scattered sei
s
mi
c colle
ction
no
des a
s
well
as the data acqui
sition
an
d
summ
ari
z
atio
n.
6. Conclusio
n
In this pape
r,
a data tran
smissi
on mo
d
e
betwe
en se
ismic
colle
cti
on nod
es a
n
d
mobile
station i
s
d
e
sig
ned by
utilizing
CAN bu
s co
mmuni
cation
techn
o
logy.
By taking
su
ch
cha
r
a
c
teri
stics of CAN b
u
s commu
nication as lo
ng transmi
ssion di
stan
ce, high
anti-inte
rfere
n
c
e
ability and ea
sy wiri
ng con
s
tru
c
tion a
s
well a
s
of
th
e excelle
nt real-time
cont
rol capa
bility and
good
commu
nicatio
n
cap
a
b
ility of micro
p
ro
ce
ssor ARM, mai
n
co
ntrolle
r n
ode
s a
r
e
con
s
tru
c
ted
betwe
en sei
s
mic colle
ction
node
s
a
nd mobile stat
io
n, and the
collectio
n no
d
e
s
scattere
d
in a
certai
n
scop
e
are u
nde
r
ce
ntralized
cont
rol i
n
th
e
form of
star top
o
logy. Me
an
while,
Linux
multi-
task sy
stem
platform o
n
ARM ha
rd
wa
re pl
atform
i
s
co
nstructe
d. Hum
an-co
m
puter i
n
tera
ct
ion
interface
i
s
establi
s
h
ed by
usi
ng em
bedd
ed appl
i
c
ation
fram
e
w
ork
Qt. Th
e ide
a
l real-t
ime
control a
nd
manag
eme
n
t function
are
perfo
rme
d
. The
sei
s
mic
data tra
n
smi
s
sion
mod
e
b
a
se
d
on CAN bu
s and embe
dd
ed
te
chn
o
log
y
facilitates
t
he con
s
tru
c
ti
on
a
nd expa
nsio
n
of network
in
field environ
ment, also he
lps re
du
ce th
e manag
eme
n
t task of mo
bile station.
Ackn
o
w
l
e
dg
ements
This
wo
rk was fin
a
n
c
ially su
ppo
rted
by
the Natural Scie
nce
Found
ation
of Chi
n
a
(612
712
74),
the
Natu
ral Sci
e
n
c
e
Found
ation
of Hu
bei P
r
ovince
(20
1
2
FFB641
2),
the
Funda
mental
Re
se
arch
F
und
s for the
Natio
nal
Un
iversity, Chi
n
a University of Geo
s
cien
ces
(Wuhan
) for
the Excellent
Youth
Scho
lars
(CUG
L1
0022
2) an
d the Ch
ara
c
te
ristic Di
sciplin
e
Team Proj
ect
(CUG12
011
9), whi
c
h I he
rewith a
c
kno
w
led
ge with b
e
st than
ks.
Referen
ces
[1]
W
and Ch
en, T
eng Yun-tian
, W
ang Xia
o
-
m
ei, Z
hang L
i
an, and F
a
n
g
Xia
o
-
y
o
ng. T
he
w
i
re
less
net
w
o
rk
ing
s
y
s
t
em of earth
qu
ake pr
ec
urs
o
r mobil
e
fie
l
d ob
servatio
n.
Progress in Geophysics
. 20
12;
27(6): 09
45-
09
49.
[2]
Guo Che
ng-zh
en, He Di. Des
i
gn a
nd impl
e
m
ent
atio
n of PLC commun
i
ca
tion net
w
o
rk based o
n
CA
N
bus.
Co
mmu
n
i
c
ations T
e
ch
no
logy.
20
12; 45(
7): 51-53, 7
4
.
[3]
Lia
ng Jin-z
h
i. Appl
icatio
n of
CAN bus pr
otocol i
n
emb
edd
ed s
y
stem.
Computer Kn
ow
ledg
e an
d
T
e
chno
logy
. 2
011; 7(7): 5
003
-500
4.
[4]
ADM30
54 Dat
a
Sheet. Ana
l
o
g
Devic
e
s, Inc. 2011.
[5]
T
M
S320C54
x
Optimizin
g
C/C
+
+
Compiler U
s
er’s Guid
e. T
e
xas Instrum
ent
s. 2002.
[6]
Song
Ba
o-h
ua.
Linux d
e
vic
e
d
r
iver dev
elo
p
m
ent.
Beiji
ng: Po
sts and T
e
lecom Press. 2010.
[7]
Corb
et J, Rubi
ni A.
Linux d
e
vi
ce drivers.
Bei
j
i
ng: Chi
na El
ectric Po
w
e
r Pres
s. 2005.
Evaluation Warning : The document was created with Spire.PDF for Python.