File files/onetouch/script.sh changed (mode: 100755) (index faf1178..8efd08f) |
... |
... |
elif test $verb = set; then |
296 |
296 |
profile_name=$3 |
profile_name=$3 |
297 |
297 |
profile_apn=$4 |
profile_apn=$4 |
298 |
298 |
profile_protocol=$5 |
profile_protocol=$5 |
|
299 |
|
profile_username=$6 |
|
300 |
|
profile_password=$7 |
299 |
301 |
if test "x$profile_id" = x -o "x$profile_name" = x -o "x$profile_apn" = x -o "x$profile_protocol" = x; then |
if test "x$profile_id" = x -o "x$profile_name" = x -o "x$profile_apn" = x -o "x$profile_protocol" = x; then |
300 |
302 |
printf 'ERROR:SET:setProfileSave:missing parameters\n' |
printf 'ERROR:SET:setProfileSave:missing parameters\n' |
301 |
|
printf 'DOC:set profilenew profile_id profile_name profile_apn profile_protocol\n' |
|
|
303 |
|
printf 'DOC:set profilenew profile_id profile_name profile_apn profile_protocol profile_username profile_password\n' |
302 |
304 |
printf 'DOC:profile_protocol:\n' |
printf 'DOC:profile_protocol:\n' |
303 |
305 |
printf 'DOC:\t0 none\n' |
printf 'DOC:\t0 none\n' |
304 |
306 |
printf 'DOC:\t1 PAP\n' |
printf 'DOC:\t1 PAP\n' |
|
... |
... |
elif test $verb = set; then |
312 |
314 |
--data 'key=new' \ |
--data 'key=new' \ |
313 |
315 |
--data "profile_protocol=$profile_protocol" \ |
--data "profile_protocol=$profile_protocol" \ |
314 |
316 |
--data "profile_apn=$profile_apn" \ |
--data "profile_apn=$profile_apn" \ |
315 |
|
--data 'profile_password=' \ |
|
316 |
|
--data 'profile_username=' \ |
|
|
317 |
|
--data "profile_password=$profile_password" \ |
|
318 |
|
--data "profile_username=$profile_username" \ |
317 |
319 |
--data "profile_name=$profile_name" \ |
--data "profile_name=$profile_name" \ |
318 |
320 |
--data 'profile_number=*99#' \ |
--data 'profile_number=*99#' \ |
319 |
321 |
"$modem_url/goform/setProfileSave?rand=$RND" |
"$modem_url/goform/setProfileSave?rand=$RND" |
|
... |
... |
elif test $verb = set; then |
402 |
404 |
--data "pin=$pin" \ |
--data "pin=$pin" \ |
403 |
405 |
"$modem_url/goform/unlockPIN?rand=$RND" |
"$modem_url/goform/unlockPIN?rand=$RND" |
404 |
406 |
exit |
exit |
|
407 |
|
elif test "$cmd" = disablewifi; then |
|
408 |
|
# we use the defaults and modify only wifi_state |
|
409 |
|
$curl -o /dev/null \ |
|
410 |
|
$curl_verbose \ |
|
411 |
|
--data "wifi_state=0" \ |
|
412 |
|
--data "wlan_mode=0" \ |
|
413 |
|
--data "wmode=2" \ |
|
414 |
|
--data "wmode_5g=5" \ |
|
415 |
|
--data "ssid=MY WIFI" \ |
|
416 |
|
--data "ssid_5g=MYWIFI _5G" \ |
|
417 |
|
--data "hidden_ssid=0" \ |
|
418 |
|
--data "hidden_ssid_5g=0" \ |
|
419 |
|
--data "channel=0" \ |
|
420 |
|
--data "channel_5g=0" \ |
|
421 |
|
--data "max_numsta=10" \ |
|
422 |
|
--data "max_numsta_5g=10" \ |
|
423 |
|
--data "curr_num=0" \ |
|
424 |
|
--data "security_mode=3" \ |
|
425 |
|
--data "wep_sec=0" \ |
|
426 |
|
--data "wep_key=1234567890" \ |
|
427 |
|
--data "wpa_sec=2" \ |
|
428 |
|
--data "wpa_passphrase=MYWIFI2549" \ |
|
429 |
|
--data "wifi_country_code=CN" \ |
|
430 |
|
--data "ap_status=0" \ |
|
431 |
|
"$modem_url/goform/setWlanInfo?rand=$RND" |
405 |
432 |
else |
else |
406 |
433 |
printf "ERROR:SET:missing known command:\n\ |
printf "ERROR:SET:missing known command:\n\ |
407 |
434 |
profiledefault\n\ |
profiledefault\n\ |
|
... |
... |
networkselect\n\ |
418 |
445 |
networkinfo\n\ |
networkinfo\n\ |
419 |
446 |
networkregister\n\ |
networkregister\n\ |
420 |
447 |
unlockpin\n\ |
unlockpin\n\ |
|
448 |
|
disablewifi\n\ |
421 |
449 |
" |
" |
422 |
450 |
exit 1 |
exit 1 |
423 |
451 |
prin |
prin |