Android WebRTC on LAN: only candidate 127.0.0.1 is sent to signaling server

241 views
Skip to first unread message

François

unread,
Mar 21, 2019, 8:20:27 AM3/21/19
to discuss-webrtc
Hi everyone,

I am trying to create an Android video chat application based on WebRTC, for deployment on a local network. The setup is simple: 2 Android terminals and one Linux server on the same local network (Ethernet). Each Android terminal has more than 1 public IP address. No STUN nor TURN server. Only host candidates, and a signaling server (HTTP+WS).

Trying to compare the two versions, I realized that the list of candidates sent to the signaling server is:

  • one candidate per network interface with the libjingle version
  • only 127.0.0.1 and :::1 with the google-webrtc version
What changed between the two versions, and how can I make the PeerConnectionFactory create all the candidates?

I also noticed that with google-webrtc-1.0.+, the following errors are logged by the C++ native code, though the network configuration is the same as with libjingle-9127:

03-20 17:07:54.613 17423 19629 W android_network_monitor.cc: (line 374): Get an unknown type for the interfac
e vlan8
03-20 17:07:54.613 17423 19629 W android_network_monitor.cc: (line 374): Get an unknown type for the interfac
e bridge
03-20 17:07:54.613 17423 19629 W android_network_monitor.cc: (line 374): Get an unknown type for the interfac
e bridge
03-20 17:07:54.613 17423 19629 W android_network_monitor.cc: (line 374): Get an unknown type for the interfac
e bridge
03-20 17:07:54.615 17423 19629 I basic_port_allocator.cc: (line 851): Network manager has started
03-20 17:07:54.615 17423 19629 I network.cc: (line 481): Network change was observed
03-20 17:07:54.616 17423 19629 W android_network_monitor.cc: (line 374): Get an unknown type for the interfac
e vlan8
03-20 17:07:54.616 17423 19629 W android_network_monitor.cc: (line 374): Get an unknown type for the interfac
e bridge
03-20 17:07:54.616 17423 19629 W android_network_monitor.cc: (line 374): Get an unknown type for the interfac
e bridge
03-20 17:07:54.616 17423 19629 W android_network_monitor.cc: (line 374): Get an unknown type for the interfac
e bridge
03-20 17:07:54.622 17423 19629 I basic_port_allocator.cc: (line 766): Allocate ports on 6 networks
03-20 17:07:54.622 17423 19629 W physical_socket_server.cc: (line 200): Binding socket to network address 10.
11.239.187 failed; result: -3
03-20 17:07:54.622 17423 19629 E basic_packet_socket_factory.cc: (line 53): UDP bind failed with error 101
03-20 17:07:54.622 17423 19629 W physical_socket_server.cc: (line 200): Binding socket to network address 172.17.116.154 failed; result: -3
03-20 17:07:54.622 17423 19629 E basic_packet_socket_factory.cc: (line 53): UDP bind failed with error 101
03-20 17:07:54.622 17423 19629 W physical_socket_server.cc: (line 200): Binding socket to network address 172.17.84.115 failed; result: -3
03-20 17:07:54.622 17423 19629 E basic_packet_socket_factory.cc: (line 53): UDP bind failed with error 101
03-20 17:07:54.622 17423 19629 W physical_socket_server.cc: (line 200): Binding socket to network address 192.168.237.1 failed; result: -3
03-20 17:07:54.623 17423 19629 E basic_packet_socket_factory.cc: (line 53): UDP bind failed with error 101
03-20 17:07:54.623 17423 19629 I basic_port_allocator.cc: (line 1318): Net[bridge:10.0.0.x/8:Unknown:id=1]: Allocation Phase=Udp
03-20 17:07:54.623 17423 19629 I port.cc : (line 318): Port[65372000::1:0:local:Net[bridge:10.0.0.x/8:Unknown:id=1]]: Port created with network cost 50


Thank you!

PS: The list of candidates sent to the signaling server.

With libjingle-9127

{"type":"candidate","payload":{"label":0,"id":"audio","candidate":"candidate:2316705582 1 udp 2122260223 192.168.237.1 34869 typ host generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":1,"id":"video","candidate":"candidate:2316705582 1 udp 2122260223 192.168.237.1 34869 typ host generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":1,"id":"video","candidate":"candidate:2316705582 1 udp 2122260223 192.168.237.1 34869 typ host generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":0,"id":"audio","candidate":"candidate:3614478314 1 udp 2122194687 172.17.84.124 52163 typ host generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":1,"id":"video","candidate":"candidate:3614478314 1 udp 2122194687 172.17.84.124 52163 typ host generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":0,"id":"audio","candidate":"candidate:1846788752 1 udp 2122129151 172.17.116.134 45915 typ host generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":1,"id":"video","candidate":"candidate:1846788752 1 udp 2122129151 172.17.116.134 45915 typ host generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":0,"id":"audio","candidate":"candidate:13699457 1 udp 2122063615 10.11.239.176 51039 typ host generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":1,"id":"video","candidate":"candidate:13699457 1 udp 2122063615 10.11.239.176 51039 typ host generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":0,"id":"audio","candidate":"candidate:3298157534 1 tcp 1518280447 192.168.237.1 36295 typ host tcptype passive generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":1,"id":"video","candidate":"candidate:3298157534 1 tcp 1518280447 192.168.237.1 36295 typ host tcptype passive generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":0,"id":"audio","candidate":"candidate:2582868762 1 tcp 1518214911 172.17.84.124 44376 typ host tcptype passive generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":1,"id":"video","candidate":"candidate:2582868762 1 tcp 1518214911 172.17.84.124 44376 typ host tcptype passive generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

,{"type":"candidate","payload":{"label":0,"id":"audio","candidate":"candidate:546324064 1 tcp 1518149375 172.17.116.134 41308 typ host tcptype passive generation 0"},"from":"-Dl0-BWMLUwmKvvcAAAD"}]

With google-webrtc-1.0.26405

03-15 18:29:47.008  2318  2347 D RoomRTCClient: GAE->C #1 : {"type":"candidate","label":0,"id":"0","candidate":"candidate:1510613869 1 udp 2121932543 127.0.0.1 58474 typ host generation 0 ufrag rhKZ network-id 4"}

03-15 18:29:47.009  2318  2347 D RoomRTCClient: GAE->C #2 : {"type":"candidate","label":0,"id
Reply all
Reply to author
Forward
0 new messages