# Beacon Success Rate versus Gateway Density in Sub-GHz Sensor Networks
## 2 System Model
### Channel Access  
In this section, the channel access scheme is presented. Each GW periodically broadcasts beacons that allow the ENs to discover the GW and join its WAN. In other words, the ENs connect to a nearby GW by scanning its advertising beacons. The Beacon frame format is used for broadcasting radio configuration parameters by the GWs. Endpoints use the information in the Beacon frame to choose a Gateway and for maintenance of the Gateway-Endpoint connection, including power control and channel hopping. ENs working in synchronous connection mode should be synchronized with a GW before an uplink or downlink transmission is performed. The synchronization mechanism works by searching for a periodic frame sent by GWs, namely Beacon frames. The time between the two consecutive beacons is referred to as the beacon interval or beacon period. When initially joining the WAN network, the ENs detect available GWs by performing a beacon scan process where all channels are swept for beacon preambles. When a preamble is detected on a channel, the EN will lock onto the channel in an attempt to receive a beacon. If a beacon is successfully received and decoded, the EN will use the timing and parameters transmitted within the payload of the beacon to acquire synchronization with that particular GW. Frequency Hopping Spread Spectrum (FHSS) is used and the hopping sequence is determined by the GWs. The beacon's payload provides synchronization information such as GW seed and beacon sequence number information. This is used by the EN for frequency hopping sequence calculations. Time synchronization is maintained by periodic beacon transmissions by each GW. The beacon payload can also carry additional information about the state of the GW, such as the current GW load, cloud connectivity status, roaming support, or information about the other nearby GWs belonging to the same network. These additional data can influence GW selection by the EN when multiple GWs are available. Beacons provide time and channel synchronization and network discovery across the network. The periodicity of the beacons provides time synchronization, while the sequence number and seed provide channel synchronization. Each WAN is served by one GW, but the EN can choose from multiple GWs available in the NW. After beacon discovery, if an EN can no longer receive consecutive beacons, for, e.g., at least three times, then it falls out of the WAN and needs to re-scan for beacons from other GWs. The WAN network is a synchronized system following a star network topology, where there are specific time slots for transmission and reception. There are fixed 160 time slots from the start of beacon transmission to the start of consecutive beacon transmission. Slots 0-3 are reserved for beacon transmission, while the remaining 156 time slots are available for data transmission shared across the entire WAN. The beacon interval and the number of slots can be programmed to different values to optimize the overall network performance in terms of collision probability and the number of devices that can be supported with a good QoS. FHSS uses 69 channels in the ISM band, starting from a 902.2 MHz carrier frequency and up to 927.8 MHz with 2 MHz spacing. The channel calculations for the beacon broadcasting and Endpoint uplink or downlink transmissions are calculated separately. The result of the calculations is a hopping sequence that is derived from the total number of channels available for upcoming transmissions. The hopping sequence is calculated by shuffling the channel list through a channel shuffler. This channel shuffler is shuffled by iterative calls to a Pseudo Random Number Generator (PRNG) seeded by the seed and sequence number. This PRNG is of the Linear Feedback Shift Register (LFSR) type. This shuffle provides a hopping sequence that guarantees all channels will be visited exactly once within each full hopping cycle. The channel shuffler used for beacon calculation for DL is different from those used for UL data transmission due to differences in periodicity.