getsupportedbands() {
	echo "$_DEFAULT_LTE_BANDS"
}

getbands() {
# +QNWPREFCFG: "lte_band",1:3:7:8:20:28:38

	O=$(sms_tool -d $_DEVICE at "at+qnwprefcfg=\"lte_band\"")
	echo "$O" | awk -F, '/^\+QNWPREFCFG:/{gsub(":"," ");print $2}'
}

setbands() {
	BANDS="$1"
	[ "$BANDS" = "default" ] && BANDS="$_DEFAULT_LTE_BANDS"

	T=""
	for BAND in $BANDS; do
		case $BAND in
			''|*[!0-9]*) continue ;;
		esac
		[ -n "$T" ] && T="${T}:"
		T="${T}${BAND}"
	done

	[ -n "$T" ] && sms_tool -d $_DEVICE at "at+qnwprefcfg=\"lte_band\",$T"
}

getsupportedbands5gnsa() {
	echo "$_DEFAULT_5GNSA_BANDS"
}

getbands5gnsa() {
# +QNWPREFCFG: "nsa_nr5g_band",1:2:3:5:7:8:12:20:25:28:38:40:41:48:66:71:77:78:79

	O=$(sms_tool -d $_DEVICE at "at+qnwprefcfg=\"nsa_nr5g_band\"")
	echo "$O" | awk -F, '/^\+QNWPREFCFG:/{gsub(":"," ");print $2}' | xargs
}

setbands5gnsa() {
	BANDS="$1"
	[ "$BANDS" = "default" ] && BANDS="$_DEFAULT_5GNSA_BANDS"

	T=""
	for BAND in $BANDS; do
		case $BAND in
			''|*[!0-9]*) continue ;;
		esac
		[ -n "$T" ] && T="${T}:"
		T="${T}${BAND}"
	done

	[ -n "$T" ] && sms_tool -d $_DEVICE at "at+qnwprefcfg=\"nsa_nr5g_band\",$T"
}

getsupportedbands5gsa() {
	echo "$_DEFAULT_5GSA_BANDS"
}

getbands5gsa() {
# +QNWPREFCFG: "nr5g_band",1:2:3:5:7:8:12:20:25:28:38:40:41:48:66:71:77:78:79

	O=$(sms_tool -d $_DEVICE at "at+qnwprefcfg=\"nr5g_band\"")
	echo "$O" | awk -F, '/^\+QNWPREFCFG:/{gsub(":"," ");print $2}' | xargs
}

setbands5gsa() {
	BANDS="$1"
	[ "$BANDS" = "default" ] && BANDS="$_DEFAULT_5GSA_BANDS"

	T=""
	for BAND in $BANDS; do
		case $BAND in
			''|*[!0-9]*) continue ;;
		esac
		[ -n "$T" ] && T="${T}:"
		T="${T}${BAND}"
	done

	[ -n "$T" ] && sms_tool -d $_DEVICE at "at+qnwprefcfg=\"nr5g_band\",$T"
}
