D-Link DNS-327L NAS now mainlined

Achievement

Yep, something like that. Despite huge amounts of rush at work these days I managed to push both patches into mainline linux, so starting from 4.1 and on you can just grab kernel from kernel.org, compile and boot it on the NAS (Yappee!!)

Just make sure you disable cpuidle ‘deep idle’ state. It causes NAS to hang once every few hours and is likely a problem with either hardware or the bootloader (I’m still too lazy to try out mainline u-boot)

echo 1 > /sys/devices/system/cpu/cpu0/cpuidle/state1/disable

//Template for that achivement logo borrowed from here

Pssst, dude! Wanna some secondhand chips?

There are many wonders in electronics land. Even more await an engineer that stocks up at aliexpress to save a bit on his hobbies. Well, I needed a few RTC chips for some prototype hardware, so I picked DS1307. As usual, placed an order at aliexpress. once in a while shit happens .

No, this time they didn’t write ‘sex toy – 3$” on the customs declaration sticker, as they did on a parcel with a dozen of TRIACs a few weeks ago (Or, did I use TRIACs wrong my whole life! Should have asked them for instructions!)

Anyways this time I received some second-hand chips. Packed in a plastic tube, no flux whatsoever, but small solder blobbies are all over the pins. Without unpacking, I’ve made a few pics. Sorry for the quality, but I put my USB microscope somewhere far and my usual camera doesn’t handle focusing on something that close well.

IMG_2508

(more…)

Debian @ Dlink DNS-327L: The guide

If you’re following my blog, you might’ve read my post about Dlink’s substandard engineering, and how I’ve got debian running on the damn thing. Well, since that time I’ve made a few improvements, namely:

  • Power button’s now correctly rigged as well as the rest of the buttons.
  • Upstream 3.18, 3.19 kernels now works flawlessly and don’t ever freeze. I update kernels with each new kernel release
  • Goodies like Marvell’s DMA engine, mv_xor, watchdog and mv_cesa are all enabled for the win and are working awesomely
  • There’s now a huge guide about ‘cooking’ the damned thing into a useable state in five easy steps. And you are reading it.
  • Power measurements are all there as well!

BIG FAT WARNING: I take no whatsoever responsibility if you screw up your device following these instructions. Proceed at your own risk, use your own head. This will also void warranty, btw.

IMG_20150215_141546

(more…)

ESP8266: Say ‘hello’ to Frankenstein

Since I’ve got some homebrew development boards ready, it’s time to get hacking.
I stocked on coffee and gave esp8266 SDK a deep dive this weekend. The code is really weird, lots of things are unknown, API is shitty, blobs all around the place. First of all, to make things clear – I’m not going to fix or do anything with AT-command firmware. It sucks. Period. Sucks so much it can’t even prove useful as a reference most of the times. So… we need a replacement.

This is what I’m working on and that is now, after a weekend of hacking is in early alpha stage.

Say hello to Frankenstein Firmware for ESP8266.

(more…)

ESP8266 and PL2303HX-gpio adventures.

As you might have seen, I’ve made a few projects with PL2303HX, namely that little nifty esp8266 developer board. I plan to dive in esp8266 firmware development soon and my goal will be a nifty mysql client, so that I can run mysql queries via UART! The only bad thing (apart from eeprom never working, and occasional freezes that I’ve later fixed with a 10uF SMD capacitor) – I had to press the buttons to reset the ESP8266 module to bootloader mode. So I’ve made a ‘dark green evil sister’ twin of that red board with a little bit updated schematics:

  • GP0 and GP1 lines are now rigged to reset and bootloader buttons respectively, resistors protect those against logic level conflict.
  • I’ve ditched EEPROM. It doesn’t work anyway. Screw that!
  • Proper decoupling – no more freezes!
  • SMD LEDs on GP0 and GP1.
  • Nice dark greenish design and clear urethane coating FTW!

IMG_2486

(more…)

Just an esp8266 dev board

ESP8266 took a hell of a time to arrive, so meanwhile I got a dev board ready. Nothing really too fancy inside – just a PL2303HX, a few LEDs, buttons and connectors… But I couldn’t resist making some nice artwork on the silkscreen:

IMG_2477

IMG_2476

The board is made using my usual tech involving a color laserjet printer, toner transfer machine, and and some urethane coating for durability. Now, it’s high time to port antares to support esp8266 CPU!

Dlink DNS-327L: How you should NOT make a NAS

TL;DR; Ported Debian on Dlink DNS-327L with fresh kernel, mybranch’s here‘е. Inside stock firmware there lies madness!

Now, the long read:

You might have noticed that my dull engineering blog has been lagging recently, occasionally throwing the nginx 500 error. That’s because of the ongoing cursed hardware adventures I’ve been having for the past 2 weeks.

But let’s start from the very beginning, and it will be a very long story. It all began with an HDD crashing in my RAID-1. Since the motherboard serving as the NAS storage box was pretty old and laggy, I decided I would get a nice and shiny small NAS box as well. The criteria was simple: cheap, supports nfs, small, RAID-1 supported.
So I picked Dlink DNS-327L and a spare HDD, I knew the box might be a Debian/OpenWRT target once the warranty’s void. Having dealt with some dlink hardware in the past (or, better to say, raising that hardware back from the dead) I ditched the stock power brick and used my own. I wanted to live on stock for a few months, just to make sure that no hardware is faulty…

Yep, I found use for that free sticker HaD sent me!
Yep, I found use for that sticker HaD sent me!

(more…)