Setup AP + STA Mode -- HOWTO keep STA after network restart

jperkins
 
Posts: 3
Joined: Thu Jan 11, 2018 12:50 pm

Setup AP + STA Mode -- HOWTO keep STA after network restart

Mon Jan 15, 2018 9:37 am

Hello
Apparently upon boot the AP will not start if the STA mode is enabled. This is addressed here http://vocore.io/v2u.html ( section Setup AP + STA Mode). However if you restart the network then the STA is no longer up and you lose the outgoing connection. Here is a different solution.

The current solution from http://vocore.io/v2u.html utilizes /etc/rc.local and leaves the STA disabled for the next reboot . Step 3 is listed here:
Code: Select all
3. set sta to disabled, so next boot if your hotspot disappear, you still able to connect to VoCore2.
note:: put the following code to /etc/rc.local
uci set wireless.sta.disabled=0
uci commit
/etc/init.d/network restart
sleep 10
uci set wireless.sta.disabled=1
uci commit


Here is a solution that will allow the network to restart. copy this file to /etc/init.d and call it disable_wifi_sta
Code: Select all
#!/bin/sh /etc/rc.common

START=99
STOP=91

start() {
        uci set wireless.sta.disabled=0
        uci commit
        /etc/init.d/network restart
}

stop() {
        uci set wireless.sta.disabled=1
        uci commit
}


after copying the file to /etc/init.d/disable_wifi_sta , then run the following command which will configure vocore to automatically start and stop the STA upon bootup and shutdown
Code: Select all
/etc/init.d/disable_wif_sta enable



This has been tested and working on a vocore2 ultimate that is running CHAOS CALMER (Chaos Calmer, r49378). I updated the vocore2 with files from and by the instructions here: http://vocore.io/v2u.html . However I do believe it will work with the original firmware on the vocore2

Return to VoCore2/Lite/Ultimate

Who is online

Users browsing this forum: Google [Bot] and 35 guests