Archive for July 2006

avrplay – got makefile working for microcontroller programming

Woo! Ok, I dug up my old makefiles for microcontroller programming and they worked like a charm! Crazy eh? I was half convinced the programmer and my one working test controller would be completely static fried.

I had one tiny problem. I got this message:

216% make program ~/avr
uisp -dprog=stk500 -dpart=ATmega16 –erase –upload if=rom.hex
Error: No such file or directory
-> /dev/avr
make: *** [program] Error 1

Which was fixed just as you would expect: sudo ln -s /dev/ttyS0 /dev/avr

Of course the bad news about everything working so well is I still really don’t understand very much of the black magic the makes this thing tick. But hey, that understanding will come with time and horrible horrible pain, right?

Anyways, check out avrplay in my source repository for all the wacky fun:

Here’s what I do to make it all happen.

make atmega16
make program

I just put in a big hardware order so you’ll hopefully be seeing lots more fun stuff in this vein soon.

XTestFakeKeyEvent and XSendEvent examples

So I was distracted on a fairly useful tanget today…looking info on XSendEvent and XTestFakeKeyEvent as an alternative to my funky XWindows keyboard driver.

After playing for a bit, I came to the same conclusion that everybody else did…XSendEvent is worthless as a tool for doing any sort of interesting keyboard remapping. Xev seemed to be the only app I could find that even noticed my simulated XSendEvent keys. I suppose I shouldn’t expect more from what amounts to a giant security hole. XTestFakeKeyEvent on the other hand, worked like a charm.

I could have discovered this faster if I could’ve found some example source code quicker. But with some searching I found two tiny little apps that do a good job showcasing their respective functions.

xpusher.c (local) by Peter Shipley for XSendEvent
keylockx.c (local) by Flu for XTestFakeKeyEvent

Access my sweet sweet code

come to the wired as soon as you can

Straight from my bizarre brain to your harddrive. I make no promises about this stuff.

the latest files
various the revisions in darcs

And when looking isn’t enough anymore and you just have to get your hands dirty…use darcs to get a version you can edit on your local filesystem:

darcs get

darcs ssh problem

While trying to set up a remote darcs server (accessed via ssh), I ran into a strange problem. Here’s the error I got:

me@toy:~/buffaloplay$ ssh-agent darcs get’s password:’s password:

darcs failed: (sftp) failed to fetch files.
source directory: buffaloplay/_darcs/patches
source files:
sftp output:
Permission denied (publickey,gssapi-with-mic,password).
Couldn’t read packet: Connection reset by peer

Looking around a bit online, it seems that I’m not the first one to have this problem but I couldn’t find an obvious workaround. But configuring myself to you ssh-agent fixed the problem, even if it wasn’t exactly the most elegant solution. Here’s the quick guide to setting up ssh agent that I used.

After that darcs worked like a charm.