Hi,
First of all I would like to thank Kevin for his help.

CC2420 directories were indeed missing in .platform file. I added all the
CC2420/* directories to sim/.platform file. But still, I am facing the same
kind of errors.


mkdir -p build/micaz
  placing object files in build/micaz
  writing XML schema to app.xml
  compiling RadioCountToLedsAppC to object file sim.o
ncc -c -shared -fPIC -o build/micaz/sim.o -g -O0 -tossim
-fnesc-nido-tosnodes=1000 -fnesc-simulate
-fnesc-nido-motenumber=sim_node\(\)   -finline-limit=100000 -Wall -Wshadow
-Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
-DIDENT_PROGRAM_NAME=\"RadioCountToLed\" -DIDENT_USER_ID=\"vjl\"
-DIDENT_HOSTNAME=\"pompili-desktop\" -DIDENT_USER_HASH=0x5a78dfa4L
-DIDENT_UNIX_TIME=0x47534b4fL -DIDENT_UID_HASH=0x1fc4e25aL
-Wno-nesc-data-race RadioCountToLedsAppC.nc   -fnesc-dump=components
-fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs
-fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xml
In file included from RadioCountToLedsC.nc:62,
                 from RadioCountToLedsAppC.nc:47:
/opt/tinyos-2.x/tos/chips/cc2420/CC2420Packet.nc:5: syntax error before `<'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420Packet.nc:11: nondigits in number and
not hexadecimal
/opt/tinyos-2.x/tos/chips/cc2420/CC2420Packet.nc:28: nondigits in number and
not hexadecimal
/opt/tinyos-2.x/tos/chips/cc2420/CC2420Packet.nc:64: nondigits in number and
not hexadecimal
/opt/tinyos-2.x/tos/chips/cc2420/CC2420Packet.nc:227: malformed floating
constant
/opt/tinyos-2.x/tos/chips/cc2420/CC2420Packet.nc:241: character constant too
long
/opt/tinyos-2.x/tos/chips/cc2420/CC2420Packet.nc:343: malformed floating
constant
In file included from /opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:46,
                 from RadioCountToLedsAppC.nc:54:
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketBody.nc:5: syntax error before
`<'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketBody.nc:11: nondigits in number
and not hexadecimal
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketBody.nc:28: nondigits in number
and not hexadecimal
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketBody.nc:64: nondigits in number
and not hexadecimal
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketBody.nc:227: malformed floating
constant
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketBody.nc:241: character constant
too long
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketBody.nc:343: malformed floating
constant
In file included from RadioCountToLedsAppC.nc:54:
In component `CC2420PacketC':
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: In function
`Acks.requestAck':
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:57: interface has no
command or event named `getHeader'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: In function `Acks.noAck':
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:62: interface has no
command or event named `getHeader'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: In function
`Acks.wasAcked':
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:67: interface has no
command or event named `getMetadata'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: At top level:
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:71: `setPower' is not in
interface `CC2420Packet'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: In function
`CC2420Packet.setPower':
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:74: interface has no
command or event named `getMetadata'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: At top level:
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:77: `getPower' is not in
interface `CC2420Packet'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: In function
`CC2420Packet.getPower':
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:78: interface has no
command or event named `getMetadata'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: At top level:
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:81: `getRssi' is not in
interface `CC2420Packet'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: In function
`CC2420Packet.getRssi':
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:82: interface has no
command or event named `getMetadata'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: At top level:
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:85: `getLqi' is not in
interface `CC2420Packet'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: In function
`CC2420Packet.getLqi':
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:86: interface has no
command or event named `getMetadata'
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc: At top level:
/opt/tinyos-2.x/tos/chips/cc2420/CC2420PacketC.nc:90: syntax error before
`*'
CC2420PacketC: `LinkPacketMetadata.highChannelQuality' not implemented

Kevin, I remember Phil had suggested that we can change TX_POWER on per
packet basis. After googling, we found out that this can be done like :


configuration RadioCountToLedsAppC {}
implementation {
  components MainC, RadioCountToLedsC as App, LedsC;
  components new AMSenderC(AM_RADIO_COUNT_MSG);
  components new AMReceiverC(AM_RADIO_COUNT_MSG);
  components new TimerMilliC();
  components ActiveMessageC;
  components CC2420PacketC;   //added by me

  App.Boot -> MainC.Boot;
  App.Receive -> AMReceiverC;
  App.AMSend -> AMSenderC;
  App.AMControl -> ActiveMessageC;
  App.Leds -> LedsC;
  App.MilliTimer -> TimerMilliC;
  App.Packet -> AMSenderC;
  App.AMPacket ->  AMReceiverC;
  App.CC2420Packet -> CC2420PacketC; //added by me
}


and

module RadioCountToLedsC {
  uses {
    interface Leds;
    interface Boot;
    interface Receive;
    interface AMSend;
    interface Timer<TMilli> as MilliTimer;
    interface SplitControl as AMControl;
    interface Packet;
    interface AMPacket;
    interface CC2420Packet; //added by me
  }
}
implemenation
{ blah blah..}


So, does this mean that we cannot change TX_POWER by CC2420Packet interface
?

Any help is appreciated.

Thanks,
Vijayant



On Dec 2, 2007 7:05 PM, Kevin Klues <[EMAIL PROTECTED]> wrote:

> I don't think getting the latest code will help you any.  I haven't
> dug into how the inner workings of the cc2420 are simulated by TOSSIM,
> but my guess is that they probably aren't.  I'm sure the radio
> communication model is probably followed pretty closely, but trying to
> call radio specific interface commands probably isn't supported.  I
> might be wrong though....
>
> if they are simulated accurately, then your only problem is that
> someone forgot to add the additional include directories under
> tos/chips/cc2420 to the tos/platforms/micaz/sim/.platform file when
> the directory structure of the cc2420 changed.
>
> Try adding in these include directories yourself (i.e. look at all the
> directory includes in tos/platforms/micaz/.platform file that are of
> the form %T/chips/cc2420/XXX and add them to the
> tos/platforms/micaz/sim/.platform file)
>
> Then try recompiling and let us know how it goes.
>
> Kevin
>
> On Dec 2, 2007 3:47 PM, Vijayant Bhatnagar <[EMAIL PROTECTED]>
> wrote:
> > Hi Kevin,
> > I would like to thank you for your reply. We are indeed using TOSSIM.
> Right
> > now I am trying to get the latest source code from CVS and then try to
> run
> > my code.
> >
> > Do you think that we will not be able to change TX_POWER even after
> getting
> > the latest source code ? Any help by others is appreciated ! Actually,
> > changing TX_POWER is very important for our research. If this thing
> doesn't
> > work, it will be very difficult for us to prove our algorithm. So, we
> have
> > to get this working at any cost!
> >
> > Any help appreciated in this regards.
> >
> > Thanks,
> > Vijayant
> >
> >
> >
> > On Dec 2, 2007 6:28 PM, Kevin Klues <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > I responded to this on a different thread also posted by Vijayant that
> > > was very similar to this one.  This one doesnt show that he is trying
> > > to use TOSSIM though.  I assume they are the same problem though....
> > > Here is my response from the other thread.
> > >
> > > >From the error I see (make: *** [sim-exe] Error 1), it looks like you
> > > are trying to run this application in TOSSIM.  I'm not sure how much
> > > of the CC2420 stack is supported by TOSSIM, but if you look at the
> > > .platform file for the micaz sim environment (the only one thats
> > > supported for sim at this point), the cc2420 directories that include
> > > the CC2420Packet interface and CC2420PacketC component are not listed.
> > >
> > > i.e. compare the files
> > > tos/platforms/micaz/.platform
> > > tos/platforms/micaz/sim/.platform
> > >
> > > Kevin
> > >
> > >
> > >
> > >
> > > On Dec 2, 2007 2:07 PM, John Griessen < [EMAIL PROTECTED]> wrote:
> > > > Vijayant Bhatnagar wrote:
> > > > > Hi,
> > > > > I updated all the CC2420* files and dumped in
> > /opt/tinyos-2.x/tos/chips/cc2420/
> > > > > but its not working. What should I do in this case ?  I am getting
> > same kind
> > > > > of errors like "interface has no > command or event named"...
> > > >
> > > > Sounds bad.
> > > >
> > > > I'd start with a fresh checkout of  /opt/tinyos-2.x
> > > > or a cvs update -dPC  to over write bad.  Also notice any ? files
> and
> > > > remove,
> > > > so you see it's easier to do another checkout.  Overwriting file
> > > > in /opt/tinyos-2.x/tos/chips/cc2420  isn't going to help beginning
> > efforts,
> > > > and it's always good to do a cp -r /opt/tinyos- 2.x
> > > > /opt/tinyos-2.x-12dce07 or some such before trying some kind of code
> > > > merging.
> > > >
> > > > I'm at a point where I have learned a little tinyos-style
> > > > and made some apps by merging code
> > > > in with the  /opt/tinyos-2.x tree, and it's getting hard to manage,
> so
> > > > I'm learning to use Makefile directives like
> > > > CFLAGS += -I$(TOSDIR)/lib/net/ -I$(TOSDIR)/lib/net/ctp  .
> > > >
> > > > With CFLAGS like that, the compiler looks in default places in the
> > > > tinyos-2.x tree plus the extra ones.  That way we can compile code
> that
> > > > uses the current dir, not have that dir located T2 or contrib code
> tree,
> > > > and have it use code from
> > > >   T2 and contrib and a local dir we are developing in.
> > > >
> > > > John Griessen
> > > > --
> > > > Ecosensory   Austin TX
> > > > tinyOS devel on:  ubuntu Linux;   tinyOS v2.0.2;   telosb ecosens1
> > > >
> > > >
> > > > _______________________________________________
> > > > Tinyos-help mailing list
> > > > Tinyos-help@Millennium.Berkeley.EDU
> > > >
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> > > >
> > >
> > >
> > >
> > > --
> > > ~Kevin
> > >
> > >
> > >
> > > _______________________________________________
> > >
> > > Tinyos-help mailing list
> > > Tinyos-help@Millennium.Berkeley.EDU
> > >
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> > >
> >
> >
>
>
>
> --
> ~Kevin
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to