Madskills of the year: a quick and dirty HC-05 adapter

Do you remember those small bluetooth to uart modules called HC-05? Those that are sold cheap in bulk from those chineese resellers. Anyway, if you remember, they are configured via AT commands, before being installed into they final place. I needed to configure a bunch of those modules, so I needed an adapter. Since I haven’t yet assembled a CNC mill, nor I had the time to visit people who have a nice CNC mill, nor I had the time to etch a board, I decided to go ultra-cheap and ultra-dirty.
Out of the junk I took a piece of clear acrylic, drilled the holes added a little mess-of-wires, a button and secured everything with hot glue.

The result looked ugly as hell, but worked anyway.

IMG_20130901_012857
Continue reading “Madskills of the year: a quick and dirty HC-05 adapter”

UBIFS over DVD+RW

Don’t ask why. I just though it might be a cool idea.

So what’s the catch? Packet writing over CD/DVD-/+RW media is pretty much the same as writing to a block device. The only bad thing is that:

  • Writes MUST be aligned
  • Writes must be of a fixed packet size
  • Before reading you must issue a flush command.

To hide this from the upper level pktcdvd module exists that assembles packets and sends them to the media. Well, this whole pktcdvd machinery reminded me of a NAND device actually, so I wondered if we could actually make an MTD device out of a CD or DVD. AND run UBIFS on top of it. (Or yaffs2. whatever). Details&code under the cut

Continue reading “UBIFS over DVD+RW”

A DIY air filter for all those soldering works.

Modern solder flux are scary. Period. Once, I ordered a professional flux and a quick read through the ‘consequences’ of it’s usage looked like a damn curse to me: Cancer, birth defects etc. You don’t have to be Ph.D. in biology to get that this flux must be a hell of a mutagen, so I decided to put it somewhere far away. Anyway, rosin was and is my flux of choice. It’s much safer, but still not ideal. You do have to filter the smoke anyways from their selection, unless you are fond of headaches. So, this project was just asking to be done:

IMG_20130701_015237

Continue reading “A DIY air filter for all those soldering works.”

Ditching the x86 – moving on to armv7l

My home server has a long story. It all started with a Pentium 4, an old 20GB HDD and FreeBSD 6.2 … hell, I don’t even remember the exact year.
Anyway, after a few years, the hardware was finally put to rest, since it died and got resurrected thrice, I got an Intel Atom D410-based miniATX board, switched to linux, first debian, then agilia, then arch… Anyway, it used to be a nice server for personal needs, that crashed only on occasional HAD-effect, so it was… sufficient.
Now, the time has come to move on, to arm. The benefits were simple and straight:

  • 10W peak power consumption
  • Fully passive cooling
  • eMMC for the root partition
  • 4 cores!
  • Always a serial terminal, starting from uboot phase, so that I don’t have to carry a monitor to the closet where it is stationed.

I picked ODROID-X2 based around Exynos4212 Prime. ODROID-U2 looked worse, since had NAND soldered onboard. eMMC looked easier to replace. And the benchmarks said eMMC was faster.

IMG_20130521_133759

So, here go my adventures with this hardware.
Continue reading “Ditching the x86 – moving on to armv7l”

STLink as a serial terminal

A usual rant goes towards ST guys for their mindless design*. I don’t really know anyone, who does some heavy app development with no serial terminal for debugging (Or may be I don’t know many of them?). You know, gdb is good, but a good old ‘dmesg’-like stuff is usually even more helpful.
Anyway, while other people are trying to discover traces of sanity of the ST people by reversing STLinkv2 and discovering only huge holes in security so far, I decided to go a different way that works just fine with STLinkV1 and STLinkV2.
My first idea was to stuff the VCP example into the stlink’s uC (which is an STM32F103C8T6) and throw a little wires, but in the end – I didn’t want to ditch STLink completely (It helped me out a few times). Ideas? Sure!

IMG_20130506_100917

First step. What does STLink do? Right, apart from that breakpoint/step voodoo it writes and reads memory. Sounds good? Good! Enough to do pretty much anything.
Continue reading “STLink as a serial terminal”

solidoodle: pushing the thing to the limits. 0.050 mm layers.

It’s been a while, since I’ve posted a anything  about this shiny toy of mine. This doesn’t mean I’m doing nothing about it. And I’m adding a hack every weekend or two. Unfortunately, this is definitely NOT the thing you can grab and start printing happily, as are most of the sub – 5k$ printers. ( Don’t believe the marketing BS!)

So far, I’ve added a better filament feed, a usb camera mount, a cooling fan, fixed the Z axis wobble… partly…

Well, last time I replaced the lead nut with a custom higher one, I had a very slight wobble remaining. This one was due to the fact that the centers of the Z axis rod and the motor shaft were not perfectly aligned. That was still a little bit too annoying, when it came to 0.1mm prints. lawsy recently made a fix in the firmware but adding another variable that needs experimental calibration certainly doesn’t fit what I wanted. Anyway, 5/16 rod also annoyed the hell out of me (I prefer metric stuff, that’s my religion, bear with it!), so I decided to make a mechanical fix first. And the idea was to throw away that crap, and place something better.
Continue reading “solidoodle: pushing the thing to the limits. 0.050 mm layers.”

Some black magic: bash, cgi and file uploads

Before you declare me an insane old man, I have to say, that I needed it for an embedded board with only 64MiBs of RAM. And (mostly due to the specifics of the tasks), I ended up using bash hooked to lighttpd via cgi. Bringing on heavy artillery (php or python), really complicated the task, since I mostly needed the outputs of different shell utils.
Anyway, I quickly got to the part where I needed to handle POST requests to upload binary files. First, I googled for a solution, and one of them eventually did what I needed. But alas, it had a drawback.
Continue reading “Some black magic: bash, cgi and file uploads”

android and dnsmasq: making a better dnsmasq wrapper

A few posts ago, I wrote about making android’s dnsmasq more usable by turning on local hostname resolution. Since I use my android phone as a pocket server, dnsmasq plays a vital role here.
However, one thing was bad – whenever I used usb tether connection to my PC, the whole dns thingie did not work. Why?

So, a little theory. When I enable the wifi ap mode, an interface called ap0 is brought up with a static ip 192.168.43.1.
Whenever I turn on usb tethering, usb0 pops into the existence with ip 192.168.42.129.
(On other mobile phones these settings can differ)
Fine, so when we resolve our pocket server from within the usb0 network, we want to get 192.168.42.129, and when via a wireless network – 192.168.43.1
I started by adding two distinct entries in /etc/hosts

192.168.43.1 anomalia anomalia.portable git.anomalia p.anomalia
192.168.42.129 anomalia anomalia.portable git.anomalia p.anomalia

Did it work? No! Why?
Continue reading “android and dnsmasq: making a better dnsmasq wrapper”