Jump to content

WPS button not working


comatose603
 Share

Recommended Posts

I've setup the script and enabled it. But it just wont launch the script for some reason. How is wpsScript.sh launched?

My resetButton.sh :

oot@Pineapple:/pineapple/config# cat resetButton.sh
#!/bin/sh
#Script to add / remove reset button
#Reset is marked as WPS (incorrect)

if [ $1 == "enable" ]
then

uci add system button
uci set system.@button[3].button=wps
uci set system.@button[3].action=released
uci set system.@button[3].handler='cp /etc/config/backup/* /etc/config/ && reboot'
uci set system.@button[3].min=5
uci set system.@button[3].max=10
uci commit system

fi

if [ $1 == "disable" ]
then
uci delete system.@button[3]
uci commit system
fi
root@Pineapple:/pineapple/config#

Link to comment
Share on other sites

This is either an old version of the firmware or the WPS button module has not been updated.

This script is incorrect and in general isn't ours.

I suggest you upgrade to 2.7.7. Then use our webUI to manage the WPS button.

I'll hit up WM as I fear his module is outdated.

Best,

Sebkinne

Link to comment
Share on other sites

I'm afraid but even without the module, the wps button does not seam to be working for me either :huh: and the module does not depend on any resetButton.sh or other scripts to avoid issues in case of changes in the reset mechanism. In the uci system, the reset button is at the position 0 and I don't touch it. Additional buttons are added after, starting from position 1.

Seb, I do also have this resetButton.sh script on my pineapple in the /pineapple/config/ folder. It is called from config.php. :P

if(isset($_GET[resetButton])){

if($_GET[resetButton] == "enable"){
exec("sh config/resetButton.sh enable");
exec("echo enabled > config/resetButtonStatus");

}
if($_GET[resetButton] == "disable"){
exec("sh config/resetButton.sh disable");
exec("echo disabled > config/resetButtonStatus");

}


Link to comment
Share on other sites

Solved, after deep debuging of this issue.

The solution is put symbolic link to /lib/functions.sh in /etc/functions.sh.

Make this by (connect by ssh to the device):

ln -s /lib/functions.sh /etc/functions.sh

That link fix the issue of the buttons.

The file /etc/hotplug.d/button/00-button search for /etc/functions.sh, if its not exists the buttons (wps and reset) not work.

Another thing is that by default (before installing the button module) the uci system button[1] handler config to /www/pineapple/config/wpsScript.sh, this path dos'nt exists. the script found at /pineapple/config/wpsScript.sh.

fix it by (connect by ssh to the device) :

uci set system.@button[1].handler='sh /pineapple/config/wpsScript.sh'

uci commit system

the first bug found at 2.7.1- 2.7.7 (in that versions the buttons not work!!).

the second bug gound at 2.7.0-2.7.7.

after fix those bugs the buttons work on 2.7.7. :D​

tell me if there any problems,

GeHeNoM.

Link to comment
Share on other sites

Solved, after deep debuging of this issue.

The solution is put symbolic link to /lib/functions.sh in /etc/functions.sh.

Make this by (connect by ssh to the device):

ln -s /lib/functions.sh /etc/functions.sh

That link fix the issue of the buttons.

The file /etc/hotplug.d/button/00-button search for /etc/functions.sh, if its not exists the buttons (wps and reset) not work.

Another thing is that by default (before installing the button module) the uci system button[1] handler config to /www/pineapple/config/wpsScript.sh, this path dos'nt exists. the script found at /pineapple/config/wpsScript.sh.

fix it by (connect by ssh to the device) :

uci set system.@button[1].handler='sh /pineapple/config/wpsScript.sh'

uci commit system

the first bug found at 2.7.1- 2.7.7 (in that versions the buttons not work!!).

the second bug gound at 2.7.0-2.7.7.

after fix those bugs the buttons work on 2.7.7. :D​

tell me if there any problems,

GeHeNoM.

Genius! Works great for me!

Nice one mate

-Foxtrot

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...