summaryrefslogtreecommitdiff
path: root/recipes-core/udev/eudev/cellular_radios.sh
blob: ee0ba2ee31ecf23b34f00ae414cccf095c670454 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# Let mts-io know when the radio is ready
pid=$$
prefix="<3>cellular-discovery[${pid}]: "
loginfo()  { echo "${prefix}$@" >/dev/kmsg ; }

loginfo "cellular_radios.sh invoked"
READYFILE=/sys/devices/platform/mts-io/radio-udev-discovery
if [[ -f $READYFILE ]] ; then
    if (($(cat $READYFILE) == 0)) ; then
        loginfo "Cellular is now available"
    fi
    echo 1 >$READYFILE
fi

# Disable echo for modem_at1. Mandatory for Sequans
STTY_PATH=/bin/stty
if [[ -x "$STTY_PATH" && -n "$DEVNAME" ]]; then
    "$STTY_PATH" -echo -echoe -echok -echoctl -echoke -F "$DEVNAME"
fi