Problem sending file using Google Nearby BANDWIDTH_UPGRADE_NEGOTIATION.UPGRADE_PATH_AVAILABLE

216 Views Asked by At

I have developed an app with nearby technology by Google. On the most of devices it works like a harm. However on Redmi (Android 10Q) when discovering there is problem with BandwidthUpgradeManager. And sending is absolutely not working.

Does anyone have an idea why this is happening on this specific device?

Full Log below:

E/NearbyConnections: BandwidthUpgradeManager couldn't complete the upgrade for endpoint S6Z4 because it failed to write the BANDWIDTH_UPGRADE_NEGOTIATION.UPGRADE_PATH_AVAILABLE OfflineFrame. [CONTEXT service_id=54 ]
java.io.IOException: Broken pipe
    at android.net.LocalSocketImpl.writeba_native(Native Method)
    at android.net.LocalSocketImpl.access$500(LocalSocketImpl.java:37)
    at android.net.LocalSocketImpl$SocketOutputStream.write(LocalSocketImpl.java:147)
    at android.bluetooth.BluetoothSocket.write(BluetoothSocket.java:600)
    at android.bluetooth.BluetoothOutputStream.write(BluetoothOutputStream.java:76)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at java.io.DataOutputStream.flush(DataOutputStream.java:123)
    at asdu.s(:com.google.android.gms@[email protected] (100400-451484765):8)
    at asdu.r(:com.google.android.gms@[email protected] (100400-451484765):4)
    at asdu.q(:com.google.android.gms@[email protected] (100400-451484765):0)
    at asdg.run(:com.google.android.gms@[email protected] (100400-451484765):61)
    at arxc.run(:com.google.android.gms@[email protected] (100400-451484765):3)
    at ymx.c(:com.google.android.gms@[email protected] (100400-451484765):6)
    at ymx.run(:com.google.android.gms@[email protected] (100400-451484765):8)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at ysc.run(:com.google.android.gms@[email protected] (100400-451484765):0)

Logs before exception:

I/NearbyConnections: EndpointChannelManager replaced endpoint JKYC's channel from type ENCRYPTED_BLUETOOTH to type WIFI_HOTSPOT. [CONTEXT service_id=54 ] 
I/NearbyConnections: Failed to close write stream of BLUETOOTH EndpointChannel BluetoothClassicSocket:14:47:2D:A8:76:FE: socket closed [CONTEXT service_id=54 ]
W/NearbyConnections: Unexpected call to physicalConnectionEstablished while NearbyRecorder still has an active current medium. [CONTEXT service_id=54 ]
I/NearbyConnections: ClientProxy(164202007) reporting onBandwidthChanged(JKYC, HIGH) [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointManager received a DISCONNECTION frame from endpoint JKYC on channel BLUETOOTH, disconnecting. [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointManager failed the next Read read/write for endpoint JKYC over its BLUETOOTH EndpointChannel. [CONTEXT service_id=54 ]
java.io.IOException: Stream closed
    at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:172)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:338)
    at java.io.DataInputStream.readFully(DataInputStream.java:198)
    at java.io.DataInputStream.readInt(DataInputStream.java:389)
    at asdu.x(:com.google.android.gms@[email protected] (100400-451484765):1)
    at asdu.w(:com.google.android.gms@[email protected] (100400-451484765):2)
    at asgr.b(:com.google.android.gms@[email protected] (100400-451484765):1)
    at asgo.run(:com.google.android.gms@[email protected] (100400-451484765):6)
    at ymx.c(:com.google.android.gms@[email protected] (100400-451484765):6)
    at ymx.run(:com.google.android.gms@[email protected] (100400-451484765):7)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at ysc.run(:com.google.android.gms@[email protected] (100400-451484765):0)
    at java.lang.Thread.run(Thread.java:919)
I/NearbyConnections: EndpointManager switched its Read loop from BLUETOOTH EndpointChannel to WIFI_HOTSPOT EndpointChannel for endpoint JKYC. [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointManager received a KEEP_ALIVE frame from endpoint JKYC on channel WIFI_HOTSPOT. [CONTEXT service_id=54 ]
I/NearbyConnections: Write elapsed time: 0 [CONTEXT service_id=54 ]
I/NearbyConnections: Write elapsed time: 0 [CONTEXT service_id=54 ]
I/NearbyConnections: Send KeepAlive and sleep 5000 for endpoint JKYC. [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointManager received a KEEP_ALIVE frame from endpoint JKYC on channel WIFI_HOTSPOT. [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointManager received a KEEP_ALIVE frame with ack from endpoint JKYC on channel WIFI_HOTSPOT. [CONTEXT service_id=54 ]
I/NearbyConnections: Write elapsed time: 1 [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointManager received a KEEP_ALIVE frame from endpoint JKYC on channel WIFI_HOTSPOT. [CONTEXT service_id=54 ]
I/NearbyConnections: Send KeepAlive and sleep 5000 for endpoint JKYC. [CONTEXT service_id=54 ]
I/NearbyConnections: Write elapsed time: 0 [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointManager received a KEEP_ALIVE frame from endpoint JKYC on channel WIFI_HOTSPOT. [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointManager received a KEEP_ALIVE frame with ack from endpoint JKYC on channel WIFI_HOTSPOT. [CONTEXT service_id=54 ]
Write elapsed time: 0 [CONTEXT service_id=54 ]
Send KeepAlive and sleep 5000 for endpoint JKYC. [CONTEXT service_id=54 ]
Found BleAdvertisement [ 0x23 0x5d 0x19 0x4b 0x31 0x4c 0x30 0x54 0x06 0x53 0x65 0x6e 0x64 0x65 0x72 0x14 0x47 0x2d 0xa8 0x76 0xfe 0x00 0x00 ] (with EndpointId 1L0T and EndpointInfo [ 0x53 0x65 0x6e 0x64 0x65 0x72 ]) [CONTEXT service_id=54 ]
I/NearbyConnections: ClientProxy(164202007) reporting onEndpointFound(1L0T) [CONTEXT service_id=54 ]
I/NearbyConnections: ClientProxy(164202007) reporting onEndpointDistanceChanged(1L0T, UNKNOWN) [CONTEXT service_id=54 ]
I/NearbyConnections: Client 164202007 requested a connection to endpoint 1L0T. [CONTEXT service_id=54 ]
I/NearbyConnections: In requestConnection(), client 164202007 attempted a connection with endpoint 1L0T, but outgoing connections are disallowed [CONTEXT service_id=54 ]
I/NearbyConnections: Write elapsed time: 0 [CONTEXT service_id=54 ]
I/NearbyConnections: Send KeepAlive and sleep 5000 for endpoint JKYC. [CONTEXT service_id=54 ]
I/NearbyConnections: Write elapsed time: 0 [CONTEXT service_id=54 ]
I/NearbyConnections: Send KeepAlive and sleep 5000 for endpoint JKYC. [CONTEXT service_id=54 ]
I/NearbyConnections: Found BluetoothDeviceName IzFMMFRdGUsAAAAAAAAABlNlbmRlcg (with EndpointId 1L0T and EndpointInfo [ 0x53 0x65 0x6e 0x64 0x65 0x72 ]) [CONTEXT service_id=54 ]
I/NearbyConnections: ClientProxy(164202007) ignoring onEndpointDistanceChanged(1L0T, UNKNOWN), because this distance has already been reported [CONTEXT service_id=54 ]
I/NearbyConnections: Found BluetoothDeviceName IzFMMFRdGUsAAAAAAAAABlNlbmRlcg (with EndpointId 1L0T and EndpointInfo [ 0x53 0x65 0x6e 0x64 0x65 0x72 ]) [CONTEXT service_id=54 ]
I/NearbyConnections: ClientProxy(164202007) ignoring onEndpointDistanceChanged(1L0T, UNKNOWN), because this distance has already been reported [CONTEXT service_id=54 ]
I/NearbyConnections: Write elapsed time: 0 [CONTEXT service_id=54 ]
I/NearbyConnections: Send KeepAlive and sleep 5000 for endpoint JKYC. [CONTEXT service_id=54 ]
I/NearbyConnections: Cleared cached local high power advertising endpoint Id. 0AJI [CONTEXT service_id=54 ]
I/NearbyConnections: Write elapsed time: 0 [CONTEXT service_id=54 ]
I/NearbyConnections: Send KeepAlive and sleep 5000 for endpoint JKYC. [CONTEXT service_id=54 ]
I/NearbyConnections: No incoming frames were processed within the KeepAlive timeout for endpoint JKYC. [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointManager quit overall KeepAliveManager loop for endpoint JKYC. [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointChannelManager reported the disconnection to endpoint JKYC. [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointChannelManager unregistered endpoint JKYC [CONTEXT service_id=54 ]
I/NearbyConnections: EndpointManager failed the next Read read/write for endpoint JKYC over its WIFI_HOTSPOT EndpointChannel. [CONTEXT service_id=54 ]
java.net.SocketException: Socket closed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.socketRead(SocketInputStream.java:119)
    at java.net.SocketInputStream.read(SocketInputStream.java:176)
    at java.net.SocketInputStream.read(SocketInputStream.java:144)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:248)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:288)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:347)
    at java.io.DataInputStream.readFully(DataInputStream.java:198)
    at java.io.DataInputStream.readInt(DataInputStream.java:389)
    at asdu.x(:com.google.android.gms@[email protected] (100400-451484765):1)
    at asdu.w(:com.google.android.gms@[email protected] (100400-451484765):2)
    at asgr.b(:com.google.android.gms@[email protected] (100400-451484765):1)
    at asgo.run(:com.google.android.gms@[email protected] (100400-451484765):6)
    at ymx.c(:com.google.android.gms@[email protected] (100400-451484765):6)
    at ymx.run(:com.google.android.gms@[email protected] (100400-451484765):7)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at ysc.run(:com.google.android.gms@[email protected] (100400-451484765):0)
    at java.lang.Thread.run(Thread.java:919)
I/NearbyConnections: EndpointManager quit overall Read loop for endpoint JKYC because there's no EndpointChannel for it. [CONTEXT service_id=54 ]
I/NearbyConnections: [BandwidthUpgradeProtocol] Remove upgrading medium WIFI_HOTSPOT for JKYC [CONTEXT service_id=54 ]
I/NearbyConnections: [BandwidthUpgradeProtocol] Remove [BandwidthUpgradeState][6GHz Mediums : ][5GHz Mediums : WIFI_HOTSPOT, ][2.4GHz Mediums : WIFI_LAN, WIFI_HOTSPOT, BLUETOOTH, ][Initial Bandwidth : BANDWIDTH_5_GHZ][Current Bandwidth : BANDWIDTH_5_GHZ][Index : 0] for JKYC [CONTEXT service_id=54 ]
I/NearbyConnections: Found BluetoothDeviceName IzFMMFRdGUsAAAAAAAAABlNlbmRlcg (with EndpointId 1L0T and EndpointInfo [ 0x53 0x65 0x6e 0x64 0x65 0x72 ]) [CONTEXT service_id=54 ]
I/NearbyConnections: ClientProxy(164202007) ignoring onEndpointDistanceChanged(1L0T, UNKNOWN), because this distance has already been reported [CONTEXT service_id=54 ]
0

There are 0 best solutions below