I nte rna t io na l J o urna l o f   E lect rica l a nd   Co m p ute E ng in ee ring   ( I J E CE )   Vo l.   7 ,   No .   4 A u g u s t   201 7 ,   p p .   1 8 6 7 ~ 1 8 7 3   I SS N:  2 0 8 8 - 8708 DOI : 1 0 . 1 1 5 9 1 / i j ec e . v7 i 4 . p p 1 8 6 7 - 1873          1867       J o ur na l ho m ep a g e h ttp : //ia e s jo u r n a l.c o m/o n lin e/in d ex . p h p /I JE C E   Security En ha nce m en in  Ne tw o rk ed E m bedde d Sys t e m       P ra dip   Ra m   Selo k a r 1 P .   T .   K a rule 2   1 De p a rte m e n o f   El e c tro n ics   a n d   Co m m u n ica ti o n ,   RCOEM ,   Na g p u r,   M a h a ra sh tra,  In d ia   2 De p a rte m e n El e c tro n ics   En g i n e e rin g ,   Y CCE,   Na g p u r,   M a h a ra sh t ra ,   In d ia       Art icle  I nfo     AB ST RAC T     A r ticle  his to r y:   R ec eiv ed   Feb   7 ,   2 0 1 7   R ev i s ed   A p r il 2 4 ,   2 0 1 7   A cc ep ted   A p r   1 0 ,   2 0 1 7       In   th e   d e v e lo p e d   sy ste m   A RM 9   is  a   m a ste a n d   Tw o   ARM7 a re   s lav e s.  T h e   p e rip h e ra ls  a re   b e in g   c o n tro ll e d   b y   t w o   A RM 7   b o a rd s .   T h e   P e ri p h e ra ls  a re   c o n n e c ted   to   th e   A RM 7   th r o u g h   Co m p lex   P r o g ra m m a b le  L o g ic  De v ic e   (CP L D).  T h e   C P L D i s in   tu r n   c o n n e c ted   to   t h e   A RM 7   u si n g   S e rial  P e ri p h e ra In terf a c e   (S P I).   T h e   A RM 7   b o a rd c o ll e c th e   in f o rm a ti o n   f ro m   th e   p e rip h e ra ls  a n d   se n d   it   t o   t h e   ARM9   b o a rd .   T h e   c o m m u n ica ti o n   b e tw e e n   A RM 7   a n d   A RM 9   is   v ia  UA R T   (Un iv e rsa A s y n c h ro n o u s   Re c e iv e r   T ra n s m it ter) o v e C A N (Co n tro ll e A r e a   Ne t w o rk ).   T h e   A RM 9   b o a rd   h a s g o th e   so f t w a re   in telli g e n c e .   T h e   ARM9   b e h a v e a a   m a st e a n d   tw o   A RM 7   b o a rd b e h a v e   a sla v e s.  Be in g   m a ste A RM 9   p a ss e to k e n to   A R M 7   w h ich   in   tu r n   re tu r n (A c k n o w led g e s)  t h e   to k e n .   T h e   A RM 9   is  f u rth e c o n n e c ted   to   P r o x y   v ia  Et h e rn e t.   T h e   p ro x y   i f u rth e c o n n e c ted   t o   th e   se rv ice   p latf o rm   (se rv e r)  v ia  Et h e rn e t.   S o   s u b se q u e n tl y   a n y   d e c isio n a a n y   sta g e   c a n   b e   c h a n g e d   a se rv e le v e l.   F u rth e t h e se   c o m m a n d c a n   b e   p a ss e d   o n   to   A RM 9   w h ich   in   tu r n   c o n tro ls  th e   p e rip h e ra ls  th ro u g h   A RM 7 .   (a T h e   s y s tem   w h ich   w e   h a v e   d e v e lo p e d   c o n sists   o f   A RM 9   a a   m a ste r,   Tw o   A RM 7   a S lav e s.   T h e   c o m m u n ica ti o n   b e tw e e n   AR M9 - A RM 7   is  v ia  UA R T   o v e a   CA N,     (b Eac h   A RM 7   f u rt h e c o m m u n ica tes   se riall y   (RS 2 3 2 w it h   t h e   tw o   8 0 5 1   M icro c o n tro ll e r   n o d e s,  (c ) T h u s   a   n e tw o rk e d   Em b e d d e d   S y ste m   is  d e v e lo p e d   w h e re in   th e   se rial  d a ta  is  b ro u g h t   o v e Et h e rn e t.   T h e   A RM 7   b o a rd ,   w h ich   is  d irec tl y   li n k e d   w it h   th e   p e rip h e r a ls,   c a n   b e   m o d if ied   o f   it f u n c t io n a li ty   a s   a n d   w h e n   re q u ired .   T h e   f u n c ti o n a li ty   o f   A RM 7   c a n   b e   m o d if ied   b y   u p g ra d in g   it f irmw a re .   T o   u p g ra d e   th e   f ir m w a r e   sa m e   c o m m u n ica ti o n   li n k   h a s   b e e n   u se d .   A RM 7   re c e iv e t h e   n e w   f ir m wa re   v i a   sa m e   A R M 9 - A RM 7   c o m m u n ica ti o n   li n k .   T h e   F las h   W rit e   o p e ra ti o n   is  p e rf o r m e d   u sin g   th e   so u rc e   c o d e   t o   w rit e   th e   n e w   f ir m w a r e .   Bo o tl o a d e a p p li c a ti o n   f o th e   A RM 7   h a b e e n   d e v e lo p e d .   T h e   sig n a tu re   h a b e e n   in c o r p o ra te d   to   a ss u re   a u th e n ti c it y   o f   th e   n e w   F irmw a re .   In tel  He x   F il e   F o rm a is  u se d   to   p a rse   th e   h e x   f il e .   K ey w o r d :   B o o tlo ad e r   C A   co n tr o ller   ar ea   n et w o r k   Flas h   W r ite   I n tel  Hex   f ile  f o r m at   Sig n at u r Au t h e n ticit y   UART     u n iv er s al  as y n ch r o n o u s   r ec ei v er   tr an s m itter     Co p y rig h ©   2 0 1 7   In stit u te o A d v a n c e d   E n g i n e e rin g   a n d   S c ien c e .     Al rig h ts  re se rv e d .   C o r r e s p o nd ing   A uth o r :   P r ad ip   R a m   Selo k ar ,     Dep ar t m en t o f   E lectr o n ics a n d   C o m m u n icat io n   E n g i n ee r in g   Sh r i Ra m d eo b ab C o lleg o f   E n g i n er i n g   a n d   Ma n a g e m en t,    Nag p u r ,   I n d ia.   E m ail: p r ad ip . s elo k ar @ g m ail. co m       1.   I NT RO D UCT I O   Secu r it y   is   m ea s u r o f   h o w   d if f ic u lt  it  i s   to   b r ea k   in t o   th o b j ec w h ic h   th s y s te m   p r o tects.  E m b ed d ed   s y s te m s   p r ese n s ig n i f ica n s ec u r it y   c h alle n g es  d u to   th e ir   li m ited   r es o u r ce s   a n d   p o w er   co n s tr ain ts .   I n   ad d itio n   to   s tan d ar d   co n ce r n s   r eg ar d in g   s y s te m   p er f o r m a n ce   a n d   p o w er   co n s u m p t io n ,   s ec u r it y   h as b ec o m lead in g   is s u f o r   m an y   e m b ed d ed   ap p licatio n s   [ 1 ] .     I n   th d ev elo p ed   s y s te m   f ir m w ar u p g r ad is   ca r r ied   o u u s in g   t h d ata  co m m u n icat io n   li n k .   Fo r   th e   d ev elo p m en t   p u r p o s th e   A R M7   b o ar d   h as  g o t h J - li n k   i n ter f ac e.   I i s   v er y   ea s y   to   b u r n   t h h e x   f ile  to   th e   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E     Vo l.  7 ,   No .   4 A u g u s 2 0 1 7     1 8 6 7     1 8 7 3   1868   Flas h   m e m o r y   o f   AR M7 .   B u t   f i n all y   w h en   t h e n tire   f ir m war d ev elo p m e n i s   co m p leted   an d   th p r o d u ct  i s   r ea d y   to   b s o ld   in   m ar k et,   s u ch   J - li n k   i n ter f ac e s   w il b r e m o v ed .   T h AR M7   b o ar d   w ill  b m o u n ted   in   co n tr o p an el.   T h is   co n tr o p an el  w o u ld   b lo ca ted   at   r e m o te  lo ca tio n s   in s id t h b u i ld in g .   I f   th e   s y s te m   w o r k s   f i n e,   it i s   w ell  an d   g o o d .     T h in k   o f   s it u atio n ,   i n   f u tu r th c u s to m er s   co m p lain   ab o u t h b u g s   in   th s y s te m .   W ill  it  b e   p o s s ib l f o r   th e   m a n u f ac tu r er   to   d is m a n tle  t h e n tire   as s e m b l y ,   ta k it b ac k   to   th e   d ev elo p er s   s ite  a n d   m o d i f y   th f u n ctio n a lit y ?   Ob v io u s l y   n o t!   A n d   also   it  w o u ld   n o t b co s w i s af f o r d ab le  to   th m a n u f ac tu r er .     Hen ce   it  w a s   n ec e s s ar y   r e q u ir e m e n w h ile  d ev elo p i n g   th f ir m w ar f o r   AR M7 ,   to   h av t h e   ca p ab ilit y   to   r ec eiv th n e f ir m w ar v ia  s a m AR M7 - A R M9   co m m u n icat io n   li n k   a n d   o v er w r ite  t h o ld   o n e.     W h en   o ld   f ir m w ar i s   to   b o v er w r itten ,   it  m ea n s   t h at  t h F lash   w r i te  o p er atio n   h a s   to   b p er f o r m e d   u s i n g   t h s o u r ce   co d ( W h ic h   o th er w i s w o u ld   h a v b ee n   p er f o r m ed   b y   J - li n k ) .   T h k e y   tas k   i n   F ir m w ar e   u p g r ad w a s   Fla s h   W r ite.   T h to k en   b ased   co m m u n icati o n   p r o to co b etw ee n   o n AR M9   ( A T 9 1 SA M9 2 6 0 )   b o a r d   [ 2 ]   an d   t w o   AR M7   ( A T 9 1 SA M7 S2 5 6 )   b o ar d s   h as  b ee n   d ev elo p ed .   I n   th is   co m m u n icatio n   lin k   th AR M9   ac ts   as  Ma s ter   an d   t w o   AR M7   ac t   as   Sla v es .   T h m ai n   co n s tr ai n   f o r   s et ti n g   u p   th is   co m m u n icatio n   l in k   w a s   T I ME .   i.e .   p er ip h er al  s h o u ld   g et  th q u i ck er   r esp o n s f r o m   th s er v er .   Of ten   th p er f o r m a n ce   in   e m b ed d ed   d ev ices  is   li m i ted   b y   th f ir m w ar w h i ch   r u n s   o v er   it.  T r ad itio n all y   s y s te m s   o n   d ev ices  h a v b ee n   d esig n ed   u s i n g   A T ME L   8 9 C 5 1   Mic r o co n tr o ller ,   P I C   Mic r o c o n tr o ller   etc.   T h ese  m icr o co n tr o ller s   s u p p o r t th co m m u n icatio n   u s i n g   R S - 2 3 2   o r   R S - 4 8 5 .   Her th AR Mic r o co n tr o ller s   a r u s ed .   T h AR m icr o co n tr o ller s   ar h av in g   f ast   ex ec u tio n   s p ee d   ( MI P   m illi o n   i n s tr u ctio n s   p er   s ec o n d ) ,   th er eb y   m ee ti n g   t h b as ic  co n s tr ain   ( T I ME )   o f   th is   co n tr o l s y s te m .     I n   th s i m p lest   f o r m   it  ca n   b ex p lain ed   as,  h alf   d u p le x   co m m u n ica tio n   h a s   b ee n   es tab lis h ed   b et w ee n   s er v er   a n d   p er ip h er als.  I n   o n d ir ec tio n   t h d ata  co llected   b y   p er ip h er al s   is   tr a n s m itted   to   s er v er .   I n   o th er   d ir ec tio n   th co m m a n d   f r o m   s er v er   is   tr a n s m it ted   to   th p er ip h er als.  Fig u r 1   g iv es  t h b lo ck   d iag r a m m atic  v ie w   o f   t h S y s t e m .           Fig u r 1 .   B lo ck   Diag r a m       2.   CO M M UNICAT I O L I NK   2 . 1 .   UART ( Univ er s a l A s y nchro no us   Rec eiv er   T ra ns m it t er )   T h Un iv er s a A s y n c h r o n o u s   R ec eiv er   T r an s ce i v er   ( UAR T )   p r o v id es  o n f u l d u p lex   u n i v er s a l   as y n ch r o n o u s   s er ial  li n k .   Data   f r a m f o r m at  is   w id el y   p r o g r a m m ab le  ( d ata  len g t h ,   p ar ity ,   n u m b er   o f   s to p   b its )   to   s u p p o r m ax i m u m   o f   s ta n d ar d s .   T h r ec eiv er   i m p le m en t s   p ar it y   er r o r ,   f r a m i n g   er r o r   an d   o v er r u n   er r o r   d etec tio n .   T h r ec eiv er   ti m eo u t   en ab le s   h an d li n g   v ar iab le - len g t h   f r a m e s   a n d   t h tr a n s m itter   ti m eg u ar d   f ac ilit ate s   co m m u n icatio n s   w i th   s lo w   r e m o te  d e v ices.  M u lt i d r o p   co m m u n icatio n s   ar al s o   s u p p o r ted   th r o u g h   ad d r ess   b it  h a n d lin g   i n   r ec ep t io n   an d   tr a n s m i s s io n .   T h U AR T   f ea tu r e s   t h r ee   test   m o d es:  r e m o te  lo o p b ac k ,   lo ca l lo o p b ac k   an d   au to m atic  ec h o .   Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2 0 8 8 - 8708       S ec u r ity  E n h a n ce men t in   N etw o r ke d   E mb ed d ed   S ystem  ( P r a d ip   R a S elo ka r )   1869   2 . 2 .   Rec eiv er   a nd   T ra ns m it t er   C o ntr o l   Af ter   r eset,  t h r ec eiv er   is   d i s a b led .   T h u s er   m u s t e n ab le  t h e   r ec eiv er   b y   s etti n g   th R XE N   b it in   th e   C o n tr o R e g is ter   ( US_ C R ) .   H o w e v er ,   th r ec eiv er   r eg i s ter s   ca n   b p r o g r am m ed   b ef o r th r ec eiv er   clo ck   i s   en ab led .   Af ter   r eset,  th tr an s m i tter   is   d i s ab l ed .   T h u s er   m u s e n ab le  it  b y   s et tin g   t h T XE b it  in   th e   C o n tr o R e g is ter   ( US_ C R ) .   Ho w e v er ,   th tr an s m it ter   r eg is te r s   ca n   b p r o g r am m ed   b ef o r b ein g   en ab led .   T h e   R ec eiv er   a n d   t h T r an s m itte r   ca n   b e n ab led   to g et h er   o r   in d ep en d en tl y .   At  a n y   ti m e,   th s o f t w ar ca n   p er f o r m   a   r eset  o n   th r ec ei v e r   o r   th tr an s m it ter   o f   t h U AR T   b y   s e tti n g   t h co r r esp o n d i n g   b it,  R ST R a n d   R ST T r esp ec tiv ely ,   i n   t h C o n tr o l Reg i s ter   ( US_ C R ) .       2 . 3 .   T ra ns m it t er   T i m eg ua rd    T h ti m e g u ar d   f ea t u r en ab l es  t h US AR T   in ter f ac w i t h   s lo w   r e m o te  d e v ices.  T h e   ti m e g u ar d   f u n ctio n   en ab le s   t h tr an s m itt er   to   in s er an   id le  s tate  o n   t h T XD  lin b et w ee n   t w o   c h ar ac ter s .   T h is   id le  s tat e   ac tu all y   ac ts   as a   lo n g   s to p   b it.     2 . 4 .   Rec eiv er   T i m eo ut    T h R ec eiv er   T i m e - o u t   p r o v i d es  s u p p o r in   h a n d li n g   v ar iab le - le n g th   f r a m es.  T h is   f ea tu r d etec ts   an   id le  co n d itio n   o n   t h R XD  l in e.   W h e n   ti m e - o u i s   d ete cted ,   th b it  T I ME OUT   in   th C h a n n el   Stat u s   R eg i s ter   ( US_ C S R )   r is es a n d   ca n   g e n er ate  an   i n ter r u p t,  th u s   in d icatin g   to   th d r i v er   an   en d   o f   f r a m e.     2 . 5 .   CAN  ( C o ntr o ller  Are a   Net wo rk )   C A i s   b r o ad ca s s er ial  b u s   s tan d ar d   f o r   co n n ec ti n g   e lectr o n ic  co n tr o u n it s   ( E C U s ) .   E ac h   n o d i s   ab le  to   s en d   an d   r ec eiv m e s s ag es,  b u n o t si m u lta n eo u s l y m es s ag ( co n s is ti n g   p r i m ar il y   o f   an   I   u s u a ll y   ch o s en   to   id en ti f y   th e   m ess a g e - t y p e/ s en d er     a n d   u p   to   ei g h m es s a g b y te s )   i s   tr an s m itt ed   s er iall y   o n to   t h e   b u s ,   o n b it a f ter   a n o th er     th i s   s i g n al - p atter n   co d es t h m e s s ag ( in   NR Z )   an d   is   s en s ed   b y   all  n o d es.   T h d ev ices  th at  ar co n n ec t ed   b y   C A n et w o r k   ar t y p ica ll y   s e n s o r s ,   ac tu a to r s   an d   co n tr o l   d ev ices.  A   C A m e s s a g n e v er   r ea ch es   th e s d ev ice s   d ir ec tl y ,   b u t   in s tead   h o s t - p r o ce s s o r   an d   C A co n tr o ller   is   n ee d ed   b et w ee n   t h ese  d ev ice s   an d   t h b u s .   I f   t h b u s   is   f r ee ,   a n y   n o d m a y   b eg i n   to   tr a n s m it.  I f   t w o   o r   m o r n o d es   b eg i n   s en d i n g   m es s ag e s   at   th s a m e   ti m e,   th e   m e s s a g w it h   th e   m o r e   d o m i n an t   I ( w h ich   h as  m o r d o m i n a n b its   i.e .   b it   0 )   w il l   o v er w r ite  o t h er   n o d es   les s   d o m i n a n I Ds,  s o   t h at  e v en t u all y   ( af ter   t h is   ar b itra tio n   o n   th I D)   o n l y   t h e   d o m i n a n m e s s a g r e m a in s   an d   is   r ec eiv ed   b y   all  n o d es.       3.   CO M M UNICAT I O P RO T O CO L   T h co m m u n icatio n   b et w ee n   AR M7   an d   A R M9   i s   v ia  U AR T   ( Un iv er s al  As y n c h r o n o u s   R ec eiv e r   T r an s m itter )   o v er   C AN  ( C o n t r o ller   A r ea   Net w o r k ) .   T h AR M9   b eh av e s   as   m a s ter   a n d   t w o   AR M7   b o ar d s   b eh av as  s la v es.   B ein g   m as t er   AR M9   p ass es  to k e n s   to   AR M7   w h ic h   i n   t u r n   r et u r n s   ( A c k n o w led g es)  t h e   to k en .   T h A R M9   i s   f u r t h er   co n n ec ted   to   P r o x y   v ia  E th er n et.   T h p r o x y   i s   f u r t h er   co n n e cted   to   th s er v ic e   p latf o r m   ( s er v er )   v ia  E t h er n et .   I n   th s i m p le s f o r m   it  ca n   b ex p la in ed   as,  h al f   d u p lex   co m m u n icatio n   h as   b ee n   estab lis h ed   b et w ee n   s er v er   an d   p er ip h er als.  I n   o n d ir ec tio n   th d ata  co llected   b y   p er ip h er als  ( User   s w ip es  t h e   ca r d   at  t h r ea d er   c o n n ec ted   to   d o o r   an d   r ea d er   r ea d s   ( ex tr ac ts )   th e   ca r d   n u m b er )   is   tr a n s m itted   to   s er v er   [ 3 ] .   I n   o th er   d ir ec tio n   t h co m m a n d   f r o m   s er v er   is   tr an s m itted   to   t h p er ip h er al s   ( B ased   o n   th e   ca r d   n u m b er   r ec eiv ed   s er v er   s e n d s   ac ce s s   g r a n ted /d en ied   c o m m a n d   to   AR M7 ,   w h ic h   in   tu r n   ta k es   t h co r r esp o n d in g   ac tio n   ( t u r n   O N/OFF)  o n   t h R ela y   co n n ec te d   at  th d o o r   to   u lti m ate l y   o p en /clo s t h d o o r ) .     3 . 1 .   UART I nitia liza t io n   a.   T h tty S4   p o r ( UA R T 3 )   o f   AR M9   is   o p en ed   u s i n g   th f ile  o p er atio n .   T h f ile  d escr i p to r   is   u s ed   to   ac ce s s   th is   p o r t.   b.   W h ile  in i tializi n g   U A R T   f o llo w i n g   s etti n g s   ar d o n th r o u g h   th s o u r ce   co d e,   1)   B au d   R ate:  1 1 5 2 0 0   2)   Data   b its : 8   b its   3)   P ar ity : N o n e   4)   Sto p   B it: 1   b it   5)   Har d w ar f lo w   C o n tr o l: No   c.   T h UA R T 0   o f   A R M7   is   ac c ess ed   u s i n g   its   b ase  ad d r ess   ( A T 9 1 _ B A SE_ US0 )   an d   s i m il ar   s ettin g s   ar e   d o n th r o u g h   t h s o u r ce   co d e.   d.   A   co m m u n icatio n   li n k   b et w e en   t h ese  t w o   p o r ts   ( tt y S4   o f   AR M9   an d   U AR T 0   o f   A R M 7   is   s et  u p .   T h p h y s ical  m ed i u m   is   C A b u s .   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E     Vo l.  7 ,   No .   4 A u g u s 2 0 1 7     1 8 6 7     1 8 7 3   1870   T h is   is   h o w   AR M7 A R M9   p h y s ical  co m m u n icatio n   lin k   w as  s e tu p .   I n itial l y   t h er w a s n an y   p r escr ib ed   co m m u n icatio n   p ac k et   f o r m at .   T h v er y   f ir s atte m p to   s e n d   d ata   o v er   th is   co m m u n icatio n   li n k   w a s   d o n b y   tr an s m itti n g   j u s t h s i n g le  ch ar ac ter   ( 1   b y te)   f r o m   A R M7   to   A R M9   u s i n g   p u tch ar   f u n c tio n   in   C .   T h is   b y te   w a s   r ec eiv ed   o n   th AR M9   s i d u s in g   g etc h ar   f u n c tio n   i n   C .   T h is   w a s   s u cc ess f u l.  L ater   o n   co m m u n icatio n   wi t h   s in g le  b y te  b u b o th   tr an s m i tti n g   a n d   r ec eiv i n g   w a s   tr i ed   s u cc ess f u ll y   o v er   t h is   co m m u n icat io n   li n k .   At   th is   s ta g f u n ctio n a l c o m m u n icatio n   lin k   w a s   estab li s h ed .   No w   t h n ex t ta s k   w as to   d ec i d th f o r m a t o f   t h e   co m m u n icatio n   p ac k et.   T ab le  1   lis ts   th e   p r escr ib ed   p ac k et  f o r m at  f o r   th AR M7 A R M9   co m m u n icatio n .       T ab le  1 .   A R M7 AR M9   C o m m u n icat io n     P r escr ib ed   P ac k et  Fo r m at   2   B y t e s   1   B y t e   2   B y t e s   1   B y t e   1   B y t e     1   B y t e   1   B y t e   1   B y t e   1   B y t e   2   B y t e s   S t a r t   o f   p a c k e t   A d d r e ss  o f   b o a r d   S e q u e n c e   N u mb e r   N u mb e r   o f   B y t e s   P a c k e t   Ty p e   D A TA   S e n so r   S t a t u s   R e l a y   S t a t u s   C h e c k su m   A C K / N A C K   En d   o f   P a c k e t   0 , 1   2   3 , 4   5   6   M a x   2 5 6   B y t e s   N - 6   N - 5   N - 4   N - 3   N - 2 ,   N - 1       3 . 2 .   Chec k s u m   Fo r   b o th ,   th d ata  r ec eiv ed   in   th p ac k e an d   th d ata  to   b tr an s m it ted   in   t h p ac k et   th 8   b its   ch ec k s u m   is   ca lc u lated   o n   b o th   t h s id es  AR M7   an d   AR M9 .   T h lo g ic  u s ed   f o r   ca lc u lati n g   t h c h ec k s u m   is   XORi n g   t h d ata  in   t h p ac k et   b y te  b y   b y te.   B ased   o n   t h c h ec k s u m   cr iter io n   t h i n te g r it y   o f   th e   d ata  r ec eiv ed   i n   t h p ac k e i s   c h ec k ed   i.e .   t h d ata  is   s aid   to   b er r o r   f r ee   if   t h r ec eiv ed   ch ec k s u m   ( C h ec k s u m   f ield   in   t h p ac k et)   an d   th ca lcu la ted   ch ec k s u m   ar m a tch i n g .   T h d ata  is   ad d ed   to   th r ec eiv q u e u o n l y   if   i ts   i n teg r i t y   i s   v alid a ted   [ 4 ] .     3. 3 .   ACK /NACK   I f   th i n te g r it y   o f   t h r ec eiv ed   d ata  is   v al id ated   o n   th b asi s   o f   c h ec k s u m ,   t h AC KNOW L E DGE ME NT   ( AC K)   i s   s e n b ac k   b y   p ig g y b ac k in g   in   th e   n e x t   p ac k et,   o th er w i s N O_   AC KNOW L E DGE ME NT   ( NACK)  is   s e n t.  W h e n e v er   NAC is   r ec eiv ed   th p ac k e t is r es en d .   T h p ac k et  r esen d in g   i s   p er f o r m ed   f o r   m ax i m u m   o f   th r ee   ti m es.  I f   t h p r o b lem   s ti ll  p er s is ts   an   ev e n t   is   s en d   to   th p r o x y   let tin g   it   k n o w   ab o u th p r o b le m   in   AR M7 AR M9   co m m u n icat io n   lin k .   I n   t u r n   t h e   s er v er   w ill co m to   k n o w   ab o u t th co m m u n icatio n   p r o b le m .   Fo r   r esen d in g   o f   t h d ata,   w h en e v er   p ac k et  is   s en its   co p y   i s   w r itte n   in   t h B A C K U P   SEND   QUE UE .   I f   NACK  is   r ec eiv e d   f o r   th last   s en p ac k et,   th e   s a m p ac k et  is   r ea d   f r o m   th B A C KUP   SEN D   QUE UE   an d   r esen d .   Ho w ev er   if   th AC i s   r ec eiv ed   f o r   th last   s en p ac k et,   th B AC K UP   SEND   QUE UE   is   r ea d   an d   it is   f r ee d   [ 5 ] .       4.   F I RM WARE UP G R ADE O F   ARM 7   T h A R M7   b o ar d ,   w h ic h   is   d ir ec tl y   lin k ed   w it h   th p er ip h er als  at  th d o o r ,   ca n   b m o d if ied   o f   its   f u n ctio n alit y   a s   an d   w h e n   r eq u ir ed .   A n d   to   m o d if y   t h f u n c tio n alit y ,   th b o ar d   n ee d   n o b d is m an t led   f r o m   th co n tr o l p an el  as s e m b l y   m o u n ted   i n   r e m o te  lo ca tio n   w it h in   t h b u i ld in g .   Ho w   is   t h i s   p o s s ib le?   T h an s w er   to   th i s   q u es tio n   lie s   in   t h i s   p ap er .   T h is   p ap er   ex p lain s   i n   d etail  th e   Fir m w ar Up g r ad P r o ce d u r o f   A R M7   b o ar d   u s i n g   th s a m AR M7 - AR M9   co m m u n ic atio n   li n k .   T h m ai n   e m p h a s is   i s   g i v e n   o n   th Flas h   w r ite  o p er atio n ,   I n tel  h ex   f ile  f o r m at  a n d   s ig n at u r f o r   th n e w   f ir m w ar [ 6 ] .     4 . 1 .   B o o t lo a der   B o o tlo ad e r   is   p iece   o f   co d e   t h at  r u n s   b ef o r an y   m ain   ap p li ca tio n   is   r u n n in g .   Si n ce   it  is   u s u all y   t h e   f ir s s o f t w ar to   r u n   a f ter   p o w er   u p   o r   r eset,  it  is   h i g h l y   p r o ce s s o r   an d   b o ar d   s p ec i f ic.   T h b o o tlo ad er   p er f o r m s   th n ec e s s ar y   i n it iali za tio n s .   T h b o o tlo a d er   a p p lic atio n   u s e s   th s a m to k e n   b ased   co m m u n icatio n   p r o to co l   to   co m m u n icate   w it h   A R M9 .   I is   d if f er en f r o m   t h m ai n   ap p licatio n   in   t h s e n s t h at  it  d o es  n o p er f o r m   a n y   o th er   f u n ctio n a l it y   ex ce p f o r   Flas h   w r ite  o p er atio n .   Fo llo w in g   s tep s   e x p lain   in   d etail  th d ev elo p m e n o f   b o o tlo ad er   a p p licatio n .   B o o tlo a d er   is   lo ca ted   at  Flas h   ad d r ess   0 x 0 0 0 0 .   T h 1 8 . 9 4 3   KB   o f   Flas h   m e m o r y   h as   b ee n   a s s i g n ed   f o r   B o o tlo ad er   ( 0 x 0 0 0 0     0 x 4 FF F).   R est   o f   th e   Fla s h   m e m o r y   h a s   b ee n   d iv id ed   in to   t w o   R e g io n s ,   ea ch   o f   s ize  1 2 0 . 8 3 2   K B .   T h R eg io n   a   ( Ma s ter   R eg io n )   is   b et w ee n   0 x 5 0 0 0     0 x 2 2 7 FF .   T h R eg io n   B   ( Seco n d ar y   R e g io n )   i s   b et w ee n   0 x 2 2 8 0 0     0 x 3 FF FF .   T ab le  2   g iv es t h d etails o f   m e m o r y   p ar titi o n s .   No w   t h er ar t w o   ca s e s   f o r   b o o tlo ad er   t o   h an d le       Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2 0 8 8 - 8708       S ec u r ity  E n h a n ce men t in   N etw o r ke d   E mb ed d ed   S ystem  ( P r a d ip   R a S elo ka r )   1871   T ab le  2 .   A R M7     Flas h   Me m o r y   P ar titi o n   B o o t l o a d e r   S t a r t   A d d r e ss   0 x 0 0 0 0   B o o t l o a d e r   En d   A d d r e ss   0 x 4 F F F   R e g i o n   A   ( M a st e r   R e g )   S t a r t   A d d r e ss   0 x 5 0 0 0   R e g i o n   A   En d   A d d r e ss   0 x 2 2 7 F F   R e g i o n   B   ( S e c o n d a r y   R e g )   S t a r t   A d d r e ss   0 x 2 2 8 0 0   R e g i o n   B   En d   A d d r e ss   0 x 3 F F F F   M a i n   A p p l i c a t i o n   S t a r t   A d d r e ss   R e g   A   S t a r t   A d d r e ss   R e g i o n   S i z e   0 x 1 D 8 0 0   B y t e ( 1 2 0 . 8 3 2   K B )       T h Fir m w ar Up g r ad co m m an d   is   r ec ei v ed   f r o m   AR M 9 .   On   r ec eiv i n g   t h is   co m m a n d   AR M7   is   r eset  u s i n g   s o f t w ar r eset.  O n   r eset,  ex ec u tio n   g o es  to   F lash   s tar ad d r ess   0 x 0 0 0 0   w h er b o o tlo ad er   is   lo ca ted . B o o tlo ad er   w ait s   f o r   1 0   Seco n d s   to   r ec eiv e   n e w   f ir m w ar b y te s ,   o th er w i s j u m p s   b ac k   to   R eg io n   A.   T h m es s ag 0 x 0 1   is   d is p la y e d   o n   7 - Seg   Dis p la y   o n   AR M7   in d icatin g   av ailab ili t y   o f   ap p licatio n   f ir m w ar i n   R eg io n   A .   I f   it  r ec eiv e s   th n e w   f ir m w ar b y t e s ,   th r ec ei v i n g   ar li n b y   l in ( o n li n i s   o f   1 6   b y te s   in   p ar s ed   h ex   f ile) .   T h m e m o r y   p ag o f   th e s b y te s   i s   f o r m ed   ac co r d in g   to   t h ad d r ess es   r ec eiv ed   ( E ac h   p ag e   is   o f   2 5 6   B y te s   Flas h   P ag Size) .     Af ter   co m p letio n   o f   o n p a g AR M9   s e n d s   th W R I T E   co m m a n d   to   A R M7 .   O n   r ec eiv i n g   t h i s   co m m a n d   th at  p ag is   w r itte n   to   f lash   m e m o r y   i n   R e g io n   B .   T h is   p r o ce d u r g o es  o n   till   th en tire   f ir m w ar is   r ec eiv ed   an d   w r it ten   to   R e g io n   B .   On ce   co m p lete  n e w   f ir m w ar is   av a ilab le  in   R e g io n   B ,   its   s ig n at u r is   v er if ied .   I f   s ig n at u r v er if ica tio n   v alid ates  t h en   n e w   f ir m w ar is   co p ied   to   R eg io n   A   f r o m   R e g io n   B ,   r ep lacin g   th o ld   f ir m w ar e.   I f   s ig n at u r v er i f icatio n   f ail s ,   m ess a g is   s e n to   AR M9 ,   an d   Old   f ir m w ar i n   R eg io n   A   i s   n o r ep lace d   b y   t h i s   n e w   f ir m w ar i n   R e g io n   B .   Af ter   f in i s h in g   t h co p y in g   o f   n e w   f ir m w ar f r o m   R e g io n   B   to   R eg io n   A ,   A R M7   s e n d s   b ac k   FW   UP GR ADE   SU C C E SS   m es s ag to   A R M9   a n d   j u m p s   to   m ai n   ap p licatio n   f r o m   b o o tlo ad er   ( to   R eg io n   w h er n e w   f ir m w ar is   av a ila b le  n o w ) .     4 . 2 .   F la s h Wr it O pera t io n   T h Fla s h   m e m o r y   i s   w r i tten   in   a   p ag e - by - p ag e   f a s h io n   [ 7 ] .   T h w r ite  i s   ca r r ied   o u b y   s t o r in g   d ata   f o r   an   en tire   p ag e   i n to   te m p o r ar y   p a g b u f f er   p r io r   to   w r it in g   t h Flas h .   W h ich   Fla s h   ad d r ess   to   w r ite   to   i s   d ec id ed   b y   th co n te n o f   t h p ar s ed   I n tel  h ex   f ile.   A   f la s h   p ag h as  to   b er ased   b ef o r it c an   b p r o g r a m m ed   w it h   t h d ata  s to r ed   in   t h te m p o r ar y   b u f f er .   T h w r ite  o p er atio n   u s es  th f o llo w i n g   p r o ce d u r w h e n   w r it in g   a   Flas h   p ag e:   a.   Fil l te m p o r ar y   p ag b u f f er   b.   E r ase  Flas h   p ag e   c.   W r ite  Flas h   p ag e   As  o n e   ca n   s ee   o f   t h is   s eq u e n ce   t h er i s   a   p o s s ib ilit y   f o r   lo s s   o f   d ata  if   r ese o r   p o w er   f ail u r e   s h o u ld   o cc u r   i m m ed iate l y   a f te r   p ag er ase.   L o s s   o f   d ata  ca n   b av o id ed   b y   ta k i n g   n ec e s s ar y   p r ec au tio n s   i n   s o f t w ar e,   in v o l v in g   b u f f er in g   i n   n o n v o latile  m e m o r y   [ 8 ] .   Fig u r 2   g iv e s   th lo g ic  o f   f las h   w r ite  o p er atio n .                             Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8708   I J E C E     Vo l.  7 ,   No .   4 A u g u s 2 0 1 7     1 8 6 7     1 8 7 3   1872                                                                                       Fig u r 2 .   Flo w c h ar   Flas h   W r ite  P r o ce d u r e       4 . 3 .   Sig na t ure  Aut hen s it y   f o Securit y   E nh a nce m e nt   T h s ig n at u r [ 9 ]   h a s   b ee n   i n co r p o r ated   to   ass u r th at   t h f ir m w ar i s   i s s u ed   f r o m   th au t h e n tic   m an u f ac t u r er .   W h ile  d e v elo p in g   th m ai n   ap p licatio n   t h p r ed ef i n ed   s i g n a tu r h as   b ee n   w r itte n   i n   a   p r ed ef in ed   m e m o r y   ad d r ess   at   co m p ile  ti m it s el f .   T o   w r it at  co m p ile  ti m f o llo w in g   ar th s tep s .   Use  o f   co m p iler   d ir ec tiv e,   #   p r ag m lo ca tio n   SE C T I ON_ NA ME   ”  h as  b ee n   m ad to   r eser v th e   p r ed ef in ed   m e m o r y   lo ca tio n   f o r   s ig n at u r e.   T h s ig n at u r d ata  is   w r itte n   in   th ab o v s ec tio n   b y   d ec lar in g   t h s ig n at u r d ata  ar r a y   i m m ed iatel y   f o llo w in g   t h #   p r ag m lo ca ti o n ”  d ir ec tiv e.   T h lo ca tio n   ad d r ess   f o r   th s ec tio n   SE C T I ON_ NA ME   h as  b ee n   d ef i n e d   in   th e   at9 1 SA M7 S2 5 6 _ FLASH. ic f   f ile.   T h is   p r ed ef in ed   m e m o r y   lo ca tio n   is   lo ck ed   p er m an en t l y   w it h   t h e   p r ed ef in ed   s ig n at u r ch ar ac ter s   w r i tten   o n   it.  T h is   r eg io n   i s   n ev er   o v er w r i tten .   W h en e v er   t h er is   a   n ee d   o f   f ir m w ar u p g r ad e,   it  is   f ir s r ec eiv ed   to   t h s ec o n d ar y   r e g i o n   o f   th e   m e m o r y .   T h en   th s ig n at u r b y tes  ar co m p ar ed   w i th   t h p r ed ef in ed   s i g n atu r e.   I f   i m atc h es  th e n   o n l y   th o ld   Y ES   Y ES   N O   Y ES   N O   N O   ST AR I s   i n put   a ddr e s s   v a li wr i t e   Di s a b l e   a ll   t h e   in ter r u pts   F las h   r e c o v e r y   C l e a r   f l a s h   r e c o v e r y   s t a t us   v a r i a bl e   F il f l a s h   te m po r a r y   buf f e r   E r a s e   wr i te  n e da ta  to  f las h   r e c o v e r y   b uf f e r   S tor e   f l a s h   pa g e   a ddr e s s   W r i te  b uf f e r   f ull   to  f las h   r e c o v e r y   s tat u s   v a r i a b l e   F il f l a s h   te m po r a r y   buf f e r   E r a s e   wr i te  n e da ta  to  f las h   pa g e   E n a b l e   a ll   t h e   in ter r u pts   F las h   r e c o v e r y   C l e a r   f l a s h   r e c o v e r y   s tatu s   v a r iab l e   R e tur n   R e tur n   Evaluation Warning : The document was created with Spire.PDF for Python.
I J E C E     I SS N:  2 0 8 8 - 8708       S ec u r ity  E n h a n ce men t in   N etw o r ke d   E mb ed d ed   S ystem  ( P r a d ip   R a S elo ka r )   1873   f ir m w ar i s   o v er w r i tten   w it h   t h n e w   o n o th er w i s it  is   d is ca r d ed .   T h is   en s u r es  t h s ec u r it y   o f   th f ir m w ar p r ev en ti n g   i t f r o m   g etti n g   co r r u p ted   f r o m   ex ter n al  s o u r ce s .       5.   CO NCLU SI O N   AND  CO M P ARIS O N   T h n e w   f ir m w ar is   o v er w r it ten   to   th AR M7   th r o u g h   s o u r ce   co d e   u s in g   th s a m co m m u n icat io n   lin k   th r o u g h   w h ic h   t h d ata  co m m u n icatio n   i s   ca r r ied   o u t.  T h is   eli m in ate s   th n ee d   o f   d is m a n tli n g   th e   h ar d w ar f r o m   th r e m o te  lo ca tio n   f o r   th p u r p o s o f   f ir m war u p   g r ad atio n .     I n   th p a s p eo p le  h av p eo p l h av e   s u g g es ted   f ir m w a r u p g r ate  to   an   e m b ed d ed   s y s te m   th r o u g h   J - L i n k /J - T r ac e.   T h is   m et h o d   o f   u p g r ad atio n   r eq u ir es  d i s m a n tlin g   o f   t h h ar d w ar f r o m   r e m o te  lo ca tio n   an d   tak i n g   it to   t h d ev elo p er s   s it e.   T h is   w o u ld   b co s tlier   o p tio n .     A l s o   Si g n at u r tak e s   ca r o f   Au t h en t icit y .   So   d u ca r h as   b ee n   ta k en   to   o v er w r ite   th e   o l d   f ir m w ar w it h   t h n e w   au th e n tic  o n t h er eb y   en h an c in g   th s ec u r it y   o f   th n et w o r k ed   e m b ed d ed   s y s te m   d e v elo p ed .   T h tech n iq u o f   Fir m w ar u p g r ad p r esen ted   in   th is   p ap er   w ill  m a k th h ar d w ar m u l tifu n c tio n a ag ai n s th ap p licatio n   s p ec i f ic.   A l s o   t h s a m h ar d w ar ca n   b m o d if ied   o f   its   f u n ctio n alit y   i n   f u t u r as  p er   t h n ee d   an d   n e w   p er ip h er als.   I n   th p as p eo p le  h av p eo p le  h av s u g g ested   s ec u r it y   b as ed   o n   er r o r   co n tr o co d es.  I n   th is   p ap er   w e   h a v s u g g es ted   s i g n a tu r b ased   s ec u r it y   w h ic h   is   m o r ef f icien as   t h s ec u r it y   co d i s   k n o w n   o n l y   to   t h e   au th e n tic  m a n u f ac t u r er .       RE F E R E NC E S   [1 ]   No rf a d z li a   M o h d   Yu s o f ,   A i m a n   Zak w a n   Jid in ,   L im   M e S z e ,   Web   Ba se d   Ho m e   S e c u rit y ,   A u to m a ti o n   S y ste m In ter n a t io n a J o u rn a o Rec o n fi g u ra b le  a n d   Em b e d d e d   S y ste ms   IJ RE S ,   2 0 1 6 5 ( 2 );  9 2 - 98.   [ 2 ]   V in a y a k   P a n d it   K.,   S a n k e De s sa i,   S h il p a   Ch a u d h a ri,   De v e lo p m e n o BS P   f o A RM 9   Ev a l u a ti o n   Bo a rd ,   In ter n a t io n a J o u rn a o Rec o n fi g u ra b le  a n d   Em b e d d e d   S y ste ms   IJ RE S .   2 0 1 5 4 ( 3 );  1 6 1 - 1 7 2 .   [3 ]   Mi ke   M e y e rste in ,   In h y o k   Ch a ,   Yo g e n d ra   S h a h ,   S e c u rity  As p e c ts  o S m a rt  Ca r d v s.  Emb e d d e d   S e c u ri ty  i n   M a c h in e - to - M a c h in e   ( M 2 M Ad v a n c e d   M o b il e   Ne two rk   Ap p li c a ti o n ”,   S e c u rit y   a n d   P riv a c y   in   M o b il e   In f o rm a t io n   a n d   Co m m u n ica ti o n   S y ste m s,   F irst  In tern a ti o n a ICS T   Co n f e re n c e ,   M o b iS e c   2 0 0 9 ,   T u rin ,   I taly ,   Re v ise d   S e lec ted   P a p e rs    S p rin g e rli n k .   (Ju n e   3 - 5 ,   2 0 0 9 )   [4 ]   Ou   Qin g v u ,   Hu a n g   Ka i,   W u   X ia o p i n g ,   Res e a rc h   o n   th e   Emb e d d e d   S e c u rity  Arc h it e c tu re   B a se d   o n   t h e   Co n tro l   Fl o S e c u rity”,   IEE C o m p u ter  S o c iety :   S e c o n d   In tern a ti o n a W o rk sh o p   o n   Co m p u ter  S c ien c e   a n d   En g in e e rin g   (2 0 0 9 ).   [5 ]   Ch a n d ra se k a ra n ,   S .   Ra jen d ra n ,   J.   A n n a m a lai,   Da ta   Dr ive n   S e c u rity  Al a rm   M o d e fo Emb e d d e d   Ap p li c a ti o n s ”,  Co m p u ti n g ,   Co m m u n ica ti o n   a n d   Ne tw o rk in g ,   ICCCn   2 0 0 8 ,   I n tern a ti o n a Co n f e re n c e     IEE x p lo re   d ig it a li b ra ry   (2 0 0 8 ).   [6 ]   G u y   G o g n iat,   T il m a n   W o lf ,   e t   a l. ,   Re c o n f ig u ra b le  Ha rd w a re   fo Hig h - S e c u rit y /h ig h - P e rf o rm a n c e   E m b e d d e d   S y st e m s:  T h e   S A F ES   P e rsp e c ti v e ,   IEE T ra n sa c ti o n o n   Ver y   L a rg e   S c a le  In teg r a ti o n   ( VL S I)  S y ste ms F e b ru a ry   2 0 0 8 1 6 ( 2 ).       [7 ]   T e d   Hu ffm ire,  Bre tt   Bo th e rto n   a n d   o t h e rs.  M a n a g in g   S e c u rit y   in   F P G A   b a se d   e m b e d d e d   S y ste m s.  I EE CS   d i g it a l   L ib ra ry .   N o v e m b e r - De c e m b e 2 0 0 8 2 5 ( 6 ).   [8 ]   R.   V a slin ,   G .   G o g n iat,   J. - P .   D ig u e t,   R.   T e ss ier,  W .   Bu rles o n ,   S e c u rit y   A p p ro a c h   f o o ff - c h ip   M e m o ry   in   E m b e d d e d   M icro p ro c e ss o S y ste m s” ,   El se v ier   J o u rn a o M icr o e lec tro n ics   a n d   M icr o p ro c e ss o rs ,   2 0 0 0 .   [9 ]   T .   Ei se n b a rth ,   T .   G u n e y su ,   C.   P a a r,   A . - R.   S a d e g h i,   D.   S c h e ll e k e n s,  M .   W o lf ,   Rec o n fi g u ra b le  T ru ste d   Co mp u ti n g   in   H a r d wa re ,   In   P ro c e e d i n g s o f   th e   A CM   W o rk sh o p   o n   S c a lab le  T ru ste d   Co m p u ti n g .   (No v e m b e 2 0 0 7 )   [1 0 ]     R.   El b a z ,   L .   T o rre s,  G .   S a ss a telli ,   P .   G u il lem in ,   M .   Ba r d o u il let,   A .   M a rti n e z ,   Pa ra l lelize d   wa y   t o   Pro v i d e   d a t a   En c ry p ti o n   a n d   In teg rity  Ch e c k i n g   o n   a   Pro c e ss o r - M e mo ry   b u s” ,   In   P ro c e e d in g o f   th e IEE E/   A CM I n tern a ti o n a De sig n   A u to m a ti o n   Co n f e re n c e   ( Ju ly   2 0 0 6 ).           Evaluation Warning : The document was created with Spire.PDF for Python.