[Solved] Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
Linxer
Level 1
Level 1
Posts: 45
Joined: Mon Feb 20, 2023 3:38 am

[Solved] Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by Linxer »

Greetings all.

I am having a recurring issue with using wifi in linux to stay connected to a hotspot when established by a smartphone. The phone in question is an iphone, standard settings, the linux version is mint 21.1 (64 bit) (although this happens on ANY other linux distro I try on different hardware even). The issue is that when wifi becomes available, I can connect to this hotspot successfully and browse for anywhere between 5-6 minutes. After that time is up, without fail, the connection to that hotspot drops, and no matter what I do, it will not allow me to reconnect to that specific hotspot, unless I reboot the linux. This has to be a common problem since it seems to happen on any distro; the only element being the same is the smart phone itself. USB tethering has not worked at all in the past, probably due to a missing driver or something. All things being the same, I'd rather get to the bottom of why this keeps happening and fix it. I have no other network issues to report with a standard wifi router or direct ethernet. Oh, and I did also test this on a friend's hotspot device; same issue, but the duration it lasted was more like 19 minutes before the failure occurred in the same circumstances.

Though I doubt anyone cares, I have had the exact same issue on other versions of linux, including mint 19.3 (32 bit), linux lite (32 bit), and Drauger linux (i forgot the version and it's been uninstalled anyway). I will focus on the 64 bit mint of course, since I am presently on that hardware. I hope there is a universal solution that works on other distros though. I have already fine-tuned my network adapter card to pickup and connect to all normal wifi routers (which was a pain in the neck), so I must be careful if the solution involves messing with that in anyway.

Since I know someone will ask, here is the output of the latest mint:

System:
Kernel: 5.15.0-60-generic x86_64 bits: 64 Desktop: Cinnamon 5.6.7
Distro: Linux Mint 21.1 Vera
Machine:
Type: Laptop System: HP product: HP Laptop 15-dw0xxx
v: Type1ProductConfigId serial: <filter>
Mobo: HP model: 85F5 v: 39.43 serial: <filter> UEFI: Insyde v: F.53
date: 10/15/2021
CPU:
Info: quad core model: Intel Pentium Silver N5030 bits: 64 type: MCP cache:
L2: 4 MiB
Speed (MHz): avg: 2858 min/max: 800/3100 cores: 1: 3078 2: 2786 3: 2786
4: 2785
Graphics:
Device-1: Intel GeminiLake [UHD Graphics 605] driver: i915 v: kernel
Device-2: Luxvisions Innotech HP TrueVision HD Camera type: USB
driver: uvcvideo
Display: server: X.Org v: 1.21.1.3 driver: X: loaded: modesetting
unloaded: fbdev,vesa gpu: i915 resolution: 1366x768~60Hz
OpenGL: renderer: Mesa Intel UHD Graphics 605 (GLK 3) v: 4.6 Mesa 22.2.5
Audio:
Device-1: Intel Celeron/Pentium Silver Processor High Definition Audio
driver: snd_hda_intel
Sound Server-1: ALSA v: k5.15.0-60-generic running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: yes
Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
driver: r8169
Device-2: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter
driver: rtw_8821ce
Drives:
Local Storage: total: 119.24 GiB used: 33.05 GiB (27.7%)
ID-1: /dev/sda vendor: Samsung model: MZNLH128HBHQ-000H1 size: 119.24 GiB
Message: No optical or floppy data found.
Last edited by Linxer on Wed Apr 03, 2024 2:24 pm, edited 1 time in total.
sleeper12
Level 21
Level 21
Posts: 14609
Joined: Thu May 25, 2017 3:22 pm

Re: Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by sleeper12 »

User avatar
AZgl1800
Level 20
Level 20
Posts: 11186
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by AZgl1800 »

I am having a bit of an issue understanding "exactly how" you are connecting to the iPhone's hotspot.

at 1st, it sounded like you connected a "laptop" direct to the phone's hotspot.

then a few sentences later, you say you don't want to reconfigure your WiFi router.

This makes me suspect you are NOT, always connecting direct to the cellphone's hotspot.
and if that is so, it is the WiFi router that is the problem, not Linux.

I have been using a cellphone hotspot with every version of Mint Cinnamon since LM17, and on a lot of different cellphones and different laptops, at least 5 of them IIRC.

I do not recall ever having a problem with the Hotspot disconnecting, unless the cellphone's signal is too weak.

However, I do remember that I used to have a Limited Data plan with Verizon, and they would shut the Hotspot off after about 5 minutes for me also..... that problem went away after I coughed up the $$$ to buy an Unlimited Data plan.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
AZgl1800
Level 20
Level 20
Posts: 11186
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by AZgl1800 »

I have two self contained T-Mobile hotspots that are "always on".
Those things will disconnect from the network very frequently, I have to reboot the darn things to get them to sync up with the cell-towers again.

it is very aggravating, no rhyme or reason as to why it happens, or when it will happen.

I bought a 3rd "hotspot' from T-Mobile to solve this, it is called a GATEWAY for "home internet", and has Unlimited data with it.... it will run for weeks and then disconnect, or it will run for a couple hours and disconnect....

sometimes, it reconnects to the global internet w/o me doing anything, other times, I have to power it off, wait ten minutes, and power it back up.

there are a host of variables involved when using the cellular internet, and it is nearly impossible to find out, exactly what or why they don't stay connected.

I have spent up to 12 hours ( in one trouble shooting session) working with T-Mobile's IT people trying to solve this, not one of them has found a solution.... or been able to tell me where the disconnect is.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Linxer
Level 1
Level 1
Posts: 45
Joined: Mon Feb 20, 2023 3:38 am

Re: Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by Linxer »

Oh my god I made a very long message and the site crashed so I'm not typing that all out again. Long story short, the issue looks like it is the iphone that is the issue. What is wrong I don't know. Works just fine if the laptop boots into windows and connects to it, but any other way I'm in linux I don't get long with that hotspot. I can't afford to phone hop for the 8th time now. Any suggestions?
Linxer
Level 1
Level 1
Posts: 45
Joined: Mon Feb 20, 2023 3:38 am

Re: Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by Linxer »

I have two self contained T-Mobile hotspots that are "always on".
My carrier is Tmobile too. Maybe they just suck.
Cant confirm just yet but it might be an issue with it being an iphone and not an android phone for me.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11186
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by AZgl1800 »

Linxer wrote: Thu Mar 28, 2024 8:27 pm Oh my god I made a very long message and the site crashed so I'm not typing that all out again. Long story short, the issue looks like it is the iphone that is the issue. What is wrong I don't know. Works just fine if the laptop boots into windows and connects to it, but any other way I'm in linux I don't get long with that hotspot. I can't afford to phone hop for the 8th time now. Any suggestions?

My carrier is Tmobile too. Maybe they just suck.
Cant confirm just yet but it might be an issue with it being an iphone and not an android phone for me.
uh,
T-Mobile has more coverage than the "other guys", and they have "more bandwidth" than the "other guys"

a case in point: just today, my son is trying to use Verizon Internet to do his company business ( he is never Off the Job, he is a manager, and has to work during vacations )

I was sitting in his truck ( office ) and trying to look at Facebook on my Verizon cellphone.
his laptop would not log into his company network, my cellphone would not open up pictures or messages to posts....

I went in the house, and brought out one of my 3 T-mobile hotspots, Boom!
both of us had instant internet at well over 35mbps, Facebook was running Full Speed,
and his Laptop immediately logged into his company Servers and he was up and running.

He is dumping Verizon and going T-Mobile.
this is the 3rd time, I have demonstrated to him, that T-Mobile beats the manure out of all the other guys.
3 times, means just now, last summer, and two summers ago...

here is T-Mobile tonight, not too shabby for living in a Cow pasture.

tm speed.jpg
as I type this, I am using the T-Mobile Gateway 5g...

as for typing stuff up,
I usually use XED and do my prose there, then copy paste to the forum.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Linxer
Level 1
Level 1
Posts: 45
Joined: Mon Feb 20, 2023 3:38 am

Re: Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by Linxer »

Well, that's why I said 'maybe.' I never had speed issues with my carrier before, except when connecting to the hotspot from my favorite android phone (which is only an issue because it will only connect via bluetooth). I become more convinced that this is an issue only affecting of all things, iphone users trying to hotspot. There must be something different about doing it with an iphone that messes things up in linux. It could be a security connection type thing, but my phone doesn't really allow me to determine the output on that. Playing around with it on the other end didn't help me much, but I will have more testing done Monday night. I want to connect to the hotspot again and immediately after run as many terminal commands to get network details as possible.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11186
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by AZgl1800 »

The previous speedtest I showed you was on the T-Mobile Gateway 5g connection.

I just now looked to see what channel I am using, it is on the little 2g Hotspot that I can carry in my shirt pocket, it is used for our Printers and WiFi global controlled home Honeywell Thermostat

not to shabby for a 2g connection tonight, it is 5:15 a.m. as I type this on Sunday morning, all of the kiddies are asleep watching pipe-dreams :lol:

butterflies 2g.jpg
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
AZgl1800
Level 20
Level 20
Posts: 11186
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by AZgl1800 »

here is the Honeywell Thermostat, I can control the house temperature from anywhere in the world.

Very convenient for Vacations, we raise it to 85*F when away from home, then the night before we return home, we set it back to 71*F again so the house stabilizes by the time we get back home.


stat on 2g.jpg
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Linxer
Level 1
Level 1
Posts: 45
Joined: Mon Feb 20, 2023 3:38 am

Re: Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by Linxer »

Strange... Very strange.

Ok, so as I said I would do, I've been running more tests on the hostpot, using the iwconfig code as much as possible.

When hotspot is working normally, here is the output:

lo no wireless extensions.

eno1 no wireless extensions.

wlo1 IEEE 802.11 ESSID:"Stirina\xE2\x80\x99s iPhone"
Mode:Managed Frequency:2.437 GHz Access Point: F6:E5:4D:01:D9:B6
Bit Rate=65 Mb/s Tx-Power=30 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=70/70 Signal level=-40 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:1 Missed beacon:0

____________

When the connection perma-drops, here is the output:

wlo1 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off

____________

Here is where things have gotten strange.
I finally found the direct connection settings in the network manager. In 'Network Connections', not Network Settings, I found a list of established connections (history of and listed by priority). Upon entering the configuration menu, I found that my network appeared to be connected under normal settings: WPA & WPA2 personal, connection type is listed as "client", and other defaults. So, I started messing around in here and breaking things, cause why not?

There was a setting to turn 'client' to 'hotspot' which totally removed its visibility from the network entirely; reverted it back. I messed with the security settings some, nothing useful, reverted. Then I went and set IPV6 to 'Disabled.' This didn't fix the issue, but for more than 30 seconds (connected to it again before dropping on its own) but the iwconfig had a slightly different output.
Output:

wlo1 IEEE 802.11 ESSID:"Stirina\xE2\x80\x99s iPhone"
Mode:Managed Frequency:2.437 GHz Access Point: B6:D0:1D:E5:AF:4E
Bit Rate=65 Mb/s Tx-Power=30 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=70/70 Signal level=-40 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:1 Invalid misc:0 Missed beacon:0

__________

I did not revert the changes I made for IPV6, figured that phone would be too old to make proper use of it anyway. Next, I went into IPV4 (which is set to DHCP Automatic), and clicked the checkbox below that said "Require IPV4 to complete this connection." Network visibility died again and never showed up, so I unchecked that box, which also changed the IPV4 mode to "Shared to other computers." I unchecked the box and set the mode back to DHCP Automatic, network showed up and allowed me to connect again...

It has been 30+ minutes since, and the connection has yet to drop, an all time high record and defiantly what I wanted.

I won't say it's solved yet cause I don't know if it will fail again in the near future, if say I reboot, try again next day only to have issues again, even though things are looking up for now.

I will say that I honestly have no idea what I did. I would appreciate if anyone can understand what I broke/fixed and why it worked. The only setting that has totally not been reverted was IPV6 (kept disabled, though this didn't work the first time I did it). I will be conducting a similar test on another linux OS to see what happens, see if I can reproduce this result. That will take a few days.
Linxer
Level 1
Level 1
Posts: 45
Joined: Mon Feb 20, 2023 3:38 am

Re: [Solved] Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by Linxer »

So the solution is reproducable on other distros. Disabling IPV6 protocals on this specific network connection seems to stabilize the issue. On mint it is still a little buggy in that I may have to disconnect and refresh at least once every so often, but even then it is way better than where I was, and mint wasn't exactly the target os I wanted to do this on anyway.

I will say I don't know why the solution worked, just that it worked for me. Maybe it's got something to do with the carrier or the phone itself, but it and linux does not handle IPV6 very well, for hotspots anyway.
sanjeev14
Level 1
Level 1
Posts: 2
Joined: Tue Apr 16, 2024 1:20 am

Re: [Solved] Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by sanjeev14 »

found any other soultion? Im having the same exact problem
RIH
Level 9
Level 9
Posts: 2910
Joined: Sat Aug 22, 2015 3:47 am

Re: [Solved] Wifi connection to Smartphone Hotspot always fails after 5 minutes.

Post by RIH »

sanjeev14 wrote: Tue Apr 16, 2024 1:56 am found any other soultion? Im having the same exact problem
Then please start a new thread of your own, rather than hijacking this one.
Don't forget that if you don't give any details that you are highly unlikely to get any meaningful replies..
Image
Post Reply

Return to “Networking”