Merge tag 'dey-2.2-r3.3' into dey-2.2/master
Manually changed recipes to use the master branches instead of the fixed SHA1 from the last release. Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
This commit is contained in:
commit
1850f74ddd
158
README.md
158
README.md
|
|
@ -19,40 +19,45 @@ OS versions:
|
|||
|
||||
# Supported Platforms
|
||||
|
||||
The current release supports the following hardware platforms:
|
||||
|
||||
Software for the following hardware platforms is in production support:
|
||||
|
||||
* Digi ConnectCore 6UL
|
||||
* [Digi P/N CC-WMX-JN58-NE](http://www.digi.com/products/models/cc-wmx-jn58-ne)
|
||||
* [Digi P/N CC-MX-JN58-Z1](https://www.digi.com/products/models/cc-mx-jn58-z1)
|
||||
* Digi P/N CC-WMX-JN7A-NE
|
||||
* Digi ConnectCore 6UL SBC Express
|
||||
* [Digi P/N CC-WMX6UL-START](http://www.digi.com/products/models/cc-wmx6ul-start) ([Get Started](https://www.digi.com/resources/documentation/digidocs/90001548/default.htm#concept/yocto/c_get_started_with_yocto.htm))
|
||||
* Digi ConnectCore 6UL SBC Pro
|
||||
* [Digi P/N CC-WMX6UL-KIT](https://www.digi.com/products/models/cc-wmx6ul-kit) ([Get Started](https://www.digi.com/resources/documentation/digidocs/90001547/default.htm#concept/yocto/c_get_started_with_yocto.htm))
|
||||
## ConnectCore 6UL
|
||||
* ConnectCore 6UL System-on-Module (SOM)
|
||||
* [CC-WMX-JN58-NE](https://www.digi.com/products/models/cc-wmx-jn58-ne)
|
||||
* [CC-MX-JN58-Z1](https://www.digi.com/products/models/cc-mx-jn58-z1)
|
||||
* CC-WMX-JN7A-NE
|
||||
* ConnectCore 6UL SBC Express
|
||||
* [CC-WMX6UL-START](https://www.digi.com/products/models/cc-wmx6ul-start) ([Get Started](https://www.digi.com/resources/documentation/digidocs/90001548/default.htm#concept/yocto/c_get_started_with_yocto.htm))
|
||||
* [CC-SBE-WMX-JN58](https://www.digi.com/products/models/cc-sbe-wmx-jn58)
|
||||
* ConnectCore 6UL SBC Pro
|
||||
* [CC-WMX6UL-KIT](https://www.digi.com/products/models/cc-wmx6ul-kit) ([Get Started](https://www.digi.com/resources/documentation/digidocs/90001547/default.htm#concept/yocto/c_get_started_with_yocto.htm))
|
||||
* [CC-SBP-WMX-JN58](https://www.digi.com/products/models/cc-sbp-wmx-jn58)
|
||||
|
||||
* Digi ConnectCore 6
|
||||
* [Digi P/N CC-WMX-J97C-TN](http://www.digi.com/products/models/cc-wmx-j97c-tn)
|
||||
* [Digi P/N CC-WMX-L96C-TE](http://www.digi.com/products/models/cc-wmx-l96c-te)
|
||||
* [Digi P/N CC-WMX-L87C-TE](http://www.digi.com/products/models/cc-wmx-l87c-te)
|
||||
* [Digi P/N CC-MX-L76C-Z1](http://www.digi.com/products/models/cc-mx-l76c-z1)
|
||||
* [Digi P/N CC-MX-L86C-Z1](http://www.digi.com/products/models/cc-mx-l86c-z1)
|
||||
* [Digi P/N CC-MX-L96C-Z1](http://www.digi.com/products/models/cc-mx-l96c-z1)
|
||||
* [Digi P/N CC-WMX-L76C-TE](http://www.digi.com/products/models/cc-wmx-l76c-te)
|
||||
* Digi P/N CC-WMX-K87C-FJA
|
||||
* Digi P/N CC-WMX-K77C-TE
|
||||
* Digi P/N CC-WMX-L97D-TN
|
||||
* Digi P/N CC-WMX-J98C-FJA
|
||||
* Digi P/N CC-WMX-J98C-FJA-1
|
||||
## ConnectCore 6
|
||||
* ConnectCore 6 System-on-Module (SOM)
|
||||
* [CC-WMX-J97C-TN](https://www.digi.com/products/models/cc-wmx-j97c-tn)
|
||||
* [CC-WMX-L96C-TE](https://www.digi.com/products/models/cc-wmx-l96c-te)
|
||||
* [CC-WMX-L87C-TE](https://www.digi.com/products/models/cc-wmx-l87c-te)
|
||||
* [CC-MX-L76C-Z1](https://www.digi.com/products/models/cc-mx-l76c-z1)
|
||||
* [CC-MX-L86C-Z1](https://www.digi.com/products/models/cc-mx-l86c-z1)
|
||||
* [CC-MX-L96C-Z1](https://www.digi.com/products/models/cc-mx-l96c-z1)
|
||||
* [CC-WMX-L76C-TE](https://www.digi.com/products/models/cc-wmx-l76c-te)
|
||||
* CC-WMX-K87C-FJA
|
||||
* CC-WMX-K77C-TE
|
||||
* CC-WMX-L97D-TN
|
||||
* CC-WMX-J98C-FJA
|
||||
* CC-WMX-J98C-FJA-1
|
||||
* ConnectCore 6 SBC
|
||||
* [CC-WMX6-KIT](https://www.digi.com/products/models/cc-wmx6-kit) ([Get Started](https://www.digi.com/resources/documentation/digidocs/90001546/default.htm#concept/yocto/c_get_started_with_yocto.htm))
|
||||
* [CC-SB-WMX-J97C-1](https://www.digi.com/products/models/cc-sb-wmx-j97c-1)
|
||||
* [CC-SB-WMX-L87C-1](https://www.digi.com/products/models/cc-sb-wmx-l87c-1)
|
||||
* [CC-SB-WMX-L76C-1](https://www.digi.com/products/models/cc-sb-wmx-l76c-1)
|
||||
|
||||
* Digi ConnectCore 6 Development Kit
|
||||
* [Digi P/N CC-WMX6-KIT](http://www.digi.com/products/models/cc-wmx6-kit) ([Get Started](https://www.digi.com/resources/documentation/digidocs/90001546/default.htm#concept/yocto/c_get_started_with_yocto.htm))
|
||||
|
||||
* Digi ConnectCore 6 SBC
|
||||
* [Digi P/N CC-SB-WMX-J97C-1](http://www.digi.com/products/models/cc-sb-wmx-j97c-1)
|
||||
* [Digi P/N CC-SB-WMX-L87C-1](https://www.digi.com/products/models/cc-sb-wmx-l87c-1)
|
||||
* [Digi P/N CC-SB-WMX-L76C-1](https://www.digi.com/products/models/cc-sb-wmx-l76c-1)
|
||||
## ConnectCore 6 Plus
|
||||
* ConnectCore 6 Plus System-on-Module (SOM)
|
||||
* CC-WMX-KK8D-TN
|
||||
* ConnectCore 6 Plus SBC
|
||||
* CC-SB-WMX-KK8D
|
||||
|
||||
Previous versions of Digi Embedded Yocto include support for additional Digi
|
||||
hardware.
|
||||
|
|
@ -68,14 +73,15 @@ To install, please follow the instructions at the dey-manifest [README](https://
|
|||
|
||||
Documentation is available online on the Digi documentation site:
|
||||
|
||||
* [Digi ConnectCore 6UL SBC Express](https://www.digi.com/resources/documentation/digidocs/90001548/default.htm)
|
||||
* [Digi ConnectCore 6UL SBC Pro](https://www.digi.com/resources/documentation/digidocs/90001547/default.htm)
|
||||
* [Digi ConnectCore 6 Jumpstart Development Kit](https://www.digi.com/resources/documentation/digidocs/90001546/default.htm)
|
||||
* [ConnectCore 6UL SBC Express](https://www.digi.com/resources/documentation/digidocs/90001548/default.htm)
|
||||
* [ConnectCore 6UL SBC Pro](https://www.digi.com/resources/documentation/digidocs/90001547/default.htm)
|
||||
* [ConnectCore 6 SBC](https://www.digi.com/resources/documentation/digidocs/90001546/default.htm)
|
||||
* [ConnectCore 6 Plus SBC](https://www.digi.com/resources/documentation/digidocs/90002275/default.htm)
|
||||
|
||||
# Downloads
|
||||
|
||||
* Demo images: ftp://ftp1.digi.com/support/digiembeddedyocto/2.2/r2/images/
|
||||
* Software Development Kit (SDK): ftp://ftp1.digi.com/support/digiembeddedyocto/2.2/r2/sdk/
|
||||
* Demo images: ftp://ftp1.digi.com/support/digiembeddedyocto/2.2/r3/images/
|
||||
* Software Development Kit (SDK): ftp://ftp1.digi.com/support/digiembeddedyocto/2.2/r3/sdk/
|
||||
|
||||
# Release Changelog
|
||||
|
||||
|
|
@ -85,6 +91,8 @@ Documentation is available online on the Digi documentation site:
|
|||
|
||||
## 2.2-r3
|
||||
|
||||
* Added support for ConnectCore 6 Plus platform
|
||||
* Updated kernel version to v4.9 for ConnectCore 6UL platform
|
||||
* Added Digi APIX C library to access and manage ConnectCore platforms interfaces:
|
||||
* ADC
|
||||
* GPIO
|
||||
|
|
@ -92,14 +100,33 @@ Documentation is available online on the Digi documentation site:
|
|||
* PWM
|
||||
* SPI
|
||||
* Updated AWS Greengrass Core software to v1.1.0
|
||||
=======
|
||||
* Updated TrustFence Code Signing Tool to v2.3.3
|
||||
* Default rootfs images are now Eclipse debug ready
|
||||
* Updated documentation
|
||||
|
||||
## 2.2-r2
|
||||
|
||||
* Fix for KRACK Attack vulnerability:
|
||||
* [CVE-2017-13077](https://nvd.nist.gov/vuln/detail/CVE-2017-13077)
|
||||
* [CVE-2017-13078](https://nvd.nist.gov/vuln/detail/CVE-2017-13078)
|
||||
* [CVE-2017-13079](https://nvd.nist.gov/vuln/detail/CVE-2017-13079)
|
||||
* [CVE-2017-13080](https://nvd.nist.gov/vuln/detail/CVE-2017-13080)
|
||||
* [CVE-2017-13081](https://nvd.nist.gov/vuln/detail/CVE-2017-13081)
|
||||
* [CVE-2017-13082](https://nvd.nist.gov/vuln/detail/CVE-2017-13082)
|
||||
* [CVE-2017-13086](https://nvd.nist.gov/vuln/detail/CVE-2017-13086)
|
||||
* [CVE-2017-13087](https://nvd.nist.gov/vuln/detail/CVE-2017-13087)
|
||||
* [CVE-2017-13088](https://nvd.nist.gov/vuln/detail/CVE-2017-13088)
|
||||
* Cloud Connector: fix connections through PPP
|
||||
* Use NetworkManager for ethernet, wireless (station) and cellular network interfaces
|
||||
* Updated kernel version to v4.1.41 for CC6 platform
|
||||
* Added support for SPI Slave mode on CC6UL platform
|
||||
* Added support for Atmel Cryptochip ATEC508A using Cryptoauthlib
|
||||
* Network failover mechanism
|
||||
* Raspberry Pi Sense hat Yocto support using meta-digi-maker layer for CC6UL SBC Express
|
||||
* QT fonts fix
|
||||
* QT software renderer for CC6UL
|
||||
* Fix for CVE-2017-1000251 vulnerability (https://nvd.nist.gov/vuln/detail/CVE-2017-1000251)
|
||||
* RS-485 kernel patches
|
||||
* Powered by AWS certified on all supported hardware platforms including:
|
||||
* AWS GreenGrass core software
|
||||
* AWS IoT Device SDK for embedded C
|
||||
|
|
@ -156,51 +183,60 @@ boot a signed U-Boot only.
|
|||
devices (ConnectCore 6UL and ConnectCore 6 Plus) running a 4.9 kernel
|
||||
version fail to join to autonomous groups.
|
||||
|
||||
## Digi ConnectCore 6UL
|
||||
## ConnectCore 6UL
|
||||
|
||||
* The UART connected to the Bluetooth chip on early versions of the ConnectCore
|
||||
* ConnectCore 6UL System-on-Module (SOM)
|
||||
* The UART connected to the Bluetooth chip on early versions of the ConnectCore
|
||||
6UL system-on-module (hardware version < 4) cannot properly execute flow
|
||||
control. To work around this issue, UART1 of these SOM versions has been
|
||||
configured to operate at 115200 bps and without hardware flow control,
|
||||
reducing the maximum throughput of this interface.
|
||||
* When using wireless concurrent mode as the wireless interface is shared
|
||||
* When using wireless concurrent mode as the wireless interface is shared
|
||||
between several different functionalities performance is reduced.
|
||||
* When using wireless concurrent mode Digi recommends to keep the different
|
||||
* When using wireless concurrent mode Digi recommends to keep the different
|
||||
modes on the same frequency channels. For example, when configuring access
|
||||
point mode on channel 36 on band A, the recommendation would be to connect
|
||||
to the same channel both in station mode and WiFi direct so that the radio
|
||||
performance is optimized
|
||||
* When working as an access point, DFS capable channels in band A are not
|
||||
performance is optimized.
|
||||
* When working as an access point, DFS capable channels in band A are not
|
||||
currently supported.
|
||||
* The QCA6564 wireless chip does not support Wake On Wireless LAN
|
||||
* The QCA6564 wireless chip does not support Wake On Wireless LAN.
|
||||
|
||||
## Digi ConnectCore 6
|
||||
## ConnectCore 6
|
||||
|
||||
* NXP i.MX6 processor has a documented errata (ERR004512) whereby the maximum
|
||||
performance of the Gigabit FEC is limited to 400Mbps (total for Tx and Rx)
|
||||
* When using softAP mode on Band A on the Qualcomm AR6233, channels used for
|
||||
Dynamic Frequency Selection (DFS) are not supported
|
||||
* The Qualcomm AR6233 firmware does not support the following configuration
|
||||
modes:
|
||||
* Concurrent modes involving P2P mode, such as P2P + softAP or P2P + STA
|
||||
* Bluetooth + softAP + STA concurrent mode
|
||||
* A maximum of five clients are supported when using Qualcomm's AR6233 in
|
||||
softAP mode
|
||||
* A maximum of ten connected devices are supported when using Qualcomm's AR6233
|
||||
Bluetooth Low Energy mode
|
||||
* ConnectCore 6 System-on-Module (SOM)
|
||||
* NXP i.MX6 processor has a documented errata (ERR004512) whereby the maximum
|
||||
performance of the Gigabit FEC is limited to 400Mbps (total for Tx and Rx).
|
||||
* When using softAP mode on Band A on the Qualcomm AR6233, channels used for
|
||||
Dynamic Frequency Selection (DFS) are not supported.
|
||||
* The Qualcomm AR6233 firmware does not support the following configuration
|
||||
modes:
|
||||
* Concurrent modes involving P2P mode, such as P2P + softAP or P2P + STA.
|
||||
* Bluetooth + softAP + STA concurrent mode.
|
||||
* A maximum of five clients are supported when using Qualcomm's AR6233 in
|
||||
softAP mode.
|
||||
* A maximum of ten connected devices are supported when using Qualcomm's AR6233
|
||||
Bluetooth Low Energy mode.
|
||||
* ConnectCore 6 SBC
|
||||
* The Micrel PHY KSZ9031 may take between five and six seconds to
|
||||
auto-negotiate with Gigabit switches.
|
||||
|
||||
## Digi ConnectCore 6 SBC
|
||||
## ConnectCore 6 Plus
|
||||
|
||||
* The Micrel PHY KSZ9031 may take between five and six seconds to
|
||||
auto-negotiate with Gigabit switches
|
||||
* ConnectCore 6 Plus System-on-Module (SOM)
|
||||
* NXP i.MX6QP processor has a documented errata (ERR004512) whereby the maximum
|
||||
performance of the Gigabit FEC is limited to 400Mbps (total for Tx and Rx).
|
||||
* ConnectCore 6 Plus SBC
|
||||
* The Micrel PHY KSZ9031 may take between five and six seconds to
|
||||
auto-negotiate with Gigabit switches.
|
||||
|
||||
# Support Contact Information
|
||||
|
||||
For support questions please contact Digi Technical Support:
|
||||
|
||||
* [Enterprise Support](https://mydigi.secure.force.com/customers/)
|
||||
* [Product Technical Support](http://www.digi.com/support/product-support)
|
||||
* [Support forum](http://www.digi.com/support/forum/)
|
||||
* [Product Technical Support](https://www.digi.com/support#support-tools)
|
||||
* [Support forum](https://www.digi.com/support/forum/)
|
||||
|
||||
When you contact Digi Technical Support, include important system details and
|
||||
device information to help Digi resolve the issue more quickly.
|
||||
|
|
|
|||
|
|
@ -48,11 +48,17 @@ bluetooth_init() {
|
|||
|
||||
# Start the Bluetooth driver and bring up the interface
|
||||
HCIATTACH_LOG="/var/log/hciattach.log"
|
||||
|
||||
for RETRY in $(seq 1 5)
|
||||
do
|
||||
killproc hciattach
|
||||
powercycle_gpio "${BT_EN_QCA_GPIO_NR}"
|
||||
if ! hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then
|
||||
BT_ERROR="FAIL (hciattach)"
|
||||
if hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then
|
||||
return
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
BT_ERROR="FAIL (hciattach)"
|
||||
}
|
||||
|
||||
# Source function library
|
||||
|
|
|
|||
|
|
@ -67,11 +67,17 @@ bluetooth_init() {
|
|||
|
||||
# Start the Bluetooth driver and bring up the interface
|
||||
HCIATTACH_LOG="/var/log/hciattach.log"
|
||||
|
||||
for RETRY in $(seq 1 5)
|
||||
do
|
||||
killproc hciattach
|
||||
powercycle_gpio "${BT_EN_QCA_GPIO_NR}"
|
||||
if ! hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then
|
||||
BT_ERROR="FAIL (hciattach)"
|
||||
if hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then
|
||||
return
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
BT_ERROR="FAIL (hciattach)"
|
||||
}
|
||||
|
||||
# Source function library
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ lockfd="9"
|
|||
|
||||
BT_INIT="/etc/init.d/bluetooth-init"
|
||||
BT_DAEMON="/etc/init.d/bluetooth"
|
||||
NM_DAEMON="/etc/init.d/networkmanager"
|
||||
|
||||
usage() {
|
||||
printf "\nSuspend system to RAM memory\n"
|
||||
|
|
@ -31,18 +32,14 @@ usage() {
|
|||
}
|
||||
|
||||
suspend_interfaces() {
|
||||
# Stop NetworkManager before suspend
|
||||
${NM_DAEMON} stop
|
||||
|
||||
# Suspend wireless interfaces
|
||||
if [ -d "/proc/device-tree/wireless" ]; then
|
||||
for i in $(sed -ne 's,^\(wlan[0-9]\)=.*,\1,g;T;p' /var/run/ifstate | sort -r); do
|
||||
ifdown "${i}" && RESUME_IFACES="${RESUME_IFACES:+${RESUME_IFACES} }${i}"
|
||||
done
|
||||
|
||||
# Get a list of the wireless interfaces managed by NetworkManager
|
||||
# and set them to unmanaged before suspend.
|
||||
for i in $(nmcli -t -f DEVICE,TYPE,STATE dev | grep :wifi: | grep -v unmanaged | cut -d':' -f1); do
|
||||
nmcli dev set "${i}" managed no && NM_MANAGED_IFACES="${NM_MANAGED_IFACES:+${NM_MANAGED_IFACES} }${i}"
|
||||
done
|
||||
|
||||
grep -qs '^wlan' /proc/modules && rmmod wlan
|
||||
fi
|
||||
|
||||
|
|
@ -61,17 +58,15 @@ resume_interfaces() {
|
|||
udevadm trigger --action=add --attr-match="modalias=sdio:c00v0271d050A"
|
||||
timeout -t 5 sh -c "while [ ! -d /sys/class/net/wlan0 ]; do sleep .2; done" 2>/dev/null
|
||||
|
||||
# Set interfaces managed by NetworkManager back as managed
|
||||
for i in $(echo ${NM_MANAGED_IFACES} | tr ' ' '\n' | sort); do
|
||||
nmcli dev set "${i}" managed yes
|
||||
done
|
||||
|
||||
# Bring up the interfaces that were bring down on suspend
|
||||
for i in $(echo ${RESUME_IFACES} | tr ' ' '\n' | sort); do
|
||||
grep -qs "^${i}" /var/run/ifstate || ifup "${i}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Resume NetworkManager after suspend
|
||||
${NM_DAEMON} start
|
||||
|
||||
# Resume bluetooth interface
|
||||
if [ -d "/proc/device-tree/bluetooth" ]; then
|
||||
if [ -n "${up_bt_on_resume}" ]; then
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ lockfd="9"
|
|||
|
||||
BT_INIT="/etc/init.d/bluetooth-init"
|
||||
BT_DAEMON="/etc/init.d/bluetooth"
|
||||
NM_DAEMON="/etc/init.d/networkmanager"
|
||||
|
||||
usage() {
|
||||
printf "\nSuspend system to RAM memory\n"
|
||||
|
|
@ -31,18 +32,14 @@ usage() {
|
|||
}
|
||||
|
||||
suspend_interfaces() {
|
||||
# Stop NetworkManager before suspend
|
||||
${NM_DAEMON} stop
|
||||
|
||||
# Suspend wireless interfaces
|
||||
if [ -d "/proc/device-tree/wireless" ]; then
|
||||
for i in $(sed -ne 's,^\(wlan[0-9]\)=.*,\1,g;T;p' /var/run/ifstate | sort -r); do
|
||||
ifdown "${i}" && RESUME_IFACES="${RESUME_IFACES:+${RESUME_IFACES} }${i}"
|
||||
done
|
||||
|
||||
# Get a list of the wireless interfaces managed by NetworkManager
|
||||
# and set them to unmanaged before suspend.
|
||||
for i in $(nmcli -t -f DEVICE,TYPE,STATE dev | grep :wifi: | grep -v unmanaged | cut -d':' -f1); do
|
||||
nmcli dev set "${i}" managed no && NM_MANAGED_IFACES="${NM_MANAGED_IFACES:+${NM_MANAGED_IFACES} }${i}"
|
||||
done
|
||||
|
||||
grep -qs '^ath6kl_sdio' /proc/modules && rmmod ath6kl_sdio ath6kl_core
|
||||
fi
|
||||
|
||||
|
|
@ -61,11 +58,6 @@ resume_interfaces() {
|
|||
udevadm trigger --action=add --attr-match="modalias=sdio:c00v0271d0301"
|
||||
timeout -t 5 sh -c "while [ ! -d /sys/class/net/wlan0 ]; do sleep .2; done" 2>/dev/null
|
||||
|
||||
# Set interfaces managed by NetworkManager back as managed
|
||||
for i in $(echo ${NM_MANAGED_IFACES} | tr ' ' '\n' | sort); do
|
||||
nmcli dev set "${i}" managed yes
|
||||
done
|
||||
|
||||
# Bring up the interfaces that were bring down on suspend
|
||||
for i in $(echo ${RESUME_IFACES} | tr ' ' '\n' | sort); do
|
||||
grep -qs "^${i}" /var/run/ifstate || ifup "${i}"
|
||||
|
|
@ -79,6 +71,9 @@ resume_interfaces() {
|
|||
${BT_DAEMON} start >/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
# Resume NetworkManager after suspend
|
||||
${NM_DAEMON} start
|
||||
}
|
||||
|
||||
enter_critical_section() {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ lockfd="9"
|
|||
|
||||
BT_INIT="/etc/init.d/bluetooth-init"
|
||||
BT_DAEMON="/etc/init.d/bluetooth"
|
||||
NM_DAEMON="/etc/init.d/networkmanager"
|
||||
|
||||
usage() {
|
||||
printf "\nSuspend system to RAM memory\n"
|
||||
|
|
@ -31,18 +32,14 @@ usage() {
|
|||
}
|
||||
|
||||
suspend_interfaces() {
|
||||
# Stop NetworkManager before suspend
|
||||
${NM_DAEMON} stop
|
||||
|
||||
# Suspend wireless interfaces
|
||||
if [ -d "/proc/device-tree/wireless" ]; then
|
||||
for i in $(sed -ne 's,^\(wlan[0-9]\)=.*,\1,g;T;p' /var/run/ifstate | sort -r); do
|
||||
ifdown "${i}" && RESUME_IFACES="${RESUME_IFACES:+${RESUME_IFACES} }${i}"
|
||||
done
|
||||
|
||||
# Get a list of the wireless interfaces managed by NetworkManager
|
||||
# and set them to unmanaged before suspend.
|
||||
for i in $(nmcli -t -f DEVICE,TYPE,STATE dev | grep :wifi: | grep -v unmanaged | cut -d':' -f1); do
|
||||
nmcli dev set "${i}" managed no && NM_MANAGED_IFACES="${NM_MANAGED_IFACES:+${NM_MANAGED_IFACES} }${i}"
|
||||
done
|
||||
|
||||
grep -qs '^wlan' /proc/modules && rmmod wlan
|
||||
fi
|
||||
|
||||
|
|
@ -61,11 +58,6 @@ resume_interfaces() {
|
|||
udevadm trigger --action=add --attr-match="modalias=sdio:c00v0271d050A"
|
||||
timeout -t 5 sh -c "while [ ! -d /sys/class/net/wlan0 ]; do sleep .2; done" 2>/dev/null
|
||||
|
||||
# Set interfaces managed by NetworkManager back as managed
|
||||
for i in $(echo ${NM_MANAGED_IFACES} | tr ' ' '\n' | sort); do
|
||||
nmcli dev set "${i}" managed yes
|
||||
done
|
||||
|
||||
# Bring up the interfaces that were bring down on suspend
|
||||
for i in $(echo ${RESUME_IFACES} | tr ' ' '\n' | sort); do
|
||||
grep -qs "^${i}" /var/run/ifstate || ifup "${i}"
|
||||
|
|
@ -79,6 +71,9 @@ resume_interfaces() {
|
|||
${BT_DAEMON} start >/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
# Resume NetworkManager after suspend
|
||||
${NM_DAEMON} start
|
||||
}
|
||||
|
||||
enter_critical_section() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue