[Tinyos-help] about the bug of serial stack

2008-09-30 Thread jiwen zhang
Hello everyone :
   I fall across an odd problem about the serial stack. this question is
asked before , but nobody gievs the answer.
   I find when the length of payload is 17 or 19 bytes , the messages i
send to serial will miss the field of length in serial header (the same as
the application of BaseStation), and also if i use java
net.tinyos.tools.Listen -comm [EMAIL PROTECTED]:mica2 to listen the data , it
will print bad pakcet. what is reason ? does anyone fall across the same
problem ? Maybe you can try , it is really odd -:) and maybe it is a big bug
.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] why my motes of mica2 can't communicate with each other when i use the cvs tree of tinyos2.x

2008-07-22 Thread jiwen zhang
Hello :
   the cvs version before has a bug , but now it has been solved now , i
download the cvs version on 2008.6.14 , it has no problem . maybe you can
compare the current version you use with the one which is ok , and find the
difference.

2008/7/22 Diego Oliveira [EMAIL PROTECTED]:

 Hi,
 I am having the same problem that you had before (May 25, 2008)
 Could you please tell me what you did to solve the problem ??
 Thanks in advance,
 diego



 On May 25, 2008, at 9:13 AM, jiwen zhang wrote:

   Hello all :
i download the cvs tree of tinyos-2.x on the day of 2008-05-23 , and
 change the frequency according to my mote of mica2 (chaging the file
 /opt/tinyos-2.x/tos/chips/cc1000/CC1000Const.h)
line 212 : change #define CC1K_DEF_PRESET (CC1K_433_002_MHZ)
To  #define CC1K_DEF_PRESET (CC1K_915_998_MHZ)
   (my mote is working on  900MHZ)

   why do they can't communicate with each other ? (i test throught the
 application of RadioCountToLeds, the leds don't blink)

 --
 zhang jiwen
 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help





-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] what is the mac protocol in tinyos-2.x

2008-07-13 Thread jiwen zhang
 Hello all :
 what is the mac protocol used in current version of tinyos-2.x ?
 thank you !!

-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about CTP

2008-07-10 Thread jiwen zhang
Hello om_p :
yes , you are right , when  the user send the data , he does not put the
data at the beginning of the payload of the message_t , but an offset whose
length is the size of the ctp_header . i understand .
   another question :
maybe i have asked the question to someone , but i can't find it . you
use   nx_uint8_t   data[0]  in ctp_data_header , what is the function of
this field ? because it's size is zero . is it similar to a pointer ?

  thank you !
2008/7/11 Omprakash Gnawali [EMAIL PROTECTED]:

  On Wed, Jul 9, 2008 at 8:15 PM, jiwen zhang [EMAIL PROTECTED]
 wrote:
  Hello Omprakash  :
 
  I have a question about the code in the file CtpForwardingEngineP.nc
 
  In the implementation of Send.send , you use hdr = getHeader(msg)
 to
  make hdr point to the payload field of the msg in order to inset the ctp
  header before the user's data  , and then you give the values to the
  fields of the  data structure of ctp_data_header_t . does these
 operations
  will destroy the user's data ?
  becase the CTP works well , so i think the user's data is not destroied
 ,
  i don't know why .
  because the function of getHeader is :
ctp_data_header_t* getHeader(message_t* m) {
  return (ctp_data_header_t*)call SubPacket.getPayload(m,
  sizeof(ctp_data_header_t));
}
  so the returned pointer points to the user's data , so when you evaluate
 to
  the fields , it shoud destroy the original datas according to my
  understanding to the pointer . why ? can you give me an explain ?

 CTP data header is in the payload section of the link layer packet.
 What the code fragment above does is get a pointer to the link layer
 payload (SubPacket gives you access to the link layer packet) and cast
 the return value as a ctp_data_header_t. The user data would appear
 immediately after the CTP data header in the link layer payload
 section so by assigning values to the fields of CTP data header, we
 are not touching the user data.

 - om_p




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about Broadcast component in tinyos2.x

2008-07-02 Thread jiwen zhang
Hello David :

I see there is Broadcast component in tinyos1.x in tos\lib\Broadcast,
is there the similar component in tinyos2.x ? i want to use it , but i don't
find . why is it taken out ?

thank you !!
-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about Broadcast component in tinyos2.x

2008-07-02 Thread jiwen zhang
Hello :
   that is to say Dissemination is a substitutor of Broadcast in tinyos1.x ?


  i have spend some time researching the Dissemination , i have a question
:

  in my opinion , once the Disseminator disseminate a data , it will
increase the sequence number , for example , if the disseminator's nodeid is
0, after two times's disseminations , the the sequence number should be
0x0002 , so the whole network maintains the same sequence number
(assuming there is only one disseminator), and at this time the disseminator
is rebooted for some reason , so the sequence number is reset to zero , so
when it disseminates new datas to the network , the other nodes maybe
discard the new data . how does the Dissemination resolve the problem ?

  thank you !!
2008/7/2 Omprakash Gnawali [EMAIL PROTECTED]:

 On Wed, Jul 2, 2008 at 12:51 AM, jiwen zhang [EMAIL PROTECTED]
 wrote:
 
  Hello David :
 
  I see there is Broadcast component in tinyos1.x in tos\lib\Broadcast,
  is there the similar component in tinyos2.x ? i want to use it , but i
 don't
  find . why is it taken out ?
 

 You should look into Dissemination.

 - om_p




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] questions about CTP

2008-06-21 Thread jiwen zhang
Hello Omprakash :
Yes , i don't instantiate a  CollectionSenderC , because my applications
is similar to AntiTheft , and i don't need the component CollectionSenderC
in the Root application .
   Does these warnings affect the application's running ? -:)  if yes , How
should i correct it ?

   i also test the Root application in AntiTheft , when i compile it , it
also gives the same warnings .

   thank you !!
2008/6/20 Omprakash Gnawali [EMAIL PROTECTED]:

 On Thu, Jun 19, 2008 at 12:07 AM, jiwen zhang [EMAIL PROTECTED]
 wrote:
 ...
  today , i write an application using CTP , when i compile it , it can be
  compiled successfully , but gives some warnings like :
 
 
 /home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
  c: In function `CtpForwardingEngineP$0$sendTask$runTask':
 
 /home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
  c:493: warning: comparison is always false due to limited range of data
 type
 
 /home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
  c: In function `CtpForwardingEngineP$0$SubSend$sendDone':
 
 /home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
  c:575: warning: comparison is always false due to limited range of data
 type
 
 /home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
  c:597: warning: comparison is always false due to limited range of data
 type
 
  i am using tinyos2.x CVS tree , Do you know the reason , Omprakash  ?
 

 Maybe the problem you describe is similar to this:

 http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2008-May/033460.html

 - om_p




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] questions about CTP

2008-06-19 Thread jiwen zhang
Hello Omprakash :

2008/6/18 Omprakash Gnawali [EMAIL PROTECTED]:

 On Tue, Jun 17, 2008 at 5:42 AM, jiwen zhang [EMAIL PROTECTED]
 wrote:
  Hello Omprakash :
 
 maybe i don't express my problems distinctly .
 
 1 .  the field etx in the struct route_info_t . Is it the current
  node's ETX through it's parent  ? or is it the parent's ETX ?

 That neighbor's ETX or the cost from that neighbor to the root. If
 that neighbor is the parent, then it would be the cost from the parent
 to the root.

 2.  what are the meaning of commands getNeighborLinkQuality(uint8_t
  neighbor) and getNeighborRouteQuality(uint8_t neighbor) in the
 interface
  of CtpInfo ?
  in my opinion , the command getNeighborLinkQuality returns the
 ext
  between the current node and one neighbor in routetable , and the
  command
  getNeighborRouteQuality returns the etx between current node
 and
  root throught the neighbor . am i right ? can you expalin it detailedly ?

 You are right.

 3 . i have seen the implementation of the interface CtpInfo , and the
  command getNeighborRouteQuality which is
  command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
return (n  routingTableActive)? call
  LinkEstimator.getLinkQuality(routingTable[n].neighbor) +
  routingTable[n].info.etx:0xf;
  }
 
  if it returns the value of the neighbor's ETX through this neighbor's
 parent
  , i think it should be changed into :
  command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
return (n  routingTableActive)?  routingTable[n].info.etx:0xf;
  }
  because routingTable[n].info.etx is the neighbor's ETX through this
  neighbor's parent , why do you add the link quality between the current
 node
  and this neighbor ?

 What we are trying to do is return the path quality from the current
 node, through the given neighbor, to the root. So, we need to add the
 cost from the node to the parent (link quality) to the cost from the
 parent to the root (getNeighborRouteQuality).


I understand what you have said . there is also a problem :
i see in the task updateRouteTask() which is in component CtpRoutingEngineP
, it computes the current node's ETX throught all it's neighbors including
it's parent .
it uses :
linkEtx = evaluateEtx(call LinkEstimator.getLinkQuality(entry-neighbor));
pathEtx = linkEtx + entry-info.etx;

and
uint16_t evaluateEtx(uint16_t quality) {
return (quality + 10);
}

so i think the implementation of CtpInfo.getNeighborRouteQuality should
change into :
command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
  return (n  routingTableActive)? evaluateEtx(call
LinkEstimator.getLinkQuality(routingTable[n].neighbor)) +
routingTable[n].info.etx:0xf;
}
what do you think , Omprakash  ?

a bug :
in component CtpSenderP , it use the component CtpC , i don't find the
component . can you check it , Omprakash  ?

another question :

today , i write an application using CTP , when i compile it , it can be
compiled successfully , but gives some warnings like :

/home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
c: In function `CtpForwardingEngineP$0$sendTask$runTask':
/home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
c:493: warning: comparison is always false due to limited range of data type
/home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
c: In function `CtpForwardingEngineP$0$SubSend$sendDone':
/home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
c:575: warning: comparison is always false due to limited range of data type
/home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
c:597: warning: comparison is always false due to limited range of data type

i am using tinyos2.x CVS tree , Do you know the reason , Omprakash  ?

thank you !!


 - om_p




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] questions about CTP

2008-06-17 Thread jiwen zhang
Hello Omprakash :

   maybe i don't express my problems distinctly .

   1 .  the field etx in the struct route_info_t . Is it the current
node's ETX through it's parent  ? or is it the parent's ETX ?
   2.  what are the meaning of commands getNeighborLinkQuality(uint8_t
neighbor) and getNeighborRouteQuality(uint8_t neighbor) in the interface
of CtpInfo ?
in my opinion , the command getNeighborLinkQuality returns the ext
between the current node and one neighbor in routetable , and the
command
getNeighborRouteQuality returns the etx between current node and
root throught the neighbor . am i right ? can you expalin it detailedly ?
   3 . i have seen the implementation of the interface CtpInfo , and the
command getNeighborRouteQuality which is
command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
  return (n  routingTableActive)? call
LinkEstimator.getLinkQuality(routingTable[n].neighbor) +
routingTable[n].info.etx:0xf;
}

if it returns the value of the neighbor's ETX through this neighbor's parent
, i think it should be changed into :
command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
  return (n  routingTableActive)?  routingTable[n].info.etx:0xf;
}
because routingTable[n].info.etx is the neighbor's ETX through this
neighbor's parent , why do you add the link quality between the current node
and this neighbor ?


thank you !!
2008/6/16 Omprakash Gnawali [EMAIL PROTECTED]:

  On Sun, Jun 15, 2008 at 8:54 PM, jiwen zhang [EMAIL PROTECTED]
 wrote:
  Hello Omprakash :
 I have some questions about the interface CtpInfo .
 Firstly , i am puzzled  to the meaning of some fields in routetable.
 in the structure routing_table_entry (TreeRouting.h), there are some
  information of the current node . the field of parent in route_info_t
 should
  be the parent of one neighbor in the routetable , and what does the ETX
 mean
  ? is it the the neighbor's parent's EXT or the neighbor's the ETX ?(the
 EXT
  here should be the path metric to the root??) .
 
i have seen the implementation of CtpInfo in CtpRoutingEngineP, and i
 have
  interest to the command which get the neighbors' information.
  command uint16_t CtpInfo.getNeighborLinkQuality(uint8_t n) {
return (n  routingTableActive)? call
  LinkEstimator.getLinkQuality(routingTable[n].neighbor):0x;
  }
  command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
return (n  routingTableActive)? call
  LinkEstimator.getLinkQuality(routingTable[n].neighbor) +
  routingTable[n].info.etx:0xf;
  }
  in my opinion , the command of getNeighborLinkQuality returns a value of
 the
  quality between the current node and this neighbor in the routetable .
  if the field of ETX in route_info_t is the neighbor's EXT to the root , i
  think the command  getNeighborRouteQuality returns a value of path metric
  between the current node and the root node  through this neighbor (which
 is
  the sum of this neighbor's ETX to the root and the quility between the
  current node and the neighbor node).
 
  the command Ctp.getEtx(uint16_t* etx) will return the value of the path
  metric between the current node and the root through the node's parent. i
  find there are some differencs with the way in
  CtpInfo.getNeighborRouteQuality.
  *etx = routeInfo.etx + evaluateEtx(call
  LinkEstimator.getLinkQuality(routeInfo.parent));
  and the function evaluateEtx() is
  uint16_t evaluateEtx(uint16_t quality) {
  return (quality + 10);
  }
 
  i don't know whether  i have expressed the problem distinctly , i think
 the
  two ways have the difference of 10 . am i right ,Omprakash ? can you
 give
  me an explain?

 Yes. The algorithms use the metric ETX*10 but the metric is encoded as
 (ETX-1)*10 in the packets.

 - om_p




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] questions about CTP

2008-06-15 Thread jiwen zhang
Hello Omprakash :
   I have some questions about the interface CtpInfo .
   Firstly , i am puzzled  to the meaning of some fields in routetable.
   in the structure routing_table_entry (TreeRouting.h), there are some
information of the current node . the field of parent in route_info_t should
be the parent of one neighbor in the routetable , and what does the ETX mean
? is it the the neighbor's parent's EXT or the neighbor's the ETX ?(the EXT
here should be the path metric to the root??) .

  i have seen the implementation of CtpInfo in CtpRoutingEngineP, and i have
interest to the command which get the neighbors' information.
command uint16_t CtpInfo.getNeighborLinkQuality(uint8_t n) {
  return (n  routingTableActive)? call
LinkEstimator.getLinkQuality(routingTable[n].neighbor):0x;
}
command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
  return (n  routingTableActive)? call
LinkEstimator.getLinkQuality(routingTable[n].neighbor) +
routingTable[n].info.etx:0xf;
}
in my opinion , the command of getNeighborLinkQuality returns a value of the
quality between the current node and this neighbor in the routetable .
if the field of ETX in route_info_t is the neighbor's EXT to the root , i
think the command  getNeighborRouteQuality returns a value of path metric
between the current node and the root node  through this neighbor (which is
the sum of this neighbor's ETX to the root and the quility between the
current node and the neighbor node).

the command Ctp.getEtx(uint16_t* etx) will return the value of the path
metric between the current node and the root through the node's parent. i
find there are some differencs with the way in
CtpInfo.getNeighborRouteQuality.
*etx = routeInfo.etx + evaluateEtx(call
LinkEstimator.getLinkQuality(routeInfo.parent));
and the function evaluateEtx() is
uint16_t evaluateEtx(uint16_t quality) {
return (quality + 10);
}

i don't know whether  i have expressed the problem distinctly , i think the
two ways have the difference of 10 . am i right ,Omprakash ? can you give
me an explain?

-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about FTSP

2008-06-11 Thread jiwen zhang
Hello brano :
The file CC2420CsmaP.nc i mentioned in last email is in
tinyos-2.x-contrib/stanford-lgl/tos/chips/cc2420/csma , and the file
CC2420CsmaC is in tinyos-2.x/tos/chips/cc2420/csma .
   i have set the LGLDIR (export
LGLDIR=$HOME/local2/src/tinyos-2.x-contrib/stanford-lgl/) ,  and i see the
sentence $(call TOSMake_include,lgl.extra) in the Makerules in
tinyos-2.x-contrib/stanford-lgl/apps , so i think the compile tools will
search the directory which lgl.extra adds (???) , so the component of
CC2420CsmaC is in tinyos-2.x/tos/chips/cc2420/csma  is wired to the compoent
of CC2420CsmaP in tinyos-2.x-contrib/stanford-lgl/tos/chips/cc2420/csma ,
not the component CC2420CsmaP  in tinyos-2.x/tos/chips/cc2420/csma . so the
error appears , because the interface of RadioBackoff in CC2420CsmaP  and
CC2420CsmaC  is not compatible , one is provides interface
RadioBackoff[am_id_t amId] and the other is provides interface
RadioBackoff .

  i don't know whether i omit some steps because i only export the LGLDIR .

  can you hellp me to check it ,  brano ? thank you very much !!


2008/6/11 Branislav Kusy [EMAIL PROTECTED]:

 hi jiwen,

 looking at the cvs head, CC2420CsmaP.nc provides interface RadioBackoff
 (
 http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaP.nc?revision=1.4
 )

 you may want to update your CVS.

 brano

 jiwen zhang wrote:

 Hello brano :
  can you give me a way to solve my problem below ? thank you !!

 2008/6/8 jiwen zhang [EMAIL PROTECTED] mailto:
 [EMAIL PROTECTED]:

Hello brano :
 when i go to  the directory /apps/TestFTSP to compile it (for
micaz platform), it give the error :
 /home/Administrator/local2/src/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc:54:
no match
   i check the file CC2420CsmaC in tinyos-2.x/tos/chips/cc2420/csma
and the file CC2420CsmaP in
tinyos-2.x-contrib/stanford-lgl/tos/chips/cc2420/csma , i find the
interface RadioBackoff is not compatible , because in CC2420CsmaC :
provides interface RadioBackoff;
and in CC2420CsmaP  :
provides interface RadioBackoff[am_id_t amId];
so the error apppears .
brano , How to solve the problem reasonablely?  because if i just
change the interface in CC2420CsmaC  , that will effect other
componets .
thank you !!




 --
 zhang jiwen




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about FTSP

2008-06-11 Thread jiwen zhang
Hell brano :
   it is not a hurry-up thing , so i will wait for some days , can you send
me an email when you finish it ? -:)

   brano , you say the support for IRIS is coming (by janos sallai) (i don't
know the emil of janos sallai , can you tell me?), i want to ask whether it
is in developing ? or it does not start now ?
2008/6/12 Branislav Kusy [EMAIL PROTECTED]:

 hi jiwen,

 jiwen zhang wrote:

 Hello brano :
The file CC2420CsmaP.nc i mentioned in last email is in
 tinyos-2.x-contrib/stanford-lgl/tos/chips/cc2420/csma , and the file
 CC2420CsmaC is in tinyos-2.x/tos/chips/cc2420/csma .
   i have set the LGLDIR (export
 LGLDIR=$HOME/local2/src/tinyos-2.x-contrib/stanford-lgl/) ,  and i see the
 sentence $(call TOSMake_include,lgl.extra) in the Makerules in
 tinyos-2.x-contrib/stanford-lgl/apps , so i think the compile tools will
 search the directory which lgl.extra adds (???) , so the component of
 CC2420CsmaC is in tinyos-2.x/tos/chips/cc2420/csma  is wired to the compoent
 of CC2420CsmaP in tinyos-2.x-contrib/stanford-lgl/tos/chips/cc2420/csma ,
 not the component CC2420CsmaP  in tinyos-2.x/tos/chips/cc2420/csma . so the
 error appears , because the interface of RadioBackoff in CC2420CsmaP  and
 CC2420CsmaC  is not compatible , one is provides interface
 RadioBackoff[am_id_t amId] and the other is provides interface
 RadioBackoff .

 sorry it's my bad, i wasn't reading carefully enough. you follow all steps
 correctly, but the radio stack changed since i ported ftsp to T2.

 i have committed a modified code to $LGLDIR, but i haven't tested it. this
 is because i'm currently updating ftsp to new timesync/timestamping
 interfaces - which are more significant changes. i'll be done in few days.

 the best option for you right now is to check out tinyos-2.x with the -r
 flag, using date when i committed ftsp (ie. march 21, 2008). or wait a
 couple of days.

 brano





-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] is there am implementation of time synchroniazation based on DMTS protocol in tinyos-2.x

2008-06-05 Thread jiwen zhang
Hello all :
   at present , i want to know is there an time synchronization based on
DMTS(Delay Measurement Time Synchronization) protocol which have been
implemented in tinyos-2.x ?
   thank you !!
-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about FTSP

2008-06-05 Thread jiwen zhang
Hello brano :
thank you very much .
2008/6/6 Branislav Kusy [EMAIL PROTECTED]:

 hi zhang,

 the FTSP paper is:
 Maroti M., Kusy B., Simon G., Ledeczi A. The Flooding Time Synchronization
 Protocol.  ACM 2nd International Conference on Embedded Networked Sensor
 Systems (SenSys).  Baltimore, MD, November 2004.

 currently, FTSP supports cc2420 chip only in T2 - and it's still work in
 progress (there are problems with telos platform).


is micaz ok when using FTSP ?

 IRIS support is coming (by janos sallai).


i am looking forward to it !!



 brano


 jiwen zhang wrote:

 hello  kusy :
   i saw the FTSP in the Contributing Codes in tinyos-2.x . i want to spend
 some time reseraching it .
   i don't find some document about it ,  i think there should be a paper
 about the FTSP or other document about it , can you give me a link ?
 what are the platforms does it support at present ? in the file
 lgl.extra in  tinyos-2.x-contrib/stanford-lgl/support/make , i find it just
 support micaz and intelmote2 , is it ?  Do you have the plan to let it
 support IRIS ?
thank you very much!!
 --
 zhang jiwen




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] time synchronization

2008-06-04 Thread jiwen zhang
Hello :

2008/6/4 Miklos Maroti [EMAIL PROTECTED]:

 Hi Zhang,

  Yes. The PacketTimeStamp interface is used to access the transmit or
  receive time of the packet. If you want to embed a time stamp inside
  the packet then you need to use the TimeSyncAMSend and TimeSyncPacket
  interfaces of the SimSyncSend component.
 
  i understand , when use the TimeSyncAMSend interface to send a packet ,
 it
  also performs sender-receiver time synchronization besides send the
 packet.
  but i still have some puzzles . if the sender and receiver are turned on
 all
  the time and sleep periodically , there is no need of time synchronzation
  and  the information of time have no significance to the motes.  am i
 right

 No. The TimsSyncAMSend is a time synchronization primitive and has
 nothing to do with asynchronous LPL. If you want to establish
 synchronized global time across all motes (regardless if you use LPL
 or not) to be able to correlate external events, then you need time
 synchronization. Please read the Flooding Time Synchronization
 Protocol paper.

that is to say this is the time synchronization between the sender and
receiver , not the whole network ?

i have seen the TimeSyncAMSend, when you send a packet , you shou give an
parameter event_time in the command send . i can't understand the function
of the parameter . it says that parameter holds the time of some event as
expressed in the local clock of the sender. , what dose the some event 
mean ? what should i set it to ?
   when the receiver receive the packet sended using the interface
TimeSyncAMSend , what does it use the parameter event_time do ? can you
explain how does the sender and the receiver realize time synchronization
detailedly ? -:) i am so sorry , i still can't understand .




  ? what is the  aim when you implement the driver ? do you want to use it
 for
  lowpowerlistening ? because the current implementation of lowpower
 listening
  is asynchronous , not synchronous (the sender  know when the receiver
 wake
  up , and there is no need to send the wake up packet before send the
 useful
  data ) .  i see the lpl of rf230 has been implemented , which kind does
 it
  belong to ? do it use time synchronization in implementation of LPL ?

 No, they are completely independent.

  i think you have implemented the time synchronization , so i want to know
  the arithmetic of time synchronization  you use .
  Do you know which implementation of time synchronization suppose rf230 ?

 What do you mean by arithmetic of time synchronization? By the way,
 only the sender-receiver time synchronization primitive is
 implemented. FTSP will be ported to use this primitive.


is there some time synchronization which supports rf230 implemented in
tinyo-2.x ?


  Not yet. a TEP is coming out soon. You should have no problem using
  the components I pointed out. The interface files have the necessary
  documentations.
 
  is rf230 supposed by CTP ?

 What is CTP?

Collection Tree Protocol . it is a muliti-hop route protocol .



 Best,
 Miklos




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] make deluge support mica2

2008-06-03 Thread jiwen zhang
Hello :

2008/6/3 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 I just found a MPR400CB and I and was able to successfully run the burn
 script from the tinyos-2.x/apps/tests/deluge/Blink.

that is to say you have modify the deluge to make it support deluge
including th burn script ? what is the way ?  are there some differences
with mine ? are there some errors in my modifications , Razvan ME ?

 I used a MIB520 so the command I used was:
./burn /dev/ttyUSB0 /dev/ttyUSB1 micaz
 Both the injection and the reboot worked fine.

i also can injection on the basestation mote . but when i use the reboot
command (-r) , it does not load the image i specify to the internal flash
and just reboot .
what about yours ? does it can reboot from the specified image ?

 I only have one of these motes so I cannot do any other test than this. :-(

You have helped me so much , i really thank you very mcch !!

Does any one try it ? i want to know the your result . thank you very much
!!



 --
 Razvan ME


 On Tue, 3 Jun 2008, jiwen zhang wrote:

 Hello all :
  can someone give me an answer to my questions (as follows)?  thank you
 very much !!!

 2008/6/1 jiwen zhang [EMAIL PROTECTED]:

 Hello all :
   because i have many mica2 motes , and few micaz motes , so i want to
 modify the deluge to make it support mica2 .
  some operations i have done :
  1 . go to /opt/tinyos-2.x/tos/lib/TOSBOOT , create a folder named mica2
 ,
 copy all the files in the directory TOSBOOT/micaz to TOSBOOT/mica2.

  2 . modify the file hardware.h in TOSBOOT/mica2 . add the sentences at
 about lines 101? :
  TOSH_ASSIGN_PIN(BAT_MON, A, 5);
  TOSH_ASSIGN_PIN(THERM_PWR, A, 7);
  chage the value of VOLTAGE_PORT to 7 . (i refer to tinyos-1.15) , i
 think it should be 30 .

  3. modify the file VoltageC.nc
   at the start of command Voltage.okToProgram() , add the sentences : (i
 refer to tinyos-1.15)
  TOSH_MAKE_BAT_MON_OUTPUT();
  TOSH_SET_BAT_MON_PIN();

  4 . modify the Makefile in the directory TOSBOOT/  , add the sentences
 (after about lines 54 ?):
 ifeq ($(MAKECMDGOALS),mica2)
  CFLAGS += -DTOSBOOT_START=0x1f000 -DTOSBOOT_END=0x2
  CFLAGS += -Wl,--section-start=.text=0x1f000
  CFLAGS += -Iat45db -Iavr -Imica2 -Ilib
  CFLAGS += -I../net/Deluge
 endif

  5 . modify the files TOSBootM.nc in /TOSBOOT/ ,
 BlockStorageManagerC.nc and BlockStorageManagerP.nc in
 lib/Deluge/BlockStorageManager/ , DelugePageTransfer.h in lib/Deluge/ .
  the mothod is easy , for example :
 at the lines : defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
 change it into : defined(PLATFORM_MICAZ) || defined(PLATFORM_MICA2) ||
 defined(PLATFORM_IRIS)

 6 . go to /opt/tinyos-2.x/tos/lib/net/Deluge/extra , copy the files
 NetProgC.nc and NetProgM.nc in extra/iris to extra/mica2 .

 7 . /opt/tinyos-2.x/support/make, modify the file bnp.extra , add the
 sentences at about line29 ?:
  ifeq ($(TARGETS),mica2)
CFLAGS += -I$(DELUGE_EXTRA)/mica2 -I$(DELUGE_EXTRA)/micaz
 -I$(DELUGE_EXTRA)/avr -I$(DELUGE_EXTRA)
BOOTLOADER ?= $(TOSBOOT_DIR)/mica2/main.ihex
AVR_FUSE_H ?= 0xda
  endif

 8 . modify the files tos-deluge in /usr/local/bin ? and
 /opt/tinyos/tools/tinyos/misc at about line38 ? :
 chage :
 BAUDRATES = {'micaz': 57600,
  'telosb': 115200,
  'iris': 57600}
 into :
 BAUDRATES = {'micaz': 57600,
 'mica2': 57600,
  'telosb': 115200,
  'iris': 57600}

 that is all .

 Do i still have something to modify or there are something wrong i have
 modified ?

 i have tested the result , there is something deviant :
 1 . i test the basestion node (/opt/tinyos-2.x/tests/deluge/blink ,
 CFLAGS=--DDELUGE_BASESTATION make mica2 ), I can ping it and inject a
 new
 image , but when i use the command to reboot it from the image i have
 installed (section 1) , it reboots but does not load the image from
 senction
 1 .

 2 . i test network programme . i use two mica2 motes , one is the
 basestion
 , the other is non-basestation . after i use the command -dr , i find
 the
 green led of non-basestation blinks .( i have tested with micaz , it is a
 right  action it should have . )  i have thought it is ok . but after a
 long
 time (about more than 30 minutes ) , the mote still blink the green led .
 i
 don't know why .

 can anyone give me some suggestions ?

 thank you very much !!

 zhang jiwen




 --
 zhang jiwen




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] time synchronization

2008-06-03 Thread jiwen zhang
Hello all :
   i see some files in chips/rf230 , i see some words like TimeSyncPacket ,
so i think maybe the time synchronization is implementated in rf230 , am i
right ?
   if yes , i want to know which arithmetic does it use ? maybe there are a
corresponding paper , can someone give me a reference ?

  thank you very much !!

-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] time synchronization

2008-06-03 Thread jiwen zhang
Hello all :

2008/6/3 Miklos Maroti [EMAIL PROTECTED]:

 Hi Zhang,

  Hello all :
 i see some files in chips/rf230 , i see some words like TimeSyncPacket
 ,
  so i think maybe the time synchronization is implementated in rf230 , am
 i
  right ?

 Yes. The PacketTimeStamp interface is used to access the transmit or
 receive time of the packet. If you want to embed a time stamp inside
 the packet then you need to use the TimeSyncAMSend and TimeSyncPacket
 interfaces of the SimSyncSend component.

i understand , when use the TimeSyncAMSend interface to send a packet , it
also performs sender-receiver time synchronization besides send the packet.
but i still have some puzzles . if the sender and receiver are turned on all
the time and sleep periodically , there is no need of time synchronzation
and  the information of time have no significance to the motes.  am i right
? what is the  aim when you implement the driver ? do you want to use it for
lowpowerlistening ? because the current implementation of lowpower listening
is asynchronous , not synchronous (the sender  know when the receiver wake
up , and there is no need to send the wake up packet before send the useful
data ) .  i see the lpl of rf230 has been implemented , which kind does it
belong to ? do it use time synchronization in implementation of LPL ?


 if yes , i want to know which arithmetic does it use ?

 What do you mean? The time resolution is currently 1 millisecond
 (continnuous) and 1 microsecond (stops of the mote stops).

i think you have implemented the time synchronization , so i want to know
the arithmetic of time synchronization  you use .
Do you know which implementation of time synchronization suppose rf230 ?



  maybe there are a corresponding paper , can someone give me a reference ?

 Not yet. a TEP is coming out soon. You should have no problem using
 the components I pointed out. The interface files have the necessary
 documentations.

is rf230 supposed by CTP ?



 Best,
 Miklos




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] make deluge support mica2

2008-06-03 Thread jiwen zhang
Hello all :

2008/6/3 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Tue, 3 Jun 2008, jiwen zhang wrote:

 Hello :

 2008/6/3 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 I just found a MPR400CB and I and was able to successfully run the burn
 script from the tinyos-2.x/apps/tests/deluge/Blink.


 that is to say you have modify the deluge to make it support deluge
 including th burn script ? what is the way ?  are there some differences
 with mine ? are there some errors in my modifications , Razvan ME ?


 I run exactly the latest version from CVS. I used micaz which means the
 radio part will not work but otherwise the Mica2 is very similar with MicaZ.


i understand what you do . i also test like you and my mica2 mote work well
too as it should be . i don't change too muh , why after modification
according to the mothod present in the email before , the mica2 can not
reboot from specified image ? it puzzle me .



  I used a MIB520 so the command I used was:
   ./burn /dev/ttyUSB0 /dev/ttyUSB1 micaz
 Both the injection and the reboot worked fine.


 What happens if you run the above command on an unmodified tree?

the mica2 mote work well if it is an basestation on an unmodified tree .



 i also can injection on the basestation mote . but when i use the reboot
 command (-r) , it does not load the image i specify to the internal flash
 and just reboot .
 what about yours ? does it can reboot from the specified image ?


 The reboot using -r worked properly because the burn script is using it. I
 also tested it manually and it worked fine.

when i use the -r on the modified tree , the mica2 mote just reboot and can
load the specified image . so i use the command -i to load an image to the
section 0 , and test it manually , it can reboot and can load the image from
section 0 .

can you see where the problem is ,  Razvan ME ?

can you modify the tree according to the mothod i have said and check where
the problem is ? maybe we can make deluge support mica2 mote , if the
basestation mote work well , i can test the network programme , i have some
mica2 motes .

thank you very much for your help !!



 All the best!
 Razvan ME


  I only have one of these motes so I cannot do any other test than this.
 :-(


 You have helped me so much , i really thank you very mcch !!

 Does any one try it ? i want to know the your result . thank you very much
 !!



 --
 Razvan ME


 On Tue, 3 Jun 2008, jiwen zhang wrote:

 Hello all :

  can someone give me an answer to my questions (as follows)?  thank you
 very much !!!

 2008/6/1 jiwen zhang [EMAIL PROTECTED]:

 Hello all :

  because i have many mica2 motes , and few micaz motes , so i want to
 modify the deluge to make it support mica2 .
  some operations i have done :
  1 . go to /opt/tinyos-2.x/tos/lib/TOSBOOT , create a folder named
 mica2,
 copy all the files in the directory TOSBOOT/micaz to TOSBOOT/mica2.

  2 . modify the file hardware.h in TOSBOOT/mica2 . add the sentences at
 about lines 101? :
  TOSH_ASSIGN_PIN(BAT_MON, A, 5);
  TOSH_ASSIGN_PIN(THERM_PWR, A, 7);
  chage the value of VOLTAGE_PORT to 7 . (i refer to tinyos-1.15) , i
 think it should be 30 .

  3. modify the file VoltageC.nc
  at the start of command Voltage.okToProgram() , add the sentences : (i
 refer to tinyos-1.15)
 TOSH_MAKE_BAT_MON_OUTPUT();
 TOSH_SET_BAT_MON_PIN();

  4 . modify the Makefile in the directory TOSBOOT/  , add the sentences
 (after about lines 54 ?):
 ifeq ($(MAKECMDGOALS),mica2)
  CFLAGS += -DTOSBOOT_START=0x1f000 -DTOSBOOT_END=0x2
  CFLAGS += -Wl,--section-start=.text=0x1f000
  CFLAGS += -Iat45db -Iavr -Imica2 -Ilib
  CFLAGS += -I../net/Deluge
 endif

  5 . modify the files TOSBootM.nc in /TOSBOOT/ ,
 BlockStorageManagerC.nc and BlockStorageManagerP.nc in
 lib/Deluge/BlockStorageManager/ , DelugePageTransfer.h in lib/Deluge/ .
  the mothod is easy , for example :
 at the lines : defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
 change it into : defined(PLATFORM_MICAZ) || defined(PLATFORM_MICA2) ||
 defined(PLATFORM_IRIS)

 6 . go to /opt/tinyos-2.x/tos/lib/net/Deluge/extra , copy the files
 NetProgC.nc and NetProgM.nc in extra/iris to extra/mica2 .

 7 . /opt/tinyos-2.x/support/make, modify the file bnp.extra , add the
 sentences at about line29 ?:
  ifeq ($(TARGETS),mica2)
   CFLAGS += -I$(DELUGE_EXTRA)/mica2 -I$(DELUGE_EXTRA)/micaz
 -I$(DELUGE_EXTRA)/avr -I$(DELUGE_EXTRA)
   BOOTLOADER ?= $(TOSBOOT_DIR)/mica2/main.ihex
   AVR_FUSE_H ?= 0xda
  endif

 8 . modify the files tos-deluge in /usr/local/bin ? and
 /opt/tinyos/tools/tinyos/misc at about line38 ? :
 chage :
 BAUDRATES = {'micaz': 57600,
 'telosb': 115200,
 'iris': 57600}
 into :
 BAUDRATES = {'micaz': 57600,
'mica2': 57600,
 'telosb': 115200,
 'iris': 57600}

 that is all .

 Do i still have something to modify or there are something wrong i have
 modified ?

 i have tested

Re: [Tinyos-help] something wrong happened in CC1000 driver in tinyos-2.x tree of cvs version

2008-06-02 Thread jiwen zhang
Hello all :
   that is right , it is the problem of CC1000SendReceiveP.nc  .
   i have compare the file CC1000SendReceiveP.nc between the version of cvs
and release  . i think there is no problem in  ((uint8_t
*)rxBufPtr)[count++] = nextByte; , because this section of programme is the
same between the two version . i find the problem exists lines 575 ,
maybe  radioState is always not equal to  RECEIVED_STATE , so the sentence
of return always run .
  if (radioState != RECEIVED_STATE) {
  return;
  }

i delete the return sentence , the motes can receive packets .

i don't know the real reason why radioState is not equal to  RECEIVED_STATE
, can someone give an explain ?

thank you !!

2008/6/2 John Regehr [EMAIL PROTECTED]:

 We think we have found a problem in the CC1000 receive-side code that is
 perhaps related to the behavior described here.

 The suspected culprit is at line 501 of CC1000SendReceiveP.nc which looks
 like this:

 ((uint8_t *)rxBufPtr)[count++] = nextByte;

 We think that count is going out of bounds, leading to RAM corruption.
 To test this, introduce some code just before this line that is something
 like

 if (count=sizeof(message_t)) { ... blink LEDs in infinite loop ... }

 Confirmation that this check fails (or not) would be useful to us.

 We'd do this ourselves but we seem to have very few mica2s sitting
 around.

 The root problem may be a failure to clear count at an appropriate time.

 John




 On Sun, 1 Jun 2008, Philip Levis wrote:

 
  On May 30, 2008, at 1:22 PM, Dima Kogan wrote:
 
  I can confirm this. My CC1000-based motes work fine with the 2.0.2
  release but crash with the latest cvs. I run a modified BlinkToRadio
  to test, with one node only transmitting and the other node only
  receiving. The transmitting node works ok. The receiving node seems
  to crash. As a test, I turn on an LED in Boot.booted() and don't
  turn it off in any part of the code. This LED blinks or turns off at
  various times on the transmitted node, which indicates that the mote
  is
  rebooting. ALso, the first packet from the transmitter is always
  received properly, with the erroneous behavior starting with the
  second
  packet.
 
  There have only been a few small changes to the CC1000 stack; the
  first was that it actually checks for CRCs, the second was the
  inclusion of support for 4 bit link estimation.
 
  Om, you were going to run some tests on mica2dots, right? Can you see
  if you encounter this problem?
 
  Phil
  ___
  Tinyos-help mailing list
  Tinyos-help@millennium.berkeley.edu
  https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
 
 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about the metadata of cc2420

2008-06-02 Thread jiwen zhang
Hello David :
i got some datas from serial port :
00 FF FF 00 08 1A 00 06 00 03 26 88 41 01 00 22 FF FF 00 08 06 EF 6B 00 01
00 2B 31 00 00 00 00 00 00
00 FF FF 00 08 1A 00 06 00 04 26 88 41 02 00 22 FF FF 00 08 06 EF 6B 00 01
00 99 50 00 00 00 00 00 00
00 FF FF 00 08 1A 00 06 00 05 26 88 41 03 00 22 FF FF 00 08 06 EF 6C 00 01
00 07 3D 00 00 00 00 00 00
00 FF FF 00 08 1A 00 06 00 06 26 88 41 04 00 22 FF FF 00 08 06 EE 6B 00 01
00 74 D2 00 00 00 00 00 00
00 FF FF 00 08 1A 00 06 00 07 26 88 41 05 00 22 FF FF 00 08 06 EF 6C 00 01
00 E3 39 00 00 00 00 00 00
00 FF FF 00 08 1A 00 06 00 08 26 88 41 06 00 22 FF FF 00 08 06 EE 6B 00 01
00 50 B5 00 00 00 00 00 00
00 FF FF 00 08 1A 00 06 00 09 26 88 41 07 00 22 FF FF 00 08 06 EF 6C 00 01
00 BF 50 00 00 00 00 00 00
00 FF FF 00 08 1A 00 06 00 0A 26 88 41 08 00 22 FF FF 00 08 06 EF 6A 00 01
00 2D 57 00 00 00 00 00 00
00 FF FF 00 08 1A 00 06 00 0B 26 88 41 09 00 22 FF FF 00 08 06 EF 6B 00 01
00 9A 25 00 00 00 00 00 00
00 FF FF 00 08 1A 00 06 00 0C 26 88 41 0A 00 22 FF FF 00 08 06 EF 6C 00 01
00 08 A8 00 00 00 00 00 00
00 FF FF 00 08 1A 00 06 00 0D 26 88 41 0B 00 22 FF FF 00 08 06 EF 6B 00 01
00 76 DE 00 00 00 00 00 00

the red font is the metadata , they are
rssi,lqi,tx_power,crc,ack,time,rxInterval,maxRetries and retryDelay .
i note that the ack is 01 , but i don't use the auto-ack . does it use the
auto-ack acquiescently?

2008/6/3 David Moss [EMAIL PROTECTED]:

  The metadata contains information about the packet that is used by the
 radio stack.  Like you said, it is not transmitted as part of the packet,
 but rather contains side-note information about the packet.



 The metadata fields are all 0's at boot time, because they haven't been
 initialized.  When you receive a packet, the buffer receiving the packet
 doesn't have any of its metadata configured except the RSSI and LQI fields.
  When you copy the metadata fields from your received packet to the payload
 portion of a serial packet, seeing 0's in most of the fields is correct.

that is to say the fields like tx_power,crc,rxInterval,maxRetries and
retryDelay are not given an significative in the implementation ? why do you
set these filelds in the implemenation ?  from the data i received from
serial port , PACKET_LINK is defined in somewhere , is it defined defaultly
?



 The timestamp should be the local relative time the packet was received,
 which is the time the SFD (start frame delimiter) interrupt fired on the
 radio chip when it began to receive a packet.

i don't find the orderliness  between the values of time i get . what kind
of time is it ? is it  a counter which counte from zero ? why do you set
this field in the implemention ? i don't find where does this filed is used
.

   The RSSI and LQI fields reflect those values while the packet was being
 received.  At that time, there is a transmitter nearby, so you'll see lots
 of energy on the channel.  The RssiToSerial application monitors the RSSI at
 any time �C and the values you read mostly occur when a transmitter is not on
 the channel.  In those cases, you'll be reading the energy of the noise
 floor.



 When the radio receives a packet, it will automatically fill in the RSSI
 and LQI fields in the metadata for that packet.  If you want to read the
 RSSI values when the radio is not receiving a packet, you would use
 CC2420ControlC's ReadRssi interface.  LQI values are only available when
 receiving a packet.



 -David








  --

 *From:* jiwen zhang [mailto:[EMAIL PROTECTED]
 *Sent:* Monday, June 02, 2008 8:11 AM
 *To:* David Moss
 *Subject:* about the metadata of cc2420



 Hello David :

as we know , the metadata is not sended when we use the command
 AMSend.send to send a packet . Can you explain  the function of the
 metadata  ?



   i see some codes of cc2420 driver . are  all fields of metadata given an
 significative value ? such as rssi , lqi and so on ?



 i put the metadata in the payload when i receive a packet and send the
 packet to serial port in order to see what the values are . i
 find  rxInterval,maxRetries and retryDelay are equal to zero . are they
 right ?

 and the time field is some strange value , for example , every second , i
 send a packet , the value of time field i receive are 3e 43 , ac 4d , 1a 27
 , 88 46 ... , i don't know how do they figure out in the implemention of
 cc2420 driver .



 the rssi value i get (i use the interface CC2420PacketBody)  is E5 or E9
 when there is only one sender and one receiver . it is different with the
 value i get by the application of /apps/tests/cc2420RssiToSerial whose value
 is about 4A ,4B or 4C,  why ? how do these value get in the implemention  of
 cc2420 driver ? read from the specified register ? and what about lqi ? (the
 value i get is about 6B or 6C , and also one sender , one receiver )



  typedef nx_struct cc2420_metadata_t {
   nx_uint8_t rssi;
   nx_uint8_t lqi;
   nx_uint8_t tx_power;
   nx_bool crc;
   nx_bool ack

Re: [Tinyos-help] make deluge support mica2

2008-06-02 Thread jiwen zhang
Hello all :
   can someone give me an answer to my questions (as follows)?  thank you
very much !!!

2008/6/1 jiwen zhang [EMAIL PROTECTED]:

 Hello all :
because i have many mica2 motes , and few micaz motes , so i want to
 modify the deluge to make it support mica2 .
   some operations i have done :
   1 . go to /opt/tinyos-2.x/tos/lib/TOSBOOT , create a folder named mica2 ,
 copy all the files in the directory TOSBOOT/micaz to TOSBOOT/mica2.

   2 . modify the file hardware.h in TOSBOOT/mica2 . add the sentences at
 about lines 101? :
   TOSH_ASSIGN_PIN(BAT_MON, A, 5);
   TOSH_ASSIGN_PIN(THERM_PWR, A, 7);
   chage the value of VOLTAGE_PORT to 7 . (i refer to tinyos-1.15) , i
 think it should be 30 .

   3. modify the file VoltageC.nc
at the start of command Voltage.okToProgram() , add the sentences : (i
 refer to tinyos-1.15)
   TOSH_MAKE_BAT_MON_OUTPUT();
   TOSH_SET_BAT_MON_PIN();

   4 . modify the Makefile in the directory TOSBOOT/  , add the sentences
 (after about lines 54 ?):
 ifeq ($(MAKECMDGOALS),mica2)
   CFLAGS += -DTOSBOOT_START=0x1f000 -DTOSBOOT_END=0x2
   CFLAGS += -Wl,--section-start=.text=0x1f000
   CFLAGS += -Iat45db -Iavr -Imica2 -Ilib
   CFLAGS += -I../net/Deluge
 endif

  5 . modify the files TOSBootM.nc in /TOSBOOT/ ,
 BlockStorageManagerC.nc and BlockStorageManagerP.nc in
 lib/Deluge/BlockStorageManager/ , DelugePageTransfer.h in lib/Deluge/ .
   the mothod is easy , for example :
 at the lines : defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
 change it into : defined(PLATFORM_MICAZ) || defined(PLATFORM_MICA2) ||
 defined(PLATFORM_IRIS)

 6 . go to /opt/tinyos-2.x/tos/lib/net/Deluge/extra , copy the files
 NetProgC.nc and NetProgM.nc in extra/iris to extra/mica2 .

 7 . /opt/tinyos-2.x/support/make, modify the file bnp.extra , add the
 sentences at about line29 ?:
   ifeq ($(TARGETS),mica2)
 CFLAGS += -I$(DELUGE_EXTRA)/mica2 -I$(DELUGE_EXTRA)/micaz
 -I$(DELUGE_EXTRA)/avr -I$(DELUGE_EXTRA)
 BOOTLOADER ?= $(TOSBOOT_DIR)/mica2/main.ihex
 AVR_FUSE_H ?= 0xda
   endif

 8 . modify the files tos-deluge in /usr/local/bin ? and
 /opt/tinyos/tools/tinyos/misc at about line38 ? :
 chage :
 BAUDRATES = {'micaz': 57600,
   'telosb': 115200,
   'iris': 57600}
 into :
 BAUDRATES = {'micaz': 57600,
  'mica2': 57600,
   'telosb': 115200,
   'iris': 57600}

 that is all .

 Do i still have something to modify or there are something wrong i have
 modified ?

 i have tested the result , there is something deviant :
 1 . i test the basestion node (/opt/tinyos-2.x/tests/deluge/blink ,
 CFLAGS=--DDELUGE_BASESTATION make mica2 ), I can ping it and inject a new
 image , but when i use the command to reboot it from the image i have
 installed (section 1) , it reboots but does not load the image from senction
 1 .

 2 . i test network programme . i use two mica2 motes , one is the basestion
 , the other is non-basestation . after i use the command -dr , i find the
 green led of non-basestation blinks .( i have tested with micaz , it is a
 right  action it should have . )  i have thought it is ok . but after a long
 time (about more than 30 minutes ) , the mote still blink the green led . i
 don't know why .

 can anyone give me some suggestions ?

 thank you very much !!

 zhang jiwen




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] make deluge support mica2

2008-06-01 Thread jiwen zhang
Hello all :
   because i have many mica2 motes , and few micaz motes , so i want to
modify the deluge to make it support mica2 .
  some operations i have done :
  1 . go to /opt/tinyos-2.x/tos/lib/TOSBOOT , create a folder named mica2 ,
copy all the files in the directory TOSBOOT/micaz to TOSBOOT/mica2.

  2 . modify the file hardware.h in TOSBOOT/mica2 . add the sentences at
about lines 101? :
  TOSH_ASSIGN_PIN(BAT_MON, A, 5);
  TOSH_ASSIGN_PIN(THERM_PWR, A, 7);
  chage the value of VOLTAGE_PORT to 7 . (i refer to tinyos-1.15) , i think
it should be 30 .

  3. modify the file VoltageC.nc
   at the start of command Voltage.okToProgram() , add the sentences : (i
refer to tinyos-1.15)
  TOSH_MAKE_BAT_MON_OUTPUT();
  TOSH_SET_BAT_MON_PIN();

  4 . modify the Makefile in the directory TOSBOOT/  , add the sentences
(after about lines 54 ?):
ifeq ($(MAKECMDGOALS),mica2)
  CFLAGS += -DTOSBOOT_START=0x1f000 -DTOSBOOT_END=0x2
  CFLAGS += -Wl,--section-start=.text=0x1f000
  CFLAGS += -Iat45db -Iavr -Imica2 -Ilib
  CFLAGS += -I../net/Deluge
endif

 5 . modify the files TOSBootM.nc in /TOSBOOT/ , BlockStorageManagerC.nc and
BlockStorageManagerP.nc in lib/Deluge/BlockStorageManager/ ,
DelugePageTransfer.h in lib/Deluge/ .
  the mothod is easy , for example :
at the lines : defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
change it into : defined(PLATFORM_MICAZ) || defined(PLATFORM_MICA2) ||
defined(PLATFORM_IRIS)

6 . go to /opt/tinyos-2.x/tos/lib/net/Deluge/extra , copy the files
NetProgC.nc and NetProgM.nc in extra/iris to extra/mica2 .

7 . /opt/tinyos-2.x/support/make, modify the file bnp.extra , add the
sentences at about line29 ?:
  ifeq ($(TARGETS),mica2)
CFLAGS += -I$(DELUGE_EXTRA)/mica2 -I$(DELUGE_EXTRA)/micaz
-I$(DELUGE_EXTRA)/avr -I$(DELUGE_EXTRA)
BOOTLOADER ?= $(TOSBOOT_DIR)/mica2/main.ihex
AVR_FUSE_H ?= 0xda
  endif

8 . modify the files tos-deluge in /usr/local/bin ? and
/opt/tinyos/tools/tinyos/misc at about line38 ? :
chage :
BAUDRATES = {'micaz': 57600,
  'telosb': 115200,
  'iris': 57600}
into :
BAUDRATES = {'micaz': 57600,
 'mica2': 57600,
  'telosb': 115200,
  'iris': 57600}

that is all .

Do i still have something to modify or there are something wrong i have
modified ?

i have tested the result , there is something deviant :
1 . i test the basestion node (/opt/tinyos-2.x/tests/deluge/blink ,
CFLAGS=--DDELUGE_BASESTATION make mica2 ), I can ping it and inject a new
image , but when i use the command to reboot it from the image i have
installed (section 1) , it reboots but does not load the image from senction
1 .

2 . i test network programme . i use two mica2 motes , one is the basestion
, the other is non-basestation . after i use the command -dr , i find the
green led of non-basestation blinks .( i have tested with micaz , it is a
right  action it should have . )  i have thought it is ok . but after a long
time (about more than 30 minutes ) , the mote still blink the green led . i
don't know why .

can anyone give me some suggestions ?

thank you very much !!

zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] problem of make

2008-06-01 Thread jiwen zhang
Hello :
  maybe you should set the environment like these :
export TOSROOT=/opt/tinyos-2.x
export TOSDIR=$TOSROOT/tos
export CLASSPATH=`cygpath -w $TOSROOT/support/sdk/java/tinyos.jar`
export CLASSPATH=$CLASSPATH;.
export MAKERULES=$TOSROOT/support/make/Makerules



2008/6/1 孙�D [EMAIL PROTECTED]:

 hello everyone!

   i installed tinyos-2.x on my PC as
 http://www.tinyos.net/tinyos-2.x/doc/html/install-tinyos.html showed,but
 when i use make to  compile  application of blink ,the error
 calledMakefile:2: no file name for include  always occurred.
 who can tell me what's wrong with my installed tinyos?

 thanks a lot!


 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Bug founded in the driver of cc1000 in the tinyos-2.x tree of cvs version

2008-05-31 Thread jiwen zhang
Hello all :
Yesterday , i send an emial to the tinyos-help that when i use the cvs
version of tinyos-2.x , the motes of mica2 can't communicate with each other
. today , after some times' test , i find the reason .
the problem exists in the file CC1000SendReceiveP.nc , lines 575 .
   if you delete the sentence return , the mote will work well .
   i think radioState is not equal to RECEIVED_STATE when the function of
packetReceiveDone is called , so it always return before other sentences run
.

   maybe it is not a good way to modify the programme like this , can
someone give a suitable mothod and some explains ?
   thank you !!

-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] something wrong happened in CC1000 driver in tinyos-2.x tree of cvs version

2008-05-30 Thread jiwen zhang
Hello all :
i don't know whether something wrong happened in the driver of cc1000 in
the cvs version of tinyos-2.x , but when i use the cvs version , my mica2
motes can't communicate with each other . i install the
/opt/tinyos-2.x/apps/tutorials/BlinkToRadio to two motes , i find the leds
never blink. (my mote use 900 MHZ , i have changed the frequency in
CC1000Const.h , this is no problem) .
   so i chaged the application to test whether the Radio can start ,
when the event startDone is signaled , i turn on the red led , i find it is
on when i boot the mote .
   next , i test whether the radio can send the message , i send the message
every 500 ms, when the sendDone() is signaled , i toggle the green led , the
green led toggles as i expected . but i find there is a strange problem ,
when it run for some times , the green leds does't blink any more .  also ,
the same application which installed different motes , some motes blink the
green led, some don't . the motes are ok , i have tested them .
   i set when the mote receives the packet , it toggle the yellow led , but
the led never blink , that is to say it never receive the packet .

  does someone has the same problem with me ?
  can someone give me an explain or solution ?
  thank you very much!!

-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] problems about Deluge

2008-05-29 Thread jiwen zhang
Hello Razvan ME :

2008/5/29 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Thu, 29 May 2008, jiwen zhang wrote:

 Hello Razvan ME :
  Recently , i download the tinyos-2.x  tree of cvs verion , now the deluge
 works well except that when i use the command tos-deluge /dev/ttyS0 micaz
 -e 1 (i have installed an image in slot 1) , then i ping the mote , it
 give
 the message that the image still exist , can you check if the bug exist ?


 I'm home now so I'll check tomorrow.

  another question :
  You have say i only need to modify the file DelugeP.nc , the deluge will
 support to programme the specified motes . how can i realize these ? i
 thick
 the tools of tos-deluge should also be modified , because there is no
 parameter of mote id . can you make a time to give a document about these
 ?


 I'm sorry to keep you waiting but I'm really-really busy right now. I
 promise that as soon as I get some time I'll write about how to do it.

I am sorry to disturb you when you are so busy .
thank you very much , i look forward to your document . -:)




 --
 Razvan ME




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] About LowPowerListening

2008-05-28 Thread jiwen zhang
Hello David :
   about the command setRxSleepInterval() , i want to ask some questions
again .
   1. In my test , the sender and receiver have the same duty cycle (sleep
interval ?) , for example 250ms , how long should i send the wake-up packet
before i send my data ? that is to say that what should i set the  parameter
of setRxSleepInterval before i use the command AMSend.send() to send my
useful datas ?
in my test , i set it equal to sleep interval , i find there is no lost
packet .
   2. If the receiver receives the packet , it will give the sender an
acknowledgement , what is the format of the acknowledgement ? where is the
format defined ? if i use the Basestation to snoop the acknowledgement , can
i receive it ?
  3. Does rf230 support LowPowerListeing ?

another question :
David , i download the cvs tree of tinyos-2.x six days ago , i install
the RadioCountToLeds to the mica2 motes , i find they can't communicate with
each other . i have chaged the frequency in CC1000Const.h , just chaged
#ifndef CC1K_DEF_PRESET
#define CC1K_DEF_PRESET (CC1K_433_002_MHZ)  To
#ifndef CC1K_DEF_PRESET
#define CC1K_DEF_PRESET (CC1K_915_998_MHZ)
(My mica2 motes use 900MHZ)

in the primary tinyos tree (not the version of cvs) , i just chage this ,
the mica2 motes can communicate with each other , but in the cvs version ,
they can't . Do you know why , David ? have you tried ?

thank you very much !!
2008/5/27 David Moss [EMAIL PROTECTED]:

  Hi Jiwen �C



 I've been out for a few days, sorry for the delay in the response.



 You're correct about the operation of setLocalSleepInterval. The amount of
 time the radio wakes up is ideally as short as possible, and is dependent
 upon the type of low power communication strategy implemented.  The default
 CC2420 low power communication implementation, in an attempt to work on
 everyone's setup, is set to 11 ms receive check intervals.  I've had this
 working reliably in more of a point-to-point scheme (no surrounding network)
 at 5 ms.  Essentially, because the wakeup transmission is a packet train,
 the amount of time a receiver radio must perform an energy-based receive
 check is the duration of the gap in modulation between packets.  On
 different strategies, like a BMAC-based strategy where a long continuously
 modulated signal is emitted from the transmitter, the receive check can be
 near instantaneous.



 The setRxSleepInterval() command is used to setup the packet, before
 transmission, to tell the radio stack how long to transmit that packet for
 to wake up its intended destination.  So if you are about to transmit a
 packet to a node that has a local duty cycle of 250 ms, you have to tell the
 packet that the receiver's sleep interval is 250 ms.  The radio stack will
 wake up the duty cycling receiver for that duration of time while attempting
 to deliver the packet.



 The cc1000_lpl directory is no longer valid, and should never be used.  The
 default cc1000 directory contains a fully functional low power communication
 implementation, BMAC.



 -David












  --

 *From:* jiwen zhang [mailto:[EMAIL PROTECTED]
 *Sent:* Monday, May 26, 2008 6:33 AM
 *To:* David Moss; tinyos-help
 *Subject:* Fwd: About LowPowerListening





 -- Forwarded message --
 From: *jiwen zhang* [EMAIL PROTECTED]
 Date: 2008/5/25
 Subject: About LowPowerListening
 To: David Moss [EMAIL PROTECTED], tinyos-help 
 tinyos-help@millennium.berkeley.edu

  Hello David :

Maybe i have asked the question to you , but i still have some puzzles .

1. about the command setLocalSleepInterval(uint16_t sleepIntervalMs) .

 in my opinion , it is used the set that how long the mote sleep . for
 example , we set sleepIntervalMs to 250 , which mean the mote will sleep
 250ms and wake up automatically , then check whether there is carrier . if
 yes , it will keep awake for a long time to receive the data packet , if no
 , it will go to sleep .

i want to know , how long does the mote take to check whether there is
 carrier wave ? if there is carrier, how long does the mote keep awake in
 order to receive the data packet ?(maybe there is no data packet sended to
 it , so i thick there could be a time upper limit that the mote keep awake
 )

2. about the command setRxSleepInterval(message_t *msg, uint16_t
 sleepIntervalMs)

i don't know what the function of this command is , can you explain to
 me ,David ?

In Lesson 16: Writing Low Power Sensing Applications , there is some
 introduction to LowPowerListening . it demonstrates the usage pattern :



 event void Boot.booted() {
   call LPL.setLocalSleepInterval(LPL_INTERVAL);
   call AMControl.start();
 }

 event void AMControl.startDone(error_t e) {
   if(e != SUCCESS)
 call AMControl.start();
 }

 ...

 void sendMsg() {
   call LPL.setRxSleepInterval(msg, LPL_INTERVAL);
   if(call Send.send(dest_addr, msg, sizeof(my_msg_t)) != SUCCESS)
 post retrySendTask

Re: [Tinyos-help] problems about Deluge

2008-05-28 Thread jiwen zhang
Hello Razvan ME :
   Recently , i download the tinyos-2.x  tree of cvs verion , now the deluge
works well except that when i use the command tos-deluge /dev/ttyS0 micaz
-e 1 (i have installed an image in slot 1) , then i ping the mote , it give
the message that the image still exist , can you check if the bug exist ?
   another question :
   You have say i only need to modify the file DelugeP.nc , the deluge will
support to programme the specified motes . how can i realize these ? i thick
the tools of tos-deluge should also be modified , because there is no
parameter of mote id . can you make a time to give a document about these ?

  thank you very much !!

2008/5/22 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Wed, 21 May 2008, jiwen zhang wrote:

 Hello Razvan ME :
  today , i tested the apps/tests/deluge/blink (the verison of git
 http://hinrg.cs.jhu.edu/git/tinyos-2.x.git   download on 2008.05.15), i
 find
 some problems , i don't know whether these have relation to my deluge
 tools:
  1. i use the command make micaz install.0 mib510,/dev/ttyS0 to install
 the application to the mote
if i don't install any image in the external flash , i can use the
 command tos-deluge /dev/ttyS0 micaz -r 1 .


 If you don't have any image in the external flash the -r 1 should not work.


 but after i install the image , for example slot 1 , then if use the
 command tos-deluge /dev/ttyS0 micaz -r 1 , the red flash will flash quickly
 and never stop . what is the reason ?
 2 . after i install an image to slot of the external flsh , i reboot the
 mote by hand , then i use the command tos-deluge /dev/ttyS0 micaz -p 1 , it
 give me the information that No valid image was detected . i think the mote
 lose the information after rebooting .


 Are you able to successfully run the burn from apps/test/deluge/Blink?

 3 . after i install the image , i use the command tos-deluge /dev/ttyS0
 micaz -e 1 to erase the image , it is successful . then i use tos-deluge
 /dev/ttyS0 micaz -p 1 , it show the information of image i have installed
 .
 that is to say it does not erase the image .


 If the erased was successful you should get a message that says 'No valid
 image was detected.'.

 questions :
 although i can't pass the command ./configure , maybe i can copy the files
 in /opt/tinyos-2.x/tools/tinyos/misc to /usr/local/bin , so i can use the
 right deluge tools ? are there any potential problems ?


 If you have a reasonable new tools installed it might work.


 Suggestion :
 Deluge is a very good tool and convenient . so i think it is better to
 give
 an document to describe how to build the environment the deluge needs ,
 what
 do you think about , Razvan ME ? can you rebuild the environment that the
 deluge needs on another computer and give us an document ? :-) i think it
 is
 necessary , or the user can't use deluge .


 You are using Windows and I cannot reproduce the errors you get on my
 Windows so unfortunately there is not much that I can do. :-(

 --
 Razvan ME


 2008/5/21 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!


 On Tue, 20 May 2008, jiwen zhang wrote:

 Hello :


 2008/5/20 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!



 On Sun, 18 May 2008, jiwen zhang wrote:

  Hello :


 2008/5/16 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!


 On Thu, 15 May 2008, jiwen zhang wrote:

 Hello Razvan ME :

  today, i modify the application in the directory of app/Blink and
 let it

 support deluge :

  -in the BlinkAppC.nc , use the component DelugeC and then
 DelugeC.Leds - LedsC
  -Modify the Makefile , add TINYOS_NP = BNP ,CFLAGS +=
 -DDELUGE_BASESTATION


 Have you first tried the burn and burn-net from

 apps/tests/deluge/Blink?



 Today(5.18) , i spend much time downloading the deluge/tinyos-2.x from
 http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git . ( it is so slow
 to
 download it -:( )
 i do according to deluge-t2-manual.pdf .
 the process is that :
 ./Bootstrap
 + aclocal
 + autoconf
 + [ -d config-aux ]
 + automake -a -c
 + set -x
 + cd platforms/mica/uisp
 + ./bootstrap
 autoheader: WARNING: Using auxiliary files such as `acconfig.h',
 `config.h.bot'
 autoheader: WARNING: and `config.h.top', to define templates for `
 config.h.in'
 autoheader: WARNING: is deprecated and discouraged.
 autoheader:
 autoheader: WARNING: Using the third argument of `AC_DEFINE' and
 autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template
 without
 autoheader: WARNING: `acconfig.h':
 autoheader:
 autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
 autoheader:   [Define if a function `main' is needed.])
 autoheader:
 autoheader: WARNING: More sophisticated templates can also be
 produced,
 see the
 autoheader: WARNING: documentation.
 + rm -f config.cache src/config.cache

 *there are some warnings .  are there some influence ?*


 It should be ok, I also get them.

  ./configure

 checking for a BSD-compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes

[Tinyos-help] About LowPowerListening

2008-05-25 Thread jiwen zhang
Hello David :
   Maybe i have asked the question to you , but i still have some puzzles .
   1. about the command setLocalSleepInterval(uint16_t sleepIntervalMs) .
in my opinion , it is used the set that how long the mote sleep . for
example , we set sleepIntervalMs to 250 , which mean the mote will sleep
250ms and wake up automatically , then check whether there is carrier . if
yes , it will keep awake for a long time to receive the data packet , if no
, it will go to sleep .
   i want to know , how long does the mote take to check whether there is
carrier wave ? if there is carrier, how long does the mote keep awake in
order to receive the data packet ?(maybe there is no data packet sended to
it , so i thick there could be a time upper limit that the mote keep awake
)
   2. about the command setRxSleepInterval(message_t *msg, uint16_t
sleepIntervalMs)
   i don't know what the function of this command is , can you explain to me
,David ?
   In Lesson 16: Writing Low Power Sensing Applications , there is some
introduction to LowPowerListening . it demonstrates the usage pattern :

event void Boot.booted() {
  call LPL.setLocalSleepInterval(LPL_INTERVAL);
  call AMControl.start();
}

event void AMControl.startDone(error_t e) {
  if(e != SUCCESS)
call AMControl.start();
}

...

void sendMsg() {
  call LPL.setRxSleepInterval(msg, LPL_INTERVAL);
  if(call Send.send(dest_addr, msg, sizeof(my_msg_t)) != SUCCESS)
post retrySendTask();
}
before we call Send.send , we will call LPL.setRxSleepInterval(msg,
LPL_INTERVAL) . what is the reason ?


-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] tests/deluge/Blink

2008-05-25 Thread jiwen zhang
Hello Janos Sallai :
   Today , i reinstall the cygwin and tinyos-2.x , and i also download the
cvs tree of tinyos-2.x . the deluge is working now . thank you very much .
   i find a probem of cvs tree of tinyos-2.x :
   when i use the mote of mica2 , the mote can't communicate with each
other . (i have chaged the frequency fit to my mote) . i don't know why .

2008/5/22 Janos Sallai [EMAIL PROTECTED]:

  Jiwen,



 As I wrote in my previous mail, the git and the CVS versions are now
 identical.



 Did you run tools/Bootstrap first? Did it give you any error messages? It
 should create Makefile.in, and configure should run without errors.



 The purpose of the --prefix=/usr parameter of configure is to place the
 created files under /usr. By default, they will be placed into /usr/local,
 and you end up with two versions of every file, one set shadowing another.



 Janos



 *From:* jiwen zhang [mailto:[EMAIL PROTECTED]
 *Sent:* Thursday, May 22, 2008 6:09 AM

 *To:* Janos Sallai
 *Cc:* [EMAIL PROTECTED]; tinyos-help@millennium.berkeley.edu
 *Subject:* Re: [Tinyos-help] tests/deluge/Blink



 Hello Janos Sallai :

 2008/5/21 Janos Sallai [EMAIL PROTECTED]:

 Jiwen,



1.Have you tested the application of apps/tests/deluge/Blink on

  micaz or iris or telesb ? is it ok ?

 Yes, I have tested it on the iris, and it works as it should. Make sure you
 have the latest code from the CVS, install tinyos-tools (cd tools;
 ./Bootstrap; ./configure --prefix=/usr; make; make install), and then run
 the burn script in apps/tests/deluge/Blink with the appropriate
 parameters.

 i have download the tinyos code from
 http://hinrg.cs.jhu.edu/git/tinyos-2.x.git on 2008.5.15 .  there are
 errors when i use the command ./configure .

 checking for a BSD-compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes
 checking for gawk... gawk
 checking whether make sets $(MAKE)... yes
 checking build system type... i686-pc-cygwin
 checking host system type... i686-pc-cygwin
 checking for gcc... gcc
 checking for C compiler default output file name... a.exe
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables... .exe
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ANSI C... none needed
 checking for style of include used by make... GNU
 checking dependency style of gcc... gcc3
 checking for g++... g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether g++ accepts -g... yes
 checking dependency style of g++... gcc3
 checking for ranlib... ranlib
 checking for perl... /usr/bin/perl
 checking for python... /usr/local/bin/python
 checking for nescc... /usr/bin/nescc
 configure: Default ncc build target is mica
 configure: ...but using a tos/.default-platform file is a better choice
 configure: TinyOS directory is /opt/tinyos-2.x/tos
 checking for cygwin... yes
 checking for JDK location... /cygdrive/d/Program Files/Java/jdk1.5.0_01
 configure: creating ./config.status
 config.status: creating Makefile
 config.status: error: cannot find input file: Makefile  .in



 i have compared the files in /opt/tinyos-2.x/tools/ , there are no much
 differences . if i replace the files .cvsignore , Bootstrap , build.xml ,
 configure.ac,Makefile.am, Makefile.am and the folder of tools/platform
 with the corresponding files form cvs version , there are will no errors
 when i use ./configure . but deluge can't work as it should .

 what is function of the parameter of '--prefix /usr' ? i add it when i use
 ./configure , it has no difference with the result that i don't add it .
 -:)

i test it according to the way you tell me in last emial . it is as
 before

  when i use the command tos-deluge /dev/ttyS0 micaz -r 1 , the red

  led flashes quickly and never stop .

 What kind of programming board do you use? Are you certain that /dev/ttyS0
 is the _*communications*_ port? (On the mib520, the programming port and
 the communications port are different.)

  i use mib510 . communication over serial port is ok .

  Are you sure that you compile the second blink with -DBLINK_REVERSE added
 to CFLAGS? If not, then it will blink red…

  i have tested the ./burn /dev/ttyS0 micaz , after the image of second
 application with -DBLINK_REVERSE when compiling has been installed to the
 slot 1 of the external flash , i press the ENTER , then the mote should
 reboot from the slot 1 and load the second appalication , and the yellow led
 should blink . but the result is that the red led flash quickly (it has
 difference with the application one which blink red led, it blinks more
 quickly . i think maybe when the deluge reprogramme the mote , it falls
 across some errors . )



 How about the burn and burn-net scripts? They should work with the
 latest CVS checkout on the iris.

  i don't test burn

Re: [Tinyos-help] tests/deluge/Blink

2008-05-21 Thread jiwen zhang
Hello Janos Sallai  :

   thak you for your reply !!
   I want to ask some question :
   1.Have you tested the application of apps/tests/deluge/Blink on micaz or
iris or telesb ? is it ok ?
i test it according to the way you tell me in last emial . it is as before .
when i use the command tos-deluge /dev/ttyS0 micaz -r 1 , the red led
flashes quickly and never stop .
   2. what is the version of tinyos you are using ? tinyos-2.x cvs or git (
http://hinrg.cs.jhu.edu/git/tinyos-2.x.git) ?
i have tested cvs version (2008.04.28) , it has the problem as i say before.

i also tested git version . when i use ./configure in the directory of
/opt/tinyos-2.x/tools, it has some problems .
   3.what are the tools you have installed in cygwin ? what is  the version
of cygwin ? cygwin-1.2a.tgz ?
thank you very much!!
2008/5/20 Janos Sallai [EMAIL PROTECTED]:

  Jiwen,



 Here's the list of commands you need to enter to get
 apps/tests/deluge/Blink work on the iris (I have a mib250 on com3 and
 com4=/dev/ttyS3, I'm using cygwin):



 Go to the directory

 $ cd /opt/tinyos-2.x/apps/tests/deluge/Blink/



 Compile and install the deluge-enabled blink (TINYOS_NP=bnp tells the make
 system to intall the bootloader, CFLAGS=-DELUGE_BASESTATION tells deluge to
 listen on the UART)

 $ TINYOS_NP=bnp CFLAGS=-DELUGE_BASESTATION make iris install.0 mib520,COM3



 Compile yellow-blinking blink that is going to be uploaded. The
 -DBLINK_REVERSE macro is the one that makes it blink the yellow led, not the
 red one.

 $ CFLAGS=-DELUGE_BASESTATION\ -DBLINK_REVERSE make iris



 Inject the new image with tos-deluge.

 $ tos-deluge /dev/ttyS3 57600 -i 1 build/iris/tos_image.xml



 Reboot the mote.

 $ tos-deluge /dev/ttyS3 57600 -r 1



 Janos



 *From:* jiwen zhang [mailto:[EMAIL PROTECTED]
 *Sent:* Saturday, May 17, 2008 8:11 AM
 *To:* Janos Sallai
 *Cc:* [EMAIL PROTECTED]; tinyos-help@millennium.berkeley.edu
 *Subject:* Re: [Tinyos-help] tests/deluge/Blink



 Hell all :

 when i tried the /apps/tests/deluge/blink , it is all right except that
 after the sencond the second version of blink has been downloaded to the
 volume 1, *the red led blink ceaselessly. (the mote should reboot with
 new blink existing in  volume 1 and then the yellow led blink periodically )
 *  i can ping the mote , there is no response , what is reason ?



later , i find that when i use the command tos-deluge /dev/ttyS0 micaz
 -r 1 , the mote will blink the red led ceaselessly . i don't know why .
 does any one has the same puzzle .

 2008/5/16 Janos Sallai [EMAIL PROTECTED]:

 Reema,



 Try to use tos-deluge directly. Apparently, the helper scripts  under
 /apps/test/deluge haven't been updated yet. The baud rate of the iris is the
 same as that of the micaz (57600bps).



 Janos



 *From:* Reema Mathew - Michael [mailto:[EMAIL PROTECTED]
 *Sent:* Friday, May 16, 2008 5:48 AM
 *To:* Janos Sallai
 *Cc:* tinyos-help@millennium.berkeley.edu


 *Subject:* RE: [Tinyos-help] tests/deluge/Blink



 I am able to make iris



 when i run ./burn /dev/ttyUSB0 iris

 the following error is displayed Wrong baudrate at Uploading image
 section



 Reema



 --- On *Fri, 16/5/08, Janos Sallai [EMAIL PROTECTED]* wrote:

 From: Janos Sallai [EMAIL PROTECTED]
 Subject: RE: [Tinyos-help] tests/deluge/Blink
 To: [EMAIL PROTECTED], tinyos-help@millennium.berkeley.edu
 Date: Friday, 16 May, 2008, 1:06 AM

 Reema,



 Please make sure that you have the latest sources from the CVS. You need to
 update your entire tinyos-2.x tree, not only the iris specific directories.



 I have verified that it does compile with the latest sources.



 Janos

 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *Reema Mathew -
 Michael
 *Sent:* Thursday, May 15, 2008 4:22 AM
 *To:* tinyos-help@millennium.berkeley.edu
 *Subject:* [Tinyos-help] tests/deluge/Blink



 Hi All,



 I am trying *deluge* for iris motes with tinyos2.0.2

 I am able to compile *tosboot*

 When I try to *make iris* for Blink in apps/tests/deluge/Blink




  --

 Sent from Yahoo! 
 Mailhttp://us.rd.yahoo.com/mailuk/taglines/isp/control/*http:/us.rd.yahoo.com/evt=52418/*http:/uk.docs.yahoo.com/nowyoucan.html.

 A Smarter Email.


 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




 --
 zhang jiwen




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] problems about Deluge

2008-05-21 Thread jiwen zhang
Hello Razvan ME :
   today , i tested the apps/tests/deluge/blink (the verison of git
http://hinrg.cs.jhu.edu/git/tinyos-2.x.git   download on 2008.05.15), i find
some problems , i don't know whether these have relation to my deluge tools
:
   1. i use the command make micaz install.0 mib510,/dev/ttyS0 to install
the application to the mote
 if i don't install any image in the external flash , i can use the
command tos-deluge /dev/ttyS0 micaz -r 1 . but after i install the image ,
for example slot 1 , then if use the command  tos-deluge /dev/ttyS0 micaz -r
1 , the red flash will flash quickly and never stop . what is the reason ?
 2 . after i install an image to slot of the external flsh , i reboot the
mote by hand , then i use the command tos-deluge /dev/ttyS0 micaz -p 1 , it
give me the information that No valid image was detected . i think the
mote lose the information after rebooting .
3 . after i install the image , i use the command tos-deluge /dev/ttyS0
micaz -e 1 to erase the image , it is successful . then i use tos-deluge
/dev/ttyS0 micaz -p 1 , it show the information of image i have installed .
that is to say it does not erase the image .

questions :
although i can't pass the command ./configure , maybe i can copy the files
in /opt/tinyos-2.x/tools/tinyos/misc to /usr/local/bin , so i can use the
right deluge tools ? are there any potential problems ?


Suggestion :
Deluge is a very good tool and convenient . so i think it is better to give
an document to describe how to build the environment the deluge needs , what
do you think about , Razvan ME ?  can you rebuild the environment that the
deluge needs on another computer and give us an document ? :-) i think it is
necessary , or the user can't use deluge .

2008/5/21 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!


 On Tue, 20 May 2008, jiwen zhang wrote:

 Hello :

 2008/5/20 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!


 On Sun, 18 May 2008, jiwen zhang wrote:

  Hello :


 2008/5/16 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!


 On Thu, 15 May 2008, jiwen zhang wrote:

 Hello Razvan ME :

  today, i modify the application in the directory of app/Blink and let
 it
 support deluge :

  -in the BlinkAppC.nc , use the component DelugeC and then
  DelugeC.Leds - LedsC
  -Modify the Makefile , add TINYOS_NP = BNP ,CFLAGS +=
  -DDELUGE_BASESTATION


 Have you first tried the burn and burn-net from
 apps/tests/deluge/Blink?



 Today(5.18) , i spend much time downloading the deluge/tinyos-2.x from
 http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git . ( it is so slow to
 download it -:( )
 i do according to deluge-t2-manual.pdf .
 the process is that :
 ./Bootstrap
 + aclocal
 + autoconf
 + [ -d config-aux ]
 + automake -a -c
 + set -x
 + cd platforms/mica/uisp
 + ./bootstrap
 autoheader: WARNING: Using auxiliary files such as `acconfig.h',
 `config.h.bot'
 autoheader: WARNING: and `config.h.top', to define templates for `
 config.h.in'
 autoheader: WARNING: is deprecated and discouraged.
 autoheader:
 autoheader: WARNING: Using the third argument of `AC_DEFINE' and
 autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template
 without
 autoheader: WARNING: `acconfig.h':
 autoheader:
 autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
 autoheader:   [Define if a function `main' is needed.])
 autoheader:
 autoheader: WARNING: More sophisticated templates can also be produced,
 see the
 autoheader: WARNING: documentation.
 + rm -f config.cache src/config.cache

 *there are some warnings .  are there some influence ?*


 It should be ok, I also get them.

  ./configure

 checking for a BSD-compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes
 checking for gawk... gawk
 checking whether make sets $(MAKE)... yes
 checking build system type... i686-pc-cygwin
 checking host system type... i686-pc-cygwin
 checking for gcc... gcc
 checking for C compiler default output file name... a.exe
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables... .exe
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ANSI C... none needed
 checking for style of include used by make... GNU
 checking dependency style of gcc... gcc3
 checking for g++... g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether g++ accepts -g... yes
 checking dependency style of g++... gcc3
 checking for ranlib... ranlib
 checking for perl... /usr/bin/perl
 checking for python... /usr/local/bin/python
 checking for nescc... /usr/bin/nescc
 configure: Default ncc build target is mica
 configure: ...but using a tos/.default-platform file is a better choice
 configure: TinyOS directory is /opt/tinyos-2.x/tos
 checking for cygwin... yes
 checking for JDK location... /cygdrive/d/Program Files/Java/jdk1.5.0_01
 configure

Re: [Tinyos-help] tests/deluge/Blink

2008-05-19 Thread jiwen zhang
hello :
   maybe you can modify the file of tos-deluge in /usr/local/bin
lines 38 :
BAUDRATES = {'micaz': 57600,
 'telosb': 115200}
changed into :
BAUDRATES = {'micaz': 57600,
 'iris' : 57600,
 'telosb': 115200}

Good luck !!
2008/5/19 Reema Mathew - Michael [EMAIL PROTECTED]:

$tos-deluge /dev/ttyUSB0 iris -i 1 apps/Blink/build/iris/tos_image.xml

  ERROR: Wrong baudrate



 Then i tried

 $tos-deluge /dev/ttyUSB0 57600 iris -i 1
 apps/Blink/build/iris/tos_image.xml

 ERROR: Unable to initialize serial port connection to /dev/ttyUSB0



 Pls help



 Reema
 **


 --- On *Fri, 16/5/08, Janos Sallai [EMAIL PROTECTED]* wrote:

 From: Janos Sallai [EMAIL PROTECTED]
 Subject: RE: [Tinyos-help] tests/deluge/Blink
 To: [EMAIL PROTECTED]
 Cc: tinyos-help@millennium.berkeley.edu
 Date: Friday, 16 May, 2008, 9:10 PM


  Reema,



 Try to use tos-deluge directly. Apparently, the helper scripts  under
 /apps/test/deluge haven't been updated yet. The baud rate of the iris is the
 same as that of the micaz (57600bps).



 Janos



 *From:* Reema Mathew - Michael [mailto:[EMAIL PROTECTED]
 *Sent:* Friday, May 16, 2008 5:48 AM
 *To:* Janos Sallai
 *Cc:* tinyos-help@millennium.berkeley.edu
 *Subject:* RE: [Tinyos-help] tests/deluge/Blink



 I am able to make iris



 when i run ./burn /dev/ttyUSB0 iris

 the following error is displayed Wrong baudrate at Uploading image
 section



 Reema



 --- On *Fri, 16/5/08, Janos Sallai [EMAIL PROTECTED]* wrote:

 From: Janos Sallai [EMAIL PROTECTED]
 Subject: RE: [Tinyos-help] tests/deluge/Blink
 To: [EMAIL PROTECTED], tinyos-help@millennium.berkeley.edu
 Date: Friday, 16 May, 2008, 1:06 AM

 Reema,



 Please make sure that you have the latest sources from the CVS. You need to
 update your entire tinyos-2.x tree, not only the iris specific directories.



 I have verified that it does compile with the latest sources.



 Janos

 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *Reema Mathew -
 Michael
 *Sent:* Thursday, May 15, 2008 4:22 AM
 *To:* tinyos-help@millennium.berkeley.edu
 *Subject:* [Tinyos-help] tests/deluge/Blink



 Hi All,



 I am trying *deluge* for iris motes with tinyos2.0.2

 I am able to compile *tosboot*

 When I try to *make iris* for Blink in apps/tests/deluge/Blink




  --

 Sent from *Yahoo! 
 Mail*http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http:/us.rd.yahoo.com/evt=52418/*http:/uk.docs.yahoo.com/nowyoucan.html.

 A Smarter Email.


 --
 Sent from Yahoo! 
 Mailhttp://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52418/*http://uk.docs.yahoo.com/nowyoucan.html.

 A Smarter Email.

 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] problems about Deluge

2008-05-19 Thread jiwen zhang
Hello :

2008/5/20 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!


 On Sun, 18 May 2008, jiwen zhang wrote:

   Hello :

 2008/5/16 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Thu, 15 May 2008, jiwen zhang wrote:

 Hello Razvan ME :

  today, i modify the application in the directory of app/Blink and let
 it
 support deluge :

  -in the BlinkAppC.nc , use the component DelugeC and then
  DelugeC.Leds - LedsC
  -Modify the Makefile , add TINYOS_NP = BNP ,CFLAGS +=
  -DDELUGE_BASESTATION


 Have you first tried the burn and burn-net from apps/tests/deluge/Blink?



 Today(5.18) , i spend much time downloading the deluge/tinyos-2.x from
 http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git . ( it is so slow to
 download it -:( )
 i do according to deluge-t2-manual.pdf .
 the process is that :
 ./Bootstrap
 + aclocal
 + autoconf
 + [ -d config-aux ]
 + automake -a -c
 + set -x
 + cd platforms/mica/uisp
 + ./bootstrap
 autoheader: WARNING: Using auxiliary files such as `acconfig.h',
 `config.h.bot'
 autoheader: WARNING: and `config.h.top', to define templates for `
 config.h.in'
 autoheader: WARNING: is deprecated and discouraged.
 autoheader:
 autoheader: WARNING: Using the third argument of `AC_DEFINE' and
 autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template
 without
 autoheader: WARNING: `acconfig.h':
 autoheader:
 autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
 autoheader:   [Define if a function `main' is needed.])
 autoheader:
 autoheader: WARNING: More sophisticated templates can also be produced,
 see the
 autoheader: WARNING: documentation.
 + rm -f config.cache src/config.cache

 *there are some warnings .  are there some influence ?*


 It should be ok, I also get them.

   ./configure
 checking for a BSD-compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes
 checking for gawk... gawk
 checking whether make sets $(MAKE)... yes
 checking build system type... i686-pc-cygwin
 checking host system type... i686-pc-cygwin
 checking for gcc... gcc
 checking for C compiler default output file name... a.exe
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables... .exe
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ANSI C... none needed
 checking for style of include used by make... GNU
 checking dependency style of gcc... gcc3
 checking for g++... g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether g++ accepts -g... yes
 checking dependency style of g++... gcc3
 checking for ranlib... ranlib
 checking for perl... /usr/bin/perl
 checking for python... /usr/local/bin/python
 checking for nescc... /usr/bin/nescc
 configure: Default ncc build target is mica
 configure: ...but using a tos/.default-platform file is a better choice
 configure: TinyOS directory is /opt/tinyos-2.x/tos
 checking for cygwin... yes
 checking for JDK location... /cygdrive/d/Program Files/Java/jdk1.5.0_01
 configure: creating ./config.status
 config.status: creating Makefile
 config.status: error: cannot find input file: Makefile  .in

 *there is an error , the it jump out . what is the reason ?*


 I don't have much experience with Cywgin. On my Windows machine when I run
 './configure --prefix=$HOME/local' I didn't get any errors. I don't know if
 it makes a different or not but I'm using the latest Cygwin.


i have download tinyos-2.x.git and /deluge/tinyos-2.x.git , and when i run
./configure , i get the same error as i said before.
maybe it's the problem of cygwin .
these are the tools i have installed : (according to the specification
of TinyOS
2.0 install instructions
file:///G:/tinyos/文档资料/doc/html/install-tinyos.html)

avr-gcc-3.4.3-1
avarice-2.4-1
nesc-1.2.8b-1
tinyos-2.0.2-2
msp430tools-binutils-2.16-20050607
msp430tools-libc-20050308cvs-20050608
avr-binutils-2.15tinyos-3
avr-libc-1.2.3-1
avr-insight-6.3-1
tinyos-tools-1.2.4-2
msp430tools-base-0.1-20050607
msp430tools-gcc-3.2.3-20050607
msp430tools-python-tools-1.0-1

the cygwin version in my computer is cygwin-1.2a.tgz . in addition , i have
update the version of python to 2.4.5 .

what are your tools you have installed ?

you know the whole cygwin is very large , maybe i have no need to
download all the files . i what to know which files do i have to download ?

another question :

i have seen the Deluge T2 document you update , i find there is no much
difference with deluge-t2-manual.pdf . you say you will explain the DelugeP
and how to reprogram the mote selectively , i can't find these .




 i copy the tools from cvs version (download at the day of 4.28)  to the
 corresponding directory and do the operations following
 deluge-t2-manual.pdf
 , there is no error.


 Copying from cvs to git will break stuff.

  then i test the /apps/tests/deluge/blink
 erery thing is ok

Re: [Tinyos-help] problems about Deluge

2008-05-18 Thread jiwen zhang
Hello :

2008/5/16 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Thu, 15 May 2008, jiwen zhang wrote:

 Hello Razvan ME :
  today, i modify the application in the directory of app/Blink and let it
 support deluge :

  -in the BlinkAppC.nc , use the component DelugeC and then
  DelugeC.Leds - LedsC
  -Modify the Makefile , add TINYOS_NP = BNP ,CFLAGS +=
  -DDELUGE_BASESTATION


 Have you first tried the burn and burn-net from apps/tests/deluge/Blink?


Today(5.18) , i spend much time downloading the deluge/tinyos-2.x from
http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git . ( it is so slow to
download it -:( )
i do according to deluge-t2-manual.pdf .
the process is that :
./Bootstrap
+ aclocal
+ autoconf
+ [ -d config-aux ]
+ automake -a -c
+ set -x
+ cd platforms/mica/uisp
+ ./bootstrap
autoheader: WARNING: Using auxiliary files such as `acconfig.h',
`config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for `
config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader:
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template
without
autoheader: WARNING: `acconfig.h':
autoheader:
autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader:   [Define if a function `main' is needed.])
autoheader:
autoheader: WARNING: More sophisticated templates can also be produced, see
the
autoheader: WARNING: documentation.
+ rm -f config.cache src/config.cache

*there are some warnings .  are there some influence ?*

./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for perl... /usr/bin/perl
checking for python... /usr/local/bin/python
checking for nescc... /usr/bin/nescc
configure: Default ncc build target is mica
configure: ...but using a tos/.default-platform file is a better choice
configure: TinyOS directory is /opt/tinyos-2.x/tos
checking for cygwin... yes
checking for JDK location... /cygdrive/d/Program Files/Java/jdk1.5.0_01
configure: creating ./config.status
config.status: creating Makefile
config.status: error: cannot find input file: Makefile  .in

*there is an error , the it jump out . what is the reason ?*

i copy the tools from cvs version (download at the day of 4.28)  to the
corresponding directory and do the operations following deluge-t2-manual.pdf
, there is no error.

then i test the /apps/tests/deluge/blink
erery thing is ok except that when it running at

 ++'
  |
  | In the next step the following things will take place:
  | - the mote will be rebooted
  | - all the leds will blink for some time as the
  |   reprogramming by tosboot takes place.
  | - a fading of the leds will indicate the exiting from tosboot.
  | - the mote should start blinking the 3rd led (blue/yellow).
  |
  |   Press ENTER to continue...
  |
  ++

*atfer i pree the ENTER , there is no responding . that is to say the mote
does't respond the reboot command . what is reason , Razvan ME ? does it
have relation with the tools ? because i copy the tools from the cvs version
. *



 i can use tos-deluge /dev/ttyS0 micaz -i 0 ./build/micaz/tos_image.xml to
 download the image to specified slot (section ?)  and i also can use
 tos-deluge /dev/ttyS0 micaz -p 0 to get the information of image.

 *but there are  alos some problems :*
 1. i can't reboot the mote to load the image from specified slot to the
 internal flash(128K) in MCU . after i use tos-deluage /dev/ttyS0 micaz -r
 1, i find the three leds blink once(i think) , then the red led blink
 quickly and never stop . what is the reason , Razvan ME ?


 Can you please give it a try the latest version from the deluge git tree? I
 just committed a fix for a bug in the micaz code.

*whether there are some differences between the version of **
http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git*http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git
* and 
**http

Re: [Tinyos-help] tests/deluge/Blink

2008-05-17 Thread jiwen zhang
Hell all :
when i tried the /apps/tests/deluge/blink , it is all right except that
after the sencond the second version of blink has been downloaded to the
volume 1, *the red led blink ceaselessly. (the mote should reboot with new
blink existing in  volume 1 and then the yellow led blink periodically )*  i
can ping the mote , there is no response , what is reason ?

   later , i find that when i use the command tos-deluge /dev/ttyS0 micaz
-r 1 , the mote will blink the red led ceaselessly . i don't know why .
does any one has the same puzzle .

2008/5/16 Janos Sallai [EMAIL PROTECTED]:

  Reema,



 Try to use tos-deluge directly. Apparently, the helper scripts  under
 /apps/test/deluge haven't been updated yet. The baud rate of the iris is the
 same as that of the micaz (57600bps).



 Janos



 *From:* Reema Mathew - Michael [mailto:[EMAIL PROTECTED]
 *Sent:* Friday, May 16, 2008 5:48 AM
 *To:* Janos Sallai
 *Cc:* tinyos-help@millennium.berkeley.edu
 *Subject:* RE: [Tinyos-help] tests/deluge/Blink



 I am able to make iris



 when i run ./burn /dev/ttyUSB0 iris

 the following error is displayed Wrong baudrate at Uploading image
 section



 Reema



 --- On *Fri, 16/5/08, Janos Sallai [EMAIL PROTECTED]* wrote:

 From: Janos Sallai [EMAIL PROTECTED]
 Subject: RE: [Tinyos-help] tests/deluge/Blink
 To: [EMAIL PROTECTED], tinyos-help@millennium.berkeley.edu
 Date: Friday, 16 May, 2008, 1:06 AM

 Reema,



 Please make sure that you have the latest sources from the CVS. You need to
 update your entire tinyos-2.x tree, not only the iris specific directories.



 I have verified that it does compile with the latest sources.



 Janos

 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *Reema Mathew -
 Michael
 *Sent:* Thursday, May 15, 2008 4:22 AM
 *To:* tinyos-help@millennium.berkeley.edu
 *Subject:* [Tinyos-help] tests/deluge/Blink



 Hi All,



 I am trying *deluge* for iris motes with tinyos2.0.2

 I am able to compile *tosboot*

 When I try to *make iris* for Blink in apps/tests/deluge/Blink




  --

 Sent from *Yahoo! 
 Mail*http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http:/us.rd.yahoo.com/evt=52418/*http:/uk.docs.yahoo.com/nowyoucan.html.

 A Smarter Email.

 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] question aout the TOSBootM

2008-05-17 Thread jiwen zhang
Hello :

2008/5/17 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Fri, 16 May 2008, jiwen zhang wrote:

 Hello Razvan ME :

  2008/5/16 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 Sorry for responding so late. I had a rather busy day. :|

 On Thu, 15 May 2008, jiwen zhang wrote:

  hello Razvan ME :

  that is to say the version of
 http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git is same with
 http://hinrg.cs.jhu.edu/git/?p=deluge/tinyos-2.x.git , i can choose one
 to
 download ?


 Please take a look at how git works. A quick introduction is here:
   http://www.kernel.org/pub/software/scm/git/docs/tutorial.html
 and the manual is here:
   http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

 The first link is the real git location. You can download the sources
 with
 by doing this:
   git clone http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git
 You can also use the native git protocol instead of http:
   git clone git://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git

 The second link [1] you mention is just a way to see in a nice way the
 status of the tree.

 [1] http://hinrg.cs.jhu.edu/git/?p=deluge/tinyos-2.x.git



 *If i have downloaded the source tree , for example , on the day of
 2008.5.16 , and then two days later , i want to update the source tree ,
 do
 i must download the whole source tree ?  or there is a way that i only
 need
 to update some files that have been modified ?*

  i just a newer  to deluge , and know little to it , it is difficult for
 me

 to modify deluge to make it support programme the specified motes -:)


 I don't have much time right now but I will update the manual to include
 all the details that will explain what you need to do to reprogram the
 mote
 selectively.


 *Do you mean that Deluge support to reprogramme the motes selectively at
 present  if i do according to the manual that you will update?*


 The default behavior of Deluge is to try to make all the motes run the same
 program. By changing the DelugeP.nc you can use change this behavior. The
 manual will explain the DelugeP.nc so you can change it to suit your needs.


*Are you writing the manual now ? how long can you finish it ? i am looking
forwarder for it !!  -:)*


 --
 Razvan ME




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] question aout the TOSBootM

2008-05-17 Thread jiwen zhang
Hello :

2008/5/17 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Fri, 16 May 2008, jiwen zhang wrote:

 Hello Razvan ME :

 2008/5/16 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 Sorry for responding so late. I had a rather busy day. :|

 On Thu, 15 May 2008, jiwen zhang wrote:

  hello Razvan ME :

  that is to say the version of
 http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git is same with
 http://hinrg.cs.jhu.edu/git/?p=deluge/tinyos-2.x.git , i can choose one
 to
 download ?


 Please take a look at how git works. A quick introduction is here:
   http://www.kernel.org/pub/software/scm/git/docs/tutorial.html
 and the manual is here:
   http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

 The first link is the real git location. You can download the sources
 with
 by doing this:
   git clone http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git
 You can also use the native git protocol instead of http:
   git clone git://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git

 The second link [1] you mention is just a way to see in a nice way the
 status of the tree.

 [1] http://hinrg.cs.jhu.edu/git/?p=deluge/tinyos-2.x.git



  *If i have downloaded the source tree , for example , on the day of
 2008.5.16 , and then two days later , i want to update the source tree ,
 do
 i must download the whole source tree ?  or there is a way that i only
 need
 to update some files that have been modified ?*


 You just need to do 'git pull' inside the tinyos-2.x to get the latest
 version.

i tried , it takes very long time .
i find it is very slow to download the tinyos-2.x.git now . (some days ago ,
it is much faster.) , is it the problem of  server ? -:)


 --
 Razvan ME




-- 
zhang jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Fwd: problems about Deluge

2008-05-16 Thread jiwen zhang
-- Forwarded message --
From: jiwen zhang [EMAIL PROTECTED]
Date: 2008/5/15
Subject: Re: problems about Deluge
To: Razvan Musaloiu-E. [EMAIL PROTECTED]
Cc: tinyos-help tinyos-help@millennium.berkeley.edu, Chieh-Jan Mike Liang
[EMAIL PROTECTED]


Hello  Razvan ME :
 thank you for your reply !!
 it is right that i am using an older tools package . when i put the
tinyos-2.x tree (.git version) in the directory of opt/ and go to
tinyos-2.x/tools .
 ./Bootstrap
 the reslut is : (*there are some warning , i don't know why* )
+ aclocal
+ autoconf
+ [ -d config-aux ]
+ automake -a -c
+ set -x
+ cd platforms/mica/uisp
+ ./bootstrap
autoheader: WARNING: Using auxiliary files such as `acconfig.h',
`config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for `
config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader:
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template
without
autoheader: WARNING: `acconfig.h':
autoheader:
autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader:   [Define if a function `main' is needed.])
autoheader:
autoheader: WARNING: More sophisticated templates can also be produced, see
the
autoheader: WARNING: documentation.
+ rm -f config.cache src/config.cache

then ./configure , the result is :
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for perl... /usr/bin/perl
checking for python... /usr/local/bin/python
checking for nescc... /usr/bin/nescc
configure: Default ncc build target is mica
configure: ...but using a tos/.default-platform file is a better choice
configure: TinyOS directory is /opt/tinyos-2.x/tos
checking for cygwin... yes
checking for JDK location... /cygdrive/d/Program Files/Java/jdk1.5.0_01
configure: creating ./config.status
config.status: creating Makefile
*config.status: error: cannot find input file: Makefile
.in
*
*there is an error , so it jump out , what is the reason , Razvan ME?*


i also download the cvs version(2008.4.28) , and copy the tools folder to
the tinyos-2.x/opt/ of .git verion and use the command of ./Bootstarp
./configure , there is no error , and then i go to tinyos/misc, use the
command make , make install , there is no error too. i don't know whether it
is suitable to copy the folder tools from cvs version to git version .

i also test the application of tests/deluge/Blink , it is all right *except
that the mote(micaz) does not blink the yellow led (the red led blink
quickly)and i can ping the mote , there is no response* , what is reason ,
Razvan ME ?

*about the mica2 platform :*

because i only have one micaz mote , and have many mica2 motes , so i want
to modify the deluge and make it support the mica2 platform , how should i
do ,Razvan ME? can you help me ?  thank you very much !!

2008/5/14 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Wed, 14 May 2008, jiwen zhang wrote:

  Hello :
I am researching deluge and have some problems when i use the version
 of tinyos-2.x.git from http://hinrg.cs.jhu.edu/git/ on the day of
 2008-5-4.
1. when i put the tinyos-2.x-git tree in two different computers , i
 find the compile choices are different. for exaple , when i compile the
 application of Blink in the directory of
 /opt/tinyos-2.x/apps/tests/deluge/Blink and the compile choice in one
 computer is that -D*IDENT_PROGRAM_NAME*=\BlinkAppC\
 -*DIDENT_USER_ID*=\Administrator\
 -*DIDENT_HOSTNAME*=\zjw\ -*DIDENT_USER_HASH*=0x2567b0c3L -*
 DIDENT_UNIX_TIME*=0x482a65deL -*DIDENT_UID_HASH*=0xad6bbf5dL  and the
 other
 is -D*IDENT_APPNAME*=\BlinkAppC\ -D*IDENT_USERNAME*=\zhangjiwen\ -D*
 IDENT_HOSTNAME*=\zjw\ -D*IDENT_USERHASH*=0x0eac215cL
 -D*IDENT_TIMESTAMP*=0x482a64abL
 -D*IDENT_UIDHASH*=0x9bde9ac6L . i use *the same Tinyos tree* , why are
 the
 compile choices different ? * where* are these macroes such as
 IDENT_USERNAME , IDENT_TIMESTAMP defined ?


 Those flags are generated by tos-ident-flags. The file is part of the tools
 package and the source of it is in:
tinyos-2.x

Re: [Tinyos-help] problems about Deluge

2008-05-15 Thread jiwen zhang
Hello Razvan ME :
   today, i modify the application in the directory of app/Blink and let it
support deluge :

   -in the BlinkAppC.nc , use the component DelugeC and then
   DelugeC.Leds - LedsC
   -Modify the Makefile , add TINYOS_NP = BNP ,CFLAGS +=
   -DDELUGE_BASESTATION

i can use tos-deluge /dev/ttyS0 micaz -i 0 ./build/micaz/tos_image.xml to
download the image to specified slot (section ?)  and i also can use
tos-deluge /dev/ttyS0 micaz -p 0 to get the information of image.

*but there are  alos some problems :*
1. i can't reboot the mote to load the image from specified slot to the
internal flash(128K) in MCU . after i use tos-deluage /dev/ttyS0 micaz -r
1, i find the three leds blink once(i think) , then the red led blink
quickly and never stop . what is the reason , Razvan ME ?
2 . after i use make micaz reinstall.1 mib510,/dev/ttyS0 to install the
programme to the mote , i use tos-deluge /dev/ttyS0 micaz -i 1
./build/micaz/tos_image.xml to load another application image to the slot 1
, then i use tos-deluge /dev/ttyS0 micaz -p 1 , i can get the information
of image in slot 1. but after i reboot the mote(by hand) , i ping the mote
using tos-deluge /dev/ttyS0 micaz -p 1, i get  No valid image was
detected . why ? maybe the programme did't save the image information in a
non-volatile storage(link EEPROM) .

all my tests are based on serial port , i have not tested the network
programme .
*questions:*
1 .  how many slots(sections ?) are the external flash  partitioned ?
2 .  in the network programme , there is a word named base station , is it
the application of BaseStation in /tinos-2.x/apps ?

thank you !!


2008/5/14 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Wed, 14 May 2008, jiwen zhang wrote:

  Hello :
I am researching deluge and have some problems when i use the version
 of tinyos-2.x.git from http://hinrg.cs.jhu.edu/git/ on the day of
 2008-5-4.
1. when i put the tinyos-2.x-git tree in two different computers , i
 find the compile choices are different. for exaple , when i compile the
 application of Blink in the directory of
 /opt/tinyos-2.x/apps/tests/deluge/Blink and the compile choice in one
 computer is that -D*IDENT_PROGRAM_NAME*=\BlinkAppC\
 -*DIDENT_USER_ID*=\Administrator\
 -*DIDENT_HOSTNAME*=\zjw\ -*DIDENT_USER_HASH*=0x2567b0c3L -*
 DIDENT_UNIX_TIME*=0x482a65deL -*DIDENT_UID_HASH*=0xad6bbf5dL  and the
 other
 is -D*IDENT_APPNAME*=\BlinkAppC\ -D*IDENT_USERNAME*=\zhangjiwen\ -D*
 IDENT_HOSTNAME*=\zjw\ -D*IDENT_USERHASH*=0x0eac215cL
 -D*IDENT_TIMESTAMP*=0x482a64abL
 -D*IDENT_UIDHASH*=0x9bde9ac6L . i use *the same Tinyos tree* , why are
 the
 compile choices different ? * where* are these macroes such as
 IDENT_USERNAME , IDENT_TIMESTAMP defined ?


 Those flags are generated by tos-ident-flags. The file is part of the tools
 package and the source of it is in:
tinyos-2.x/tools/tinyos/misc
 The flags are suppose to be different because their purpose is to uniquely
 identify an image.

2. some files in the directroy of tos/lib/deluge/ contains the macroes
 for example , in the file DelugeP.nc , there is a macro named
 IDENT_UIDHASH,
 in the file FlashVolumeManagerP.nc , there are macroes named
 IDENT_APPNAME,IDENT_TIMESTAMP,IDENT_UIDHASH and so on . so when i compile
 the application of Blink in in the directory of
 /opt/tinyos-2.x/apps/tests/deluge/Blink  on one of the two computers, it
 will give errors like IDENT_APPNAME not defined , the reason is obvious
 ,
 should i modify all the names which the errors tell me not defined ? i
 think
 there should be a easy way , because the deluge should be cross-PC(-:)) .


 You are probably using an older tools package. Can you install the tools
 from sources (from tinyos-2.x/tools)?

  3 . If i want to repot deluge to the platform of mica2 , which files
 should i modity ?  and how ?


 What is 'repot'? :P I don't have any mica2 motes but the code works fine on
 micaz.

 --
 Razvan ME

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] problems about Deluge

2008-05-14 Thread jiwen zhang
Hello :
 I am researching deluge and have some problems when i use the version
of tinyos-2.x.git
http://hinrg.cs.jhu.edu/git/?p=tinyos-2.x.git;a=summary from
http://hinrg.cs.jhu.edu/git/ on the day of 2008-5-4.
 1. when i put the tinyos-2.x-git tree in two different computers , i
find the compile choices are different. for exaple , when i compile the
application of Blink in the directory of
/opt/tinyos-2.x/apps/tests/deluge/Blink and the compile choice in one
computer is that -D*IDENT_PROGRAM_NAME*=\BlinkAppC\
-*DIDENT_USER_ID*=\Administrator\
-*DIDENT_HOSTNAME*=\zjw\ -*DIDENT_USER_HASH*=0x2567b0c3L -*
DIDENT_UNIX_TIME*=0x482a65deL -*DIDENT_UID_HASH*=0xad6bbf5dL  and the other
is -D*IDENT_APPNAME*=\BlinkAppC\ -D*IDENT_USERNAME*=\zhangjiwen\ -D*
IDENT_HOSTNAME*=\zjw\ -D*IDENT_USERHASH*=0x0eac215cL
-D*IDENT_TIMESTAMP*=0x482a64abL
-D*IDENT_UIDHASH*=0x9bde9ac6L . i use *the same Tinyos tree* , why are the
compile choices different ? * where* are these macroes such as
IDENT_USERNAME , IDENT_TIMESTAMP defined ?
 2. some files in the directroy of tos/lib/deluge/ contains the macroes
for example , in the file DelugeP.nc , there is a macro named IDENT_UIDHASH,
in the file FlashVolumeManagerP.nc , there are macroes named
IDENT_APPNAME,IDENT_TIMESTAMP,IDENT_UIDHASH and so on . so when i compile
the application of Blink in in the directory of
/opt/tinyos-2.x/apps/tests/deluge/Blink  on one of the two computers, it
will give errors like IDENT_APPNAME not defined , the reason is obvious ,
should i modify all the names which the errors tell me not defined ? i think
there should be a easy way , because the deluge should be cross-PC(-:)) .
   3 . If i want to repot deluge to the platform of mica2 , which files
should i modity ?  and how ?

   thank you very much!!

  the compile process on two computers (one own two MCPs):
mkdir -p build/micaz
compiling BlinkAppC to a micaz binary
ncc -o build/micaz/main.exe  -Os -Wall -Wshadow -Wnesc-all -target=micaz
-fnesc-cfile=build/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22
-finline-limit=10 -Ibuild/micaz -DDELUGE_BASESTATION -DDELUGE
-I/opt/tinyos-2.x/tos/lib/net -I/opt/tinyos-2.x/tos/lib/net/drip
-I/opt/tinyos-2.x/tos/lib/net/Deluge
-I/opt/tinyos-2.x/tos/lib/net/Deluge/FlashVolumeManager
-I/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager
-I/opt/tinyos-2.x/tos/lib/net/Deluge/extra
-I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/avr
-I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/micaz
-I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/mica2
-DIDENT_APPNAME=\BlinkAppC\ -DIDENT_USERNAME=\zhangjiwen\
-DIDENT_HOSTNAME=\zjw\ -DIDENT_USERHASH=0x0eac215cL
-DIDENT_TIMESTAMP=0x482a64abL -DIDENT_UIDHASH=0x9bde9ac6L -fnesc-dump=wiring
-fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs,
components)' -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
compiled BlinkAppC to build/micaz/main.exe
   34036 bytes in ROM
1135 bytes in RAM
avr-objcopy --output-target=srec build/micaz/main.exe build/micaz/main.srec
avr-objcopy --output-target=ihex build/micaz/main.exe build/micaz/main.ihex
writing TOS image


mkdir -p build/micaz
compiling BlinkAppC to a micaz binary
ncc -o build/micaz/main.exe  -Os -Wall -Wshadow -Wnesc-all -target=micaz
-fnesc-cfile=build/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22
-finline-limit=10 -Ibuild/micaz -DDELUGE_BASESTATION -DDELUGE
-I/opt/tinyos-2.x/tos/lib/net -I/opt/tinyos-2.x/tos/lib/net/drip
-I/opt/tinyos-2.x/tos/lib/net/Deluge
-I/opt/tinyos-2.x/tos/lib/net/Deluge/FlashVolumeManager
-I/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager
-I/opt/tinyos-2.x/tos/lib/net/Deluge/extra
-I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/avr
-I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/micaz
-I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/mica2
-DIDENT_PROGRAM_NAME=\BlinkAppC\ -DIDENT_USER_ID=\Administrator\
-DIDENT_HOSTNAME=\zjw\ -DIDENT_USER_HASH=0x2567b0c3L
-DIDENT_UNIX_TIME=0x482a65deL -DIDENT_UID_HASH=0xad6bbf5dL
-fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
-fnesc-dump='referenced(interfacedefs, components)'
-fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
compiled BlinkAppC to build/micaz/main.exe
   34036 bytes in ROM
1135 bytes in RAM
avr-objcopy --output-target=srec build/micaz/main.exe build/micaz/main.srec
avr-objcopy --output-target=ihex build/micaz/main.exe build/micaz/main.ihex
writing TOS image
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] problems about Deluge

2008-05-14 Thread jiwen zhang
Hello  Razvan ME :
 thank you for your reply !!
 it is right that i am using an older tools package . when i put the
tinyos-2.x tree (.git version) in the directory of opt/ and go to
tinyos-2.x/tools .
 ./Bootstrap
 the reslut is : (*there are some warning , i don't know why* )
+ aclocal
+ autoconf
+ [ -d config-aux ]
+ automake -a -c
+ set -x
+ cd platforms/mica/uisp
+ ./bootstrap
autoheader: WARNING: Using auxiliary files such as `acconfig.h',
`config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for `
config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader:
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template
without
autoheader: WARNING: `acconfig.h':
autoheader:
autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader:   [Define if a function `main' is needed.])
autoheader:
autoheader: WARNING: More sophisticated templates can also be produced, see
the
autoheader: WARNING: documentation.
+ rm -f config.cache src/config.cache

then ./configure , the result is :
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for perl... /usr/bin/perl
checking for python... /usr/local/bin/python
checking for nescc... /usr/bin/nescc
configure: Default ncc build target is mica
configure: ...but using a tos/.default-platform file is a better choice
configure: TinyOS directory is /opt/tinyos-2.x/tos
checking for cygwin... yes
checking for JDK location... /cygdrive/d/Program Files/Java/jdk1.5.0_01
configure: creating ./config.status
config.status: creating Makefile
*config.status: error: cannot find input file: Makefile
.in
*
*there is an error , so it jump out , what is the reason , Razvan ME?*


i also download the cvs version(2008.4.28) , and copy the tools folder to
the tinyos-2.x/opt/ of .git verion and use the command of ./Bootstarp
./configure , there is no error , and then i go to tinyos/misc, use the
command make , make install , there is no error too. i don't know whether it
is suitable to copy the folder tools from cvs version to git version .

i also test the application of tests/deluge/Blink , it is all right *except
that the mote(micaz) does not blink the yellow led (the red led blink
quickly)and i can ping the mote , there is no response* , what is reason ,
Razvan ME ?

*about the mica2 platform :*

because i only have one micaz mote , and have many mica2 motes , so i want
to modify the deluge and make it support the mica2 platform , how should i
do ,Razvan ME? can you help me ?  thank you very much !!

2008/5/14 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Wed, 14 May 2008, jiwen zhang wrote:

  Hello :
I am researching deluge and have some problems when i use the version
 of tinyos-2.x.git from http://hinrg.cs.jhu.edu/git/ on the day of
 2008-5-4.
1. when i put the tinyos-2.x-git tree in two different computers , i
 find the compile choices are different. for exaple , when i compile the
 application of Blink in the directory of
 /opt/tinyos-2.x/apps/tests/deluge/Blink and the compile choice in one
 computer is that -D*IDENT_PROGRAM_NAME*=\BlinkAppC\
 -*DIDENT_USER_ID*=\Administrator\
 -*DIDENT_HOSTNAME*=\zjw\ -*DIDENT_USER_HASH*=0x2567b0c3L -*
 DIDENT_UNIX_TIME*=0x482a65deL -*DIDENT_UID_HASH*=0xad6bbf5dL  and the
 other
 is -D*IDENT_APPNAME*=\BlinkAppC\ -D*IDENT_USERNAME*=\zhangjiwen\ -D*
 IDENT_HOSTNAME*=\zjw\ -D*IDENT_USERHASH*=0x0eac215cL
 -D*IDENT_TIMESTAMP*=0x482a64abL
 -D*IDENT_UIDHASH*=0x9bde9ac6L . i use *the same Tinyos tree* , why are
 the
 compile choices different ? * where* are these macroes such as
 IDENT_USERNAME , IDENT_TIMESTAMP defined ?


 Those flags are generated by tos-ident-flags. The file is part of the tools
 package and the source of it is in:
tinyos-2.x/tools/tinyos/misc
 The flags are suppose to be different because their purpose is to uniquely
 identify an image.

2. some files in the directroy of tos/lib/deluge/ contains the macroes
 for example , in the file DelugeP.nc , there is a macro named

Re: [Tinyos-help] question aout the TOSBootM

2008-05-11 Thread jiwen zhang
Hello Razvan ME:

2008/5/9 Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Wed, 7 May 2008, jiwen zhang wrote:

 Hello all :
  when i read the file TOSBootM.nc , there are some things i can' t
 understand !

  1. The external flash is divided into three slots , *i want to know the
 size of every slot ? are they identical ?*
  from reading the TOSBootM , i think the *structure of every slot *is
 that:

 for example , slot 0 :

 DELUGE_IDENT_SIZE (128 Bytes)


 DELUGE_CRC_BLOCK_SIZE(256 Bytes)

-
  PAGE 0
  PAGE 1
  ...
  ...


 and *PAGE structure* is that :

 -
   Internal flash Address  (4 Bytes)
 -
  Page length(4 Byte)
 
  Effective Image data()
  ---
 Am i right ?  i am not sure the page structure , if i am not right , can
 someone give me an explain ?


 You are almost right: what you call pages are called sections.


 2. Question about the function of  programImage(ex_flash_addr_t startAddr)

 .
 .


   while ( secLength ) {

 pageAddr = newPageAddr = intAddr / TOSBOOT_INT_PAGE_SIZE;

 call ExtFlash.startRead(curAddr);
 // fill in ram buffer for internal program flash sector
 do {

 // check if secLength is all ones
 if ( secLength == 0x ) {
  call ExtFlash.stopRead();
  return FAIL;
 }

 buf[(uint16_t)intAddr % TOSBOOT_INT_PAGE_SIZE] = call ExtFlash.readByte();
 intAddr++; curAddr++;

 if ( --secLength == 0 ) {
  intAddr = extFlashReadAddr();
  secLength = extFlashReadAddr();
  curAddr = curAddr + 8;
 }

 newPageAddr = intAddr / TOSBOOT_INT_PAGE_SIZE;

 } while ( pageAddr == newPageAddr  secLength );
 call ExtFlash.stopRead();

 call Leds.set(pageAddr);

 // write out page
 if (call ProgFlash.write(pageAddr*TOSBOOT_INT_PAGE_SIZE, buf,
 TOSBOOT_INT_PAGE_SIZE) == FAIL) {
 return R_PROGRAMMING_ERROR;
 }
   }

 i don't know *how the programme jump out the while cycle*.  because the
 condition of jumping out the while cycle is that secLength = 0 , but in
 the while  , there is some sentences :

if ( --secLength == 0 ) {
  intAddr = extFlashReadAddr();
  secLength = extFlashReadAddr();
  curAddr = curAddr + 8;
 }

 *so when secLength == 0 , it will be given a new value (which is the next
 page size ?) , how does it jump out ?*

 *is it possible that it jump out from here ? :*

 if ( secLength == 0x ) {
  call ExtFlash.stopRead();
  return FAIL;
 }

 i am not sure, can someone give me an explain ?


 The secLength will be zero because the image is padded with zeros. If the
 image is an exact number of pages the reprogramming might fail. I'll try to
 reproduce this bug tomorrow.
 is it to say that when reading to the end of the image , the secLength of
 the page is setted to zero , so the programme can jump out ?

 what is the meaning of If the image is an exact number of pages the
reprogramming might fail ? and what is the bug you say in your emial ? i
can't find the bug :-)


 --
 Razvan ME


 2008/5/7, jiwen zhang [EMAIL PROTECTED]:


 Hello :
   thank you very much for your reply, Razvan ME.
   i have found it .




 2008/5/7, Razvan Musaloiu-E. [EMAIL PROTECTED]:


 Hi!

 On Tue, 6 May 2008, jiwen zhang wrote:

 Hello all :

  Recently , i an researching the deluge, and find a problem in
 TOSBootM.
  In the function programImage(ex_flash_addr_t startAddr) , there is a
 sentence
  #if defined(PLATFORM_TELOSB)
  if (intAddr != TOSBOOT_END) {
 #elif defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
  if (intAddr != 0) {
 
 

  I can't find where TOSBOOT_END is defined . if i am using the platform
 telosb , maybe it does't work .
  can someone give me an answer ?


 TOSBOOT_END is defined in tinyos-2.x/tos/lib/tosboot/Makefile.

 --
 Razvan ME

  I am using Tinyos2.x .

  thank you !!





___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Porting VoltageC to mica2

2008-05-08 Thread jiwen zhang
Hello :
   you can also use it in platform of mica2.


2008/5/5, Tiny User [EMAIL PROTECTED]:

 Hello please Did any body tried to port these files


 VoltageC.nc
 VoltageP.nc
 VoltageNowC.nc
 VoltageStreamC.nc

 in this Dir:

 /opt/tinyos-2.x/tos/platforms/mica  to use them with mica2 platform??



 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] GDB - Debugging Mica2Dot/Mica2

2008-05-08 Thread jiwen zhang
Hello Aurélien Francillon :
   thank you for your reply .
   1.when  i compile the application , i use the command make mica2 debug .
when i debug the application , i still can't see the NesC source in
tinyos1.15(avarice version 2.4)
 , but i can see the NesC source in tinyos2.x(avarice version 2.4-1) , i
think it should not be the problem of version, because if it is the problem
of version , then you can't debug the app in tinyos1.x because you only see
assembler code. why ?
2. i  want to know how to update my tools in tinyos . if the format of
tools are *. tar.bz2 , how to update ? can you tell me ?
 thank you !!!
2008/5/8, Aurélien Francillon [EMAIL PROTECTED]:

 jiwen zhang a écrit :

  Hello :

 Hi,

   i am trying debugging the nesc code.
   the version of avarice i am using is 2.4. i find a problem that some
 times i can connect but sometimes not when i use the same setting , and also
 i can't see the C source , only see assembler code(tinyos1.15) . (i am using
 jtagICE mkii )

 to see the C/nesc source code you need to build with '-g' compiler flags
  or just
 make XXX debug
 under tinyos which is adding the proper flags to gcc
 without those flags the debugger don't know the relationships between the
 assembly and the C source line, however if you build with optimizations
 (-Os) then the assembly/C relations might look weird because of the
 optimizations.

   after i connected , i set a breakpoint and click run , i find it never
 stop at the breakpoint.


 so i click the stop , and click run again, it gives an error that
 can't connect. i am puzzled.

 I have trouble too with the stop like commands, breakpoints work fine
 however...

  so i doubt the version of avarice . so i want to update it . i have a
 question :
 i have download the avarice from www.sourceforge.net 
 http://www.sourceforge.net , the version is 2.7 . there are two packets
 named avarice-2.7.tar.bz2 and avarice-2.7.tar.bz2.sig.
 1. what is the useness of the avarice-2.7.tar.bz2.sig ?


 It's a signature of the file, you may ignore it, you can find more details
 on gnupg.org if you want to check the signature

 2.they are used for linux . can they be used in cygwin ?

 probably, I haven't personnaly tried

 cheers
 Aurélien



___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Fwd: question aout the TOSBootM

2008-05-08 Thread jiwen zhang
-- Forwarded message --
From: jiwen zhang [EMAIL PROTECTED]
Date: 2008-5-7 16:53
Subject: Re: question aout the TOSBootM
To: Razvan Musaloiu-E. [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED], [EMAIL PROTECTED], tinyos-help 
tinyos-help@millennium.berkeley.edu

Hello all :
   when i read the file TOSBootM.nc , there are some things i can' t
understand !

  1. The external flash is divided into three slots , *i want to know the
size of every slot ? are they identical ?*
  from reading the TOSBootM , i think the *structure of every slot *is that
:

 for example , slot 0 :
 
  DELUGE_IDENT_SIZE (128 Bytes)
 

  DELUGE_CRC_BLOCK_SIZE(256 Bytes)

 -
   PAGE 0
   PAGE 1
   ...
   ...


and *PAGE structure* is that :

  -
Internal flash Address  (4 Bytes)
  -
   Page length(4 Byte)
  
   Effective Image data()
   ---
Am i right ?  i am not sure the page structure , if i am not right , can
someone give me an explain ?

2. Question about the function of  programImage(ex_flash_addr_t startAddr)

  .
  .


while ( secLength ) {

  pageAddr = newPageAddr = intAddr / TOSBOOT_INT_PAGE_SIZE;

  call ExtFlash.startRead(curAddr);
  // fill in ram buffer for internal program flash sector
  do {

 // check if secLength is all ones
 if ( secLength == 0x ) {
   call ExtFlash.stopRead();
   return FAIL;
 }

 buf[(uint16_t)intAddr % TOSBOOT_INT_PAGE_SIZE] = call ExtFlash.readByte();
 intAddr++; curAddr++;

 if ( --secLength == 0 ) {
   intAddr = extFlashReadAddr();
   secLength = extFlashReadAddr();
   curAddr = curAddr + 8;
 }

 newPageAddr = intAddr / TOSBOOT_INT_PAGE_SIZE;

  } while ( pageAddr == newPageAddr  secLength );
  call ExtFlash.stopRead();

  call Leds.set(pageAddr);

  // write out page
  if (call ProgFlash.write(pageAddr*TOSBOOT_INT_PAGE_SIZE, buf,
  TOSBOOT_INT_PAGE_SIZE) == FAIL) {
 return R_PROGRAMMING_ERROR;
  }
}

i don't know *how the programme jump out the while cycle*.  because the
condition of jumping out the while cycle is that secLength = 0 , but in
the while  , there is some sentences :

 if ( --secLength == 0 ) {
   intAddr = extFlashReadAddr();
   secLength = extFlashReadAddr();
   curAddr = curAddr + 8;
 }

*so when secLength == 0 , it will be given a new value (which is the next
page size ?) , how does it jump out ?*

*is it possible that it jump out from here ? :*

 if ( secLength == 0x ) {
   call ExtFlash.stopRead();
   return FAIL;
 }

i am not sure, can someone give me an explain ?
2008/5/7, jiwen zhang [EMAIL PROTECTED]:

 Hello :
thank you very much for your reply, Razvan ME.
i have found it .




 2008/5/7, Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Tue, 6 May 2008, jiwen zhang wrote:

 Hello all :
  Recently , i an researching the deluge, and find a problem in TOSBootM.
  In the function programImage(ex_flash_addr_t startAddr) , there is a
 sentence
  #if defined(PLATFORM_TELOSB)
   if (intAddr != TOSBOOT_END) {
 #elif defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
   if (intAddr != 0) {
  
  

   I can't find where TOSBOOT_END is defined . if i am using the platform
 telosb , maybe it does't work .
   can someone give me an answer ?


 TOSBOOT_END is defined in tinyos-2.x/tos/lib/tosboot/Makefile.

 --
 Razvan ME

   I am using Tinyos2.x .
   thank you !!



___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] question aout the TOSBootM

2008-05-07 Thread jiwen zhang
Hello all :
   when i read the file TOSBootM.nc , there are some things i can' t
understand !

  1. The external flash is divided into three slots , *i want to know the
size of every slot ? are they identical ?*
  from reading the TOSBootM , i think the *structure of every slot *is that
:

 for example , slot 0 :
 
  DELUGE_IDENT_SIZE (128 Bytes)
 

  DELUGE_CRC_BLOCK_SIZE(256 Bytes)

 -
   PAGE 0
   PAGE 1
   ...
   ...


and *PAGE structure* is that :

  -
Internal flash Address  (4 Bytes)
  -
   Page length(4 Byte)
  
   Effective Image data()
   ---
Am i right ?  i am not sure the page structure , if i am not right , can
someone give me an explain ?

2. Question about the function of  programImage(ex_flash_addr_t startAddr)

  .
  .


while ( secLength ) {

  pageAddr = newPageAddr = intAddr / TOSBOOT_INT_PAGE_SIZE;

  call ExtFlash.startRead(curAddr);
  // fill in ram buffer for internal program flash sector
  do {

 // check if secLength is all ones
 if ( secLength == 0x ) {
   call ExtFlash.stopRead();
   return FAIL;
 }

 buf[(uint16_t)intAddr % TOSBOOT_INT_PAGE_SIZE] = call ExtFlash.readByte();
 intAddr++; curAddr++;

 if ( --secLength == 0 ) {
   intAddr = extFlashReadAddr();
   secLength = extFlashReadAddr();
   curAddr = curAddr + 8;
 }

 newPageAddr = intAddr / TOSBOOT_INT_PAGE_SIZE;

  } while ( pageAddr == newPageAddr  secLength );
  call ExtFlash.stopRead();

  call Leds.set(pageAddr);

  // write out page
  if (call ProgFlash.write(pageAddr*TOSBOOT_INT_PAGE_SIZE, buf,
  TOSBOOT_INT_PAGE_SIZE) == FAIL) {
 return R_PROGRAMMING_ERROR;
  }
}

i don't know *how the programme jump out the while cycle*.  because the
condition of jumping out the while cycle is that secLength = 0 , but in
the while  , there is some sentences :

 if ( --secLength == 0 ) {
   intAddr = extFlashReadAddr();
   secLength = extFlashReadAddr();
   curAddr = curAddr + 8;
 }

*so when secLength == 0 , it will be given a new value (which is the next
page size ?) , how does it jump out ?*

*is it possible that it jump out from here ? :*

 if ( secLength == 0x ) {
   call ExtFlash.stopRead();
   return FAIL;
 }

i am not sure, can someone give me an explain ?
2008/5/7, jiwen zhang [EMAIL PROTECTED]:

 Hello :
thank you very much for your reply, Razvan ME.
i have found it .




 2008/5/7, Razvan Musaloiu-E. [EMAIL PROTECTED]:
 
  Hi!
 
  On Tue, 6 May 2008, jiwen zhang wrote:
 
  Hello all :
Recently , i an researching the deluge, and find a problem in
   TOSBootM.
In the function programImage(ex_flash_addr_t startAddr) , there is a
   sentence
#if defined(PLATFORM_TELOSB)
 if (intAddr != TOSBOOT_END) {
   #elif defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
 if (intAddr != 0) {


  
 I can't find where TOSBOOT_END is defined . if i am using the
   platform
   telosb , maybe it does't work .
 can someone give me an answer ?
  
 
  TOSBOOT_END is defined in tinyos-2.x/tos/lib/tosboot/Makefile.
 
  --
  Razvan ME
 
I am using Tinyos2.x .
 thank you !!
  
  

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] question aout the TOSBootM

2008-05-06 Thread jiwen zhang
Hello all :
   Recently , i an researching the deluge, and find a problem in TOSBootM.
   In the function programImage(ex_flash_addr_t startAddr) , there is
a   sentence
   #if defined(PLATFORM_TELOSB)
if (intAddr != TOSBOOT_END) {
#elif defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
if (intAddr != 0) {
   
   

I can't find where TOSBOOT_END is defined . if i am using the platform
telosb , maybe it does't work .
can someone give me an answer ?
I am using Tinyos2.x .
thank you !!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] question aout the TOSBootM

2008-05-06 Thread jiwen zhang
Hello :
   thank you very much for your reply, Razvan ME.
   i have found it .




2008/5/7, Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Tue, 6 May 2008, jiwen zhang wrote:

 Hello all :
   Recently , i an researching the deluge, and find a problem in TOSBootM.
   In the function programImage(ex_flash_addr_t startAddr) , there is a
  sentence
   #if defined(PLATFORM_TELOSB)
if (intAddr != TOSBOOT_END) {
  #elif defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
if (intAddr != 0) {
   
   
 
I can't find where TOSBOOT_END is defined . if i am using the platform
  telosb , maybe it does't work .
can someone give me an answer ?
 

 TOSBOOT_END is defined in tinyos-2.x/tos/lib/tosboot/Makefile.

 --
 Razvan ME

   I am using Tinyos2.x .
thank you !!
 
 
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] GDB - Debugging Mica2Dot/Mica2

2008-05-06 Thread jiwen zhang
Hello :
   i am trying debugging the nesc code.
   the version of avarice i am using is 2.4. i find a problem that some
times i can connect but sometimes not when i use the same setting , and also
i can't see the C source , only see assembler code(tinyos1.15) . (i am using
jtagICE mkii )
   after i connected , i set a breakpoint and click run , i find it never
stop at the breakpoint. so i click the stop , and click run again, it
gives an error that can't connect. i am puzzled.
  so i doubt the version of avarice . so i want to update it . i have a
question :

   i have download the avarice from www.sourceforge.net , the version is 2.7
. there are two packets named avarice-2.7.tar.bz2 and
avarice-2.7.tar.bz2.sig.
1. what is the useness of the avarice-2.7.tar.bz2.sig ?
2.they are used for linux . can they be used in cygwin ? because they may be
dependent on some files which don't exist in cygwin . have someone tried ?
3 . i have installed avarice of version 2.4 , if i can install version
2.7, should i set the environment ? because i ever upadate my python version
in cygwin , after  i installed the higher version of python (the format
:*.tar.bz2),  i typewrite python in cygwin , i show i still use the former
verion of python , i don't know why , can someone tell me how to update my
tools in cygwin ?

  thank you very much!!

2008/5/7, Aurélien Francillon [EMAIL PROTECTED]:

 Edgar Charry a écrit :
Hi all,
 
  I am trying to debug my nesC codes using GDB (for TinyOS1.x using
  Mica2Dot and Mica2). Bunch of naive questions, so I think you know this
  for sure:
 
  1) avr-gdb and gdb are used for .exe (srec?) symbols reading. For the
  Mica2Dot ATMega128L do I necessarily need to use the 1st one? Or the
  latter one can also be used? What would be their difference by the way?

 exe are elf binary possibly including debug symbols
 avr-gdb is a gdb to use for avr binaries
 gdb is usually the debugger for your host platform binaries (x86,
 x86_64, ppc ... ) so using the plain gdb on a avr binary will not work ...

  2) Why can I read these symbols only by compiling with the debug command
  (make mica2dot install debug mib520,com3)?

 the debug command adds the -g and or -ggdb flags to the compiler, this
 adds the debug symbols, without them the debugger can't know function
 names / variables names /types etc...
 You can inspect symbols names/addresses/sections/disassembly  with
 avr-objdump
 With  PFLAFS='-v' make micaz ... you can see the exact command line
 passed to gcc .

  3) For on-chip debugging i need necessarily the JTAG interface to be
  connected with the MIB520 programming board. Avarice will carry out the
  interconnection of the JTAG-ICE interface (which is connected to the
  programming board+Mica2/Mica2Dot of course) and the avr-gdb through the
  serial port. So that means is 100% certain that I can do step-by-step
  on-chip debugging using avr-gdb

 yes but it's painfull to use as there is no native support for nesc in
 gdb so you are actually debugging on the plain c code generated by nesc
 (ie. build/micaz/app.c) moreover nesc's $ are ugly to read and prevent
 completion to work under gdb (can be replaced by __ see
 tinyos-2.x/support/make/avr/avr.rules)

  (or even using the WinAvr Insight graphical GUI).
 never tried

  Can I also see the assembly code and the correspondant
  nesC code side-by-side on that Insight GUI? Has anyone have this sort of
  experience?
 probably asm - C code, at least it works with gdb tui mode

  Is Avarice also compatible with JTAG-ISP
 yes but for programming only it's better to use avrdude
  or just with the  JTAG-ICE?
 what worked best for me was cvs version with patches present on
 sourceforge project page... it's then quite reliable and fast...

  Didn't really want to waste my money
 It's not a waste of money as long as you are aware that it can be
 sometimes painfull and slow to setup and having it running properly.
 It's probably of very little use if you have no idea of where or what
 the bug is or the bug happens only very randomly. On the other hand if
 you want to inspect values of i/o / registers/ memory... step by step or
 upon precise conditions or events then it can be very helpful.
 You can find some more hints there:
 http://planete.inrialpes.fr/~francill/stuff/AvrJtagIce.pdf

 Cheers
 Aurélien

 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] a strange problem while compile

2008-04-27 Thread jiwen zhang
Hello Janos Sallai :
   thank you very much for your reply !!
   i have tried it , it is the result as you say .


2008/4/25, Janos Sallai [EMAIL PROTECTED]:

  Jiwen:



 If you're compiling an application that does not make use of active
 messages, there's going to be no ActiveMessageAddressC$addr symbol in the
 binary. For example, this is the case with Blink, and this is the expected
 behavior of tos-set-symbols.



 Janos



 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *jiwen zhang
 *Sent:* Friday, April 25, 2008 3:37 AM
 *To:* tinyos-help
 *Subject:* [Tinyos-help] a strange problem while compile



 Hello all :

when i install the app blink to mote , there is a problem :



 *tos-set-symbols build/mica2/main.srec build/mica2/main.srec.out-10
 TOS_NODE_ID=10 ActiveMessageAddressC$addr=10**
 Could not find symbol ActiveMessageAddressC$addr in build/mica2/main.exe,
 ignoring symbol.
 Could not find symbol TOS_NODE_ID in build/mica2/main.exe, ignoring
 symbol.
 installing mica2 binary using mib510
 uisp -dprog=mib510 -dserial=/dev/ttyS0 --wr_fuse_h=0xd9 -dpart=ATmega128
 --wr_fuse_e=ff  --erase --upload if=build/mica2/main.srec.out-10
 Atmel AVR ATmega128 is found.
 Uploading: flash
 Firmware Version: 2.1*

 *Fuse High Byte set to 0xd9*

 *Fuse Extended Byte set to 0xff**
 rm -f build/mica2/main.exe.out-10 build/mica2/main.srec.out-10*

 it can't set the node id . what is wrong ? i am using tinyos2.x .

 thank you !!

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] does deluge support multihop ?

2008-04-27 Thread jiwen zhang
Hello Razvan ME :
  i think it is a very useful function , because maybe there are different
applications running in the network , so we should specify the node id when
we reprogram the motes .

  i wish you can make it possible as soon as possible -:)


2008/4/25, Razvan Musaloiu-E. [EMAIL PROTECTED]:

 Hi!

 On Fri, 25 Apr 2008, jiwen zhang wrote:

 Hello all :
   i want to whether deluge supports multiho in tinyos2.x ?
 
   if it support , i want to know which route arithmetic does it use .
 
   another question :
 
   The OTAP provided by crossbow can specify some nodes in the network to
  be reprogrammed , does deluge realize the function ?
 

 Deluge T2 doesn't yet support this functionality but I'm working on making
 it possible. :P

 --
 Razvan ME

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] does deluge support multihop ?

2008-04-27 Thread jiwen zhang
Hello Mike :
   thank you for your reply .
   i will spend some time reading it .

2008/4/25, Chieh-Jan (Mike) Liang [EMAIL PROTECTED]:

 Yes, Deluge supports multi-hop. It is a network-wide dissemination
 protocol. I would suggest reading the original Deluge paper (The dynamic
 behavior of a data dissemination protocol for network programming at
 scale).

 Mike

 On Apr 25, 2008, at 2:52 AM, jiwen zhang wrote:

  Hello all :
   i want to whether deluge supports multiho in tinyos2.x ?
 
   if it support , i want to know which route arithmetic does it use .
 
   another question :
 
   The OTAP provided by crossbow can specify some nodes in the network to
  be reprogrammed , does deluge realize the function ?
 
   thank you !!
  ___
  Tinyos-help mailing list
  Tinyos-help@millennium.berkeley.edu
  https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
 

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] How to update my python version in tinyos2.x

2008-04-25 Thread jiwen zhang
Hello all :
  when i compile the application BlinkConfig , there is a problem:
File /usr/local/bin/tos-storage-at45db, line 14, in ?
from subprocess import Popen, PIPE
ImportError: No module named subprocess
and StorageVolumes.h: No such file or directory

at last , i find that the module of subprocess appear after python 2.4 , but
my python version is 2.3.4 . so i have to update my python version .
i try update my cygwin , and i have installed python2.5 , but when i type
'python' in cygwin , it show the version is still 2.3.4 . can someone give
me help ? should i set the environment ? and how ?

thank you very much !!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] does deluge support multihop ?

2008-04-25 Thread jiwen zhang
Hello all :
  i want to whether deluge supports multiho in tinyos2.x ?

  if it support , i want to know which route arithmetic does it use .

  another question :

  The OTAP provided by crossbow can specify some nodes in the network to
be reprogrammed , does deluge realize the function ?

  thank you !!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] some questions about deluge

2008-04-23 Thread jiwen zhang
Hello Janos Sallai :
  it is a good news to hear that you have ported deluge to the iris .
  Recently , i want to spend some time researching the principle and
realization of deluge , can you give me some advises ?  thank you !!

 Maybe you spend much time porting deluge to iris . i will use deluge in
iris in future , could you tell me the mothod ? thank you very much !!



2008/4/23, Janos Sallai [EMAIL PROTECTED]:

  The IRIS mote is also supported (CVS version).



 Based on my experience with porting deluge to the iris, getting it working
 on the mica2 shouldn't be too complicated, either.



 Janos



 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *jiwen zhang
 *Sent:* Monday, April 21, 2008 8:50 PM
 *To:* weiping SONG
 *Cc:* tinyos-help
 *Subject:* Re: [Tinyos-help] some questions about deluge



 Hello all :

   thank you very much for your reply .

   1.mica2 and micaz use the same microprocessor and both of them use the
 same external flash at45db . i think the hardware platforms are the same to
 deluge . why only micaz is supported in tinyos 2.x ?

 2. i use tinyos2.x cvs tree . is it the same as  tinyos-2.x.git ?

 thank you !!





 2008/4/21, weiping SONG [EMAIL PROTECTED]:

 jiwen zhang wrote:

 Hello all :
i want to use deluge in my project to realize the function of OTAP .
 now i am using tinyos2.x ,  and i know little about deluge before , it is a
 new thing to me , so i have some questions :
 1. what are the platforms supported by deluge in tinyos2.x ?

 Tmote Sky  and MicaZ only

 2. is the deluge in developing ? is iris supported ?



 3. is the deluge steady now ? are there some people using it in some
 projects ? how about the  reliability?

 It  is not  steady now and still in develop, but there seems  no  new
  plan  recently.  I have installed deluge T2 in my testbed, it works fine
 till now. But I use the latest Deluge from the following git repository:
   http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git
   http://hinrg.cs.jhu.edu/git/?p=deluge/tinyos-2.x.git(webgit)
 Which is different from the version in Tinyos 2.0.2.

 4. if i want to learn the implemention of deluge , are there some paper of
 documents i can read ?
  thank you very much !!
 

 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

 I hope these info would be helpful!

 Weiping



___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] some questions about deluge

2008-04-23 Thread jiwen zhang
Hello Jnnos Sallai :
   thank you very much for your reply .
   At present , i know little about deluge , so i plan to spend some time
researshing the  principle , if possible , i will read some codes of the
realization of deluge.
  about the port of iris , i will ask you some question when i use the
platform of iris in future , i wish you can help me . thank you very much in
advance !!

2008/4/23, Janos Sallai [EMAIL PROTECTED]:

  The iris is very similar to the micaz. I only had to change the
 bootloader (flash access is different), the rest worked pretty much out of
 the box. Of course, there were some compilation problems here and there, but
 that could be fixed with adding and changing some #ifdefs. It took me no
 more than a day. Of course, I knew already how deluge works, and I was
 pretty familiar with the hardware I am working with.



 Janos



 *From:* jiwen zhang [mailto:[EMAIL PROTECTED]
 *Sent:* Wednesday, April 23, 2008 3:56 AM
 *To:* Janos Sallai
 *Cc:* weiping SONG; tinyos-help
 *Subject:* Re: [Tinyos-help] some questions about deluge



 Hello Janos Sallai :

   it is a good news to hear that you have ported deluge to the iris .

   Recently , i want to spend some time researching the principle and
 realization of deluge , can you give me some advises ?  thank you !!



  Maybe you spend much time porting deluge to iris . i will use deluge in
 iris in future , could you tell me the mothod ? thank you very much !!





 2008/4/23, Janos Sallai [EMAIL PROTECTED]:

 The IRIS mote is also supported (CVS version).



 Based on my experience with porting deluge to the iris, getting it working
 on the mica2 shouldn't be too complicated, either.



 Janos



 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *jiwen zhang
 *Sent:* Monday, April 21, 2008 8:50 PM
 *To:* weiping SONG
 *Cc:* tinyos-help
 *Subject:* Re: [Tinyos-help] some questions about deluge



 Hello all :

   thank you very much for your reply .

   1.mica2 and micaz use the same microprocessor and both of them use the
 same external flash at45db . i think the hardware platforms are the same to
 deluge . why only micaz is supported in tinyos 2.x ?

 2. i use tinyos2.x cvs tree . is it the same as  tinyos-2.x.git ?

 thank you !!





 2008/4/21, weiping SONG [EMAIL PROTECTED]:

 jiwen zhang wrote:

 Hello all :
i want to use deluge in my project to realize the function of OTAP .
 now i am using tinyos2.x ,  and i know little about deluge before , it is a
 new thing to me , so i have some questions :
 1. what are the platforms supported by deluge in tinyos2.x ?

 Tmote Sky  and MicaZ only

 2. is the deluge in developing ? is iris supported ?



 3. is the deluge steady now ? are there some people using it in some
 projects ? how about the  reliability?

 It  is not  steady now and still in develop, but there seems  no  new
  plan  recently.  I have installed deluge T2 in my testbed, it works fine
 till now. But I use the latest Deluge from the following git repository:
   http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git
   http://hinrg.cs.jhu.edu/git/?p=deluge/tinyos-2.x.git(webgit)
 Which is different from the version in Tinyos 2.0.2.

 4. if i want to learn the implemention of deluge , are there some paper of
 documents i can read ?
  thank you very much !!
 

 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

 I hope these info would be helpful!

 Weiping





___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] some questions about deluge

2008-04-22 Thread jiwen zhang
Hello all :
   thank you very much for your reply .
   i have seen deluge-t2-manual.html , there is a word In addition, it
provides a quick test for software prerequisite. The latest TinyOS 2 CVS
tree and Python 2.4 with pySerial support are recommended for running Deluge
T2..  so i have update my tinyos tree to cvs version , but the tools
installed are the same with tinyos2.02 except python, i update it to 2.4
. but when i  typed 'python' in cygwin , i display that i still use the
version 2.3.4 not 2.4 . what is wrong ? is there something i should set ?
can you give me some cues about the tools if i want to use deluge rightly ?
it's better give me a link to the tools so i can download it and the way how
to set something .
thank you !!


2008/4/22, Chieh-Jan (Mike) Liang [EMAIL PROTECTED]:

 Hi Jiwen,

 While porting Deluge to T2, Telosb and MicaZ were the two platforms that
 we tested on. The original Deluge paper is at
 http://portal.acm.org/citation.cfm?id=1031495.1031506. The manual for
 Deluge T2 is at
 http://www.tinyos.net/tinyos-2.x/doc/html/deluge-t2-manual.html.

 Mike

 On Mon, 21 Apr 2008, jiwen zhang wrote:

 Hello all :
i want to use deluge in my project to realize the function of OTAP .
  now
  i am using tinyos2.x ,  and i know little about deluge before , it is a
  new
  thing to me , so i have some questions :
  1. what are the platforms supported by deluge in tinyos2.x ?
  2. is the deluge in developing ? is iris supported ?
  3. is the deluge steady now ? are there some people using it in some
  projects ? how about the  reliability?
  4. if i want to learn the implemention of deluge , are there some paper
  of
  documents i can read ?
 
  thank you very much !!
 
 
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] some questions about deluge

2008-04-22 Thread jiwen zhang
Hello all :
  thank you very much for your reply .
  1.mica2 and micaz use the same microprocessor and both of them use the
same external flash at45db . i think the hardware platforms are the same to
deluge . why only micaz is supported in tinyos 2.x ?
2. i use tinyos2.x cvs tree . is it the same as  tinyos-2.x.git ?

thank you !!



2008/4/21, weiping SONG [EMAIL PROTECTED]:

 jiwen zhang wrote:

  Hello all :
 i want to use deluge in my project to realize the function of OTAP .
  now i am using tinyos2.x ,  and i know little about deluge before , it is a
  new thing to me , so i have some questions :
  1. what are the platforms supported by deluge in tinyos2.x ?
 
 Tmote Sky  and MicaZ only

  2. is the deluge in developing ? is iris supported ?
 

 3. is the deluge steady now ? are there some people using it in some
  projects ? how about the  reliability?
 
 It  is not  steady now and still in develop, but there seems  no  new
  plan  recently.  I have installed deluge T2 in my testbed, it works fine
 till now. But I use the latest Deluge from the following git repository:
   http://hinrg.cs.jhu.edu/git/deluge/tinyos-2.x.git
   http://hinrg.cs.jhu.edu/git/?p=deluge/tinyos-2.x.git(webgit)
 Which is different from the version in Tinyos 2.0.2.

  4. if i want to learn the implemention of deluge , are there some paper
  of documents i can read ?
   thank you very much !!
  
 
  ___
  Tinyos-help mailing list
  Tinyos-help@millennium.berkeley.edu
  https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
 
 I hope these info would be helpful!

 Weiping

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] some questions about deluge

2008-04-21 Thread jiwen zhang
Hello all :
i want to use deluge in my project to realize the function of OTAP . now
i am using tinyos2.x ,  and i know little about deluge before , it is a new
thing to me , so i have some questions :
1. what are the platforms supported by deluge in tinyos2.x ?
2. is the deluge in developing ? is iris supported ?
3. is the deluge steady now ? are there some people using it in some
projects ? how about the  reliability?
4. if i want to learn the implemention of deluge , are there some paper of
documents i can read ?

thank you very much !!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] how to get the hops using CTP

2008-04-20 Thread jiwen zhang
Hello all :
   i am using tinyos2.x . i want to get the hops from the source to the root
. how should i realize this ?
   thank you !!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about mica2 in deluge

2008-04-17 Thread jiwen zhang
Hello all :
   I see on http://www.cs.berkeley.edu/~jwhui/research/deluge/faq.html that
mica2 is supported by deluge in tinyos1.x . now i am using tinyos2.x
cvs, when i use 'make mica2 in the directory of
D:\cygwin\opt\tinyos-2.x\tos\lib\TOSBoot , there are some errors as follows:

mkdir -p build/mica2
compiling TOSBoot to a mica2 binary
ncc -o build/mica2/main.exe  -Os -DNESC_BUILD_BINARY -Wall -Wshadow
-Wnesc-all -target=mica2 -fnesc-cfile=build/mica2/app.c -board=micasb
-DDEFINED_TOS_AM_GROUP=0x22 -finline-limit=10
-DIDENT_APPNAME=\TOSBoot\ -DIDENT_USERNAME=\zhangjiwen\
-DIDENT_HOSTNAME=\zjw\ -DIDENT_USERHASH=0x0eac215cL
-DIDENT_TIMESTAMP=0x4807508cL -DIDENT_UIDHASH=0x2b5d32beL -fnesc-dump=wiring
-fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs,
components)' -fnesc-dumpfile=build/mica2/wiring-check.xml TOSBoot.nc -lm
TOSBoot.nc:31: C file Deluge not found
TOSBoot.nc:32: C file DelugePageTransfer not found
TOSBoot.h:31:30: TOSBoot_platform.h: No such file or directory
TOSBoot.nc:33: failed to preprocess TOSBoot.h
TOSBootM.nc:155:4: #error Target platform is not currently supported by
Deluge T2
In component `TOSBoot':
TOSBoot.nc:40: failed to preprocess TOSBootM.nc
TOSBoot.nc:41: component ExecC not found
TOSBoot.nc:42: component ExtFlashC not found
TOSBoot.nc:43: component HardwareC not found
TOSBoot.nc:44: component InternalFlashC not found
In file included from /opt/tinyos-2.x/tos/system/LedsC.nc:38,
 from TOSBoot.nc:45:
In component `LedsP':
/opt/tinyos-2.x/tos/system/LedsP.nc:63: `led0On' is not in interface `Leds'
/opt/tinyos-2.x/tos/system/LedsP.nc:68: `led0Off' is not in interface `Leds'
/opt/tinyos-2.x/tos/system/LedsP.nc:73: `led0Toggle' is not in interface
`Leds'
/opt/tinyos-2.x/tos/system/LedsP.nc:78: `led1On' is not in interface `Leds'
/opt/tinyos-2.x/tos/system/LedsP.nc:83: `led1Off' is not in interface `Leds'
/opt/tinyos-2.x/tos/system/LedsP.nc:88: `led1Toggle' is not in interface
`Leds'
/opt/tinyos-2.x/tos/system/LedsP.nc:93: `led2On' is not in interface `Leds'
/opt/tinyos-2.x/tos/system/LedsP.nc:98: `led2Off' is not in interface `Leds'
/opt/tinyos-2.x/tos/system/LedsP.nc:103: `led2Toggle' is not in interface
`Leds'
/opt/tinyos-2.x/tos/system/LedsP.nc:108: `get' is not in interface `Leds'
/opt/tinyos-2.x/tos/system/LedsP.nc: In function `Leds.get':
/opt/tinyos-2.x/tos/system/LedsP.nc:113: `LEDS_LED0' undeclared (first use
in this function)
/opt/tinyos-2.x/tos/system/LedsP.nc:113: (Each undeclared identifier is
reported only once
/opt/tinyos-2.x/tos/system/LedsP.nc:113: for each function it appears in.)
/opt/tinyos-2.x/tos/system/LedsP.nc:116: `LEDS_LED1' undeclared (first use
in this function)
/opt/tinyos-2.x/tos/system/LedsP.nc:119: `LEDS_LED2' undeclared (first use
in this function)
/opt/tinyos-2.x/tos/system/LedsP.nc: At top level:
/opt/tinyos-2.x/tos/system/LedsP.nc:125: `Leds.set': async mismatch with
declaration
Leds.nc:32: previous declaration of `Leds.set'
/opt/tinyos-2.x/tos/system/LedsP.nc: In function `Leds.set':
/opt/tinyos-2.x/tos/system/LedsP.nc:127: `LEDS_LED0' undeclared (first use
in this function)
/opt/tinyos-2.x/tos/system/LedsP.nc:128: interface has no command or event
named `led0On'
/opt/tinyos-2.x/tos/system/LedsP.nc:131: interface has no command or event
named `led0Off'
/opt/tinyos-2.x/tos/system/LedsP.nc:133: `LEDS_LED1' undeclared (first use
in this function)
/opt/tinyos-2.x/tos/system/LedsP.nc:134: interface has no command or event
named `led1On'
/opt/tinyos-2.x/tos/system/LedsP.nc:137: interface has no command or event
named `led1Off'
/opt/tinyos-2.x/tos/system/LedsP.nc:139: `LEDS_LED2' undeclared (first use
in this function)
/opt/tinyos-2.x/tos/system/LedsP.nc:140: interface has no command or event
named `led2On'
/opt/tinyos-2.x/tos/system/LedsP.nc:143: interface has no command or event
named `led2Off'
/opt/tinyos-2.x/tos/system/LedsP.nc: At top level:
/opt/tinyos-2.x/tos/system/LedsP.nc:44: `Leds.glow' not implemented
/opt/tinyos-2.x/tos/system/LedsP.nc:44: `Leds.flash' not implemented
In component `TOSBoot':
TOSBoot.nc:46: component PluginC not found
TOSBoot.nc:47: component ProgFlashM not found
TOSBoot.nc:48: generic component `VoltageC' requires instantiation arguments
TOSBoot.nc:50: cannot find `SubInit'
TOSBoot.nc:51: cannot find `StdControl'
TOSBoot.nc:52: cannot find `SubControl'
TOSBoot.nc:54: cannot find `Exec'
TOSBoot.nc:55: cannot find `ExtFlash'
TOSBoot.nc:56: cannot find `Hardware'
TOSBoot.nc:57: cannot find `IntFlash'
TOSBoot.nc:58: cannot find `Leds'
TOSBoot.nc:59: cannot find `ProgFlash'
TOSBoot.nc:60: cannot find `Voltage'
make: *** [exe0] Error 1
i find there is no folder named mica2 under the directory . is mica2 not
supported by deluge ?

thank you!!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about mica2 in deluge

2008-04-17 Thread jiwen zhang
Hello all :
   if i want to reprogramme some nodes of the sensor network using deluge,
for example , i specify the mote numbers which need to reprogramme, and the
motes which are not specified need not to reprogramme. can i realize that ?
   thank you !!


2008/4/17, jiwen zhang [EMAIL PROTECTED]:

 Hello all :
thank you for your reply philip .
i want to know is mica2 supported by deluge in tinyos2.x ?
thank you !!


 2008/4/17, Philip Levis [EMAIL PROTECTED]:
 
 
  On Apr 17, 2008, at 7:24 AM, jiwen zhang wrote:
 
   Hello all :
 I see on http://www.cs.berkeley.edu/~jwhui/research/deluge/faq.html
   that mica2 is supported by deluge in tinyos1.x . now i am using tinyos2.x
   cvs, when i use 'make mica2 in the directory of
   D:\cygwin\opt\tinyos-2.x\tos\lib\TOSBoot , there are some errors as 
   follows:
  
  
  That web page refers to Deluge in TinyOS 1.x.
 
  Phil
 


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Does CTP and Dissemination support rf230

2008-04-15 Thread jiwen zhang
hello all :
  i have a question about CTP and Dissemination. do they support rf230 in
tinyos2.x cvs version? and is it nicely supported like cc2420 ?
  thank you!!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] some question about LinkEstimatorP

2008-03-18 Thread jiwen zhang
Hell :
   Thank you for your answer to my questions , Om_p.
   I still have some questions :

 1. what are uses of the inage and outage defined in struct
neighbor_table_entry in LinkEstimator.h? in file LinkEstimatorP.nc, it
defines MAX_AGE=6,which is maximum link update rounds before we expire the
link. i want to know what is the meaning of link update rounds ?


  2.In LInkEstimatorP.nc,there are some functions :
  void updateEETX(neighbor_table_entry_t *ne, uint16_t newEst) {
ne-eetx = (ALPHA * ne-eetx + (10 - ALPHA) * newEst)/10;
  }

  // update data driven EETX
  void updateDEETX(neighbor_table_entry_t *ne) {
uint16_t estETX;

if (ne-data_success == 0) {
  // if there were no successful packet transmission in the
  // last window, our current estimate is the number of failed
  // transmissions
  estETX = (ne-data_total - 1)* 10;
} else {
  estETX = (10 * ne-data_total) / ne-data_success - 10;
  ne-data_success = 0;
  ne-data_total = 0;
}
updateEETX(ne, estETX);
  }

  // EETX (Extra Expected number of Transmission)
  // EETX = ETX - 1
  // computeEETX returns EETX*10
  uint8_t computeEETX(uint8_t q1) {
uint16_t q;
if (q1  0) {
  q =  2550 / q1 - 10;
  if (q  255) {
 q = INFINITY;
  }
  return (uint8_t)q;
} else {
  return INFINITY;
}
  }

  // BidirETX = 1 / (q1*q2)
  // BidirEETX = BidirETX - 1
  // computeBidirEETX return BidirEETX*10
  uint8_t computeBidirEETX(uint8_t q1, uint8_t q2) {
uint16_t q;
if ((q1  0)  (q2  0)) {
  q =  65025u / q1;
  q = (10*q) / q2 - 10;
  if (q  255) {
 q = LARGE_EETX_VALUE;
  }
  return (uint8_t)q;
} else {
  return LARGE_EETX_VALUE;
}
  }

I can't understand the arithmetic used in the functions such as ne-eetx =
(ALPHA * ne-eetx + (10 - ALPHA) * newEst)/10 in updateEETX ,estETX =
(ne-data_total - 1)* 10  estETX = (10 * ne-data_total) /
ne-data_success - 10 in updateDEETX and others in computeEETX and
computeBidirEETX. i think there should be some reasons why they write the
programem link that. can someone give me a detail explains or give me a clue
where i can find the reason ?



2008/3/17, Omprakash Gnawali [EMAIL PROTECTED]:

 On Sun, Mar 16, 2008 at 7:35 AM, jiwen zhang [EMAIL PROTECTED]
 wrote:
  Hello all :
today , i spend some time reading the LinkEstimatorP and have soem
  questions about it :
1.in LinkEstimator.h,the struct linkest_footer has an array member
  neighborList which is the type of  neighbor_stat_entry_t and the size is
  one. but at line 130 in file LinkEstimatorP
 footer-neighborList[j].ll_addr
  = NeighborTable[k].ll_addr;
   footer-neighborList[j].inquality = NeighborTable[k].inquality , the
  variable j can be 0 to maxEntries . i can't understand this. can
 somebody
  give me an explain ?

 This is a C trick that allows you to address that region of the
 payload as an array even though you don't know apriori how many
 elements you have.


2.  In the file LinkEstimatorP.nc, there is a function
 linkest_footer_t*
  getFooter(message_t* m, uint8_t len) ,it return the address of neighbor
  entries. i want to what is meaning of the parameter len ?

 It is the size of the payload sent by the component that uses the link
 estimator.

  I have seen TEP124
  , it said the LEEP frame includes a header, the payload and a footer .
 In my
  opinion , the len should be the length of a header and the payload .

 No.

   if my
  opioion is right , i still have a question. Is the parameter len in the
  function of addLinkEstHeaderAndFooter(message_t *msg, uint8_t len) the
 same
  as the one in getFooter ?

 Yes.

  if yes , i have doubt to the sentence maxEntries
  = ((call SubPacket.maxPayloadLength() - len -
  sizeof(linkest_header_t)/sizeof(linkest_footer_t)) in
  addLinkEstHeaderAndFooter , because the len includes the length of the
  header so i think it should be  maxEntries = ((call
  SubPacket.maxPayloadLength() - len)/ sizeof(linkest_footer_t)) . am i
 right
  ?

 No. len does not include the linkest header.


 3.in the function addLinkEstHeaderAndFooter in LinkEstimatorP.nc, it
  defines a pointer hdr which points to the header of the payload , then
 it
  gives some value to the field of seq and flag. if the payload is not
 null
  and have some useful data, does it cover the primary data with the
 header? i
  really can't understand.

 Packet.getPayload() makes sure that we leave room for the header. That
 is why we do not overwrite payload when we assign fields to the
 header.

 4.what is the meaning of Data-driven Link Quality and
 Beacon-driven
  Link Quality ? what are the functions of them and what are the
 differcnces
  between them ?

 Estimating the quality of link based on data transmission statistics
 vs. just using beacons. For more details, please read this paper about
 the link estimator used by CTP:
 http://enl.usc.edu/papers/abstract/Fonseca07.html

 - om_p

[Tinyos-help] some question about LinkEstimatorP

2008-03-16 Thread jiwen zhang
Hello all :
  today , i spend some time reading the LinkEstimatorP and have soem
questions about it :
  1.in LinkEstimator.h,the struct linkest_footer has an array member
neighborList which is the type of  neighbor_stat_entry_t and the size is
one. but at line 130 in file LinkEstimatorP footer-neighborList[j].ll_addr
= NeighborTable[k].ll_addr;
footer-neighborList[j].inquality = NeighborTable[k].inquality , the
variable j can be 0 to maxEntries . i can't understand this. can somebody
give me an explain ?
  2.  In the file LinkEstimatorP.nc, there is a function linkest_footer_t*
getFooter(message_t* m, uint8_t len) ,it return the address of neighbor
entries. i want to what is meaning of the parameter len ? I have seen TEP124
, it said the LEEP frame includes a header, the payload and a footer . In my
opinion , the len should be the length of a header and the payload . if my
opioion is right , i still have a question. Is the parameter len in the
function of addLinkEstHeaderAndFooter(message_t *msg, uint8_t len) the same
as the one in getFooter ? if yes , i have doubt to the sentence maxEntries
= ((call SubPacket.maxPayloadLength() - len -
sizeof(linkest_header_t)/sizeof(linkest_footer_t)) in
addLinkEstHeaderAndFooter , because the len includes the length of the
header so i think it should be  maxEntries = ((call
SubPacket.maxPayloadLength() - len)/ sizeof(linkest_footer_t)) . am i right
?
  3.in the function addLinkEstHeaderAndFooter in LinkEstimatorP.nc, it
defines a pointer hdr which points to the header of the payload , then it
gives some value to the field of seq and flag. if the payload is not null
and have some useful data, does it cover the primary data with the header? i
really can't understand.
  4.what is the meaning of Data-driven Link Quality and Beacon-driven
Link Quality ? what are the functions of them and what are the differcnces
between them ?
  Thank you!!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] packet format in CTP

2008-03-13 Thread jiwen zhang
Hello :
  I have seen the TEP123 . i want to know whether there are only the two
kinds messages  i received in the Basestation ?  does the data frame or the
route frame is also put in the data region  of message_t ? if yes , if i put
two bytes data in the CTP packet , the payload length region should be  ten
, am i right ? that is to say i can only put twenty bytes data in the CTP
packet , am i right ?
   thank you !!


2008/3/13, Greg Hackmann [EMAIL PROTECTED]:

 jiwen zhang wrote:
 i find there are some kinds of packet, i want to know the function of
  each pakcet (such as for building route table). what is the meaning of
  evry part of each kind of packet ? can some one tell me what kinds of
  pakcet i may receive using Basestation ? and what are the meaning of
  every parts of the packet ?

 The CTP packet formats are described in TEP 123
 (http://www.tinyos.net/tinyos-2.x/doc/html/tep123.html).

 Greg Hackmann
 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about CTP

2008-03-13 Thread jiwen zhang
hello om_p:
   can you  recommend some papers about CTP so i can understand CTP
implementation easily ?
   thank you!!


2008/3/13, Omprakash Gnawali [EMAIL PROTECTED]:

 On Wed, Mar 12, 2008 at 6:50 AM, jiwen zhang [EMAIL PROTECTED]
 wrote:
  Hello all :
 as we know , ACKs is on link layer , that is to say if a mote
 receives a
  packet , it will return an ACKs to the sender. but how to ensure data
  transmission in network layer ? for exaple , in a mulitihop sensor
 network ,
  a mote receives a packet and returns the ACK. maybe it has received many
  packets waiting to send and the queue is full , so it has to discard it
 , so
  the packet may not get to Root(in CTP) . (i don't know if i say it
 clealy ,
  in short, i want to know whether there is a  route layer ACK in CTP)

 No, there isn't.

how the problem is solved in CTP ?

 If the packet was not acknowledged (you can look at the ack bit of the
 packet), you retransmit.

 - om_p

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about CTP

2008-03-12 Thread jiwen zhang
 Hello :
   after check the application under the directory
tinyos-2.x/apps/tests/cc2420/testACK,i
finally understand how to turn on the ACK. if i want to use the ACK ,
i must use the interface
PacketAcknowledgementshttp://www.tinyos.net/tinyos-2.x/doc/html/nesdoc/mica2dot/ihtml/tos.interfaces.PacketAcknowledgements.html
.
  i find in the testACK , befor send a packet, it will use the command
requestAckhttp://www.tinyos.net/tinyos-2.x/doc/html/nesdoc/mica2dot/ihtml/tos.interfaces.PacketAcknowledgements.html#requestAck,
i want to know if i should use
requestAckhttp://www.tinyos.net/tinyos-2.x/doc/html/nesdoc/mica2dot/ihtml/tos.interfaces.PacketAcknowledgements.html#requestAck
every
time before sending.
  thank you!!!


2008/3/11, Omprakash Gnawali [EMAIL PROTECTED]:

 On Mon, Mar 10, 2008 at 6:35 AM, jiwen zhang [EMAIL PROTECTED]
 wrote:
  Hello Omprakash Gnawali :
 at present , my application is not started .
 you say in application TestNetwork  and MultihopOscilloscope ,
 the
  ACKs are enabled. i don't find where it enables the ACKs ? in the
 makefile ?
  i can't find it . can you tell me how to enable the ACKs in an
 application
  using CTP ?

 Please look for requestAck calls in CtpForwardingEngineP.nc.

 - om_p

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about CTP

2008-03-12 Thread jiwen zhang
Hello all :
   as we know , ACKs is on link layer , that is to say if a mote receives a
packet , it will return an ACKs to the sender. but how to ensure data
transmission in network layer ? for exaple , in a mulitihop sensor network ,
a mote receives a packet and returns the ACK. maybe it has received many
packets waiting to send and the queue is full , so it has to discard it , so
the packet may not get to Root(in CTP) . (i don't know if i say it clealy ,
in short, i want to know whether there is a  route layer ACK in CTP)
  how the problem is solved in CTP ?
  Thank you very much!!


2008/3/12, jiwen zhang [EMAIL PROTECTED]:

  Hello :
after check the application under the directory  
 tinyos-2.x/apps/tests/cc2420/testACK,i
 finally understand how to turn on the ACK. if i want to use the ACK ,
 i must use the interface
 PacketAcknowledgementshttp://www.tinyos.net/tinyos-2.x/doc/html/nesdoc/mica2dot/ihtml/tos.interfaces.PacketAcknowledgements.html
 .
   i find in the testACK , befor send a packet, it will use the command
 requestAckhttp://www.tinyos.net/tinyos-2.x/doc/html/nesdoc/mica2dot/ihtml/tos.interfaces.PacketAcknowledgements.html#requestAck,
 i want to know if i should use 
 requestAckhttp://www.tinyos.net/tinyos-2.x/doc/html/nesdoc/mica2dot/ihtml/tos.interfaces.PacketAcknowledgements.html#requestAck
  every
 time before sending.
   thank you!!!


 2008/3/11, Omprakash Gnawali [EMAIL PROTECTED]:
 
  On Mon, Mar 10, 2008 at 6:35 AM, jiwen zhang [EMAIL PROTECTED]
  wrote:
   Hello Omprakash Gnawali :
  at present , my application is not started .
  you say in application TestNetwork  and MultihopOscilloscope ,
  the
   ACKs are enabled. i don't find where it enables the ACKs ? in the
  makefile ?
   i can't find it . can you tell me how to enable the ACKs in an
  application
   using CTP ?
 
  Please look for requestAck calls in CtpForwardingEngineP.nc.
 
  - om_p
 


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] packet format in CTP

2008-03-12 Thread jiwen zhang
Hello all :
  i am using CTP in my application.
  i want to analyse the packet format received .
*  *as we know , the message_t format is that :
*  Destination address (2 bytes)
  Source address (2 bytes)
  Message length (1 byte)
  Group ID (1 byte)
  Active Message handler type (1 byte)
  Payload (up to 28 bytes):*

   maybe there will be some information in the payload such as  routing
,link quality and so on in CTP.
   i use the* BaseStation* in directory tinyos-2.x/apps to receive the
packet(including Root and other nodes's packets) , and use java
net.tinyos.tools.Listen to look the messages on pc.
   i find there are some kinds of packet, i want to know the function of
each pakcet (such as for building route table). what is the meaning of evry
part of each kind of packet ? can some one tell me what kinds of pakcet i
may receive using Basestation ? and what are the meaning of every parts of
the packet ?
   thank you very much !!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] radio in powermanagement

2008-03-12 Thread jiwen zhang
Hello all :
as we know , in tinyos 2.x , the system will go to sleep mode when there
is no task running . i want to know if the radio is turned off automatically
too in sleep mode if the radio is free (no send, no receive) ? for exaple ,
in LPL, when the mote is not in listening , whether the radio is turned off
?
  thank you !!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about message_t

2008-03-12 Thread jiwen zhang
Hello all :
  as we know , there is a metadata field in the message_t . i want to know
if there is a interface providing some ways to access them like the
interface Packet or the metadata can be accessed directly ?
  for example,cc2420 metadat:
typedef nx_struct cc2420_metadata_t {
  nx_uint8_t tx_power;
  nx_uint8_t rssi;
  nx_uint8_t lqi;
  nx_bool crc;
  nx_bool ack;
  nx_uint16_t time;
  nx_uint16_t rxInterval;

  /** Packet Link Metadata */
#ifdef PACKET_LINK
  nx_uint16_t maxRetries;
  nx_uint16_t retryDelay;
#endif

} cc2420_metadata_t;

   Because i want to get the value of the metadata , and put them in the
payload of a packet and send them out.i want to know do they really be given
a right value in the implementation before sending such as tx_power,rssi,ack
and so on ?  and in which file does it implement  these ?
thank you !!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] some question about Collection

2008-03-10 Thread jiwen zhang
Hello all :
There is a words* The collection infrastructure can be multiplexed
among independent applications, by means of a collection identifier. It is
important to note that the data traffic in the protocol is multiplexed,
while the control traffic is not* in TEP 119. what does it mean ? can
someone explain it detailedly ?what is multiplexed mean ? why data
traffic is multiplexed and control traffic is not ? what is function of
collection id in Collection ?

  There is also a words *Each collection id t corresponds to a different
protocol operating on top of collection, in the same way that different
am_id _t values represent different protocols operating on top of active
messages..*
  what does it mean ? what is the meaning of different protocal ? if two
application using different collection_id or am_id_t,do they can communicate
with each other ? (i can't understand the function of collection_id and
am_id_t)

 * what is the relation between Collection and CTP ?*
  thank you !!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about interface send and AMSend

2008-03-10 Thread jiwen zhang
Hello all :
 as we know , both interface send and AMSend can send a message out to a
mote.the difference is that AMSend provides a parameter am_addr_t which
specifies the receiver's address. i want to know which mote dose it sends to
if the application uses the interface send ?
  thank you!!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] some words in TEP123 about CTP

2008-03-10 Thread jiwen zhang
Hello all :
  in TEP123 , there are some words i can't understand .

*  Together, the origin, seqno and collect id fields denote a unique
*origin packet.* Together, the origin, seqno, collect id, and THL denote a
unique *packet instance* within the network.*

  what does it mean? what does origin packet  and packet instance mean?

  when it node receive a CTP packet,how does it know it is a data frame or
route frame?

  thank you very much.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about CTP

2008-03-09 Thread jiwen zhang
Hello all :
  In TEP123,there is a words A node MUST send CTP data frames as
unicast messages with link-layer acknowledgments enabled.. what does
it mean? as i know,if i use cc2420 or cc1000 to communicate with each
other,acknowledgment is turned off defalt.should i turn on
acknowledgment if i want to use CTP? and how ?
  thank you very much.
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] about sleep mode

2008-03-05 Thread jiwen zhang
Hello all:
   In the sensor network,we have to make nodes go into sleep mode in order
to save power. In tinyos2.x, i want to know whether it is done by operation
system or not? can we make it go into sleep mode by hand and how?
  what does the operation system do to make the node go into sleeep mode ?
for example,turning off radio?
  when a node has gone into sleep mode, is  the timer  working ? because i
want the node wake up in a fixed time,so i use the timer to realize that.
  thank you very much!!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about power detect

2008-03-04 Thread jiwen zhang
Hello :
   I still can't find the answer to the question.
   Does anyone find it ? please give me a right address or tell me how to
realize voltage measure ?
  thank you very much!!

2008/3/4, Michael Schippling [EMAIL PROTECTED]:

 Yeah it's kinda too bad, but the good search page belonged to moteiv
 and they no longer support it. However Google works pretty good,
 and you can even limit it to the help site with some sort of magic foo.

 MS

 David wrote:
   Hi. Sorry if this is a dumb question. How do you search the archives?
   This page doesn't have a search box:
 
   http://mail.millennium.berkeley.edu/pipermail/tinyos-help/
 
 
  I just found this page through Google:
 
  http://www.tinyos.net/search.html
 
  However, searching gets me a 404 error, with this message:
 
  Not Found
 
  The requested URL /cgi-bin/htsearch was not found on this server.
  Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-22 mod_ssl/2.0.54
  OpenSSL/0.9.7e mod_perl/1.999.21 Perl/v5.8.4 Server at
  mail.millennium.berkeley.edu Port 443

 --
 Platform: WinXP/Cygwin
 TinyOS version: 1.x, Boomerang
 Programmer: MIB510
 Device(s): Mica2, MicaZ, Tmote
 Sensor board: homebrew

 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about power detect

2008-03-02 Thread jiwen zhang
Hello all:
  I am using tinyos-2.x, i want to know how to detect how much power is left
in the node or how we know whetherpower of a node will exhaust?
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about tools of ice-insight

2008-01-25 Thread jiwen zhang
Hello all:
  when i use the tool of ice-insight , i fall across some problems.
  firstly, i talk about the link of hardware.
  i have a programming board mib510 , Jtag ICE mk-ii.
  i use serial port to connect jtag ice with pc.
  i use usb port to supply power to jtag ice(because i can't find the
transformer to jtag ice ^0^,i don't know whether it has some effection ).

  the process is :
  cd blink
  export AVARICE_ARGS='-j /dev/ttyS0'
  make mica2 debug
  ice-insight build/mica2/main.exe

  after some seconds , in the commnd line ,it print as
Failed to synchronise with the JTAG ICE (is it connected or powered?)

 and a visual window appears , i select run-Connect to target , it appears
a error window as 2.jpg in the attachment . i don't know why, can any one
help me?
  thank you very much!!
attachment: 2.JPG___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about time synchronization in tinyos2.x

2008-01-24 Thread jiwen zhang
hello all:
   I want to know whether time synchronization is supposed in tinyos2.x.
   thank you!!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about BlinkConfig(compile error)

2008-01-17 Thread jiwen zhang
Hello all:
   when I compile the application BlinkConfig under the directory
apps/tutorials , but some problems appear.


  mkdir -p build/mica2
tos-storage-at45db /opt/tinyos-2.x/tos/platforms/mica2
volumes-at45db.xmlbuild/mica2/StorageVolumes.h || rm -f
build/mica2/StorageVolumes.h
Traceback (most recent call last):
  File /usr/local/bin/tos-storage-at45db, line 14, in ?
from subprocess import Popen, PIPE
ImportError: No module named subprocess
compiling BlinkConfigAppC to a mica2 binary
ncc -o build/mica2/main.exe -Os -finline-limit=10 -Wall -Wshadow
-Wnesc-all -target=mica2 -fnesc-cfile=build/mica2/app.c -board=micasb
-Ibuild/mica2 -DIDENT_PROGRAM_NAME=\BlinkConfigAppC\
-DIDENT_USER_ID=\zhangjiwen\ -DIDENT_HOSTNAME=\zjw\
-DIDENT_USER_HASH=0x0eac215cL -DIDENT_UNIX_TIME=0x47901048L
-DIDENT_UID_HASH=0x67560eeeL -fnesc-dump=wiring
-fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs,
components)' -fnesc-dumpfile=build/mica2/wiring-check.xml BlinkConfigAppC.nc-lm
BlinkConfigAppC.nc:26:28: StorageVolumes.h: No such file or directory
commandline: failed to preprocess BlinkConfigAppC.nc
make: *** [exe0] Error 1

  the version of tinyos in my pc is 2.02. and the application is provided by
tinyos and i don't modify it .

  can any one help me ? thank you very much!!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] about sensor

2008-01-06 Thread jiwen zhang
Hello peizhao:
thank you for your responding.
   i am now using tinyos2.02 , today i did some experimentation about
sensors. I use the example of
oscilloscopehttp://dict.iciba.com/oscilloscope/ in
apps/, and my sensor is mts310, i find the sensing value is always zero. i
don't know whethc my sensor is working . is there driver for mts310? because
there is only a folder named mts300 in the directory sensorboarders .
when i compile the app , i use the command: SENSORBOARD=mts310 make
mica2 .


在08-1-6,Peizhao Hu [EMAIL PROTECTED] 写道:

 they are sensorboards, for individual sensors, you have to look into
 these directories for their drivers.

 regards;

 Peizhao



 jiwen zhang wrote:
  Hello all:
  As we know , there are many kinds of sensors which tinyos supposes .
  For example , in tinyos2.02 , in the directory sensorboards/ , there
  are basicsb/,im2sb,mda100/,mts300/ folders 。 i know little about
  sensors.i don't know what kind sonsors do these folders respond to .
  now i have some mts310 and mts400 and mts420 . dose these sensors have
  driver in tinyos ?
  thank you !!
  
 
  ___
  Tinyos-help mailing list
  Tinyos-help@millennium.berkeley.edu
  https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about sensor

2008-01-05 Thread jiwen zhang
Hello all:
As we know , there are many kinds of sensors which tinyos supposes . For
example , in tinyos2.02 , in the directory sensorboards/ , there are
basicsb/,im2sb,mda100/,mts300/ folders 。 i know little about sensors.i don't
know what kind sonsors do these folders respond to . now i have some mts310
and mts400 and mts420 . dose these sensors have driver in tinyos ?
   thank you !!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about two radioes on one mote

2007-12-27 Thread jiwen zhang
Hello all :
  we design a mote which has two radioes(cc2420 and cc1100) , now each one
of them can send and receive data nomally , that is to say they are ok on
hardware. now i want to use both of them in one application , sometimes i
use one to communicate , sometimes i use the other (not synchronously ,
because they use the same SPI) . How to realize it ?
  Maybe it is a difficult question ,  but i think there must be a way to
solve it . Is there someone having done this work ? can you give me some
suggestions ? thank you very much!!!


 Jiwen
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about Interrup of FIFOP in cc2420

2007-12-11 Thread jiwen zhang
Hello all:
   Maybe we know that standard micaz links PE6/int6 of atmega128  to FIFOP
of cc2420, now our designed mote use PE7/int7 to links with FIFOP and other
places are same with micaz. I am using tinyos2.x, and modify files
HplCC2420InterruptsC.nc(InterruptFIFOPC.Atm128Interrupt -
Interrupts.Int6modified into
InterruptFIFOPC.Atm128Interrupt - Interrupts.Int7) and HplCC2420PinsC.nc(FIFOP
= IO.PortE6 modified into FIFOP = IO.PortE7 ), but after these changes , the
micaz can only send but can not receive packet. are there other places i
don't modify? or I must use PE7/int6 to links with FIFOP??
   Thank you very much!!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] __attribute__ ((signal, spontaneous, C)) and __attribute__ ((interrupt, spontaneous, C))

2007-11-08 Thread jiwen zhang
Hello all:
I have some question about the codes below:
1. what are the functions of  __attribute__ ((signal, spontaneous, C))
and  __attribute__ ((interrupt, spontaneous, C))?
2.what are the meanings of singanl,spontaneous,C and interrupt?
3.what are the differences between __attribute__ ((signal, spontaneous,
C)) and  __attribute__ ((interrupt, spontaneous, C))?
   can you give me the answer? Thank you very much?

codes:

#define TOSH_SIGNAL(signame) \
void signame() __attribute__ ((signal, spontaneous, C))

#define TOSH_INTERRUPT(signame)\
void signame() __attribute__ ((interrupt, spontaneous, C))
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Fwd: __attribute__ ((signal, spontaneous, C)) and __attribute__ ((interrupt, spontaneous, C))

2007-11-08 Thread jiwen zhang
Hello all:
I have some question about the codes below:
1. what are the functions of  __attribute__ ((signal, spontaneous, C))
and  __attribute__ ((interrupt, spontaneous, C))?
2.what are the meanings of singanl,spontaneous,C and interrupt?
3.what are the differences between __attribute__ ((signal, spontaneous,
C)) and  __attribute__ ((interrupt, spontaneous, C))?
   can you give me the answer? Thank you very much?

codes:

#define TOSH_SIGNAL(signame) \
void signame() __attribute__ ((signal, spontaneous, C))

#define TOSH_INTERRUPT(signame)\
void signame() __attribute__ ((interrupt, spontaneous, C))
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] about Blaze_CC1100_Radio_Stack

2007-11-05 Thread jiwen zhang
Hello all:
   I spend much time in https://sourceforge.net in search Blaze project
source code. but finally I could not find a way to download the source
codes. can you give me a straightforward address to download the it or send
me the source code to me ?Thank you me much.
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Help about cc1100 in tinyos

2007-10-31 Thread jiwen zhang
Hello:
I designed a mote and the hardware are Atmega128L and cc1100 .but tinyos
doesn't support a mote with cc1100, so i have to write the bottom codes to
support my platform .Now I really don't know how to do .Can you give me some
advice. Thank you very much.
   I find a Key word Blaze radio stack on the Internet, but I don't know
what it is . Maybe it is radio statck about cc1100 or cc2500. If you know
about it ,can you tell me something about it ? Thank you !!
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help