rsora / luncher

lunch proposals
0 stars 1 forks source link

Restarting WiFi? #21

Open edent opened 2 years ago

edent commented 2 years ago

Hello! I'm glad you found my tutorial useful ☺

I haven't noticed any memory leaks - but once in a while the Nook loses Wi-Fi and doesn't reconnect automatically.

I saw you had a crontab for rebooting - do you know of any command to periodically restart the network connection?

Thanks!

rsora commented 2 years ago

Hi @edent !

Thank you very very very much for your blogpost and material! I'm having a lot of fun on this project since I saw your project :+1:

Unfortunately for me, after 2/3 weeks of uptime, my Nook literally falls apart, and yes it starts losing wi-fi as well...

Probably after the rooting, I exaggerated installing too much apps and mods :smile_cat: so the hard reboot sounded like a quick and dirty solution.

I didn't try specifically to restart the wifi, but I guess, being a linux machine in the end, I should be able to find something useful, once I come back from vacation!

I saw during my researches, that someone tried to configure for an ad-hoc networking using wpa_supplicant So I guess some way to control the wifi from the command line is possible for sure!

Stay tuned and happy coding!

rsora commented 2 years ago

@edent

wandering in the internet I found out that my nook has a couple of handy tools to restart the wifi, probably the rooting process i followed somehow installed them

  1. [tested: ok] svc
$ svc
Available commands:
    help     Show information about the subcommands
    power    Control the power manager
    data     Control mobile data connectivity
    wifi     Control the Wi-Fi manager
$ svc wifi
Control the Wi-Fi manager

usage: svc wifi [enable|disable]
         Turn Wi-Fi on or off.

       svc wifi prefer
          Set Wi-Fi as the preferred data network

using

svc wifi disable
  1. [tested: error] rfkill unfortunately gives me back:
    
    $ rfkill block all                                                                                                                                                                            
    rfkill: /dev/rfkill: No such file or directory

4. [tested: ok] `ifconfig` 
using
```bash
ifconfig tiwlan0 down

I suppose you can create a small script with the respective "enable" command to implement a wifi restart! Let me know if those command above work for you!