×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Delay hotspot mode for wifi

  • Posts: 8
  • Thank you received: 2
Hi,

I have a setup where all my equipment is on the rooftop and I control it from my study through a combination of wired and wireless LAN. The whole setup is controlled through a Astroberry+rpi and it works brilliantly.

I use a wifi switch to turn on power to all my equipment in the roof in one go. The problem is that the wifi router in my roof takes about 15 seconds to make the wifi network available. The Astroberry/rpi does not wait for this network. Since no configured network is present, it switches to the hotspot mode and makes it impossible to access it from my study, 3 floors below. To solve this problem, I manually switch on the rpi a few seconds after the wifi router is tuned on. 

Is there a software based solution for this? Can we delay the switch to hotspot and continue to wait for the wifi network to be available? I do not want to disable hotspot completely as I think is incredibly useful to troubleshoot or when I use it in a external dark site. The other solution I am thinking about is a delayed on electrical switch for the rpi. Hopefully there will be a software solution for this.

Regards,
Arun
 
The following user(s) said Thank You: Francisco Bitto
10 months 3 weeks ago #79285

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 49

Replied by Gene N on topic Delay hotspot mode for wifi

Hi Arun,

Below is info for a quick and dirty way to delay just about everything on the PI coming up.

Add a one line change to:
    /lib/systemd/system/NetworkManager.service

Just before the line
   ExecStart=/usr/sbin/NetworkManager --no-daemon

Add the line, where XX is the number of seconds to delay
   ExecStartPre=/bin/sleep XX

So it looks like:
  ExecStartPre=/bin/sleep XX
  ExecStart=/usr/sbin/NetworkManager --no-daemon


Then let system know things changed

  sudo systemctl daemon-reload

The above will stall the startup configuring the network


If the configured external router cannot be connected, the hotspot will take over after the timeout

Gene
The following user(s) said Thank You: Arun Venkataswamy
10 months 3 weeks ago #79322

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 2
Thanks! Will check this and get back to you.

Regards,
Arun
10 months 2 weeks ago #79337

Please Log in or Create an account to join the conversation.

Moderators: Radek Kaczorek
Time to create page: 0.511 seconds