From 8f0ea44328ccdb64223e369f8be7ca178c6b674a Mon Sep 17 00:00:00 2001 From: Andrii Davydenko Date: Wed, 18 Jan 2023 14:28:30 +0200 Subject: Add Sequans udev rule for modem_at1 Rename Main Radio ECM to the wwan0 Rename Control Radio ECM to the wwanmng0 --- recipes-core/udev/eudev/cellular_radios.rules | 3 +++ recipes-core/udev/eudev/cellular_radios_cdc_ecm.rules | 11 +++++++++++ recipes-core/udev/eudev_%.bbappend | 7 +++++-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 recipes-core/udev/eudev/cellular_radios_cdc_ecm.rules diff --git a/recipes-core/udev/eudev/cellular_radios.rules b/recipes-core/udev/eudev/cellular_radios.rules index 78c5741..e94e835 100644 --- a/recipes-core/udev/eudev/cellular_radios.rules +++ b/recipes-core/udev/eudev/cellular_radios.rules @@ -83,5 +83,8 @@ ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0195", ENV{ID_IFACE}=="03", SYMLINK+ ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{ID_IFACE}=="02", SYMLINK+="modem_at0" ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{ID_IFACE}=="03", SYMLINK+="modem_at1", ACTION=="add", RUN+="/etc/udev/scripts/cellular_radios.sh" +# Sequans CB610L: ttyACM0 +ATTRS{idVendor}=="258d", ATTRS{idProduct}=="2000", ENV{ID_IFACE}=="02", SYMLINK+="modem_at1", ACTION=="add", RUN+="/etc/udev/scripts/cellular_radios.sh" + LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/cellular_radios_cdc_ecm.rules b/recipes-core/udev/eudev/cellular_radios_cdc_ecm.rules new file mode 100644 index 0000000..a6a553a --- /dev/null +++ b/recipes-core/udev/eudev/cellular_radios_cdc_ecm.rules @@ -0,0 +1,11 @@ +ACTION!="add|change|move", GOTO="mlinux_end" +SUBSYSTEM!="net", GOTO="mlinux_end" + +# Main Radio ECM interface of Sequans CB610L +ATTRS{idVendor}=="258d", ATTRS{idProduct}=="2000", ENV{ID_USB_INTERFACE_NUM}=="00", NAME="wwan0" + +# Control Radio ECM interface of Sequans CB610L +ATTRS{idVendor}=="258d", ATTRS{idProduct}=="2000", ENV{ID_USB_INTERFACE_NUM}=="04", NAME="wwanmng0" + + +LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev_%.bbappend b/recipes-core/udev/eudev_%.bbappend index a7b0d67..5966524 100644 --- a/recipes-core/udev/eudev_%.bbappend +++ b/recipes-core/udev/eudev_%.bbappend @@ -1,17 +1,20 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" RDEPENDS_${PN} += "bash" -PR .= ".mlinux8" +PR .= ".mlinux9" # add custom rules for persistent modem device names SRC_URI += "file://cellular_radios.rules \ file://cellular_radios.sh \ file://ubi.rules \ - file://${MACHINE}.rules" + file://${MACHINE}.rules \ + file://cellular_radios_cdc_ecm.rules \ + " do_install_append() { install -m 644 ${WORKDIR}/cellular_radios.rules ${D}${sysconfdir}/udev/rules.d/ install -m 644 ${WORKDIR}/${MACHINE}.rules ${D}${sysconfdir}/udev/rules.d/ + install -m 644 ${WORKDIR}/cellular_radios_cdc_ecm.rules ${D}${sysconfdir}/udev/rules.d/ install -d ${D}${sysconfdir}/udev/scripts install -m 755 ${WORKDIR}/cellular_radios.sh ${D}${sysconfdir}/udev/scripts/ } -- cgit v1.2.3 From a60f89b06926f96d26fdbb3d0106921908c020e6 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Fri, 10 Feb 2023 14:42:47 +0200 Subject: [GP-1733] Disable echo on /dev/modem_at1 Disable the "echo" terminos option for /dev/modem_at1. This change is mandatory for Sequans, becase the Sequans radios do not tolerate garbage in their input. --- recipes-core/udev/eudev/cellular_radios.sh | 5 +++++ recipes-core/udev/eudev_%.bbappend | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes-core/udev/eudev/cellular_radios.sh b/recipes-core/udev/eudev/cellular_radios.sh index cb9258b..ee0ba2e 100644 --- a/recipes-core/udev/eudev/cellular_radios.sh +++ b/recipes-core/udev/eudev/cellular_radios.sh @@ -13,3 +13,8 @@ if [[ -f $READYFILE ]] ; then 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 diff --git a/recipes-core/udev/eudev_%.bbappend b/recipes-core/udev/eudev_%.bbappend index 5966524..f781c83 100644 --- a/recipes-core/udev/eudev_%.bbappend +++ b/recipes-core/udev/eudev_%.bbappend @@ -1,7 +1,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" RDEPENDS_${PN} += "bash" -PR .= ".mlinux9" +PR .= ".mlinux10" # add custom rules for persistent modem device names SRC_URI += "file://cellular_radios.rules \ -- cgit v1.2.3