Rewrote simulation app to support sending data between BS and motes.