I'm experimenting with packet injection in TOSSIM. My application has a Java toolset that
normally connects to a TOSbase mote, and the main application running on mica2 motes.
My goal is to simulate the entire setup in TOSSIM, being able to inject packets from Java
code into TOSSIM (mote 0), and intercept packets that mote 0 receives by forwarding them
to my Java program.
At this point I was only able to implement packet injection, but not in a way I thought it
would be done.
I started out experimenting with the TOSbase application and running it in the TOSSIM
environment. Unfortunately, when the "tossim-serial" parameter is used, neither TOSbase
nor TransparentBase sees any packets generated by my Java tool (I also tried BcastInject
with the same result). It seems that TOSbase doesn't proceed anywhere further than
StdControl.start(), no matter what what AM group/type/destination address is used.
It's a little better with the "tossim-radio" parameter. I can inject radio packets into the
motes specified by the destination address, however, using TOS_BCAST_ADDR generates
an error message. TOSbase reports copying these messages to UART, but I guess all
of them go to lala land. The neither SerialForwarder nor my application (when connected
directly using "MOTECOM=tossim-radio") see any of these messages (this, actually,
seems to be the expected behavior).
After these experiments I moved on to try these things with my NesC code.
My application doesn't use the FramerM to the UART modules, But surprisingly enough,
when using the "tossim-serial" mode, the packets get injected successfully. When
my Java code sends a packets, a GenericComm "receive" event on mote 0 gets
triggered for the respective AM message type. So it works similar to the "tossim-radio"
mode, except the packet is always injected into mote 0 and messages with
TOS_BCAST_ADDR destination address are valid.
The last result suits my needs for injecting packets into the motes network very well,
although a separate injection module (e.g. FramerM) would be better for code portability
between TOSSIM and AVR. However, my biggest problem is that I can't figure out how
to intercept packets that the the motes (especially mote 0) receive from other TOSSIM
motes.
Is there anything I could read on the topic of using external Java applications with
TOSSIM? Will I find any luck messing with FramerM/UART modules? What's the
best approach to follow for my needs?
At the moment I'm using TinyOS 1.1.11, and would rather stay away from using
TOSSIM 2.0b for now, since this is pretty urgent and my code is in NesC 1.1
Also I'm much better with Java than with Python/C++.
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
