~ [ source navigation ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
cvs/emstar/mote/


Name Size Last modified (GMT) Description
Back Parent directory 2009-11-23 14:27:14
Folder debug/ 2009-11-23 14:26:56
Folder emtos/ 2009-11-23 14:26:57
Folder examples/ 2009-11-23 14:26:57
Folder hostmote/ 2009-11-23 14:26:57
Folder include/ 2009-11-23 14:26:57
Folder libmote/ 2009-11-23 14:26:57
Folder logger/ 2009-11-23 14:26:58
Folder marcopolo/ 2009-11-23 14:26:58
Folder motesync/ 2009-11-23 14:26:58
Folder nic/ 2009-11-23 14:26:58
Folder testtabs/ 2009-11-23 14:26:58
Folder tosnic/ 2009-11-23 14:26:58
Folder ultra/ 2009-11-23 14:26:58
Folder util/ 2009-11-23 14:26:58
File BUILD 4709 bytes 2006-12-06 03:14:44
File FIXME 541 bytes 2005-07-11 21:35:44
File README 3047 bytes 2003-10-23 21:20:34

  1 $Id: README,v 1.2 2003-10-23 21:20:34 vladimir Exp $
  2  
  3 The "New MoteNIC"
  4 -----------------
  5 
  6 21 Feb 2003
  7 
  8 
  9 The "mote" directory contains the source for the New MoteNIC.  This
 10 README file describes its design, and how to extend it.
 11 
 12 The first thing to remember is that "MoteNIC" is really a misnomer.
 13 This software is a collection of daemons that give Linux-based
 14 programs access to various functions of the Mote.  Originally, the
 15 only one of these functions was sending and receiving packets, hence
 16 the name "MoteNIC".  However, there are now other functions, such as
 17 querying the mote for values of its sensors, and performing time
 18 synchronization between the Linux clock and the Mote's clock.
 19 
 20 Communication between the Linux host and the Mote is performed using
 21 the "Host-Mote Protocol".  This is a simple protocol with a
 22 fixed-length header followed by variable length data, and is mainly
 23 responsible for framing messages over the serial port.  Host-Mote
 24 protocol messages have a "type" associated with them, describing which
 25 module (NIC, sensor, configuration, synchronization, etc.) should
 26 process the packet.
 27 
 28 The host-mote protocol is defined in the header file:
 29 tos/tinyos-1.x/tos/system/host_mote.h
 30 
 31 The contents of the variable-length data portion of a Host-Mote packet
 32 depends on the module.  For example:
 33 
 34 -- For NIC-type packets, the data is either a flow-control packet
 35    (request to send, clear to send...), or a TOS_Msg that was either
 36    just received on the radio or which is being given to the mote to
 37    send on the radio.
 38 
 39 -- For Configuration-type packets, the data is a structure describing
 40    the configuration of the mote (its POT value, Group ID, etc.)
 41 
 42 -- For Sensor-type packets, the data is a series of sensor values from
 43    the mote's ADC, or a request to configure the ADC.
 44 
 45 The details of each of these "sub-protocols" that runs over the
 46 Host-Mote protocol are documented in other README files in this
 47 directory.
 48 
 49 
 50 The Design of the Software
 51 --------------------------
 52 
 53 On the Linux side, the implementation of the mote software is now
 54 distributed into multiple modules, each of which is responsible for
 55 one function.
 56 
 57 The "master" module, hostmoted, is the only daemon that deals directly
 58 with the serial port.  It is responsible for the low-level handling of
 59 the host-mote protocol -- that is, framing and packetizing the
 60 incoming serial stream.  It then feeds the hostmote packets to other
 61 daemons, each of which can open hostmoted's device file and tell it
 62 what kind of hostmote packets it wants (e.g. NIC, Sensor, etc.).
 63 
 64 Extending the Host-Mote protocol consists of the following steps:
 65 
 66 1- Define a new "op type" in the host-mote protocol header.
 67 
 68 2- Add code to the mote-side (transceiver) app that knows how to deal
 69 with this op.
 70 
 71 3- Create a new daemon to handle your protocol on the Linux sid,
 72 similar to the "motenic" and "motesens" daemons (in the nic and sens
 73 directories, respectively).  Each of these daemons gets packets of a
 74 particular op-type from hostmoted and does something useful with them.

~ [ source navigation ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.