Alternative Firmware (Debian Jessie, Synology DSM6)

@Fox_exe nice work with DSMv6 on the WD Mycloud Mirror, i’ve noticed it runs pretty well, I was wondering if we can optimize the cpu usage further. Apparently in DSMv6 smbd uses a sh!t ton of cpu. Switching over to SMB3 with no encryption increased the speed a bit. Memory usage seems fine and surprisingly everything works well.

adding this to /etc/sysctl.conf helps a bit
net.ipv4.tcp_rmem= 10240 87380 12582912
net.ipv4.tcp_wmem= 10240 87380 12582912
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
then to apply live:
sudo sysctl -p /etc/sysctl.conf

From original firmware:

[CODE]echo 8192 > /proc/sys/vm/min_free_kbytes

echo 4096 > /proc/sys/net/core/somaxconn
echo 16777216 > /proc/sys/net/core/wmem_max
echo 16777216 > /proc/sys/net/core/rmem_max
echo 163840 > /proc/sys/net/core/wmem_default
echo 163840 > /proc/sys/net/core/rmem_default
echo 3000 > /proc/sys/net/core/netdev_max_backlog

echo 1800 > /proc/sys/net/ipv4/tcp_keepalive_time
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 2048 > /proc/sys/net/ipv4/tcp_max_syn_backlog
#echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 0 > /proc/sys/net/ipv4/tcp_timestamps

@Fox_exe those settings thrown into DSMv6 on Mirror v1 boosted speed +20MB write speed. Can you add that to the next DSM?

@Fox_exe is there external device support in DSMv6 for our device? I’d like to plug in another hard drive to my WD Mirror

@Fox_exe got a github?

Yes, supported, but error in syno-gpio lib - USB not powered on. I fix it in next release.
Also good news - I sucessfyl test official Marvell kernel (3.10.70+).

  • Fan now have normal driver (/sys/class/hwmon).
  • Fixed HDD leds + trigger for indicate HDD activity
  • Reset button do Reset action (Normal, software reboot on device). Can be changed to any other key (Driver: gpio-key, emulated keyboard key).
  • Still can’t find GPIO for rtc (Real Time Clock, based on SPI) - Fix: fake_hwclock package (Debian)
  • Still can’t find gpio for Power led (Blinking blue)
  • Missing support for spi flash (nand chip). I can fix it, but need more time.
1 Like

Good work :slight_smile:

@fox_exe any ETA on the new DSM release with FAN control? I’m worried my My cloud my burn up since the fan is none stop 100%

Fan control already in kernel. But missed thermal control, so DSM not change fan speed.
Now - another “problem”. Synobios - is not a protection, its just “Workaround”: Synobios control external MCU (Microchip, like popular Atmega, but based on Wetrend MCU).
In mirror and other “top” devices this chip control led, fan, LCD (For Ex2/Ex4), WOL, RTC, Thermal and maybe more things.
So, i need C++ programmers, who can write new synobios for our devices (Skeleton of this module already available, almost all hex codes for MCU available too. Need write simple code for control this MCU via /dev/ttyS1 (Yes, its just UART))

I really love where this project is heading. Thank you Fox for all your work so far!

I just got my hands on a MCM Gen2, which by the looks of your files, is not yet supported? I’m keen on the Debian + OMV project of yours. That sounds like a much better combination than what WD has on there now.

+1 for support on the Gen2! Correct me if I’m wrong about current support!

WDMC Gen2 supported. Debian - Full and stable (+OMV), DSM - partial (Works, need more tuning and fix’es).

I don’t see the firmware image file here:

Do i use the Gen1 file?

Oh, sorry. I dont have Mirror Gen2 and can’t test/develop firmware for this device.
I can use “blind” method, but still need someone with this device and wired UART console for debug.

Hey. Thanks a lot for your work Fox.
I have the WD My Cloud 2 To (the basic one :
Is there a version of this firmware for this NAS ?

Hey Fox, I’m seriously considering being your guinea pig. I’m reasonably savy with this stuff: I can certainly open this su.cker up and see about getting UART access. I’ll get back to you when I have that.

How smoothly do you think this could go? Did the other builds require significant rework? What are the chances it will work on the first try considering you have gen1 working? A good question would be whether the WD codebase is the same for Gen1 and Gen2 - do you know if it is?

Edit: Is this the UART port? 3.3V?
For Gen2 uart is same.

1 Like

Ahh gotcha, gotta do some more disassembly and soldering. This is getting fun!

I got this gen2 open. The board looks a bit different, but I found the UART.

By trial and error, I found the speed of the MCM is 115200 baud, but I’m having RX problems… that is, the MCM’s TX gets garbled by my receiver.

Bu?yAox v1.20.1 (2014-10-s`?????????MQE?????e????????B
root@?oas?erOven _ # 
root@T?as?erOven /@# 
ro?t@Toas?erOv?n / # ????Q??????=????z?
ro?t@Toas?erOv?n / # ????Q??????=????z?
ro?t@Toast?rOsen / # 
root@Toast?rOven / # root@Toa?tY??W?z?ls
e[1;34m?a,?????W???j??????j????m[0m   @     e[1;34?mgte[0m     `@???[[4 Sm t;+j??0 ue???  vcl; S?[+?=
ro?t@ToasterOvdn / # 
??ot@Toaste?Oven / #@
root@To?st?rOven / C C!???Q??????=????z:?

I typed the root username and password, and now i’m at the prompt. It seemed to have no problem detecting my username and password, which is why this seems to be only an RX problem. Ever seen this kind of issue? I tried shortening my cables for RX, but it didn’t help.

My USB to UART module is an Arduino running on 3.3V. Pretty overkill, but also maybe limited. Not sure I can affect parity and stop bits. Do you think they could be messing me up? Can I change them on the MCM side? The setserial command is not found.

Edit: I’m thinking maybe this arduino isn’t quite as powerful as it needs to be for this. It’s software bit banging. Seems 115200 is the limit of the library, and it has troubles with simultaneous send/receiving. I think need to invest in some dedicated hardware :confused:

Use PyTTY or MiniCom.
Speed: 115200 bps
Data bits: 8
Stop bits: 1
Parity: 0
Flow control: off (xOn/xOff works too)
Codepage: UTF-8
Best is USB-Uart adapter based on cp21xx microchip.

WDMC Mirror Gen1 vs Gen2 - G2 have better CPU. All other - same. Almost fully compatabile.