Gateway selection for heterogeneous IoT using dynamic BHFC and thresholding | Synapse