Monthly Archives: August 2008

Freenet: using tin for FMS

I actually had to switch back to Thunderbird to read FMS, because tin has a bug or something that prevents communicating with the FMS server.

EDIT: no it doesn’t. This was an issue with FMS. It’s fixed now. Get a newer version.

Anyway, someone made a post to group fms yeasterday, detailing how to use tin with FMS. Here it is, almost entirely. I only removed some private data.

This is to report on using tin as a news client, and
also on the fact that FMS can’t handle many pipelined
GROUP commands.


% uname -a
FreeBSD [removed] 7.0-STABLE
FreeBSD 7.0-STABLE #5: Sun Aug 10 [removed] 2008
[removed]:/usr/obj/usr/src/sys/[removed] i386

% tin -V
Reading config file…
Version: tin 1.9.3 release 20080506 (“Dalintober”) Aug 30 2008 16:27:33

FMS version 0.3.18

When tin reads the list of active articles from the NNTP
server, it sends GROUP commands, all at once – “pipelined”.
Like this:

read_newsrc_active_file() GROUP anarchism
>>> GROUP anarchism [DEBUG: put_server]
read_newsrc_active_file() GROUP de.test
>>> GROUP de.test [DEBUG: put_server]
<<< 211 5 9 324 anarchism
<<< 211 4 215 328 de.test

This breaks FMS when more than two groups are subscribed to.
(Yes, I actually did check 2, 3, 4, 5 groups – "more than two"
seems to be the right definition.)

What happens is that tin sends, say, 5 GROUP messages, FMS
receives and properly handles two of them, and the rest get
choked up somewhere. NNTPConnection::run has a do-while cycle,
this cycle is executed iteration after iteration until
the news client is disconnected.

After that, FMS "receives" all the "missing" GROUP messages.

diff file that I used to trace where all this was taking place:

[CHK link removed]

P.S. It might be related to the sockets, etc.


A temporary solution for anyone who wants to use tin is
disabling message pipelining.

Doing it in 1.9.3 (unstable):

1) add ‘#define DISABLE_PIPELINING’ in include/autoconf.h,
there is no ./configure option yet.
2) grep for PIPELINE_LIMIT, seems that a recent addition to
mail.c doesn’t check if DISABLE_PIPELINING is enabled. So,
either remove PIPELINE_LIMIT or surround it with
‘#ifdef DISABLE_PIPELINING’ and ‘#endif’.
3) make build, don’t make distclean, since it will erase
the modified include/autoconf.h

Proper tabbing/indentation

Someone’s personal opinion. Hey, that’s right!

Firefox 3 renders images incorrectly, on FreeBSD

They appear black or like if “moved” on the block canvas. If you try to “drag and drop” the image, you can see it well, until you actually drop it.

I thought it was related to Cairo. Turns out not. Actually, it’s even noted in the 3.0.1 release notes:

Incompatibilities between NVIDIA drivers and some versions of the X server cause scaled images to render incorrectly (bug 411831)

Although I’m using radeonhd, nowhere near nVidia.

You can fix it, as suggested in this thread and also in the bug entry discussion above, by adding

Option "XAANoOffscreenPixmaps" "true"

to your video card device section in xorg.conf.

Drawing digital timing diagrams, AKA logic level diagrams

So far I’ve found these:

Freenet 0.7 on FreeBSD 7.0

First off, running with Sun’s JDK won’t work. I’ve tried 1.6, 1.5 has also been reported. It doesn’t work, since the process can’t bind to the configured IPs.

You have to run it using Diablo JDK. At the time of writing Diablo JDK 1.6 was already available, yet I used diablo-jdk15 from ports.

If you get an error like

Updating time zones...You have the same version as the embedded one.

when installing, you can try disabling the Timezone Update tool:

sudo make -DWITHOUT_TZUPDATE install

That’s about it. You can run Freenet.

But there’s a catch: to run in the background, Freenet needs a wrapper. There is no wrapper for FreeBSD right now, of which you will be informed upon running freenet/ start. Luckily, if you have Linux compatibility enabled, you can add a hard link (symbolic won’t work):

ln ./bin/wrapper-linux-x86-32 ./bin/wrapper

wpi-monitor: simple script to keep the wireless link up

I’m using a rum device in Host AP mode, so every time I try to send a large file or open many connections, the wireless link breaks down (gets “no carrier” instead of “associated”). To get it back up, I have to pull the interface on the station computer (wpi) down and then back up.

To automate the process, I’ve written this simple script. To be run with root/operator permissions.

# Stop wpi from falling off.

if=wpi0 # interface name

while true
        # see if it has "no carrier" status, by looking for "no"
        status=`ifconfig $if | grep status | cut -d ":" -f 2 | cut -d " " -f 2`

        # bourne shell string comparison... you can has it
        if [ "$status" = "no" ] ; then
                ifconfig $if down
                ifconfig $if up
#               echo down
#               echo up

        sleep 1

Naughty timer ACPI-safe, hangs on FreeBSD on Koolu

After updating the CVS tree from STABLE, rebuilding and reinstalling world and the kernel, I have found that:

  • boot hangs at DHCP discovery (dhclient), devd start-up, and one more place;
  • key repeating doesn’t work, you have to press a key every time;
  • the date doesn’t update;
  • you can’t restart or shut down.

All these have one thing in common: they happen when the counter doesn’t tick.

After noodling around for quite some time with the kernel config and make.conf, I finally understood this wasn’t the reason. See, the GENERIC kernel that kame with the FreeBSD 7.0 CD (and I backed that up after installing, right away) worked, and the GENERIC kernel re-compiled didn’t.

I thought it was related to the build tools. No, not.

Turned out it was the counter (timer). See, your system has several:

% sysctl kern.timecounter.choice
kern.timecounter.choice: TSC(800) ACPI-fast(1000) i8254(0) dummy(-1000000)
% sysctl kern.timecounter.hardware
kern.timecounter.hardware: ACPI-fast

Now, this stuff happened on a Koolu, and it had an ACPI-safe, quality 850, so that got chosen by default. Turned out it didn’t work.

You can do several things:

  • you can boot the same kernel without ACPI, just select the appropriate option;
  • or you can load it by hand:
    sudo sysctl kern.timecounter.hardware=TSC

  • or automatically – add this to /etc/sysctl.conf:
    (Make sure there are no quotes in the latter!)

DWA-110 on FreeBSD: if_rum additions

It works. I’m using the rum driver for Host AP mode, so it actually sucks being me. Fact is, device is supported. I did get WPA2 up, following the Handbook.


product DLINK2 DWA110 0x3c07 DWA-110

to usbdevs and


to if_rum.c.

Quick link: Koolu

A site detailing the setup and use of Koolu as a server.

D-Link DWA-110 IDs

Here’s what sysctl says:

dev.ugen.1.%pnpinfo: vendor=0x07d1 product=0x3c07 devclass=0x00 devsubclass=0x00 release=0x0001 sernum=""