In IoT-NGIN, we use Nearby Connections as an off-the-shelf framework to showcase the project’s contribution toward device-to-device communications. Contributions include 5G coverage extension and direct link characterization.
Nearby Connection is a feature developed by Google for the Android operating system that allows devices to communicate and interact with each other over short distances without requiring an internet connection. It enables devices to discover and connect with each other using Wi-Fi, Bluetooth, or Wi-Fi Direct.
Nearby Connections provides a peer-to-peer network where devices can discover each other, establish a connection, and exchange data. This feature is particularly useful in scenarios where an internet connection is not available or when direct device-to-device communication is desired for reasons like speed, security, or privacy.
Here’s a breakdown of how Nearby Connections typically works:
1. *Discovery*: Devices actively scan for nearby devices using Wi-Fi, Bluetooth, or Wi-Fi Direct. They broadcast and listen for signals to identify potential connections. This discovery process can be initiated programmatically by apps or triggered by user actions.
2. *Connection*: Once devices discover each other, they can establish a connection. Nearby Connections supports various connection strategies, including Bluetooth, Wi-Fi, and Wi-Fi Direct. The specific strategy used depends on the devices involved and their capabilities.
3. *Data Exchange*: After establishing a connection, devices can exchange data with each other. Nearby Connections offers reliable and efficient data transfer mechanisms, allowing apps to send and receive data in the form of bytes or streams. It also supports high-level APIs for sending structured data, files, and media.
Once the devices are connected, apps can leverage this connection to enable collaborative or interactive experiences. For example, apps can use Nearby Connections to create multiplayer games, share files, collaborate on documents, or enable shared experiences between devices. Nearby Connections provides a robust framework with various features to enhance the connection and data transfer process. It includes features like streaming, advertising and discovery APIs, authentication, encryption, and even supports offline background operations. It’s important to note that Nearby Connections is primarily an Android-specific feature and may require the integration of the Nearby Connections API within apps to enable its functionality. Overall, Nearby Connections simplifies the process of establishing direct connections between Android devices, enabling them to communicate, collaborate, and exchange data without relying on an internet connection.