UKHASnet / protocol

The UKHASnet protocol documentation
https://ukhas.net
4 stars 1 forks source link

M for Mode, depricating Z for Zombie #3

Open oddstr13 opened 8 years ago

oddstr13 commented 8 years ago

I suggest using the M character as a replacement for Z, allowing for more different states to be transmitted.

Lost in the conversion from the wiki;

Query: should Zombie be deprecated in favor of Mode as per https://oddstr13.openshell.no/paste/VwWOq8-1/

  • repeating packets? Repeater
  • uploading packets? Gateway
  • operating in a low-power mode? Zombie
  • getting location from GPS (or possibly wifi)? Location up to date
  • moving? vehicle? by sea, air or road?
  • APRS? GSM?
philcrump commented 8 years ago

I'm in favour of deprecating 'Zombie', we need a rough (optional) spec for the Mode values first though.

jamescoxon commented 8 years ago

Mode does make more sense and having a number of different values is a good idea.

We probably can't reassign Z though as a number of nodes will continue to use it. Obviously will try and update them but quite a few are hard to get to.

russss commented 8 years ago

If we were going to munge all of these attributes into one field then we could use a bitmask. The problem with that is it isn't possible to parse in grafana. That said, I think any method of doing this is going to require some additional parsing on the grafana inserter.

If we were happy to sacrifice a byte or two and have a slightly differently-formatted field, we could assign a (lowercase) letter to each of these statuses. So you could have Mrg for a repeater and a gateway. I think it's usually unlikely you'll have more than one or two of these status letters, and this makes it more human-readable.

"Zombie mode" is really just "not a repeater" so it probably doesn't need a letter by itself.

My solarnodes use an X field to communicate battery charge status, so we could also have a "charging" and "charged" status.

philcrump commented 8 years ago

+1 for the lowercase letter flags!

oddstr13 commented 8 years ago

@russss I somewhat disagree on the point about zombie mode. Zombie mode means that the node isn't even listening for packets, and that it probably is doing some deep sleep between sending packets. A node could be made to listen for packets, while not repeating them. It could still be acting on the received packets. Indicating zombie state could be useful in the case of a normally zombie mode node occasionally (say, between sequence a-c for example) waking up and listening, for configuration purposes or some such.

philcrump commented 8 years ago

Well in that case, listening for command packets would be a candidate for a flag.