initial commit of data packet retrieval code.  this is probably broken,
it depends on a few untested serial functions.