All,
I am trying to implement a radio transmit power control with the
EasyCollection protocol in order to decrease the effective transmission
range on my mica2 motes, using tinyos-2.x. The archives suggest using the
CC1000Control, but I'm getting an error with the implementation, please see
below. Any help is appreciated.

These are the changes I made to the code (in bold):

in EasyCollectionAppC:

configuration EasyCollectionAppC {}
implementation {
  components CC1000RadioC, EasyCollectionC, MainC, LedsC, ActiveMessageC;
  ...

  EasyCollectionC.Boot -> MainC;
  ...
  EasyCollectionC.CC1000Control -> CC1000RadioC.CC1000Control;
}


in EasyCollectionC.nc:

module EasyCollectionC {
  uses interface Boot;
  ...
  uses interface CC1000Control;
}
implementation {
  message_t packet;
  bool sendBusy = FALSE;

  typedef nx_struct EasyCollectionMsg {
    nx_uint16_t id;
  } EasyCollectionMsg;

  event void Boot.booted() {
    call RadioControl.start();
  }

  event void RadioControl.startDone(error_t err) {
    if (err != SUCCESS)
      call RadioControl.start();
    else {
      call RoutingControl.start();
      call CC1000Control.setRFPower(0);
      if (TOS_NODE_ID == 1)
call RootControl.setRoot();
      else
call Timer.startPeriodic(TIMER_PERIOD_MILLI);
    }
  }


At compile time, here is the error I get:

$ make mica2
mkdir -p build/mica2
    compiling EasyCollectionAppC to a mica2 binary
ncc -o build/mica2/main.exe  -Os -I%T/platform/pc/CC1000Radio
-fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=mica2
-fnesc-cfile=build/mica2/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22
--param max-inline-insns-single=100000 -I/opt/tinyos-2.x/tos/lib/net
-I/opt/tinyos-2.x/tos/lib/net/le -I/opt/tinyos-2.x/tos/lib/net/ctp
-DCC1K_DEF_FREQ=916400000 -DIDENT_APPNAME=\"EasyCollectionA\"
-DIDENT_USERNAME=\"EShloss\" -DIDENT_HOSTNAME=\"dyn-209-2-228-8\"
-DIDENT_USERHASH=0x1692cb25L -DIDENT_TIMESTAMP=0x4a772253L
-DIDENT_UIDHASH=0xa5b7416fL -fnesc-dump=wiring
-fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs,
components)' -fnesc-dumpfile=build/mica2/wiring-check.xml
EasyCollectionAppC.nc -lm
In component `EasyCollectionAppC':
EasyCollectionAppC.nc:6: component CC1000RadioC not found
EasyCollectionAppC.nc:19: cannot find `CC1000Control'
make: *** [exe0] Error 1


Thanks!
Ellen

-- 
Ellen Shlossberg
Columbia University
MS Electrical Engineering
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to