MK802: First impressions, teardown and adding an uart.

I finally got it! For roughly 60 bucks an 1Ghz ARM CPU + 1GiB RAM is a deal. Anyways, since android is quite useless on such a device, the first thing I’ve done (after insuring that all came in working), I took the thing apart.
Some teardown photos can be found here.
Next was the surgical procedure of adding an UART header. I bet I’ll need that one pretty soon. The 4 pads near the CPU are Vcc(?), GND and RX&TX pair, so adding a header was simple and straightforward.

Vanilla firmware boot log follows.
(more…)

Mercury MW150R: Turning an Epic Fail to an Epic Win

Okay, that was fun. You see, it happened, that I got for nearly free a Mercury MW150R router. Since it was pretty sucky, I didn’t hope to find anything useful in it, nor I thought it could be the target for OpenWRT. Nevertheless, once I had a spare moment I cracked it open and…
Well, AR9331 describes it all. The same chip you’ll find on WR703N, so it WAS a target for OpenWRT after all. Next I hooked up the UART, and saw the very unpleasant picture. It had only 2 MiBs of spi flash, and 8 MiBs of RAM, barely enough to run VxWorks with a crippled web interface. So it was a nice time for an upgrade:


(more…)

lighttpd + mod_proxy trick on OpenWRT

Okay, looks like I’m somewhat back after a (very) nasty crash of an raid mirror. Looks like 1Tb WD + 1Tb seagate decided to die together at (nearly) the same time after roughly 19000 hours of operation (according to smart). Luckily smartd detected all those reallocates and ‘runtime bad blocks’ at the very time they appeared, giving me time to order the replacements. However, I decided to completely reconfig the server, so I got quite a few days of downtime. But hey, I’m not google, so who cares?. And 5-year old apache2 config with over 1k lines, that had a chance to work under FreeBSD, Debian, Agilia was just looking to ugly. Even I couldn’t make sense of some older parts of it.
Anyways, I also upgraded the router, now stuffed with OpenWRT+lighttpd to do the dirty work, and I want to quickly describe a small trick I used.
Basically I wanted luci to be avaliable on a subdomain, e.g. router.myhost.net, while all queries to hyhost.net, anythingelse.myhost.net would get forwarded to a http server behind the network.
To do so, you’ll need mod_proxy for your lighty, and something like that. In this fashion, everything not directed to wrt.myhost.net will get to a server behind the router.

$HTTP["host"] != "wrt.myhost.net" {
 proxy.server = ( "" =>
   (( 
   "host" => "192.168.0.7", #web server ip in the lan
   "port" => 80
   ))
 )  
}

proof-of-concept: driving 13 servos with attiny2313 over usb

Heh, that proved to be a nice rant on an arduino-lover that complained something about the inability on mega1280 to drive enough servos for his app (usb controlled pan and tilt for a few cams).
I picked an uC that has nor the hardware output-compare channels to drive all 13 servos, nor any hardware usb (attiny2313), threw up a small board and after a few dozen lines of code, here we go:
Attiny2313 driving 13 servos with 16-bit pwm over the usb with little to no external components. I also fitted in an option to set each output to Z-state from the commandline effectively relaxing a servo.

(more…)

RTL-SDR & Static protection.

Okay, I also got myself an rtl-sdr dongle and it rocks. However, just a tip.
If you ever think of connecting an external antenna – have a GOOD look at the PCB. Some dongles are missing ESD protection. Like the one I got myself from ebay.

If so, connecting a big external antenna will result in a dead dongle. The ESD Protection is BAV99, according to the reference schematics.
Thnkx for exception13 for drawing my attention to this issue.
You can get those for about 7 bucks for 100pcs at aliexpress with freeshipping.

Rolling out my own bench power supply.

I was moving old stuff around, when I found an ancient artefact of the times long gone: A Soviet 15W ТПП-245-127/220-50 transformer (Back from year 1979 or so. Yeah, it’s way older than me, lol). Being somewhat a fan of old soviet stuff I decided to throw up a bench power supply based on that one.
So, the whole thing has a very simple circuit. A diode rectifier, 4700uF capacitor and 3 GS6300 stepdown ICs providing 3 separate channels. I also popped some 1.8A recovery fuses, so if I screw up and make a short circuit, I’ll just have to wait a little, till it goes on again. The ICs can handle up to 3A of current, but I thought that would be a little to much for this kind of bench supply.

(more…)

xEMACS: A bunch of useful tricks.

Vi is somewhat cool, kate looks even better in places, but none of them had anything nearly as useful, as verilog-mode in emacs. Therefore, I decided to make the switch.
However, making yourself somewhat confortable in emacs requires a bit of effort, so here go my adjustments.
First, let’s get out emacs instances at different places in sync. Git is a very good tool for that. Therefore, I put my custom el scripts in ~/.emacs.d and made that a git repo with origin at my github account. Next step is to tune ~/.emacs to automagically load ~/.emacs.d/autoexec.el via adding

(load-file "~/emacs.d/autoexec.el")

Rest – under the cut.
(more…)