HefnySco / andruav_android_app

14 stars 7 forks source link

Video connection problem again #13

Open ghost opened 1 year ago

ghost commented 1 year ago

https://github.com/HefnySco/andruav_android_app/issues/8

I had thought that the problem was solved now. however, while I go out for flying outdoors, the video connection failed to establish again. when drone card connected to WIFI, not LTE, the video connection could be estabilished.

Despite many many attempts, the connection couldn't be established. Initially, I believed that turning off the network program had solved the issue, but that was not the case.

Although changing the settings (including the initial installation, ID, and network) worked the first time, but connection is not established after that. it is common repeated problem until now

ghost commented 1 year ago

I apologize for asking so many questions.

I have been trying to debug the app to identify the problem, and when I build this app, I received an error message that I believe is related to signing.

Is it possible to disable this with a simple line of code edit?

if not, I will find the solution for this on my own. :

Execution failed for task ':app:validateSigningPUBLIC_Debug'.

Keystore file 'C:\Users\hlfan\Desktop\004 MDT\004 Cell Phone Companion Computer\andruav\andruav_android_app\app\home\mhefny\Documents\Keys\Andruav_AP\Andruav_Ap.jks' not found for signing config 'config'.

ghost commented 1 year ago

commenting-out signing-config code worked well. sorry for frequent question.

ghost commented 1 year ago

it is very mysterious thing. I build this project on my own, and video was not blocked via LTE. the video comes very well.

I will test further and let you know.

ghost commented 1 year ago

it is very mysterious thing. I build this project on my own, and video was not blocked via LTE. the video comes very well.

I will test further and let you know.

I reboot laptop and restarted cell phone, and video connection not estabilished again.

is it related to IP assigning? my carrier moves IP address when reboot.

this is my debug message :

https://drive.google.com/file/d/1nKSlzHCEtMGx0n0GroWnDP7L5gVSj47T/view?usp=share_link

ghost commented 1 year ago

when I use WIFI connection and get video data well, I can see below debug message, but with LTE connection, I can't see this(I deleted some IP addresses) :

I/org.webrtc.Logging: NetworkMonitor: Start monitoring with native observer -5476376626976149440 D/ConnectivityManager: StackLog: [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:4191)] [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:4233)] [android.net.ConnectivityManager.requestNetwork(ConnectivityManager.java:4371)] [android.net.ConnectivityManager.requestNetwork(ConnectivityManager.java:4349)] [org.webrtc.NetworkMonitorAutoDetect$ConnectivityManagerDelegate.requestMobileNetwork(NetworkMonitorAutoDetect.java:469)] [org.webrtc.NetworkMonitorAutoDetect.(NetworkMonitorAutoDetect.java:674)] [org.webrtc.NetworkMonitor.createAutoDetect(NetworkMonitor.java:167)] [org.webrtc.NetworkMonitor.startMonitoring(NetworkMonitor.java:90)] [org.webrtc.NetworkMonitor.startMonitoring(NetworkMonitor.java:112)] D/ConnectivityManager: StackLog: [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:4191)] [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:4233)] [android.net.ConnectivityManager.registerNetworkCallback(ConnectivityManager.java:4615)] [android.net.ConnectivityManager.registerNetworkCallback(ConnectivityManager.java:4585)] [org.webrtc.NetworkMonitorAutoDetect$ConnectivityManagerDelegate.registerNetworkCallback(NetworkMonitorAutoDetect.java:456)] [org.webrtc.NetworkMonitorAutoDetect.(NetworkMonitorAutoDetect.java:681)] [org.webrtc.NetworkMonitor.createAutoDetect(NetworkMonitor.java:167)] [org.webrtc.NetworkMonitor.startMonitoring(NetworkMonitor.java:90)] [org.webrtc.NetworkMonitor.startMonitoring(NetworkMonitor.java:112)] D/offer action: onSetSuccess I/org.webrtc.Logging: NetworkMonitorAutoDetect: Network becomes available: 100 I/org.webrtc.Logging: NetworkMonitorAutoDetect: capabilities changed: [ Transports: CELLULAR Capabilities: SUPL&RCS&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED&NOT_VCN_MANAGED LinkUpBandwidth>=15000Kbps LinkDnBandwidth>=30000Kbps Specifier: <TelephonyNetworkSpecifier [mSubId = 2]> UnderlyingNetworks: Null] I/org.webrtc.Logging: NetworkMonitorAutoDetect: link properties changed: {InterfaceName: rmnet1 LinkAddresses: [ 2001:e60:87d4:5992::85ca:aa0b/64 ] DnsAddresses: [ /2001:xxx:e050:x:xxx:xxx:xx:x,/2001:xxxx:xxxx::xxx ] Domains: null MTU: 1450 TcpBufferSizes: 2097152,4194304,8388608,1048576,3145728,4194304 Routes: [ ::/0 -> fe80::3 rmnet1 mtu 1450,2001:xxx:xxxx:xxxx::/64 -> :: rmnet1 mtu 0 ] Nat64Prefix: 64:xxxx::/96 Stacked: [[ {InterfaceName: v4-rmnet1 LinkAddresses: [ 192.x.x.x/32 ] DnsAddresses: [ ] Domains: null MTU: 0 Routes: [ 0.0.0.0/0 -> 192.0.0.4 v4-rmnet1 mtu 0 ]} ]]} I/org.webrtc.Logging: NetworkMonitorAutoDetect: Network becomes available: 102 I/org.webrtc.Logging: NetworkMonitorAutoDetect: capabilities changed: [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED&NOT_VCN_MANAGED LinkUpBandwidth>=12000Kbps LinkDnBandwidth>=30000Kbps TransportInfo: <SSID: , BSSID: 02:00:00:00:00:00, MAC: xx:xx:xx:00:00:00, IP: /xxx.168.0.21, Security type: 2, Supplicant state: COMPLETED, Wi-Fi standard: 4, RSSI: -37, Link speed: 65Mbps, Tx Link speed: 65Mbps, Max Supported Tx Link speed: 150Mbps, Rx Link speed: 65Mbps, Max Supported Rx Link speed: 150Mbps, Frequency: 2457MHz, Net ID: -1, Metered hint: false, score: 60, isUsable: true, CarrierMerged: false, SubscriptionId: -1, IsPrimary: -1, Trusted: true, Restricted: false, Ephemeral: false, OEM paid: false, OEM private: false, OSU AP: false, FQDN: , Provider friendly name: , Requesting package name: MLO Information: , AP MLD Address: , AP MLO Link Id: , AP MLO Affiliated links: > SignalStrength: -37 UnderlyingNetworks: Null] I/org.webrtc.Logging: NetworkMonitorAutoDetect: link properties changed: {InterfaceName: wlan0 LinkAddresses: [ fe80::54f9:xxxx:xxxx:3b1b/64,192.xxx.0.21/24 ] DnsAddresses: [ /xxx.xxx.xx.1,/xxx.xxx.xx.2 ] Domains: null MTU: 0 ServerAddress: /192.168.0.1 TcpBufferSizes: 524288,1048576,4194304,524288,1048576,4194304 Routes: [ fe80::/64 -> :: wlan0 mtu 0,192.168.0.0/24 -> 0.0.0.0 wlan0 mtu 0,0.0.0.0/0 -> 192.168.0.1 wlan0 mtu 0 ]} I/org.webrtc.Logging: EglRenderer: fpvactivity_rtc_glviewsurfaceDuration: 4004 ms. Frames received: 25. Dropped: 0. Rendered: 25. Render fps: 6.2. Average render time: 11847 us. Average swapBuffer time: 5322 us. D/offer action: SetRemoteSDPAction - iceConnectionStateNEW D/offer action: onSetSuccess D/offer action: AddIceCandidateAction I/org.webrtc.Logging: SurfaceEglRenderer: fpvactivity_rtc_glviewsurface: Reporting frame resolution changed to 960x540 with rotation 0 I/org.webrtc.Logging: SurfaceViewRenderer: fpvactivity_rtc_glviewsurface: updateSurfaceSize. Layout size: 2194x1017, frame size: 960x540, requested surface size: 960x444, old surface size: 1280x593 D/SurfaceView@572084d: setFixedSize 1280x593 -> 960x444

ghost commented 1 year ago

I want to estabilish my own server after testing the connection is good at far sea, with this application...

geofrancis commented 1 year ago

I have ran into this problem with my own testing and its really strange.

if i put the EE UK data sim in the andruav drone phone and try and stream video, all I get is a black screen on the webclient,

if i take that same simcard, insert it into a different phone or dongle then share that connection using the wifi hotspot with the andruav drone phone it works.

If i connect the andruav drone phone to a vpn with the sim inserted it will work. so there is some strange routing issue.

geofrancis commented 1 year ago

Some more testing has showed that this is related to the Mobile network as It works reliably with an O2 UK mobile sim. so I believe there is some routing or DNS limitations with some mobile networks.

geofrancis commented 10 months ago

I belive this is a WEBRTC issue rather than a andruav issue

https://groups.google.com/g/discuss-webrtc/c/SkmRIO_wcRo?pli=1