Hello team,
I am trying to build a zigbee protocol stack in TinyOs.
Kindly see below, the description of a problem I'm facing trying to
implement the physical layer.
Problem: To implement the Zigbee Physical layer in TinyOs for an IRIS Mote
(MIB520 for base and MTS410 for client)which has an AT86RF230 RF antenna.
Status: Code attached (wiring and config). However, the error message
attached was received upon compilation.
Approach:
Knowing that the Physical and MAC layers for Zigbee are defined
by the IEEE.802.15.4 standard, my approach was to use the interfaces
provided in the IEEE154MessageC component file instead of the
ActiveMessageC component file.
I would be glad to receive your help.
Thank you.
Dasola
#include "Timer.h"
#include "appfeatures.h"
module testSounderC @safe()
{
uses interface Timer<TMilli> as Timer0;
uses interface Timer<TMilli> as Timer1;
uses interface Leds;
uses interface Boot;
uses interface Mts300Sounder;
uses interface SplitControl as AMControl;
//uses interface AMSend;
uses interface Ieee154Send;
uses interface Packet;
//uses interface AMPacket;
uses interface Ieee154Packet;
}
implementation
{
message_t packet;
bool sending_packet = FALSE;
event void Boot.booted()
{
call AMControl.start();
}
event void AMControl.startDone(error_t err) {
if (err == SUCCESS) {
call Timer0.startPeriodic( 330 );
}
else {
call AMControl.start();
}
}
event void AMControl.stopDone(error_t err) {
// do nothing
}
void task sendData()
{
if (sending_packet) return;
sending_packet = TRUE;
{
radio_count_msg_t* rcm = (radio_count_msg_t*)call
Packet.getPayload(&packet, sizeof(radio_count_msg_t));
if (rcm == NULL) {
return;
}
rcm->counter1 = 3;
call Ieee154Packet.setSource(&packet, 1);
if (call Ieee154Send.send(AM_BROADCAST_ADDR, &packet,
sizeof(radio_count_msg_t)) == SUCCESS) {
}
}
}
event void Ieee154Send.sendDone(message_t* bufPtr, error_t error)
{
if (&packet == bufPtr) {
sending_packet = FALSE;
call Leds.led1Toggle();
call Timer1.startOneShot( 10 );
}
}
event void Timer0.fired()
{
call Leds.led0Toggle();
post sendData();
}
event void Timer1.fired()
{
call Leds.led2Toggle();
call Mts300Sounder.beep(10);
}
}
#include "appfeatures.h"
configuration testSounderAppC
{
}
implementation
{
components MainC, testSounderC, LedsC, SounderC;
components new TimerMilliC() as Timer0;
components new TimerMilliC() as Timer1;
//components ActiveMessageC as Radio;
components Ieee154MessageC as Radio;
//components new AMSenderC(AM_RADIO_COUNT_MSG);//
testSounderC -> MainC.Boot;
testSounderC.Timer0 -> Timer0;
testSounderC.Timer1 -> Timer1;
testSounderC.Leds -> LedsC;
testSounderC.Mts300Sounder -> SounderC;
//testSounderC.AMSend -> AMSenderC;
testSounderC.Ieee154Send -> Radio;
testSounderC.AMControl -> Radio;
//testSounderC.Packet -> AMSenderC;
testSounderC.Packet -> Radio;
//testSounderC.AMPacket -> Radio;
testSounderC.Ieee154Packet -> Radio;
}
> "C:\Crossbow\PN\IDE.bat"
"C:\Crossbow\cygwin\opt\tinyos-2.x\apps\testSounder\"
"C:\Crossbow\cygwin\bin" "make iris"
#############################
Command: make iris
Cygwin: C:\Crossbow\cygwin\bin
Directory: C:\Crossbow\cygwin\opt\tinyos-2.x\apps\testSounder\
"/opt/MoteWorks/tools/bin/ide.pl 'make iris'
'C:\Crossbow\cygwin\opt\tinyos-2.x\apps\testSounder\'"
#############################
ide.pl Ver:$Id: ide.pl,v 1.1.2.1 2006/05/29 07:22:52 lwei Exp $
Executing: /opt/tinyos-2.x/apps/testSounder/ bash -c "make iris"
cygpath: cannot create short name of C:\Crossbow\cygwin\etc\avrdude.conf
mkdir -p build/iris
compiling testSounderAppC to a iris binary
ncc -o build/iris/main.exe -Os -fnesc-separator=__ -Wall -Wshadow
-Wnesc-all -target=iris -fnesc-cfile=build/iris/app.c -board=mts300
-DDEFINED_TOS_AM_GROUP=0x22 -finline-limit=100000
-DIDENT_PROGRAM_NAME=\"testSounderAppC\" -DIDENT_USER_ID=\"Achintha\"
-DIDENT_HOSTNAME=\"universi-9b80dc\" -DIDENT_USER_HASH=0x0f1fe943L
-DIDENT_UNIX_TIME=0x4f2321e9L -DIDENT_UID_HASH=0xab272bddL
-fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
-fnesc-dump='referenced(interfacedefs, components)'
-fnesc-dumpfile=build/iris/wiring-check.xml testSounderAppC.nc -lm
In component `RF230Ieee154MessageC':
/opt/tinyos-2.x/tos/chips/rf230/RF230Ieee154MessageC.nc:87: no match
make: *** [exe0] Error 1
> Process Exit Code: 0
> Time Taken: 00:45
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help