Switch on Wake on LAN

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Switch on Wake on LAN

Unread post by dbod » Fri Apr 26, 2019 10:22 pm

I understand that I need to set "enable_wol=1" in the kernel command line in order to activate WOL.

I found a boot.ini in /usr/share/bootini and added the flag there and ran the bootini-persistence.pl script which is located in that directory. The script reported no problems.

All the things I did were based on assumptions :-)

But after a reboot looking at /proc/cmdline the flag did not show up and no WOL was activated.

Which of my assumptions are wrong?

Thanks in advance

User avatar
mad_ady
Posts: 6529
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Switch on Wake on LAN

Unread post by mad_ady » Fri Apr 26, 2019 10:41 pm

The bootini-persistence script parses /media/boot/boot.ini.default and sets uncommented values there in /media/boot/boot.ini.
So the correct way is to edit /media/boot/boot.ini.default, uncomment the bootargs line and set it as the one in boot.ini + wol, save it and then run bootini-persistence as root and check after booting.
These users thanked the author mad_ady for the post:
dbod (Mon Apr 29, 2019 6:26 pm)

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Tue Apr 30, 2019 2:44 am

Hmmm.. When editing boot.ini files I use to be very cautious.... The boot.init.default in /media/boot has only 11 lines and there is in particular no "bootargs" line. Adding the line there results in nothing happening to boot.ini.

User avatar
mad_ady
Posts: 6529
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Switch on Wake on LAN

Unread post by mad_ady » Tue Apr 30, 2019 3:01 am

I don't have the N2 close by to check, but the C2 has

Code: Select all

#C2 bootargs
#bootargs=root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro ${condev} no_console_suspend hdmimode=${m} ${comde} m_bpp=${m_bpp} vout=${vout} fsck.repair=yes net.ifnames=0 elevator=noop disablehpd=${hpd} max_freq=${max_freq} maxcpus=${maxcpus} monitor_onoff=${monitor_onoff}
display_autodetect=false

inside boot.ini.default. Can you post both your boot.ini and boot.ini.default?

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Tue Apr 30, 2019 3:09 am

boot.init.default:
----------------------------------------------------------------------------------------------------------------------------------

[general]
#This configuration is parsed by the bootini-persistence script
#uncomment the section you want to override in boot.ini and set the desired value

####################
# N2 configuration #
####################

#N2 resolution
#hdmimode=1080p60hz

----------------------------------------------------------------------------------------------------------------------------------

boot.ini:

[....lots of lines omitted ...]

# max cpu frequency for little core, A53 in MHz unit
# setenv max_freq_a53 "1992" # 1.992 GHz
setenv max_freq_a53 "1896" # 1.896 GHz, default value
# setenv max_freq_a53 "1704" # 1.704 GHz


# max cpu-cores
# Note:
# CPU's 0 and 1 are the A53 (small cores)
# CPU's 2 to 5 are the A73 (big cores)
# Lowering this value disables only the bigger cores (the last cores).
# setenv maxcpus "4"
# setenv maxcpus "5"
setenv maxcpus "6"

### Normal HDMI Monitors
if test "${display_autodetect}" = "true"; then hdmitx edid; fi
if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi

# Boot Args
setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan}"

# Set load addresses
setenv dtb_loadaddr "0x1000000"
setenv k_addr "0x1100000"
setenv loadaddr "0x1B00000"
setenv initrd_loadaddr "0x3700000"

# Load kernel, dtb and initrd
fatload mmc ${devno}:1 ${k_addr} Image.gz
fatload mmc ${devno}:1 ${dtb_loadaddr} meson64_odroidn2.dtb
fatload mmc ${devno}:1 ${initrd_loadaddr} uInitrd
fdt addr ${dtb_loadaddr}
# unzip the kernel
unzip ${k_addr} ${loadaddr}

# boot
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}

User avatar
odroid
Site Admin
Posts: 32121
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 292 times
Contact:

Re: Switch on Wake on LAN

Unread post by odroid » Tue Apr 30, 2019 8:55 am

Our latest boot.ini file always exists in this link.
https://github.com/mdrjr/n2_bootini/blo ... ot.ini#L90

Which Kernel version do you use?
Did you edit /media/boot/boot.ini file?
Do you use our Ubuntu image?

User avatar
tobetter
Posts: 3902
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Switch on Wake on LAN

Unread post by tobetter » Tue Apr 30, 2019 12:19 pm

@dbod, you can add enable_wol=1 to the end of line setenv bootargs in boot.ini

User avatar
mad_ady
Posts: 6529
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Switch on Wake on LAN

Unread post by mad_ady » Tue Apr 30, 2019 12:26 pm

For persistency add:

Code: Select all

bootargs=root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} enable_wol=1
in /media/boot/boot.ini.default and run sudo bootini-persistence.pl

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Tue Apr 30, 2019 3:38 pm

Which Kernel version do you use? 4.9.168-24
Did you edit /media/boot/boot.ini file? no, changes were made to boot.init.default
Do you use our Ubuntu image? yes, but I already did a release upgrade to Disco

User avatar
odroid
Site Admin
Posts: 32121
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 292 times
Contact:

Re: Switch on Wake on LAN

Unread post by odroid » Tue Apr 30, 2019 3:54 pm

The latest kernel update should be 4.9.170-27.
If you don't use 18.04 Bionic, you will have a pain to keep the kernel version since we support only LTS.

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Tue Apr 30, 2019 4:23 pm

odroid wrote:
Tue Apr 30, 2019 3:54 pm
The latest kernel update should be 4.9.170-27.
If you don't use 18.04 Bionic, you will have a pain to keep the kernel version since we support only LTS.
Okay. That is something I had to learn then. Was that mentioned anywhere and I overlooked it?

But anyway: When setting enable_wol=1 in boot.ini and rebooting the system, that does indeed show up in ]/proc/cmdline.

But then the system does still not react to a WoL packet. I tried sending that directly from my router and from a Raspberry Pi nearby.

User avatar
tobetter
Posts: 3902
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Switch on Wake on LAN

Unread post by tobetter » Tue Apr 30, 2019 4:40 pm

dbod wrote:
Tue Apr 30, 2019 4:23 pm
odroid wrote:
Tue Apr 30, 2019 3:54 pm
The latest kernel update should be 4.9.170-27.
If you don't use 18.04 Bionic, you will have a pain to keep the kernel version since we support only LTS.
Okay. That is something I had to learn then. Was that mentioned anywhere and I overlooked it?

But anyway: When setting enable_wol=1 in boot.ini and rebooting the system, that does indeed show up in ]/proc/cmdline.

But then the system does still not react to a WoL packet. I tried sending that directly from my router and from a Raspberry Pi nearby.
How did you trigger the WOL packet?
Do you have USB-to-SERIAL debug board?

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Tue Apr 30, 2019 5:35 pm

Hi, as I said I triggered that
1) from a Raspberry Pi using the wakeonlan command with the appropriate MAC address given
2) from my router via simple button press :-)

And no, I don't have such a board.

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Tue Apr 30, 2019 5:39 pm

But I guess I should start again with a pristine image.

I only found instructions for the other Odroid's but not for the N2.

Is there an offical description somewhere on how to flash the emmc correctly? I would hate to brick that, especially as I have the 128GB one.

If I just use etcher in the straightforward way, I would know how to do it.

User avatar
tobetter
Posts: 3902
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Switch on Wake on LAN

Unread post by tobetter » Tue Apr 30, 2019 11:35 pm

dbod wrote:
Tue Apr 30, 2019 5:39 pm
But I guess I should start again with a pristine image.

I only found instructions for the other Odroid's but not for the N2.

Is there an offical description somewhere on how to flash the emmc correctly? I would hate to brick that, especially as I have the 128GB one.

If I just use etcher in the straightforward way, I would know how to do it.
FYI, https://wiki.odroid.com/troubleshooting ... ing_etcher

eMMC would not be bricked if you do not connect incorrectly. If OS boot is failed, you can flash it again.

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Fri May 03, 2019 3:16 am

This still does not work for me.

I changed /media/boot/boot.ini to include enable_wol=1, as can be verified by having a look at /proc/cmdline after a reboot:

Code: Select all

root@odroid:/media/boot# cat /proc/cmdline                                         │
root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw console=ttyS0,115200n8  │
no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=1080p60hz c│
vbsmode=576cvbs max_freq_a53=1896 max_freq_a73=1800 maxcpus=6 voutmode=hdmi  disabl│
ehpd=false cvbscable=0 overscan=100 enable_wol=1 

The WoL packet makes its way to the board's interface:

Code: Select all

db@odroid ~ ❯❯❯ sudo nc -ul -p 9                                            
BBBBBBBBBBBBBBBB
My kernel version is:

Code: Select all

db@odroid ~ ❯❯❯ uname -r                                                           │
4.9.170-27   
Does Wake on LAN work for anybody out there on the N2?

whaly
Posts: 10
Joined: Sat May 11, 2019 8:56 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by whaly » Sat May 11, 2019 9:01 am

Hi,

I have the same result for
cat /proc/cmdline
nc -ul -p 9
uname -r

and wake on lan is not working too :(

whaly
Posts: 10
Joined: Sat May 11, 2019 8:56 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by whaly » Sat May 11, 2019 9:35 am

each boot the wake-on lan seems to be disabled on eth0

Code: Select all

root@odroid:~# ethtool eth0 | grep Wake-on
        Supports Wake-on: ug
        Wake-on: d
I have tried both
root@odroid:~# ethtool -s eth0 wol g
and
root@odroid:~# ethtool -s eth0 wol ug

then
root@odroid:~# poweroff

and still not wakeonlan working

User avatar
tobetter
Posts: 3902
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Switch on Wake on LAN

Unread post by tobetter » Sat May 11, 2019 2:02 pm

whaly wrote:
Sat May 11, 2019 9:35 am
each boot the wake-on lan seems to be disabled on eth0

Code: Select all

root@odroid:~# ethtool eth0 | grep Wake-on
        Supports Wake-on: ug
        Wake-on: d
I have tried both
root@odroid:~# ethtool -s eth0 wol g
and
root@odroid:~# ethtool -s eth0 wol ug

then
root@odroid:~# poweroff

and still not wakeonlan working
The command using ethtool won't work since the driver is not supporting. Please add "enable_wol=1" to boot.ini instead.

whaly
Posts: 10
Joined: Sat May 11, 2019 8:56 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by whaly » Sat May 11, 2019 6:42 pm

"enable_wol=1" to boot.ini didn't work neither thats why I have tested the ethtool.

User avatar
mad_ady
Posts: 6529
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Switch on Wake on LAN

Unread post by mad_ady » Sat May 11, 2019 6:48 pm

Are you sending the wol packet from the same lan, or across a router? If sending through a router, the router needs a static mac-ip binding in its arp table so that it doesn't do arp for the sleeping device.

whaly
Posts: 10
Joined: Sat May 11, 2019 8:56 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by whaly » Sun May 12, 2019 2:47 am

I have tried to send the wol packet from a windows 10 wsl ubuntu bash and from a raspberry pi.
They are on the same subnet 192.168.180.x, but they are connected on a openwrt/lede switch/router the dhcp server is done by openwrt, I have added a static leases for the n2 but still not working.

whaly
Posts: 10
Joined: Sat May 11, 2019 8:56 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by whaly » Sun May 12, 2019 2:50 am

I don't think it's a routing problem because when the odroid is on and like dbod when I do
sudo nc -ul -p 9
I receive the packet.

User avatar
mad_ady
Posts: 6529
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Switch on Wake on LAN

Unread post by mad_ady » Sun May 12, 2019 3:33 am

Can you do two tests:
1. Capture the wol packet with tcpdump when the n2 is on.
2. Capture the same packet with the N2 off.

The packet should normally have a broadcast mac (ff:ff:ff:ff:ff:ff), but if it doesn't, when the N2 is off it stops replying to arp and no wake up packets are sent.

Also how are you stopping the N2? Try poweroff instead of halt. They may behave differently

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Sun May 12, 2019 3:33 am

I think the problem is twofold.

We first have to see whether the device really reacts to the packet at all. I guess it does but have not seen a proof yet.

The other one is to make the OS (in my case Ubuntu) permanently set things so that the signal is not ignored again. There is a very helpful page on some Ubuntu site on that. Seems to be a science of its own.

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Sun May 12, 2019 3:46 am

mad_ady wrote:
Sat May 11, 2019 6:48 pm
If sending through a router, the router needs a static mac-ip binding in its arp table so that it doesn't do arp for the sleeping device.
How do I know whether my router acts like that?

And does it really need that if I broadcast broad enough?

whaly
Posts: 10
Joined: Sat May 11, 2019 8:56 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by whaly » Sun May 12, 2019 4:23 am

I use poweroff like in the doc, and no led are on after this command.

For the test here is the result of the first test with odroid n2 on :

From my Windows 10 WSL Ubuntu bash :

Code: Select all

~$ wakeonlan 00:1e:06:42:01:47
Sending magic packet to 255.255.255.255:9 with 00:1e:06:42:01:47
From the odroid N2 :

Code: Select all

root@odroid:~# tcpdump -i eth0 -v -X port 9
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
19:16:42.021581 IP (tos 0x0, ttl 128, id 49906, offset 0, flags [none], proto UDP (17), length 130)
    bigwhaly.lan.65523 > 255.255.255.255.discard: UDP, length 102
        0x0000:  4500 0082 c2f2 0000 8011 021f c0a8 b4b1  E...............
        0x0010:  ffff ffff fff3 0009 006e 0f4b ffff ffff  .........n.K....
        0x0020:  ffff 001e 0642 0147 001e 0642 0147 001e  .....B.G...B.G..
        0x0030:  0642 0147 001e 0642 0147 001e 0642 0147  .B.G...B.G...B.G
        0x0040:  001e 0642 0147 001e 0642 0147 001e 0642  ...B.G...B.G...B
        0x0050:  0147 001e 0642 0147 001e 0642 0147 001e  .G...B.G...B.G..
        0x0060:  0642 0147 001e 0642 0147 001e 0642 0147  .B.G...B.G...B.G
        0x0070:  001e 0642 0147 001e 0642 0147 001e 0642  ...B.G...B.G...B
        0x0080:  0147            
From the raspberry pi :

Code: Select all

osmc@osmc:~$ sudo tcpdump -i eth0 -v -X port 9
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
21:16:42.033367 IP (tos 0x0, ttl 128, id 49906, offset 0, flags [none], proto UDP (17), length 130)
    bigwhaly.lan.65523 > 255.255.255.255.discard: UDP, length 102
        0x0000:  4500 0082 c2f2 0000 8011 021f c0a8 b4b1  E...............
        0x0010:  ffff ffff fff3 0009 006e 0f4b ffff ffff  .........n.K....
        0x0020:  ffff 001e 0642 0147 001e 0642 0147 001e  .....B.G...B.G..
        0x0030:  0642 0147 001e 0642 0147 001e 0642 0147  .B.G...B.G...B.G
        0x0040:  001e 0642 0147 001e 0642 0147 001e 0642  ...B.G...B.G...B
        0x0050:  0147 001e 0642 0147 001e 0642 0147 001e  .G...B.G...B.G..
        0x0060:  0642 0147 001e 0642 0147 001e 0642 0147  .B.G...B.G...B.G
        0x0070:  001e 0642 0147 001e 0642 0147 001e 0642  ...B.G...B.G...B
        0x0080:  0147                                     .G
and now after the poweroff :
From my Windows 10 WSL Ubuntu bash :

Code: Select all

~$ wakeonlan 00:1e:06:42:01:47
Sending magic packet to 255.255.255.255:9 with 00:1e:06:42:01:47
From the raspberry pi :

Code: Select all

osmc@osmc:~$ sudo tcpdump -i eth0 -v -X port 9
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
21:20:55.303838 IP (tos 0x0, ttl 128, id 49915, offset 0, flags [none], proto UDP (17), length 130)
    bigwhaly.lan.59040 > 255.255.255.255.discard: UDP, length 102
        0x0000:  4500 0082 c2fb 0000 8011 0216 c0a8 b4b1  E...............
        0x0010:  ffff ffff e6a0 0009 006e 289e ffff ffff  .........n(.....
        0x0020:  ffff 001e 0642 0147 001e 0642 0147 001e  .....B.G...B.G..
        0x0030:  0642 0147 001e 0642 0147 001e 0642 0147  .B.G...B.G...B.G
        0x0040:  001e 0642 0147 001e 0642 0147 001e 0642  ...B.G...B.G...B
        0x0050:  0147 001e 0642 0147 001e 0642 0147 001e  .G...B.G...B.G..
        0x0060:  0642 0147 001e 0642 0147 001e 0642 0147  .B.G...B.G...B.G
        0x0070:  001e 0642 0147 001e 0642 0147 001e 0642  ...B.G...B.G...B
        0x0080:  0147        
the packet was received on the other computer but not the wake on lan didn't work.

User avatar
mad_ady
Posts: 6529
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Switch on Wake on LAN

Unread post by mad_ady » Sun May 12, 2019 6:05 am

Ok, the packet is broadvast. It should arrive at the N2. Is the N2's network port still up? Any lights on the N2 ethernet/switch port? Do they blink when sending the packet?
Network looks fine...

testuser
Posts: 3
Joined: Sun May 12, 2019 9:24 am
languages_spoken: english
ODROIDs: N2, HC1
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by testuser » Sun May 12, 2019 9:42 am

So I got wake-on-lan almost working. After adding the enable_wol=1 to boot.ini.

Code: Select all

$ sudo apt-get install pm-utils
$ sudo pm-suspend # the blue system light is off, the green light is on, and it consumes 0.6W

Code: Select all

$ wakeonlan 00:1e:06:41:11:12
Sending magic packet to 255.255.255.255:9 with 00:1e:06:41:11:12
It does wake up, but afterwards it cannot access the filesystem:

Code: Select all

$ ls
-bash: ls: command not found

whaly
Posts: 10
Joined: Sat May 11, 2019 8:56 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by whaly » Sun May 12, 2019 5:13 pm

when I use the poweroff command all the led are off.

testuser
Posts: 3
Joined: Sun May 12, 2019 9:24 am
languages_spoken: english
ODROIDs: N2, HC1
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by testuser » Sun May 12, 2019 5:19 pm

I'm guessing that you're powering it off completely. I've got wakeonlan working on a different machine from suspend, but haven't tried doing it from full poweroff. I'm guessing there's something needed to be set in the bios for that to be successful.

whaly
Posts: 10
Joined: Sat May 11, 2019 8:56 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by whaly » Sun May 12, 2019 5:20 pm

With pm-suspend like tesuser I, the wakeonlan is working but no bash.

Maybe it's the poweroff command that doesn't detect the param enable_wol ?

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Sun May 12, 2019 10:45 pm

[Having the wake on LAN permanently active regarding the OS itself must be something like

https://askubuntu.com/questions/764158/ ... untu-16-04

We have to be aware of the fact that Ubuntu is systemd based.

I just cannot try it myself, as my N2 does not yet react to the signal.

whaly
Posts: 10
Joined: Sat May 11, 2019 8:56 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by whaly » Mon May 13, 2019 3:56 am

with no success I have tried to add

Code: Select all

root@odroid:~# cat /etc/default/halt
NETDOWN=no

testuser
Posts: 3
Joined: Sun May 12, 2019 9:24 am
languages_spoken: english
ODROIDs: N2, HC1
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by testuser » Mon May 13, 2019 3:34 pm

whaly wrote:
Sun May 12, 2019 5:20 pm
With pm-suspend like tesuser I, the wakeonlan is working but no bash.
So that means that either the filesystem is not mounted on restore or some drivers aren't loaded coming off of suspend.

Code: Select all

Module                  Size  Used by
fuse                  118784  3
squashfs               49152  0
cpufreq_ondemand       20480  0
cpufreq_powersave      16384  0
cpufreq_userspace      16384  0
cpufreq_conservative    16384  0
rtc_pcf8563            20480  0
i2c_meson_master       20480  0
sch_fq_codel           20480  2
firmware               24576  0
media_clock            45056  0
ip_tables              32768  0
x_tables               49152  1 ip_tables
ipv6                  483328  32
Got to muck around with seeing if this is the problem...has anyone successfully gotten WOL working?

whaly
Posts: 10
Joined: Sat May 11, 2019 8:56 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Switch on Wake on LAN

Unread post by whaly » Tue May 14, 2019 4:04 am

I have read that with systemd we should use systemctl suspend and not pm-suspend, I have tried it but it doesn't work, it poweroff the network.

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Wed Jun 19, 2019 7:07 pm

Something else around this topic:

I do the bespoke wol setting in /media/boot/boot.ini.default but it looks like after an upgrade that does not make its way into /media/boot.ini.

What can be the reason for this?

I know these files are also in /usr/share/bootini. The perl script doing the transformation is only there. Looking at the code superficially it should do what it is expected to do. Does this script also need to be in /media/boot? At least for me it is not.

User avatar
mad_ady
Posts: 6529
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Switch on Wake on LAN

Unread post by mad_ady » Wed Jun 19, 2019 10:12 pm

How does /media/boot/boot.ini.default look like?

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Thu Jun 20, 2019 2:53 am

There you go:

Code: Select all

[general]
#This configuration is parsed by the bootini-persistence script
#uncomment the section you want to override in boot.ini and set the desired value

####################
# N2 configuration #
####################

#N2 resolution
#hdmimode=1080p60hz

# Boot Args
setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} enable_wol=1"

User avatar
mad_ady
Posts: 6529
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Switch on Wake on LAN

Unread post by mad_ady » Thu Jun 20, 2019 12:24 pm

The syntax for bootargs is not correct. Instead of setenv bootargs "...", try bootargs="...". Manually run the persistence script after and check boot.ini.
These users thanked the author mad_ady for the post:
dbod (Thu Jun 20, 2019 4:50 pm)

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Switch on Wake on LAN

Unread post by balbes150 » Sat Jun 22, 2019 1:13 am

mad_ady wrote:
Thu Jun 20, 2019 12:24 pm
The syntax for bootargs is not correct. Instead of setenv bootargs "...", try bootargs="...". Manually run the persistence script after and check boot.ini.
The syntax is correct. Text file "boot.ini" is used for u-boot. For verification, you can burn the image to SD card. Open the first partition on the PC, there should be a file "boot.ini", add the string "bootargs" the setting you want, and check the run with him. You can freely edit this file, even if you make a mistake, you can easily fix it on your PC. Here is an example of a working "boot.ini" which is used in Armbian with kernel 4.9.
After checking on the SD card, you can easily transfer the checked settings directly to the working "boot.ini" on eMMC.

If you add to the u-boot SPI direct launch from USB, all the checks you can perform using a simple USB flash drive (unlike the card reader, USB support is absolutely on all PCs).

https://github.com/150balbes/Build-Armb ... ot.ini#L89

User avatar
mad_ady
Posts: 6529
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Switch on Wake on LAN

Unread post by mad_ady » Sat Jun 22, 2019 1:51 am

I meant the syntax is wrong for boot.ini.default, which is an ini-like file and gets parsed by that perl script.

User avatar
odroid
Site Admin
Posts: 32121
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 292 times
Contact:

Re: Switch on Wake on LAN

Unread post by odroid » Fri Aug 02, 2019 9:29 am

We've tested it.
But the N2 waked up around 15 minutes later. :o
We will try to check why it is so lazy.

User avatar
mad_ady
Posts: 6529
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 125 times
Contact:

Re: Switch on Wake on LAN

Unread post by mad_ady » Fri Aug 02, 2019 1:03 pm

odroid wrote:We've tested it.
But the N2 waked up around 15 minutes later. :o
We will try to check why it is so lazy.
It's normal if you try to wake it up in the morning. It happens to everyone Image

User avatar
odroid
Site Admin
Posts: 32121
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 292 times
Contact:

Re: Switch on Wake on LAN

Unread post by odroid » Wed Aug 07, 2019 11:41 am

Try the latest Kernel update 4.9.187-52.
It wakes up immediately now.

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Tue Aug 20, 2019 5:53 am

I still cannot reproduce it. Can you tell me how you shutdown the system and if there are any other customizations needed? Thanks.

User avatar
odroid
Site Admin
Posts: 32121
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 292 times
Contact:

Re: Switch on Wake on LAN

Unread post by odroid » Tue Aug 20, 2019 10:48 am

There was nothing special.
Just installed the latest image 201908** and ran "poweroff" command on terminal.
https://wiki.odroid.com/odroid-n2/os_images/ubuntu

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Tue Aug 20, 2019 4:06 pm

Nope. Does not work for me. One fine day I will find out why.

User avatar
odroid
Site Admin
Posts: 32121
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 292 times
Contact:

Re: Switch on Wake on LAN

Unread post by odroid » Tue Aug 20, 2019 4:39 pm

Which OS image did you try?
Let me know the OS file name and we will try to reproduce the issue.

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Switch on Wake on LAN

Unread post by dbod » Tue Aug 20, 2019 5:25 pm

> uname -a
Linux odroid 4.9.187-53 #1 SMP PREEMPT Fri Aug 9 06:12:18 -03 2019 aarch64 aarch64 aarch64 GNU/Linux
> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"


This is the 2019-03-29 minimal image with mate desktop installed and after all updates that came up in the meantime.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests