2008 network design

From Glacsweb Wiki
Jump to: navigation, search

brainstorming on new network design aims:

  • Simple packet structure
  • direct connection to wired probe
  • avoid direct eeprom r/w from base except for debug/setup
  • allow easier data send (stream back and fetch errors later)
  • maintain logs
  • probes need to count retries etc if they do them

Packet

  • All RF packets would have a 10ms 0x55 preamble appended.
  • Multi byte fields are LSB first. so store and packet encode 0x1234 as 0x34 0x12.
  • Maximum payload size is 64 bytes, minimum is 1. LEN = 0 is 1 byte, LEN = 63 is 64 bytes.

IDs - I suggest reserve 0 for broadcast, 1 for base stn (km)

HDR[1]  - Header = 0x34
SRC[2]  - Source ID
DST[2]  - Destination ID
FRM[2]  - Frame number (used for sequences)
CMD[1]  - Command, like type of packet
RSV[2]  - Reserved as we don't quite know final net reqs yet! maybe TTL?
LEN[1]  - Size of data payload (PAY)
PAY[64] - Payload, enough for one set of readings
CHK[2]  - Checksum


Radio packet

preamble 12 bytes (96bits) of 0x55

FEC coded (not(byte) byte)
header
rfsize (bytes remaining)
followed by packet decribed above

Probes

Packets for probes can be received by UART or Transceiver (TRX)

  • Packets received by UART:
    • If meant for self: process and reply via UART
    • If broadcast: process only
    • If meant for others: transmit via TRX in "Wired Probe mode" or ignored
  • Packets received by TRX:
    • If meant for self: process and reply via TRX
    • if broadcast: process only
    • If meant for others: get interesting... networking algorithm comes in!

New Probe config

When programmed they have ID=2

this needs setting (eeprom address 0x20 0x21)

Network concept

Probably a csma-mainly technique, possibly with collision optimisation afterwards. First ideas were the nodes self-determine their route tables (I think this means they need to talk to each other though!). Config stage should use RSSI or at least report it. Once net is setup base station will talk to one at a time briefly and send completed non-routers to sleep.

Network has characteristics we may be able to exploit:

  • few nodes
  • high failure rate of packets sometimes - at others very clean links
  • accurate timings for rtc/wake
  • max data per day can be determined
    • but max per link-up may be over several days due to being disconnected