From f7b9504a8dd624c73a2cfcfaa1d4b0c5879a5d60 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 19 Aug 2021 13:49:48 -0500 Subject: Have eudev notify mts-io when cellular modem is ready to use after reset --- recipes-core/udev/eudev/cellular_radios.rules | 1 + recipes-core/udev/eudev/cellular_radios.sh | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 recipes-core/udev/eudev/cellular_radios.sh (limited to 'recipes-core/udev/eudev') diff --git a/recipes-core/udev/eudev/cellular_radios.rules b/recipes-core/udev/eudev/cellular_radios.rules index d7c0521..a74ddf1 100644 --- a/recipes-core/udev/eudev/cellular_radios.rules +++ b/recipes-core/udev/eudev/cellular_radios.rules @@ -1,4 +1,5 @@ ACTION=="remove", GOTO="mlinux_end" +ACTION=="add", RUN+="/etc/udev/scripts/cellular_radios.sh" SUBSYSTEM!="tty", GOTO="mlinux_end" KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="mlinux_end" diff --git a/recipes-core/udev/eudev/cellular_radios.sh b/recipes-core/udev/eudev/cellular_radios.sh new file mode 100644 index 0000000..695831f --- /dev/null +++ b/recipes-core/udev/eudev/cellular_radios.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Let mts-io know when the radio is ready +READYFILE=/sys/devices/platform/mts-io/radio-udev-discovery +if [[ -f $READYFILE ]] ; then + echo 1 >$READYFILE +fi + -- cgit v1.2.3