×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Auto-reconnect to Home Wifi

  • Posts: 124
  • Thank you received: 13
My stellarmate disconnects from local wifi few times a day, could be million reason why and I think best solution woukd be for stellarmate try to reconnect to home wifi.

Now on windows I would write a script if hotspot active turn of adapter and turn it back on.

How can I do periodically check and reconnect on stellarmate ?
6 months 2 weeks ago #96436

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

  • Posts: 124
  • Thank you received: 13

Replied by Outta on topic Auto-reconnect to Home Wifi

I tried with this script but to no luck

#!/bin/bash

# Name of the desired WiFi network
WIFI_NAME="MyWifi"

# Check if already connected to the desired WiFi
connected=$(nmcli -t -f active,ssid dev wifi | grep "^yes:$WIFI_NAME")

# If not connected, try connecting
if [ -z "$connected" ]; then
nmcli d wifi connect "$WIFI_NAME"
fi

chmod
crontab -e
*/10 * * * * */10 * * * * /home/stellarmate/connect_to_wifi.sh
Last edit: 6 months 1 week ago by Outta.
6 months 1 week ago #96481

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

  • Posts: 15
  • Thank you received: 1

Replied by Salman on topic Auto-reconnect to Home Wifi

Hello,
We have an API call in SM in the Web manager.
"stellarmate.local/api/system/configure_wifi" (i.e stellarmate.local is the hostname ).
This POST request accepts the payload with includes payload {ssid: WIFI_NAME, psk: PASSWORD}
and then
"stellarmate.local/api//system/select_wifi" to activate the WIFI

This will connect to the desired Wi-Fi in SM.

Please let us know if any issue is occured.
6 months 1 week ago #96504

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

Time to create page: 0.386 seconds