Reigning in the Gen2

If the device (mycloud) uses isolated grounds for tx and rx, you will need to put a jumper wire between the grounds though. Otherwise your cable (which expects common ground) will only be able to talk, or listen, depending on which one it is connected to.

Just grasping for a possible explanation for why he was able to successfully connect to gen1, but could not listen to gen2.

I thought that I had a picture of pin-out. But I can’t find it. It is 4 pins tx rx gnd and vcc.

Do you get anything at all? More importantly-- do they provide posts? (I have joint damage, and soldering is something I have difficulty with these days.)

(now tempted to abandon attempting to patch newer zram into provided kernel source, and take cover off to see if I can read the uart.)

*takes apart, looks

NOPE. NOT POPULATED. Cheapskates. Really, is 1/2 a cent per unit REALLY worth this? I would gladly pay the extra half cent per unit to not have to stabilize my soldering iron with a freaking armature due to my joint damage, just so I can connect to the debug port you DESIGNED the system to have, OK? Yes-- I would gladly pay it. I would pay it for 100 other people too.

No posts. Just edge connector. But the connectors very close together. I’ve looked into
taking an old post connector and cutting off three posts and solder them to make a removable connector.
Was just waiting to see if anybody had a suggestion on why it didn’t work.

Fox has pictures on his site but I currently cant connect to his site.

Looking at the connector positioning, it looks like it will be something like this:

gnd, tx, rx, (gap) vcc

but that is just a guess. I dont feel like messing with it, because I really dont want to have to solder those damned posts on. You have no idea how it hurts my hands to do that.

Instead I will just continue trying to port zram and zsmalloc from a newer 3.10.x source tree in. (one where it is not in staging)

Sadly, mine are not. Without something to stabilize the iron, my joint damage results in shaking of the iron. :frowning: Fighting it for stability causes pain like putting my hand in a fire. It is getting to the point where I will pay somebody to do it for me.

Ok, I am convinced that there is something weird with the kernel of the gen2. I have compiled both the native version of zram, AND one that was backported to the 3.10.xxx kernel ecosystem by redhat that I manually merged into the source tree-- both compile and insert successfully, but as soon as you start writing to zram0, it hangs the nas in just a few seconds, even if the size of the created block device is very small.

I will recompile again late tomorrow with debugging enabled.

You don’t have a gen1 do you? It would be interesting to see if it works
on a gen1 system. When I first started playing with the gen2 I couldn’t
get anything I compiled to work. Always got the no such file. It was
frustrating because I couldn’t tell what file it couldn’t find. As it turned
out it was library files I think. Because once I started compiling with
-static the programs started to work.

No but I might end up ordering one. I will try building exactly the same way with the gen1 source package you mentioned, and then we can arrange some way for me to send you a zip with the needful inside. Then you can tell me if the compiled modules work on gen1 or not. Gen1 is the one that really needs the zram swap.

We could try that.

Finally got the serial port on the Gen2 working. It seems that the Gen2 does not start a getty on the serial port.
So when you try to test the uart nothing happens when you type. After some testing I was ale to cat a file to /dev/ttyS0 and it displayed on my laptop. So I did a reboot from the dashboard. Was able to capture the reboot sequence. I got a few none printable characters which I don’t see on the Gen1 serial port. I tried to start a getty but it gets an error. getty: setsid: Operation not permitted
The last charater captured is a $ prompt. So I think some where in the boot process it stops the getty.

putty.exe

Change the settings to fix what problem?

$ is often used as an ‘unknown character’. Which is likely if the TTY port is shut down, corrupting the serial line.

$ is also a prompt character.

Not arguing that it isn’t (among many other characters).

Just musing that an embedded system might shut down its boot serial port (as in disable the Tx/Rx buffers) after it has finished its boot sequence, since it no longer serves any useful purpose; a command terminal can be launched from the booted system.

I may have mistaken your meaning, but weren’t you recently suggesting we should try to work together to build our own, fixed version of WD’s firmware…? Or did you mean that you intend to just do it yourself?

https://community.wd.com/t/latest-firmware-still-vulnerable/96743/229

as for the prompt or not. On the gen1 system you can access the terminal any time. Which is
nice if the system appears to hang. You can just plug in the terminal and take a look around.
The Gen2 system appears to shutdown the terminal at some point during the boot process. But
you can still output characters to the terminal. As I said I thought that the uart was not working
when I first tried to use it. I didn’t notice that there was no getty running. So I tried to output
/etc/samba/smb.conf to /dev/ttyS0. When I did that I didn’t get output so I reversed tx and rx
and now got output. So I decided to reboot and see what happened. When I did I got a complete
output of the boot process.
I did notice on the output maybe 10 times that a non printable character displayed as a rectangular
block of what looks like black and white alternating dots. In the putty log I cant find those characters.

A have few devices for test. If someone want to develop something - i an test anything for you.
WD MyCloud Gen2
WD MyCloud Mirror Gen1 and Gen2
Also i already build Debian and Synology DSM for these devices.
Many info and other things.

http://anionix.ddns.net/ (Mirror)
https://drive.google.com/drive/folders/0B_6OlQ_H0PxVRXF4aFpYS2dzMEE?usp=sharing

if you need more - just ask me in PM.