&ot Journeys' End

Journeys' End

We walk many paths, many roads
Till death halts our steps.
Every day a new adventure,
A new journey of self discovery.

20080731

iwconfig not setting essid?

If iwconfig wlan0 essid blah is seemingly not working when connecting to a open wireless network, then try

  1. iwconfig wlan0 essid blah
  2. iwconfig wlan0 key open
  3. iwconfig wlan0 enc off

The above seems to work for me by turning off encryption. It would appear with encryption enabled, iwconfig won't work for a open network because of some magic or other. If it still doesn't work, then try stick the above in your /etc/network/interfaces and prefix the commands with "wireless-", like so:

allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-essid blah
wireless-key open
wireless-enc off

Hope this help some people, it drove me nuts!

Cheers,
Steve

Labels: , ,

20080724

grub, xfs, debian

Running grub-install with a XFS partition will likely fail - there is a reason lilo is used when XFS is root! The issue is grub-install creates the stage files in /boot/grub, which grub then expects to find when it accesses the disk directly using its own file system drivers. For most file systems sync is sufficient to force this to be true, but not with XFS - unless grubs's XFS drivers replays the journal, grub won't find the files. The detailed why of this is covered in this thread. To get around this, one needs to effectively replace sync with mount -r -o remount /; mount -w -o remount /. A quick a nasty way to get grub going with XFS partition is as follows:

  • init 1 # need single user mode to be able to remount root
  • cp /usr/sbin/grub-install /tmp # make a copy of grub-install to butcher
  • vim /tmp/grub-install
  • # now butcher grub-install as follows:
  • # 1. find the line that says "Sync to prevent GRUB from not finding stage files
  • # 2. deleted everything after sync
  • # 3. add exit 0 after sync for good measures
  • /tmp/grub-install # invoke our amputated grub-install to just produce the stage files
  • mount -r -o remount / # flush everything by mount as read only
  • mount -w -o remount / # remount since grub needs it to be rw
  • grub # invoke the grub shell
  • root (hdx,y) # manually specify the disk x partition y where /boot/grub/* is located
  • setup (hdx) # install grub into the disk x's MBR. DO NOT specify a partition number, XFS's sector 0 is NOT reserved for boot loaders!!
  • quit # exit grub
  • reboot # should work now

Cheers,
Steve

Labels: , , ,

20080716

unoffical libfg repository

I have set up an unofficial git respository for libfg patches and new swig generated python interface, as Gavin Baker (the author) appears to be busy with other things. This is a maintance only repository as far as libfg goes - I don't plan on adding any more features (since all the ones I need are there already). I will however work to produce a more pythonic interface to libfg, as the swig generated interface is a straight port of C api into Python.

Currently the repository contains the following fixes and enhancements:

  • RGB565 and RGB555 patch by Adalbert Prokop
  • fg_new_compatible_frame patch by echoline
  • mmap fix by me
  • swig generated Python interface by me

If you have a patch against libfg, please post it at the libfg project's page first, and then to me if Gavin does not respond. I do not intend to take over development of libfg, and it is my hope Gavin will in the future make this obselete/redundant.

Cheers,
Steve

Labels: , , , , , ,

20080505

Death by *nix

chown state: you
chmod o+x you
./you

Cheers,
Steve

Labels: , , ,

20080328

eeepc, likes and dislikes

Likes:

  • nice and small
  • all the hardware works, including sleep/suspend
  • runs debian based OS by default
  • can run an external monitor at decent resolution

Dislikes:

  • uses fastinit which only boots into single user mode, so user "user" is always logged in. Endless frustration playing with X11 startup in vain to get a multiuser login screen
  • when kmixer shows a speaker with a cross on top, it means built in speakers will be used. When it is a speaker with no cross on top, it means headphone jack will be used. Talk about counter-intuitive.
  • keyboard truly sucks

Cheers,
Steve

Labels: , , , ,

20080215

Allow only virtual users to login to proftpd

Locate the AuthOrder line in your proftpd.conf and change it to:

AuthOrder mod_auth_file.c

Cheers,
Steve

Labels: ,

20080119

Programming 16F84As with piklab-prog and JDM programmer

Finally got around to using piklab-prog to program my surplus 16F84As. The command line options are a little confusing, so here is what I used:

piklab-prog -d 16F84A -t /dev/ttyS0 -p direct -h 'JDM classic' -c program led_test.hex

For some reason there is a hardware option which doesn't work for me and is not documented in the man page. piklab-prog seems to magically detect that I am using a JDM classic programmer, so all is well :-)


Cheers,
Steve

Labels: , , ,

20080107

Finally, PIC under Linux made Easy

I have been looking for software to work with my PIC-PG2 programmer under Linux for a while now. Previously I have been using windows and PICPROG which while nice, still involved messing with windows and stuff. The situation back then (around 2006) was bleak - there were no up to-date and actively maintained Linux software for PIC developers. Now there is.

PikLab is a fantastic piece of work which does for Linux what MPLAB does for Windows. Big thanks to Nicolas Hadacek and Alain Gibaud and all contributors for producing a much needed piece of software.


Cheers,
Steve

Labels: , ,

20070621

The importance of backspace

Update - 23/6/07: Turns out, screen doesn't like TERM=xterm-color. Setting TERM to xterm in my .bash_profile fixed everything - none of the hacks below is required! Incidentally, if you want unicode support for a particular language in irssi, you need to have the locales for that language installed - at least Chinese characters didn't work for me until I installed them on debian. Then restart irssi and the screen session it is running in for good measures.

Life is all about the small things. Whilst we have big things to occupy ourselves with, the small things is what make life worth living.

One of these small things is backspace. For me, backspace is important because I am the kind of person who needs to fix what I type a lot - be it code, messages, articles. When backspace doesn't work, my inner child cries.

When I switched to using iTerm, my backspace stopped working in irssi. Thankfully a kind soul posted the solution to this problem: modify the mapping for backspace in your keyboard profile (Bookmarks->Manage Profiles...) so it sends a hexadecimal 0x8.

Horrah!

Happiness, until I tried to edit something in vim. backspace deleted stuff in vim. Inner child sheds more tears. Googling revealed some recent changes to vim in version 4 which caused this. Solution is to append the following to vimrc:

inoremap ^? ^H set t_kb=^H set t_kD=^?

Happy inner child again.


Cheers,
Steve

Labels:

20070406

PIC Programming under Linux with KIT81

To get KIT81 and its variants working under linux, you need picprg, and configure it as follows:

PinPolarity
Vpp-
Vdd-
Clock+
Data out+
Data in+

The following screen shot shows what the configuration screen should look like:


Cheers,
Steve

Labels: , ,