I'm working on an app that uses the Nearby Connections API which involves sending a series of large files (around 20-30 MB each). I'm using the P2P_STAR strategy as I intend to have a "master" device coordinating a group of "worker" devices, though this issue only involves two device.
Whenever I attempt to transfer some files after connecting my Samsung Galaxy S8 and Galaxy Tab S7 FE via a shared wireless access point, it inevitably leads to a disconnection. According to the logs, the issue appears to start after repeated timeouts such as this:
I/NearbyConnections: Write operation on ENCRYPTED_WIFI_LAN (isPaused: false, isClosed: false) is timeout. [CONTEXT service_id=54 ]
I/NearbyConnections: Failed to send KEEP_ALIVE frame with ack on endpoint 15SN [CONTEXT service_id=54 ]
This eventually leads to the endpoint disconnecting:
I/NearbyConnections: EndpointChannelManager unregistered endpoint 15SN [CONTEXT service_id=54 ]
I/NearbyConnections: BandwidthUpgradeManagerV2 has processed endpoint disconnection for 15SN because there is no current BandwidthUpgradeMedium. [CONTEXT service_id=54 ]
E/NearbyConnections: EndpointManager failed to find EndpointChannel over which to write DATA at offset 1048576 of Payload -4994995080558146502 to endpoint 15SN [CONTEXT service_id=54 ]
I've uploaded all of the Nearby-related message logs here.
Is there anything I can do to prevent this from occurring?