nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Gazell Pairing Device with Dynamic Pairing

Gazell Link Layer Device using Gazell Pairing for adding dynamic pairing functionality. : This project requires a running counterpart project, which is either a: More...

Functions

int main (void)
 Main function. More...
 

Configuration

#define UNENCRYPTED_DATA_PIPE   2
 Pipes 0 and 1 are reserved for GZP pairing and data. See nrf_gzp.h.
 
#define NRF_GZLLDE_RXPERIOD_DIV_2   504
 RXPERIOD/2 on LU1 = timeslot period on nRF51.
 
#define MAX_TX_ATTEMPTS   (NRF_GZLL_DEFAULT_TIMESLOTS_PER_CHANNEL_WHEN_DEVICE_OUT_OF_SYNC * NRF_GZLL_DEFAULT_CHANNEL_TABLE_SIZE)
 
#define BUTTONS   NRF_GPIO_PORT_SELECT_PORT0
 GPIO port for reading from buttons.
 
#define LEDS   NRF_GPIO_PORT_SELECT_PORT1
 GPIO port for writing to LEDs.
 

Detailed Description

1) nRF24Lxx Host running the gzll_host_w_dynamic_pairing example from the compatible version of the nRFgo SDK, or a

2) nRF51 Host running the gzp_host_dynamic_pairing_example example.

The application sends packets continuously. If a packet transmission fails (either times out or encryption failed), the Device will attempt pairing to a Host by sending a pairing request, consisting of an "address request" and a "Host ID" request.

If the Device is paired to a Host, pairing data will be stored in non volatile memory.

Before adding a packet to the TX queue, the contents of the GPIO Port BUTTONS is copied to the first payload byte (byte 0). When an ACK is received, the contents of the first payload byte of the ACK are output on GPIO Port LEDS.

The application alternates between sending the packets encrypted through the pairing library or directly as plaintext using pipe UNENCRYPTED_DATA_PIPE.

Function Documentation

int main ( void  )
Returns
ANSI required int return type.

< Payload to send to Host.