Hello
First off all sorry for my english...
I'm looking to make a script to execute a command
according to that french topic : http://www.crack-wifi.com/forum/topic-1 … tml#p75390
you can look at #7 message.
I'm trying to do the same on my TL-WR1043ND v1 with an alfa awus036NHA connected on usb.
I manage to make working wpa_supplicant with that command:
wpa_supplicant -c /var/run/wpa_supplicant-wlan1.conf -i wlan1
my wpa_supplicant-wlan1.conf look like that :
ctrl_interface=/tmp/run/wpa_supplicant/
update_config=1
my /etc/config/network look like that (i add 2 lines):
config interface 'wlan1'
option _orig_ifname 'wlan1'
i lauch
wpa_cli -i wlan1
without problems : i'm in interactive mode...
But now i'm looking to do a script to execute that command: while : ; do wpa_cli -i wlan1 wps_pbc any ; sleep 120 ; done &
my script is looking like this :
#!/bin/sh
while : ;
do
wpa_cli -i wlan1 wps_pbc any ; sleep 120 ; done &
but did not work i received a beautiful message : UNKNOWN COMMAND
oh yes i execute the script with the command
ash myscript
edit : it seem ash does not recognize the command wpa_cli wps_pbc any... is there a way to do it?
we have the option when we are in wpa_cli but wps_pbc is not recognise ... who give the unknow command!!!
could you help me to make it work please?
I'm just beginning in scripting so sorry if you see something really bad
thanks in advance
(Last edited by smokeh on 5 Feb 2016, 19:40)