Custom Script to Restart Wireless Services (if dropped)

Discussion in 'Tomato Firmware' started by tdotnico, Feb 1, 2019.

  1. tdotnico

    tdotnico New Member Member

    Hi there everyone,

    I'm relatively new to Tomato and after configuring my routers (R7000 both at home and at work), I have noticed that the wifi, more specifically the 5ghz AP constantly drops and it does not restart itself.

    Is there a custom script that I can set to scan every 5 minutes, and if either AP has dropped have it restart automatically?

    By the way, I am using Freshtomato firmware 2019.1.015 -beta K26ARM USB AIO-64K based on Based on Tomato Firmware v1.28. I know it is BETA but I have used previous ones and I still had the same issue with AP's dropping and unless I restart them myself nothing happens.

    Any help would be much appreciated, whether I have to add them to the scheduler custom fields or in the main console.

    Thanks!
     
  2. rs232

    rs232 Network Guru Member


    Yes there is, but by experience I can tell you there's something wrong with your router config.
    Can I suggest you clear the NVRAM? This often resolve the issue.
    Also make sure you use a country (in Advance/Wirelss) sully supports 5GHz e.g. I use Singapore

    /sbin/radio on|off if the answer to your question any ways.
     
    Last edited: Feb 1, 2019
  3. ruggerof

    ruggerof Network Guru Member

    What do you mean by "drop"?

    I agree with @rs232, wipe your NVRAM and config your R7000 again. There shouldn't be any reason for the "drops" you are experiencing, my R7000 and AC68U 5GHz SSID's are rock solid.

    If you want to switch the 5GHz radio off:
    If you want to switch the 5Ghz radio on:
    If you want to restart the wireless service (both 2.4 GHz and 5 Ghz radios will turn off and then on as the wireless service is killed and then called again)
     
  4. tdotnico

    tdotnico New Member Member


    Thanks for your response and help but I have been struggling with the WIFI dropping for a while. It started when I was using the stock firmware from netgear, then I upgraded to tomato (latest one available), and even though it was pretty stable (wifi, issue at hand), I would not get the speeds I should get. I have Bell Fiber in Ontario and my speeds should be 500/500 mbps.

    Anyways, freshtomato gives me the lowest latency and the max speed, but I still have problems with my WIFI, it's driving me crazy. I have clear nvram every time I upgrade, setup my VLAN, my PPPoE settings, wifi, etc. Everything fresh, but wifi still drops randomly. Say once every other day.
     
  5. tdotnico

    tdotnico New Member Member


    Thank you so much for the help. But if I add these to the scheduler, they are simply a scheduled action. How Can I turn this script into a conditional one (if), say something like if eth0 or eth1 off, restart?
     
  6. Sean B.

    Sean B. Network Guru Member

    This depends on how exactly the wifi is failing and what can be tested via the router itself reliably every time to know it has. Have you checked anything on the router via wired connection while the wifi issue is present? IE: checked the system log, or checked to see if the wireless interfaces are still up via ifconfig etc? If the symptoms are only seen on the client side, then there's really no good way to code a check for it on the router. About the only thing you could do in that instance is set a static IP address for a wireless client of which is left connected to the wifi 24/7, and code a scheduled ping test against that IP address of which failure to receive a response triggers a restart of wireless services.
     
    Last edited: Feb 4, 2019
  7. tdotnico

    tdotnico New Member Member


    Hi, thank you for your response. That is exactly what I had in mind, though I have very limited knowledge in coding and don't know exactly how write a script for that. My issue is mainly with 5ghz band, though sometimes the router would crash for whatever reason (hard to read and understand what exactly happens in the log file), all I can tell you is that I saw an orange LED light up on the router physically and to me that is the orange light of death. I have to physically restart it as even accessing it via Ethernet/wireless does not work.

    I've been thinking about upgrading to a new router, I just have a very bitter taste about this whole Tomato firmware experience and as some other users have suggested, it's very odd for these issues to happen, I think it's due to the router itself, because I need to have a router that can keep up 24/7 with wifi services and acces to the internet.

    Could it have anything to do wit the fact that I'm using it to bypass my bell modem? I've got their ONT unit to get Fiber, but then they I set up tomato with VLAN ID 35 to get my internet straight from the ONT fiber modem.
     
  8. Sean B.

    Sean B. Network Guru Member

    Aside from the fact your wifi access fails intermittently, and an LED illuminates on the router, I have no actual information on what's occurring and therefor cannot give any opinion on what's causing it. However, I would suggest either flashing back to stock firmware, or to a known stable build of Tomato. Such as the outdated but proven Toastman builds or pre multiwan Shibby. If the issue remains, then it's reasonable to say there's a hardware issue with the router.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice