Hi,
I'm trying to get a DataChannel between two Android devices. Chrome and Firefox to Android works really good but I'm running into this when trying it between two Android devices:
I tested this between a Nexus 5 and a Nexus 7 (2012) over a strong WLAN conneciton.
On the offerer side the dataChannel.state never gets set to DataChannel.State.OPEN. On the receiver end it does.
Some logs (DataChannelService is my service that creates the PeerConnection etc.)
offerer:
I/DataChannelService( 5639): IceConnectionState changed: CONNECTED
I/DataChannelService( 5639): Ice Connection complete, registering Observers
I/DataChannelService( 5639): IceConnectionState changed: COMPLETED
I/libjingle( 5639): Channel socket writable (data, 1) for the first time
I/libjingle( 5639): Using Cand[2702239670:1:udp:2122129151:192.168.1.103:41326:local::0:ONTsw7w84B7WuzBc:jc4ItFqNg1IsBT2
yd52kRsBs]->Cand[3467446226:1:udp:2122129151:192.168.1.109:60366:local::0:W7sBpQ0vV8TC/Y0t:COSc71Ot9jtyzDOSOrC7U/wx]
I/libjingle( 5639): Changing data state, recv=1 send=1
I/libjingle( 5639): Sent CONTROL message on channel 1
I/libjingle( 5639): DataChannel received OPEN_ACK message, sid = 1
...
peer/receiver:
I/DataChannelService(26746): IceConnectionState changed: CONNECTED
I/DataChannelService(26746): Ice Connection complete, registering Observers
I/libjingle(26746): Channel socket writable (data, 1) for the first time
I/libjingle(26746): Using Cand[3467446226:1:udp:2122129151:192.168.1.109:60366:local::0:W7sBpQ0vV8TC/Y0t:COSc71Ot9jtyzDO
SOrC7U/wx]->Cand[2702239670:1:udp:2122129151:192.168.1.103:41326:local::0:ONTsw7w84B7WuzBc:jc4ItFqNg1IsBT2yd52kRsBs]
I/libjingle(26746): Changing data state, recv=1 send=1
I/DataChannelService(26746): PeerConnection onDataChannel State: CONNECTING
I/libjingle(26746): Sent CONTROL message on channel 1
I/DataChannelService(26746): DataChannel state changed: OPEN
As you can see the offerer gets a writable socket but the DataChannel never opens. On the peer the onDataChannel state changes are logged and the DataChannel opens.
I tried to send messages between them after this but in neither direction anything arrives.
I have tried to offer on both devices with the same results.
Any idea what is going on here?