17 lines
635 B
Bash
17 lines
635 B
Bash
#!/bin/sh
|
|||
|
|
# Open/close the QMI BAM-DMUX data port on demand (U9/K11).
|
||
|
|
# With Wi-Fi as the default route and no cellular data profile there is no
|
||
|
|
# reason to keep the modem data plane open at boot.
|
||
|
|
QMICLI="qmicli --silent -pd qrtr://0"
|
||
|
|
case "${1:-}" in
|
||
|
|
open)
|
||
|
|
$QMICLI --dpm-open-port=hw-data-ep-type=bam-dmux,hw-data-ep-iface-number=1,hw-data-rx-id=1,hw-data-tx-id=1 >/dev/null 2>&1 || true
|
||
|
|
;;
|
||
|
|
close)
|
||
|
|
$QMICLI --dpm-close-port=hw-data-ep-type=bam-dmux,hw-data-ep-iface-number=1,hw-data-rx-id=1,hw-data-tx-id=1 >/dev/null 2>&1 || true
|
||
|
|
;;
|
||
|
|
*)
|
||
|
|
printf 'Usage: %s [open|close]\n' "${0##*/}" >&2
|
||
|
|
exit 1
|
||
|
|
;;
|
||
|
|
esac
|