[Tinyos-help] MicaZ-mica2 makefile compatibility,
serial forwarder problem
Heo Heo
nt7272 at yahoo.com
Wed Jan 3 20:22:36 PST 2007
I am a beginner in TinyOS (version 1.1.15). I hope someone would help me answer the following questions. I am sorry for the long email.
1) We have some micaZ motes. With the default makefile of TinyOS (say for the Blink apps), I couldn't "make micaz". So, I replaced the original TinyOS makefile with the one on the XBow CD. The contents of this XBow make file are as follows:
== BEGIN ===============
COMPONENT=Blink
XBOWROOT=%T/../contrib/xbow/tos
PFLAGS= -I$(XBOWROOT)/platform/mica2 <=== WHY MICAZ DOES NOT WORK ?
include ../MakeXbowlocal
include $(TOSROOT)/tools/make/Makerules
== END ===============
If I use this make file (i.e. use "mica2" in this file), and "make micaz" everything works fine. However, if I replace "mica2" with "micaz" in the makefile, and "make micaz", I get compilation errors as follows:
== BEGIN ===============
C:/tinyos/cygwin/opt/tinyos-1.x/tos/lib/CC2420Radio/CC2420RadioM.nc: In function `tryToSend':
C:/tinyos/cygwin/opt/tinyos-1.x/tos/lib/CC2420Radio/CC2420RadioM.nc:419: implicit declaration of function `TOSH_READ_CC_FIFOP_PIN'
C:/tinyos/cygwin/opt/tinyos-1.x/tos/lib/CC2420Radio/CC2420RadioM.nc: In function `delayedRXFIFO':
C:/tinyos/cygwin/opt/tinyos-1.x/tos/lib/CC2420Radio/CC2420RadioM.nc:544: implicit declaration of function `TOSH_READ_CC_FIFOP_PIN'
C:/tinyos/cygwin/opt/tinyos-1.x/tos/lib/CC2420Radio/CC2420RadioM.nc: In function `HPLChipconFIFO.RXFIFODone':
C:/tinyos/cygwin/opt/tinyos-1.x/tos/lib/CC2420Radio/CC2420RadioM.nc:641: implicit declaration of function `TOSH_READ_CC_FIFOP_PIN'
C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/micaz/HPLCC2420InterruptM.nc: In function `FIFOP.startWait':
C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/micaz/HPLCC2420InterruptM.nc:80: implicit declaration of function `CC2420_FIFOP_INT_MODE'
C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/micaz/HPLCC2420InterruptM.nc: In function `__vector_7':
C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/micaz/HPLCC2420InterruptM.nc:102: implicit declaration of function `CC2420_FIFOP_INT_CLEAR'
== END ===============
So, should I use "mica2" or "micaz" for the makefile ? Using mica2 seems to be working fine, but it potentially creates some errors as mentioned in my next question. Using "micaz" may need some tweaks for the compiler to work but I really don't know how to do it.
2) So I had to use the "mica2" option in order for the make file to work. I compiled and loaded TOSBase on one mote. I ran Serial Forwarder (with argument serial at COM1:mica2) and LISTEN, and was to received some data from another mote running SenseToRFM.
If I change the argument of Serial Forwarder to serial at COM1:micaz, Serial Forwarder generates runtime errors about packet having wrong format. I guess that is because mica2 and micaZ use different packet formats as I read about it somewhere. So, probably, the micaZ mote that runs SenseToRFM sends out packets in mica2 format which was not expected by SerialForwarder. Is that right ? My concern is that it leads to the error mentioned in question 3.
3) So I had to use serial at COM1:mica2 for SerialForwarder. I was able to run LISTEN and get data. But when I tried to use tools/BcastInject , I always got "write failed" in serial forwarder. The first time I run tools/BcastInject , the Yellow lights is turned ON. And it will be ON forever regardless of you run BcastInject to turn it off later.
My doubt is that the packet was sent out, but was not interpreted properly by the external mote due to the difference in packet format (mica2 vs. micaz).
The 3 issues mentioned above seem so related to me. I would really appreciate it if someone could shed some light on these issues.
Thank you very much.
Heo
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070103/a062b72c/attachment.html
More information about the Tinyos-help
mailing list