WOL for Duo4k? [wip]

Sharo

Vu+ Newbie
Hello people :)
Quick introduction: I'm frustrated from lack of WoL on duo4k, it is really useful feature. I have been using IPBOX for almost 10 years, and it didn't have it either. But i had rasp+ir diode (lame but the only possible solution, as the STB source was waay older than the installedd image).
Now I see that in vuplus world this is much better.
So back to the topic, I see that duo4k is with BCM7278, and the devicetree (fdt or /proc/devicetree) have everything required for wol. BUT the kernel does not support it - that is 4.1.45. The driver for systemportlite (switch chip) is generic for systemport (support for systemportlite is introduced in 4.11 kernel). Difference between Lite and non-lite is that the latter one has 3 interrupts (WoL is #3), and Lite has 2 (WoL is #2) - so using 4.1.45 WoL interrupt never gets correct.
So 2 options i see here - compile image with kernel >4.11 (unfortunately there are closed source modules, so this seems no-go without vuplus support); second option - manually change bcmsysport.c & recompile. I'll try this tonight.

Probably there will be other issues (i.e. aon-ctrl, which also does not have drivers in 4.1)...

Anyone tried something regarding this topic?
 

AlexWilMac

Moderator
I'm curious to know what would you use WOL for.
If for streaming, you don't need it. If for FTP access, you don't need it. So, I'm interested to know the final reason.
 

Sharo

Vu+ Newbie
Well, I don't like the idea to run the box 24/7 (not just because of electricity bill). Occasionally I need to watch something over the internet/record something - and bad surprise - the box is off, and there is nobody to turn it on. My cat is not clever enough to do it for me :)
 

AlexWilMac

Moderator
OK, so it's the energy saving thing. Actually, I don't know how much a box requires in StandBy; but it's so comfortable to have access to it from any location for streaming or for adding a timer, that I much prefer to "pay" something for this.
By the way, there is a plugin for OBH but I don't know if and how it works: maybe you can give it a try ;)
 

Attachments

  • WOL-plugin.jpg
    388.9 KB · Views: 18

Sharo

Vu+ Newbie
Thanks Alex. This plugin is to wake another machine in the network.
My previous box was not very stable - if i left overnight becomes unresponsive (20+ sec to display power menu), sometimes it just freezes...i tried to set cron to reboot it everyday, but then i got issues with the hdd.... As for Duo4k - standby is ~ 25W (and the hdd does not spin down), deep standby ~1W.

Anyway, I think first to patch vu+ official image, because it has coldboot binary, which i couldn't find in BH and OBH :blink: (just for the test) If it works there, it should work in every other distro.
Now it is compililng....sloooow
 

AlexWilMac

Moderator
The fact it becomes unresponsive is not normal. What OBH version are you using? Usually, it's plugins that cause mess: have you tried a clean image without any plugins of any sort, at least for some days? I've never had such a problem, even with the oldest OBH 0.6.
 

Shiro

BH-C
Did you checked for the plugin in the image feeds ?

The plugin machine soecific is in image, green panel, addons, feeds plugins, extensions name: wakeonlan
 

p.rodrigues

Vu+ User
I always have my boxs connected 24/7 ... Uno 4K SE is the "base" box, where I access streaming when I'm away from home. If a lock happens, where a restart is needed, a lock cannot be reached. So nothing like a smart plug which is what I use ... we can always turn off / on wherever we are. I think nobody turns off the router when leaving home ... I find a simple solution and consumption of this socket is negligible.
 

Sharo

Vu+ Newbie
Alex, it was not OpenBH :) It was based on original dgstation (korean) image.. To be honest, until yesterday, duo4k had 20 days uptime.
Anyway, i tried my kernel - it is no-go. After poweroff, LAN port LEDs are off. It seems it is missing some PM routines for S3/S5 standby, but i doubt that this is the problem. I'll give it another try, and then will get KNX power switch :wacko:
 

Sharo

Vu+ Newbie
Alex, I was referring to my previous box (IPBOX 910) - almost 10 years old. Sorry if it wasn't clear. No issues with OBH stability. No issues at all (except lack of wol :confused: & alphabetical sort of EPG).

So, back to the topic:
I disassembled DeviceTree structure (ftp-ed /sys/firmware/fdt on my local machine, and did dtd ....). Here are my findings:
1. There is hardware support for WOL - sysport (eth0/sys0) and timer wakeup irqs are tied to the same L2 interrupt controller that support cpu wakeup (and it is working - wakeup timer).
2. Sysport wakeup irq does not get initialized correctly (driver does not consider Lite version, which is present in bcm7278).
2. The ethernet switch driver seems broken (old driver). Unfortunately new driver comes with a lot of changes in the kernel/devicetree handling :(

The options i see are (1) patch devicetree & use newer kernel or (2) try to fix switch driver code. First option is *really* dangerous, as patching the bootloader is necessary. In case of wrong image - the box becomes useless (or jtag-ed). So I'm trying now second option. Will post results when ready.

@mods, please move the topic if you find it to be more suitable for VU+ OE & Firmware develop
 

Sharo

Vu+ Newbie
Some update from this "experiment" :)
It took me some days to realize that the box is constructed in similar to dbox way - fronpanel is the one which turns on/off the box, and wakes it up on timer event. It is not bcm7278 chip. So "deep standby" is actually poweroff?
It seems that the same is in ultimo4k which supports wowl - I don't have such box to see where and how wifi is wired.
Also, both boxes are using magnum/nexus middleware (kernel modules), which are closed source, and seems difficult to patch them. There are differences in standby routines in 7445 and 7278 modules. I guess the only option is to beg vuplus to add wol support.
 

Venc

Vu+ Newbie
Hmm that's sheer disadvantage of Vu+ devices. I have two STBs and with harddisks, USB hub and external T2 tuners it all consumes about 30W of energy. And it's especially sad when compared to e.g. Octagon devices where the Wol works like a charm.
Currently I'm using dedicated phone with IR blaster output (old Xiaomi) which is pointed to devices and runs the blaster Power/on macro initiated by remote command (using Macrodroid). That's a little bit complicated solution so using simple Wol (wakelan) would be much better...
 
R

rinoronie

Guest
Why not use a SONOFF?
If the decoder is turned off, just turn off the power via the sonoff for a second and it automatically turns on again
 
Top