Bug 451154 - KDE connect does not discover PC and Android (each other) if the connection is Mobile Hotspot Tethering started from Android and Windows laptop connected to it.
Summary: KDE connect does not discover PC and Android (each other) if the connection i...
Status: REPORTED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (show other bugs)
Version: unspecified
Platform: Android Android 11.x
: NOR wishlist
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-05 06:13 UTC by darkphoenix534
Modified: 2023-05-01 04:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description darkphoenix534 2022-03-05 06:13:25 UTC
SUMMARY
***
It works perfectly if there is a Wifi but i don't have wifi and i use mobile hotspot to share my intenet to my laptop.
With Android custom rom, the ip address keep changing and cannot be set to static for hotspot. Hostname also don't work.
I tried two android device one with custom rom and one with moto stock rom both on Android 11. The Android device and Windows PC are able to discover each other if Hotspot is started from Third device ( android device acting as a wifi router).
I use syncthing and my android device and windows pc are able to discover each other.

It would be very good if support for discovering Windows PC and Android device using Hotspot tethering can be added.

Also if i manually add ipv4 address of my hotspot to KDE connect android app. pc-discovers each other but as my ip keep changing with each hotspot session. its not possible to use this method.
 
Also, i tried using Two Android device connected to each other using Hospot tethering started by one device- the result- they were discovering each other.
***


STEPS TO REPRODUCE
1. Start Hotspot from Android Device.
2. Connect windows pc to that hotspot using wifi.
3. Start KDE connect on both device.

OBSERVED RESULT

Device not discovering each other until manually ip address is added to the android kde connect app.

EXPECTED RESULT

Device automatically abe to discover each other.

SOFTWARE/OS VERSIONS
Windows: 21H2 ( build 19044.1526)
KDE connect windows version : latest from MS Store ( 21.1200.818.0 publisher-KDE e,V.)
Android version : 1.19.1 from Fdroid

PS: I tried to reproduce same with my third android devie running and the same thing happed- not discovering each other.

Also the hostname is in top left of Find device in windows kde connect app right ?
i tried adding it in Add device by IP in KDE connect android app, eg- DESKTOP-QT7AATI but still not discovering each other.
Comment 1 johnathan 2022-03-05 12:57:03 UTC
i can confirm this happening on my system as well over mobile hotspot. kde connect refuses to open occasionally and then works all of a sudden

Operating System: KDE neon 5.24
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Kernel Version: 5.13.0-30-generic (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz
Memory: 7.7 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4400
Comment 2 johnathan 2022-03-11 16:19:26 UTC
i found something. i i manually add the IP of the laptop as trusted that i get in its wifi from the phone hotpspot (192.168.121.215 in my case), kde connect immediately worked flawlessly.

i suspect there is a problem in the ip address recognition/dhcp whatever that kde connect gets confused. 

note: i turned on mobile hotspot, connect my laptop and wrote down its ip address. on the phone, kde connect app, i manually added the same ip as trusted and then it worked,
Comment 3 darkphoenix534 2022-03-13 05:22:40 UTC
(In reply to johnathan from comment #2)
> i found something. i i manually add the IP of the laptop as trusted that i
> get in its wifi from the phone hotpspot (192.168.121.215 in my case), kde
> connect immediately worked flawlessly.
> 
> i suspect there is a problem in the ip address recognition/dhcp whatever
> that kde connect gets confused. 
> 
> note: i turned on mobile hotspot, connect my laptop and wrote down its ip
> address. on the phone, kde connect app, i manually added the same ip as
> trusted and then it worked,

yes it works. but i am on a custom rom and in custom rom with each new session of Hotspot. The IP address gets changed, so its not feasible to keep adding ip address in kde app.
Comment 4 johnathan 2022-03-13 05:40:50 UTC
(In reply to darkphoenix534 from comment #3)
> (In reply to johnathan from comment #2)
> > i found something. i i manually add the IP of the laptop as trusted that i
> > get in its wifi from the phone hotpspot (192.168.121.215 in my case), kde
> > connect immediately worked flawlessly.
> > 
> > i suspect there is a problem in the ip address recognition/dhcp whatever
> > that kde connect gets confused. 
> > 
> > note: i turned on mobile hotspot, connect my laptop and wrote down its ip
> > address. on the phone, kde connect app, i manually added the same ip as
> > trusted and then it worked,
> 
> yes it works. but i am on a custom rom and in custom rom with each new
> session of Hotspot. The IP address gets changed, so its not feasible to keep
> adding ip address in kde app.

oh yes. since i added the last comment, i saw the same problem happening again. turns out my stock android 11 motorola does the same. it had changed the IP address of the laptop to 192.168.166.215 and hence it was failing. i changed that to updated ip in kde connect and now its working again but i agree, this is a terrible workaround because dynamic ip is the norm and we should expect kde connect to understand that, dunno why its happening
Comment 5 roxov65293 2022-05-31 05:28:17 UTC
KDE Connect on Android states that since I'm not connected to a Wi-Fi network, I will not see available devices. I wish it would check for available devices when wireless hotspot is turned on.
Turning on static IP is not an option on newer Android versions. I hope this will get fixed because the workaround is very time consuming.