STUN BINDING not working when using hotspot

153 views
Skip to first unread message

Anchorer Du

unread,
Jul 2, 2021, 11:43:04 AM7/2/21
to discuss-webrtc
I have two devices under a LAN to do WebRTC screen casting, from Mac Pro to an Android device. I have a signaling channel for the two devices to find each other to build the WebRTC peer connection and it works well under this situation.

However, when I try to use hotspot between these devices, it starts to fail to build peer connection. Process as follows:
  • Enable a hotspot on the Android device
  • Connect to the hotspot on Mac Pro
  • Try to cast screen from Mac Pro to the Android device
I found it failed, seems the Android device will never receive the STUN BINDING response. Any suggestions on this? I appreciate your help!

Here's a log from the Android device:

I/port.cc: (line 376): Received STUN BINDING request id=714c443461444f6b41484f49 from unknown address 192.168.43.x:62372
I/connection.cc: (line 312): Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|C--W|-|0|0|7926369428982087166|-]: Connection created
I/p2p_transport_channel.cc: (line 1145): Adding connection from peer reflexive candidate: Cand[:68302534:1:udp:1845501695:192.168.43.x:62372:prflx::0:HWh9:STJP33wldEQ2M0WG8rtl8yAS:0:999:0]
I/connection.cc: (line 732): Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|CR-W|-|0|0|7926369428982087166|-]: Sent STUN BINDING response, to=192.168.43.x:62372, id=714c443461444f6b41484f49
I/p2p_transport_channel.cc: (line 1213): Not switching the selected connection on controlled side yet: Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|CR-W|-|1|0|7926369428982087166|-]
I/p2p_transport_channel.cc: (line 1920): Channel[0|1|R_]: Transport channel state changed from 0 to 2
I/jsep_transport_controller.cc: (line 1195): 0 Transport 1 state changed. Check if state is complete.
I/p2p_transport_channel.cc: (line 1700): Channel[0|1|R_]: Have a pingable connection for the first time; starting to ping.
I/basic_ice_controller.cc: (line 229): Selecting connection for triggered check: Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|CR-W|-|1|0|7926369428982087166|-]
I/connection.cc: (line 1176): Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|CR-W|-|1|0|7926369428982087166|-]: Sent STUN BINDING request, id=7a47426c686d4977745a335a, use_candidate=0, nomination=0
I/peer_connection.cc: (line 1826): Changing standardized IceConnectionState 0 => 1
I/connection.cc: (line 1176): Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|CR-I|-|1|0|7926369428982087166|-]: Sent STUN BINDING request, id=5a6f4649736b425548656e2b, use_candidate=0, nomination=0
I/connection.cc: (line 1176): Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|CR-I|-|1|0|7926369428982087166|-]: Sent STUN BINDING request, id=462b71326875336747555169, use_candidate=0, nomination=0
I/connection.cc: (line 485): onReadPacket: handle STUN message
I/connection.cc: (line 487): onReadPacket: start handle STUN message type: STUN BINDING request
I/connection.cc: (line 490): Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|CR-I|-|1|0|7926369428982087166|-]: Received STUN BINDING request, id=363241314356336369583649
I/connection.cc: (line 494): onReadPacket: HandleStunBindingOrGoogPingRequest
I/connection.cc: (line 732): Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|CR-I|-|1|0|7926369428982087166|-]: Sent STUN BINDING response, to=192.168.43.x:62372, id=363241314356336369583649
I/basic_ice_controller.cc: (line 229): Selecting connection for triggered check: Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|CR-I|-|1|0|7926369428982087166|-]
I/connection.cc: (line 1176): Conn[6ad41000:0:Net[wlan0:192.168.50.x/24:Wifi:id=3]:oCQH15PV:1:0:local:udp:192.168.50.x:48063->KbKCQgvi:1:1845501695:prflx:udp:192.168.43.x:62372|CR-I|-|1|0|7926369428982087166|-]: Sent STUN BINDING request, id=7832524c6d592b4934785874, use_candidate=0, nomination=0

Reply all
Reply to author
Forward
0 new messages