Power Management Awareness


Connecting to a mangOH Green board through Ethernet cable and having it powered only of the power supply will not be enough to have a sustainable connection. In many cases, it will appear that the Ethernet port will not get enough power to stay on, but don’t worry, your board is not defective! The board was actually programmed to automatically go into power saving mode if the host decides to suspend the USB connection (in our case, we did not have an upstream machine connected to our USB hub). The simple solution to this obstacle would be to disable the auto sleep feature. There are two ways to do this:

##1) Disabling auto sleep feature manually:
a. Open a console or ssh connection to the desired mangOH board and log in
b. Edit enable_autosleep.sh file using vi text editor tool
vi /etc/init.d/enable_autosleep.sh
c. Scroll down the file (using the down arrow key) until you reach the following function
# Enable the autosleep feature
if [ -f /sys/power/autosleep ]
echo mem > /sys/power/autosleep

d. Once you have reached this function, you can now press the i key (this will place you into insert mode)
e. Edit the text so it looks like the following
# Enable the autosleep feature
if [ -f /sys/power/autosleep ]
# stop autosleep
#echo mem > /sys/power/autosleep
echo "Disable Autosleep"
echo off > /sys/power/autosleep

f. Press ESC key and then type :wq! (this will save and then quit the file)
The next time you reboot the manhOH board, the auto sleep on USB suspend function will be disabled.

##2) Disabling auto sleep feature using an automated script:
a. Download DisableUsbSleep.sh.gz
b. Unpack the script (using gunzip on Linux or 7zip on Windows)
c. Copy the DisavleUsbSleep.sh script to your mangOH board (scp on Linux, WinSCP on Windows)
d. Open a console or ssh connection to the desired mangOH board and log in
e. Run the script
This will modify /etc/init.d/enable_autosleep.sh to disable the auto-sleep feature. Next time the mangOH board will be rebooted, the auto sleep on USB suspend functionality will be disabled.

#Wavefront #hardware #offline # network #wp8548 #CF3


Please note that from Legato 16.10, the new devMode app is handling that for you.
Have a look at http://legato.io/legato-docs/latest/howToDevMode.html


Yes, the devMode app uses the Power Management API (http://legato.io/legato-docs/latest/c_pm.html) to keep the system awake. Your own custom app can do that too.




right… lets try that again…

File not found

The site configured at this address does not contain the requested file.


I’m not sure what content was at that previous URL, but this is the information I found (using the search box on legato.io) http://legato.io/legato-docs/latest/basicTargetDevMode.html


Is there a way to “disable” this from being built included in Legato-Dist ? as with the custom image build it appears to be included and running by default after a new flash, while im at it the mentioned below are apps also included that we dont need

[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp


The system definition file (.sdef) defines which apps are in the Legato system that is built. Legato’s Makefile has a variable named SDEF_TO_USE which controls which SDEF it uses. Within the primary Makefile you can see that it is set like this SDEF_TO_USE ?= default.sdef. This actually has no effect in the case of the WP modules because of another line earlier in the Makefile. That line is include $(wildcard modules/*/moduleDefs. That line causes modules/WiFi/moduleDefs to be included which setsSDEF_TO_USEif it's not already set tomodules/WiFi/wifi.sdef`.

I’m not sure exactly what it is that you do want in your SDEF. You can define your own and then pass SDEF_TO_USE=path/to/your/system.sdef if you are building with the Legato Makefile. Or if you’re just using mksys, then you just pass your sdef as the one to build.


A bit confusing, there are no sdef files in Legato-Dist there are sdef files in legato

but these apps appear to be included in the custom built image in the Legato-Dist AKA Yocto tree