MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Pi loses WiFi connection after a few hours

    Scheduled Pinned Locked Moved Troubleshooting
    rasberry pi 4wificonnection
    9 Posts 5 Posters 3.7k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MajorC Project Sponsor
      last edited by

      Hello,
      my Raspberry Pi 4 (4GB) seems to lose the WiFi connection after a few hours (I can’t say exactly yet).

      Whereby this is not correct. The device still has the correct IP address. In the WiFi menu it is connected with the correct SSID. But I can’t ping a device in the network anymore. Also the Raspberry is not reachable from the network.

      Rebooting the Raspberry solves the problem immediately.

      Power Management: off is already set. What else can I do?

      Thanks

      1 Reply Last reply Reply Quote 0
      • swvalentiS Offline
        swvalenti Project Sponsor
        last edited by

        Linux script that will check if the wifi on the pi is connected and reconnect if needed. This script is run from the pi. Typically you would set this up as a cron job that would run periodically (e.g. every 5 minutes). If the script detected the wifi was not connected it would attempt to reconnect.

        https://gist.github.com/mharizanov/5325450

        1 Reply Last reply Reply Quote 0
        • M Offline
          MajorC Project Sponsor
          last edited by

          Thank you, at the moment I would like to find the problem. There are a couple of modules on the MM that are using the internet connection regularly. So there should be no need to disconnect.

          1 Reply Last reply Reply Quote 0
          • H Offline
            heretodomagic
            last edited by

            @MajorC said in Pi loses WiFi connection after a few hours:

            Rebooting the Raspberry solves the problem immediately

            I have the same issue except rebooting doesn’t correct the issue

            1 Reply Last reply Reply Quote 0
            • M Offline
              MajorC Project Sponsor
              last edited by

              At the moment I am doing long term test. A have a new SD Card, with online running raspberry os on it. So far, after 24h the pi runs smoothly and the Wi-Fi is still working.
              Tomorrow I will install MM2 on the same card, to see what’s going on.

              What I need to know is, where to look if after installing MM2 the problems start?

              1 Reply Last reply Reply Quote 0
              • jca2112J Offline
                jca2112
                last edited by

                I wanted to revive this topic, as I am having the same issue.

                After a day or two, the Raspberry Pi 3 B+ seems to lose it’s connection. I’m not able to connect to it via SSH, and the Weather module stops updating temp/forecast/etc. The news headline module and calendar module seem to continue to update, however.

                This problem goes away (temporarily) after a reboot.

                Looking at the error logs, I only see this:

                [ERROR] fatal: unable to access 'https://github.com/MichMich/MagicMirror.git/': Could not resolve host: github.com
                

                I’ve made sure the Pi is updated, and I’m able to ping sites (like github) after the reboot.

                Any ideas? I haven’t had any problems until the past month or two.

                S 1 Reply Last reply Reply Quote 0
                • jca2112J Offline
                  jca2112
                  last edited by

                  This Github post seems to describe the same (or similar) issue:

                  https://github.com/MichMich/MagicMirror/issues/218

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @jca2112
                    last edited by

                    @jca2112 are you running pihole as an advert filter? seem to see this a lot with pihole servers…
                    i had a system that would lose connection almost daily… (over a years time)

                    finally installed a different network system… google wifi vs router and extenders…
                    wifi hub in same location as one of the prior extenders
                    haven’t had it fail since

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    jca2112J 1 Reply Last reply Reply Quote 0
                    • jca2112J Offline
                      jca2112 @sdetweil
                      last edited by

                      @sdetweil said in Pi loses WiFi connection after a few hours:

                      @jca2112 are you running pihole as an advert filter? seem to see this a lot with pihole servers…

                      Yes, I am running a pihole – thanks for suggesting that. (I should have mentioned it.) I’ve not had any issues with the magicmirror + pihole setup in the past, but just to make sure I whitelisted the magicmirror so it would bypass the pihole altogether. It didn’t seem to affect the problem, so I’m not sure that it is a factor.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy