GW12 network commands

From Glacsweb Wiki
Jump to: navigation, search

list of text version node commands

settime ID epoch - sets RTC epoch time on a node

gettime ID - prints epoch.subseconds from a node

ping ID - pings node ID

pingreq ID RID - asks node ID to ping RID for discovery purposes

routeadd ID channel - add an entry to a node's route table

delroute ID channel - delete an entry in a node's route table

getroute ID - get the route table of a node

status ID - get a list of status values from a node, batV etc



Ideas on network discovery

using some terminology from tcp/ip etc

  • ping ID asks for a reply from one node - same as a normal echo-request ERQ
  • pingreq ID PID- ask another node to ping, have send to ID with param or ID to ping
  •  ??neighbour-discover ND - when received, send ERQ, reply back to originator with list of IDs

this would be for an algorithm like:

neighbours[0] = echo-request 0 // find out who is local, store in a list
for each id in neighbours[0]
 neighbours[id] = neighbour-discover id // ask each to find their neighbours
//recurse through until all known nodes are in one of the lists?
// needs more thought 

Data gathering

as the data is in files now (on uSD) we could send one file at a time. These will be bigger than a radio packet - so we'll need to frame properly. So we need a protocol for retries and broken frames. Files could be encapsulated in a packet which starts with a filename and size (creation date?). packets are then sent 1/20 2/20 3/20 etc. base station or receiver reconstitues them and saves.

With the small packet size possible with the RPM we may need hundreds of frames for files of several kB.

Also the 40ms turn around time for an ACK could slow the whole thing down a lot. We should eventually look at burst then ack and refetch broken packets.