Skip to content

Commit

Permalink
Docs rearragned, some new documentation on radio protocol, new folder…
Browse files Browse the repository at this point in the history
… layout for datasheets and app notes
  • Loading branch information
FarMcKon committed May 12, 2015
1 parent 701db69 commit aa59422
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/Protocol In The Air.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0" type="device"><diagram>7VtZc6M4EP41eXSKy9g8xs4cVVt71CZVO68aIxvVyMgrcI799dNC3TZYnjg7Joap8EKJRuj4PvUlxFU4Xz990myT/a5SLq8CL326Cm+vgiAYR/F1AAUje7ayOJhcjyMrW2mRWqm/F9yJ/zgKPZRuRcqLRsVSKVmKTVO4UHnOF2VDtlSy2cWGraj5veBuwaQr/UekZWal0yDeyz9zscqoGz9O7JOifKY2Ur5kW1mOKhHOf82orWpW4QeATSsFzZjS+mnOpYGOALFT//iDp7tBap7jQF5+IZraNx6Y3OIgnVFLkUNplgoNIAqVg7RQWzPqWVauJdz6UHR7xsE8cF1yJL4S4Ug+cbXmpX6GKvh05I8nCBouCgDY3j/uISf2szraMQoZMr/aNb6fPBRw/j/AAvvuBxZJglPqAooxtlGDAiTeurgKYgkdzb5qKK1MyYEIJmjkNTiKUqtvfK6k0iDJVQXhUkh5IGJSrAyiC4CNg3xm4BKggjf4YC3S1HQze8xEye82bGH6fAQTAzIFtZdSPYIkg3ocXphpVTKkaUR4nrtEk3GDFz8JHV6iI7ygIp5HC413T4vpauAFePG8pr5clBc0FK+wHK1bzOmhmXCnHRM0DTvRxryxr754DzJbnZhMjF16gkU0wcCkEyzQRPYEi5D0sxMskIeeYBFMcZ12gsWkX1jQRDvBol+Rt0dz6gKL2I1rqtRoCGsgI8KXOghrYjesAQUeaDHuNemQFjfq8sHhDrwYVx91l53FbgQ4ZM3kapNmOHpRXtxoNITeB16OuP2L8uJGxrecpQMpTk6fuLHYm5HihuhzBVjl1RwDeN+zoy0VXO6/XA90jWkTneiaunRNMJSq0xVitbPocvesb+a/vT+vf8AA7dGeYKANhZm4W+UVA4NnaUZiF+XkSD45RMgYiRkkOvL4xHeNl3vN8mItSuta/uYLLh64vbmTnG9sEVA2l03GwAd5UhTgkH5hz9NSDhodbPHSdvwJDYNPJS1Q2a/tbq/LrbyJm2AMgaxl5WCFHomM3szWuNmFCbgGH2B46dIHvP4bwFufLgmnF/xWSn3X5v1ZgXs7uRaLjG1MsRD5SvIbrc3yaBjVXOnKqB5bUTUMmXmVzi5519HEiyehN4mTAK4JLAmsggetvOsgCeEUSjiNYn8MWKHFb9kmhEfWHhnl1r0WJdbvnYTYa34FvCwJbujwhyox6FO5NCMtoNnHjEFYaDcaCnMQ71eL+NoxWh4aTKQq8lyqdjF928Z66jrRYTfoRH51ePCCMLzAbtDU9a1DfvXTTO5ygy7yK4qUXwqTyCkttlo+zzRbfOOGjRMeSKttnnLTjb3bodbWp1FayQQbNlu3V8diS9ofOgu1Vxzh7SdqPsXbHaBGU6jnr6xk5pS8ZmuwFu/P60b0cYoyJPPF8FD3cZ237XTpaMFAR80Ud0iHu2lZ5Qzvl43Qb+bRR9LoNyPjFSeO+2ngd+sIQRv5tBNywsTvfjg4Bzefzl80gLNLdwkRfQPB+N+t+f+oejAqqkT0BioE0eZp/5CW+58Agon9M1AF70aY8oxn7EGYmPLjXwCkWigYiu0LRLY70pWf0B7NYUzsa1XBM1qyLZUdpc2wUTckX5oXD1WmBN0FDYR1AKn8vbm5HUUvaQb+PYYd7v6o+p8/jTS9e4gKVKM+pMPrZ6oM3O5/H6ue1X7BCz98Bw==</diagram></mxfile>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
71 changes: 71 additions & 0 deletions docs/radio_protocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Flutter Radio Protocol

NOTE: Documentation is still in Beta

Flutter Radio Protocol is a Spread Spectrum open source protocol. The goal is a reliable and
cooperatve (and jam-free) protocol for individual or mesh of devices to work together.

This document covers the basics of the over the air protocol design.

# General Design:
The Flutter protocol is a Frequency-hopping spread spectrum (FHSS)[1] protocol, where communication
between a Coach node and the rest of the team nodes hop channels over time. Setting 'Coach' or team
membership is bsed on build-time configuration. Along with 48 general purpous channels, there are two 'master' channels, which nodes use to sync their hops and who is the master of their group.

## Setting a netwwork

- Assign a coach (Address 0x01)
Select a deivice that will behave as master. That device will act as a master, based on logic/behavior found in Network.cpp. The coach device will blindly Freq Hops, when hits the first channel sends a timing info packet.


- Everything else is a Team device:
Other devices process every packet, and look for a command byte for timing information. When they do find a timing packet, they do some calibration of timing to start joining the frequency-hopping party, so they know where to jump to for the next message in the chain.

## Timing Calculations
When a packet is recived, the flutter node saves local system time. The node then Decodes the delta from local system time to absolute time. By subtracing out the delta, the node know accuratly enough to what system time should have been. Example: 3600ms delay offset for packet travel time, ~100us accuracy. This is enough to find the right channel at the right time.


## Packet Data Format

Each Packet of data (a flut) contains the same header information FIZBUZZ

packet[0] = length-1; //packet length byte not included in length calculation
packet[1] = destaddress;
packet[2] = address;
packet[3] = command;
packet[4] = network code;


### Command codes:

These are the command codes that have been developed so far. Command codes are for identifying packet type. Mostly, these are not exposed to end users, and are used internally for data management and system vs. user data flow.


0x00 - 0x1F - RESERVED

0x20 - user data, byte array
0x21 - user data, string
0x22 - user data, 32 bit float
0x23 - user data, 64 bit double
0x24 - user data, 32 bit unsigned int
0x25 - user data, 32 bit signed int
0x26 - user data, 64 bit unsigned int
0x27 - user data, 64 bit signed int
0x28 - user data, two 32 bit signed int
0x29 - 0x2F - RESERVED

0x30 - 0x3F - RESERVED

0x40 - system control, orphan host request
0x41 - system control, orphan request response. Contains timing and channel information or orphan-orphan response.
0x42 - system control, network descriptor packet - timing and channel information
0x43 - system control, request for host. If no host is known, one will be elected. Default choice is first to send request for host.
0x44 - 0x4F - RESERVED

0x4F - 0xFF - RESERVED



# Footnotes
[1] https://en.wikipedia.org/wiki/Frequency-hopping_spread_spectrum

0 comments on commit aa59422

Please sign in to comment.