0

I'm running a script to connect my amazon fire device with wifi but it actually fails exactly on setting up the ssid and password script:

echo $DSN1

adb -s $DSN1 root
sleep 2
adb -s $DSN1 remount
sleep 2
adb -s $DSN1 shell wpa_cli list_n all
adb -s $DSN1 shell wpa_cli remove_n all
adb -s $DSN1 shell wpa_cli save_config
adb -s $DSN1 shell wpa_cli add_network 0
adb -s $DSN1 shell wpa_cli set_network 0 ssid "AA0RaI40RaI40RaI40RaI40RaI40RaI4"
adb -s $DSN1 shell wpa_cli set_network 0 psk "AA0RaI40RaI40RaI40RaI40RaI40RaI4"
adb -s $DSN1 shell wpa_cli set_network 0 scan_ssid 1
adb -s $DSN1 shell wpa_cli save_config
adb -s $DSN1 shell wpa_cli select_network 0
adb -s $DSN1 shell wpa_cli status

Output:

Using interface 'wlan0'
network id / ssid / bssid / flags
0       any [CURRENT]
Using interface 'wlan0'
OK
Using interface 'wlan0'
OK
Using interface 'wlan0'
0
Using interface 'wlan0'
FAIL
Using interface 'wlan0'
FAIL
Using interface 'wlan0'
OK
Using interface 'wlan0'
OK
Using interface 'wlan0'
OK
Using interface 'wlan0'
wpa_state=INACTIVE

can anyone sort it out?

2 Answers 2

0

Try this one

wpa_cli enable_network 0
Sign up to request clarification or add additional context in comments.

Comments

0

Seems that the double quotes need to be escaped

wpa_cli set_network 0 ssid "\"AA0RaI40RaI40RaI40RaI40RaI40RaI4\""

or

wpa_cli set_network 0 ssid '"AA0RaI40RaI40RaI40RaI40RaI40RaI4"'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.