PAN ID Verification


Description:

When more than one SPOT is broadcasting on a channel, things can get pretty hecktic. In order to keep things running smoothly without problems, I created a verification system that allows for easy identification of a transmission. Each SPOT should have a unique PAN ID assigned to it upon manufacture. This PAN ID is handy for labelling outgoing transmissions for a kind of digital signature identifying the SPOT that broadcasted the data. PAN ID Verification is integrated into the Transceiver class.

PAN ID Verification only works when two SPOTs both have it activated, otherwise problems will arise.

Here is the PAN ID Verification cycle:

1A. SPOT A goes to send a message. SPOT A's PAN ID inserted in front of data (since Datagrams are first-in-first-out queue).

2A. SPOT A sends message and begins waiting for a PAN ID Verification packet back containing its PAN ID

1B. SPOT B goes into receive mode*. It receives SPOT A's broadcast and reads its PAN ID (thus removing it from the Datagram). It returns the Datagram as it should, but not before...

2B. SPOT B sends SPOT A's PAN ID as a verification packet (With a char identifying that the packet is a verification packet).

3A. SPOT A receives PAN Verification packet and finishes its cycle.

*If SPOT B is running the receive mode with a given PAN ID, then it will ignore all transmissions from SPOTs other than the one with the PAN ID given

- Tyler McClung


See also:

SourceCode

The SPOTBot Wiki Home

The Source Code Repository