No internet connection
  1. Home
  2. Technical Support

Switching to/from access point mode

By @csetera
    2025-04-12 00:58:50.611Z

    I'm trying to use TinyPilot to administer, in part, my IPFire firewall. When my network is working properly, it is ideal to have TinyPilot acting as a normal client/service on my network. However, if my firewall (and router) are down, that starts to be a problem. I was having problems with access point mode that went away when I went to normal client/service mode. Long story short is there a way to convert to access point mode if the firewall/router is not working properly?

    Thanks!
    Craig

    • 5 replies
    1. Japhiel @japhiel
        2025-04-16 05:32:44.624Z

        Hi Craig, thanks for your access point question.

        TinyPilot doesn't have an automated way to switch to access point mode if it doesn't have a Wi-Fi connection. However, this might be possible to automate with a cron job and a custom script.

        For example, a cron job would run this custom script every minute or so to check whether your TinyPilot can ping your firewall/router, if there's no connection, the script would run TinyPilot's enable-wifi-ap script (detailed in our Wi-Fi AP FAQ) to enable the access point. This should have the behavior you're looking for.

        I was having problems with access point mode that went away when I went to normal client/service mode.

        Could you share some more details on the problems you had here?

        Please let me know if you have any questions.

        1. C@csetera
            2025-04-16 14:11:05.097Z

            Thanks for your response. What I was seeing was that the video image would show the "broken image" graphic after a reboot while in access point mode. Switching it back to standard client mode would clear that up.

            I did take a look at the scripts involved in changing modes. I had considered how hard it would be to actually be able to switch (via GPIO) from one mode to the other. It would be really cool to turn the device off, flip a switch and turn it back on in the other mode. However, looking at the two scripts, it didn't look particularly possible given that it seems to be installing packages and such. Maybe I'm misunderstanding what is happening in those scripts, but I guess I'm not sure if there would be issues in cron if I needed to switch and the network is down?

            TinyPilot is very well done. If I could have stable access point mode, I imagine I would use that most of the time.

            Thanks again,
            Craig

            1. Japhiel @japhiel
                2025-04-18 06:35:56.080Z

                Hi Craig, Thanks for your patience. We’ve been able to reproduce the issue you’ve reported with the video stream in access point (AP) mode. It seems that after running the enable-wifi-ap script and rebooting, TinyPilot is failing to start its streaming service, which is causing the "broken image" graphic to appear.

                As a temporary workaround, you can manually start the service using the following command:

                sudo service ustreamer start

                This should restore the video stream while we continue to investigate the issue further.

                We’ve already opened an internal ticket to develop a fix for this, and we’ll keep you updated on any progress. In the meantime, we appreciate your understanding as we work on resolving this bug.

                The enable-wifi-ap script installs packages and makes system changes, but it's safe to run manually as part of setup since that's what it's designed for. It wasn't built with automation in mind, so running it through a cron job or background script could cause unexpected behavior if the system isn't in the right state.

                For now, we recommend using it manually. Implementing automatic switching would require more development and testing to ensure stability. It’s something we’ll definitely review as we continue to improve TinyPilot, especially if there’s growing demand for this feature.

                I hope that helps! Let me know if you have further questions.

                1. C@csetera
                    2025-04-18 23:46:57.363Z

                    Thanks!

                    With this workaround, I can leave TinyPilot in AP mode 99% of the time and switch when not working on my firewall.

                    Craig

                    1. Japhiel @japhiel
                        2025-04-21 06:52:51.699Z

                        Glad to hear that works for your setup, Craig!

                        If anything else comes up or if you run into more issues while switching modes, feel free to reach out. Always happy to help.