More
referral
Increase your income with Hive. Invite your friends and earn real cryptocurrency!

Rig Lost WiFI connection and could not reconnect again automatically

How to resolve subject problem.
My rig is connected through wifi with internet. Due to some reason it lost connection but could not reconnected again automatically like windows. Manually I restarted rig and now its connected again.
I don’t know much about linux . .
Any help would be appreciated to resolve this issue.

1 Like

Me too… any luck with solution

I used ethernet to USB adapter and it works fine now . . .

Thx…ive got mine working on a usb wifi dongle. Seems to be ok now

Have the same problem. I’m using the builtin wifi on the motherboard. It connects fine on boot, but should the wifi fail, it is unable to reconnect.

I have configured these files

/etc/wpa_supplicant/wpa_supplicant.conf
/etc/network/interfaces.d/wlan0

I have the following for /hive-config/network/30-wireless.network

[Match]                                                                                                                                                 
Name=w*                                                                                                                                                 
                                                                                                                                                        
[Network]                                                                                                                                               
DHCP=yes                                                                                                                                                                                                                                                                               
DNS=8.8.8.8                                                                                                                                             
                                                                                                                                                        
[DHCP]                                                                                                                                                  
ClientIdentifier=mac                                                                                                                                    
RouteMetric=20

could there be something wrong in one of the other files in /etc/network/? Maybe something that isn’t compatible with onboard wifi?

Just saw this

systemctl status networking.service

● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)                                                             
   Active: failed (Result: exit-code) since Sun 2022-10-16 13:31:01 CDT; 1h 50min ago
     Docs: man:interfaces(5)                                                                                                                            
  Process: 599 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 590 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm sett
 Main PID: 599 (code=exited, status=1/FAILURE)                                                                                                          
                                                                                                                                                        
Oct 16 13:31:01 hive670 wpa_supplicant[679]: rfkill: Cannot get wiphy information                                                                       
Oct 16 13:31:01 hive670 wpa_supplicant[679]: Could not read interface wlan0 flags: No such device
Oct 16 13:31:01 hive670 wpa_supplicant[679]: WEXT: Could not set interface 'wlan0' UP
Oct 16 13:31:01 hive670 wpa_supplicant[679]: wlan0: Failed to initialize driver interface
Oct 16 13:31:01 hive670 ifup[599]: /etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot create /dev/stderr: No su
Oct 16 13:31:01 hive670 ifup[599]: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1                                          
Oct 16 13:31:01 hive670 ifup[599]: Failed to bring up wlan0.                                                                                            
Oct 16 13:31:01 hive670 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE                                              
Oct 16 13:31:01 hive670 systemd[1]: networking.service: Failed with result 'exit-code'.                                                                 
Oct 16 13:31:01 hive670 systemd[1]: Failed to start Raise network interfaces.

at least this one is working

systemctl status wpa_supplicant

● wpa_supplicant.service - WPA supplicant
   Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; enabled; vendor preset: enabled)                                                         
   Active: active (running) since Sun 2022-10-16 13:31:01 CDT; 1h 52min ago
 Main PID: 511 (wpa_supplicant)                                                                                                                         
    Tasks: 1 (limit: 4915)                                                                                                                              
   CGroup: /system.slice/wpa_supplicant.service                                                                                                         
           └─511 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant                                                                                      
                                                                                                                                                        
Oct 16 13:31:01 hive670 systemd[1]: Starting WPA supplicant...                                                                                          
Oct 16 13:31:01 hive670 systemd[1]: Started WPA supplicant.                                                                                             
Oct 16 13:31:01 hive670 wpa_supplicant[511]: Successfully initialized wpa_supplicant

it should try to reconnect every 60 seconds or so. you can set a hashrate watchdog to reboot if it cant reconnect though.

doesn’t do it. I had periods of about 30m, after which I had to restart

I could add a script that checks for the wlan0 state, and try to reconnect, but hive should do this by itself.

If I boot, wifi has no issues. However, if it gets disconnected, it doesn’t know how to reconnect.

Not sure I want the rig to reboot if the network goes down. Sometimes it is an exterior issue (isp, modem, etc.) and the network is fine. The rig would be rebooting for a while if the problem isn’t local

Also my AP isn’t great and would love to restart it once a week, without having my rig restart because the AP was out.

Wouldn’t rebooting and fixing the internet be better than not rebooting and not regaining internet? If you’re having so many network issues I would upgrade your ap and wiring and such.

works well enough for most cases. However, my point was that the rig should be capable of reconnecting by itself. Even my old phone can do that and would presume windoze can do it too. Rebooting shouldn’t be needed to regain wifi, especially since there is already a watchdog routine that should check for that.

Besides, the same behavior happened with the other ap, which is better behaved. Serendipitously, we just had the power flicker. Even stranger the ap went down, but the rig didn’t! Alas, it lost the wifi and had to reset :frowning:

Using this script seems to work.

@keaton_hiveon

The script to reconnect works (see below for one changed for hive). Added a line to be run through crontab. Though I’m confused whether to use crontab -e or edit /hive/etc/crontab.root. I did both lol

However, the system is getting confused about wlan0. At boot, it can’t find it. Either it has a different name and then gets renamed, or it takes a while to come online. So something at a lower level than I want to mess with.

This affects networking.service, thus slowing down the boot process. Since the network interface isn’t being found, the system waits for the network (systemd-networkd-wait-online.service) and that can add a couple of minutes. It also affects resolvconf-pull-resolved.service

Can you also pass this on to the devs? This should solve the problem of people not reconnecting, and hopefully, they find a way to speed up the boot

systemctl status networking.service                                                                                                   
● networking.service - Raise network interfaces                                                                                                       
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)                                                           
   Active: failed (Result: exit-code) since Wed 2022-10-19 16:13:40 CDT; 23min ago                                                                    
     Docs: man:interfaces(5)                                                                                                                          
  Process: 623 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 614 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm se
 Main PID: 623 (code=exited, status=1/FAILURE)                                                                                                        


hive670 wpa_supplicant[705]: rfkill: Cannot get wiphy information                                                                     
hive670 wpa_supplicant[705]: Could not read interface wlan0 flags: No such device
hive670 wpa_supplicant[705]: WEXT: Could not set interface 'wlan0' UP
hive670 wpa_supplicant[705]: wlan0: Failed to initialize driver interface
hive670 ifup[623]: /etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot create /dev/stderr: No 
hive670 ifup[623]: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1                                        
hive670 ifup[623]: Failed to bring up wlan0.                                                                                          
hive670 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE                                            
hive670 systemd[1]: networking.service: Failed with result 'exit-code'.                                                               
hive670 systemd[1]: Failed to start Raise network interfaces.
root@hive670:/# ifquery --read-environment --list --exclude=lo                                                                                        
wlan0                                                                                                                                                 
root@hive670:/# systemctl restart networking.service                                                                                                  
root@hive670:/# systemctl status networking.service                                                                                                   
● networking.service - Raise network interfaces                                                                                                       
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)                                                           
   Active: active (exited) since Wed 2022-10-19 16:38:15 CDT; 5s ago                                                                                  
     Docs: man:interfaces(5)                                                                                                                          
  Process: 29276 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)                                                           
  Process: 29273 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm 
 Main PID: 29276 (code=exited, status=0/SUCCESS)                                                                                                      


hive670 systemd[1]: Starting Raise network interfaces...                                                                              
hive670 systemd[1]: Started Raise network interfaces.
 systemd-networkd-wait-online.service - Wait for Network to be Configured
   Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; enabled; vendor preset: enabled)                                         
   Active: failed (Result: exit-code) since Wed 2022-10-19 16:50:09 CDT; 3min 2s ago
     Docs: man:systemd-networkd-wait-online.service(8)                                                                                                
  Process: 624 ExecStart=/lib/systemd/systemd-networkd-wait-online (code=exited, status=1/FAILURE)
 Main PID: 624 (code=exited, status=1/FAILURE)                                                                                                        
                                                                                                                                                      
hive670 systemd-networkd-wait-online[624]: ignoring: lo                                                                               
hive670 systemd-networkd-wait-online[624]: ignoring: lo                                                                               
hive670 systemd-networkd-wait-online[624]: ignoring: lo                                                                               
hive670 systemd-networkd-wait-online[624]: ignoring: lo                                                                               
hive670 systemd-networkd-wait-online[624]: managing: wlan0                                                                            
hive670 systemd-networkd-wait-online[624]: ignoring: lo                                                                               
hive670 systemd-networkd-wait-online[624]: Event loop failed: Connection timed out
hive670 systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE                          
hive670 systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.                                             
hive670 systemd[1]: Failed to start Wait for Network to be Configured.
systemctl status resolvconf-pull-resolved.service                                                                                     
● resolvconf-pull-resolved.service                                                                                                                    
   Loaded: loaded (/lib/systemd/system/resolvconf-pull-resolved.service; static; vendor preset: enabled)                                              
   Active: failed (Result: start-limit-hit) since Wed 2022-10-19 16:48:16 CDT; 23min ago                                                              
  Process: 836 ExecStart=/bin/sh -c cat /run/systemd/resolve/stub-resolv.conf | grep -v edns0 | /sbin/resolvconf -a systemd-resolved (code=exited, sta
 Main PID: 836 (code=exited, status=0/SUCCESS)                                                                                                        


hive670 systemd[1]: Starting resolvconf-pull-resolved.service...                                                                      
hive670 systemd[1]: Started resolvconf-pull-resolved.service.                                                                         
hive670 systemd[1]: resolvconf-pull-resolved.service: Start request repeated too quickly.                                             
hive670 systemd[1]: resolvconf-pull-resolved.service: Failed with result 'start-limit-hit'.                                           
hive670 systemd[1]: Failed to start resolvconf-pull-resolved.service.
hive670 systemd[1]: resolvconf-pull-resolved.service: Start request repeated too quickly.                                             
hive670 systemd[1]: resolvconf-pull-resolved.service: Failed with result 'start-limit-hit'.                                           
hive670 systemd[1]: Failed to start resolvconf-pull-resolved.service.

root@hive670:/# systemctl restart resolvconf-pull-resolved.service                                                                                    
root@hive670:/# systemctl status resolvconf-pull-resolved.service                                                                                     
● resolvconf-pull-resolved.service                                                                                                                    
   Loaded: loaded (/lib/systemd/system/resolvconf-pull-resolved.service; static; vendor preset: enabled)                                              
   Active: inactive (dead) since Wed 2022-10-19 17:13:02 CDT; 2s ago                                                                                  
  Process: 4961 ExecStart=/bin/sh -c cat /run/systemd/resolve/stub-resolv.conf | grep -v edns0 | /sbin/resolvconf -a systemd-resolved (code=exited, st
 Main PID: 4961 (code=exited, status=0/SUCCESS)                                                                                                       


hive670 systemd[1]: Starting resolvconf-pull-resolved.service...                                                                      
hive670 systemd[1]: Started resolvconf-pull-resolved.service.                                                                         
lshw -C network                                                                                                                       
  *-network                                                                                                                                           
       description: Wireless interface                                                                                                                
       product: QCA6174 802.11ac Wireless Network Adapter                                                                                             
       vendor: Qualcomm Atheros                                                                                                                       
       physical id: 0                                                                                                                                 
       bus info: pci@00x:x:00.0                                                                                                                     
       logical name: wlan0                                                                                                                            
       version: 32                                                                                                                                    
       serial: x:x:x:x:x:23                                                                                                                      
       width: 64 bits                                                                                                                                 
       clock: 33MHz                                                                                                                                   
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless                                                                 
       configuration: broadcast=yes driver=ath10k_pci driverversion=5.10.0-hiveos firmware=WLAN.RM.4.4.1-00079-QCARMSWPZ-1 ip=192.168.x.x latency=0
 link=yes multicast=yes wireless=IEEE 802.11                                                                                                          
       resources: irq:149 memory:df200000-df3fffff                                                                                                    
  *-network                                                                                                                                           
       description: Ethernet interface                                                                                                                
       product: Ethernet Connection (2) I219-V                                                                                                        
       vendor: Intel                                                                                                                                  
       physical id: 1f.6                                                                                                                              
       bus info: pci@00x:x:1f.6                                                                                                                     
       logical name: eth0                                                                                                                             
       version: 00                                                                                                                                    
       serial: x:x:x:x:x:9b                                                                                                                      
       capacity: 1Gbit/s                                                                                                                              
       width: 32 bits                                                                                                                                 
       clock: 33MHz                                                                                                                                   
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation                            
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=5.10.0-hiveos firmware=0.2-4 latency=0 link=no multicast=yes port=t
wisted pair                                                                                                                                           
       resources: irq:143 memory:d7100000-d711ffff                                                                                                    

the script from before with some changes for hive

#!/bin/bash                                                                                                                                           
SSID=$(/sbin/iwgetid --raw)                                                                                                                           
                                                                                                                                                      
if [ -z "$SSID" ]                                                                                                                                     
then                                                                                                                                                  
     echo "`date -Is` WiFi interface is down, trying to reconnect" >> /var/log/wifi-log.txt                                                           
     sudo ifconfig wlan0 down                                                                                                                         
     sleep 30                                                                                                                                         
     sudo ifconfig wlan0 up                                                                                                                           
fi                                                                                                                                                    
                                                                                                                                                      
echo "WiFi check finished"                                                                                                                            

This topic was automatically closed 416 days after the last reply. New replies are no longer allowed.