7 echo "Starting PBC mode"
8 echo "Push button on the station within two minutes"
9 if ! $CLI wps_pbc | grep -q OK; then
10 echo "Failed to enable PBC mode"
16 echo "Enter a PIN from a station to be enrolled to the network."
17 read -p "Enrollee PIN: " pin
18 cpin=`$CLI wps_check_pin "$pin" | tail -1`
19 if [ "$cpin" = "FAIL-CHECKSUM" ]; then
20 echo "Checksum digit is not valid"
21 read -p "Do you want to use this PIN (y/n)? " resp
24 cpin=`echo "$pin" | sed "s/[^1234567890]//g"`
31 if [ "$cpin" = "FAIL" ]; then
32 echo "Invalid PIN: $pin"
35 echo "Enabling Enrollee PIN: $cpin"
36 $CLI wps_pin any "$cpin"
48 echo "1: Push button (activate PBC)"
49 echo "2: Enter Enrollee PIN"
50 echo "3: Show current configuration"
51 echo "0: Exit wps-ap-cli"
53 read -p "Command: " cmd
69 echo "Unknown command: $cmd"