Hi all,
I'm interested in setting up distributed sensors for various uses and recently came across your radio protocol. Since you'll be getting together to work on the protocol and implementations this weekend I thought I'd provide some feedback from someone who is interested in using it and has just read through the docs. I hope the feedback and suggestions are useful and that you all have a fun and productive time over on the island. My plans are to try and get some nodes and a gateway running at Oxford Hackspace in the near future.
Cheers,
Nick
Layer 1 & 2 protocols
-------------------------------
Radio isn't really an area I have much experience in. I'm assuming, having looked at the HopeRF boards that a decent amount of this comes from the capabilities of the selected chip. Most of the details make sense to me, but I don't really understand the description of how the checksum is calculated. I understand the HopeRF chip handles this for me, but when I first read the documentation I found this section very confusing.
Packet format
---------------------
This mostly makes sense to me. Having a specific delimiter between each of the data formats may make parsing the string easier in some languages. The sequence count only being 'a' on boot makes me think there's some sort of specific message on boot to be sent that I don't understand and didn't find documented. On the packet format page it has some details on node IDs, but I assume there may be other constraints elsewhere? Here it says the node ID is 16 bytes, without being explicit of how it's encoded, in the server API the node ID appears to be an integer (of unspecified precision).
Packet data types
---------------------------
I think it's a great idea to have physically meaningful data with standardised units that can be understood by a human who happens to read the data string. I don't understand why there's a Sx data format because it isn't well defined.
A generic dimensionless numeric format (Nx,y,z?) would be good for transmitting a value that is not covered by one of the other data types but is a list of numbers rather than a generic string that will not be parsed.
I think an optional single timestamp (in unix nanoseconds or just float unix seconds?) data type per packet would be of use. This could override the timestamp stored on servers of when the packet was actually transmitted to the server, allowing low power nodes to batch packet transmission but later appear from the server as if they were sent at the correct time.
Server API
----------------
I assume the returned data are JSON encoded (or similar?), it's not clear from the API documentation page.
I don't really understand the difference between node ID and node callsigns.
In the logtail, etc, shouldn't the ID of the originator of the message be a field, as well as the callsign of the gateway?
In the nodeData and lastData endpoints the data format is encoded in an integer. I think it makes more sense to use the unique character from the packet instead of various software implementations having to map those to integers.
Also in the nodeDat and lastData it seems all data types are really handled as floats (of unspecified precision). This isn't made clear in the data type documentation.
Suggested improvements
-------------------------------------
Here are some general improvements that might be useful to consider:
* Tidying up and centralising the documentation: When developing and debugging things I find it very useful to have a single document (such as a PDF) to refer to, even if the documentation is also on some web pages. Along with the basic definitions of the protocol, expected and/or suggested behaviour for parts of the system (eg node, repeater, gateway) are often useful. Having good quality, clear documentation really is very helpful in developing around the protocol. As a good example of protocol documentation (that I happen to use regularly), see
https://svnweb.cern.ch/trac/cactus/browser/trunk/doc/ipbus_protocol_v2_0.pdf* Defining versions of the protocol: The documentation should preferably give a version number for the protocol along with a statement of what is fixed with a major version (low level protocol, etc.) and what may change in minor versions (eg adding but not removing data packet formats).
* The protocol is currently designed to be fire and forget packets from a node's point of view. However I wonder if a simple acknowledge mechanism could also be implemented. The scenario I'm thinking of is a sensor deployed in the field that mostly just sends back measurements which are not a problem if lost, but also may flag some values as out of range, requiring some sort of action. For the alarm level messages a request for acknowledgement could be added to the packet, with the gateway sending back (via any repeaters) an acknowledge packet when the original message has been uploaded to a server. The sensor could then listen for this acknowledge and if it isn't received attempt an alternative communication method.
* Allow nodes to define a manifest describing the data types used: Currently each value is just as a data type and number (eg temperature 1 and 2). When registering nodes could users also upload a more meaningful description per expected transmission value? As an example "inside" and "outside" temperatures.