wpa_cli command not found when using bash
Posted: Tue May 05, 2020 5:29 am
Hi,
I am using bash script in order to ssh into RPi from my Linux desktop. I followed steps to do this without a password. For example, I have the bash script, called ssh2Pi.sh. In this file I have:
This works. Then, when I want to use wpa_cli and send p2p_find command, I change the bash script into this:
I get the following error:
When I ssh into RPi and then use "wpa_cli -ip2p-dev-wlan0 p2p_find", everything is fine, but when I try to do this from bash I get the error I talked about.
A weird note: pwd and ls commands work in the bash script, but ifconfig gives "command not found". I see some inconsistency here.
All in all, my question is: How can I send p2p_find command from Linux computer to RPi using a bash script?
I am using bash script in order to ssh into RPi from my Linux desktop. I followed steps to do this without a password. For example, I have the bash script, called ssh2Pi.sh. In this file I have:
Code: Select all
ssh pi@raspberry.Pis.IP.addressCode: Select all
ssh pi@raspberry.Pis.IP.address wpa_cli -ip2p-dev-wlan0 p2p_findCode: Select all
bash: wpa_cli: command not foundA weird note: pwd and ls commands work in the bash script, but ifconfig gives "command not found". I see some inconsistency here.
All in all, my question is: How can I send p2p_find command from Linux computer to RPi using a bash script?