MavEtJu's Distorted View of the World - 2007-12

Getting rid of unused shared memory segments, message queues and semaphore sets - ipcrm(1)
Abode or Adobe?
Cycling: Caringbah to Kurnell
Cycling: Helensburgh to Stanwell Park
Cycling: Waterfall to Helensburgh
FreeBSD and the Huawei E220 USB 3G Modem
Hypnocube needs maintenance
FreeBSD FTP mirrors quality
src/share/zoneinfo updated to 2007j
Hypnocube is finished!

Back to index

Getting rid of unused shared memory segments, message queues and semaphore sets - ipcrm(1)

Posted on 2007-12-26 17:00:00
Tags: FreeBSD, IPC

Thanks to a submmited patch of Callum Gibson the ipcrm(1) program now has the capabilities to wipe all unused shared memory segments, message queues and semaphore sets. You can either chose to specify the individually (e.g. only the message queues, or only the shared memory segments) or just wipe them all with the -W option.

This will be availabe in FreeBSD >7.0, >6.3 and >5.5.


No comments | Share on Facebook | Share on Twitter

Abode or Adobe?

Posted on 2007-12-16 17:00:00
Tags: Happiness

I bought a new fan today and it wasn't until I came home that I saw the brand and the logo. I compared it with the logo of Adobe and wonder how long they will be able to get away with it.

But then, since it's made in China I doubt that there is much Adobe can do about it.


No comments | Share on Facebook | Share on Twitter

Cycling: Caringbah to Kurnell

Posted on 2007-12-15 15:02:00
Tags: Cycling, Cycling in Sydney, Australia

Cycling between Caringbah station and Kurnell is 13 kilometers, but you have to cycle back due to lack of train stations in Kurnell (but there is one in Cronulla and Woolooware).

From the train station, go to the Denman avenue because you will not be able to cross the railroad again until somewhere in Cronulla.

At the crossing of Denman Avenue and Gannoa Road, turn left. If you go straight, you unnecessary will go up a hill. Past Sharkies and the school and that's the last you will see from Cronulla.

The Captain Cook drive is a nice long road with only two minor hills but it has, despite that it is a beautiful natural area, one huge drawback: It is full with factories and industrial areas on the right hand side. I don't know who got the idea of putting all that industry here, but it surely is not the right place for it.

In Kurnell at the crossing of the Captain Cook drive and Polo street is a small milkshop which does do a very good milkshake. Take the milkshake into the National Park and enjoy it in the Memorial Park!


No comments | Share on Facebook | Share on Twitter

Cycling: Helensburgh to Stanwell Park

Posted on 2007-12-15 15:01:00
Tags: Cycling, Cycling in Sydney, Australia

Cycling between Helensburgh station and Stanwell Park is another nice size trip (10 kilometers) with a stop at Symbio Zoo and Stanwell Heights.

But there is one major warning: From the station till Helensburgh town center it is only hill up. And hill up. And hill up. For about three kilometers. But once you are at the Symbio Zoo you have two hours to recover from it.

From Symbio Zoo to Stanwell Heights is a nice refreshing trip through the foresty areas, and at Stanwell Heights an unique view over Stanwell Park and if you're lucky you will see some whales.

Down from Stanwell Heights to Stanwell Park is a drop of 250 meters over 2500 meters, making it an interesting experience for the brakes on the back of your bike. And at the bottom you can enjoy a swim on the beach.

Be warned, going back to the train station in Stanwell Park is an only-hill-up experience too.


No comments | Share on Facebook | Share on Twitter

Cycling: Waterfall to Helensburgh

Posted on 2007-12-15 15:00:00
Tags: Cycling, Cycling in Sydney, Australia

Cycling between Waterfall and Helensburgh is a nice size trip (10 kilometers).

You can go via the Southern Freeway but I would strongly suggest not to do this: You only have three hills, but these are horrible hills which don't give you any satisfaction. When you do it early in the morning you don't have too much hassle of the traffic going between Sydney and Wollogong.

The path you should take is via the Princes Highway, on which there are more hills but they are not that high. And it will give you more shadowed areas.


No comments | Share on Facebook | Share on Twitter

FreeBSD and the Huawei E220 USB 3G Modem

Posted on 2007-12-14 21:00:00, modified on 2007-12-17 07:30:00
Tags: Huawei E220, FreeBSD, Networking, 3G

I'm the lucky owner of a Huawei E220 3G USB modem. For certain degrees of lucky that is: Getting it to work has been an interesting challenge.

The E220 is by default (FreeBSD 6.3-BETA) recognized as an umass(4) (USB Mass Storage Device) device. That's true, there is a memory disk in it. It is recognized as /dev/cd0 and you can mount it with mount_cd9660 /dev/cd0 /mnt, giving you 10 megabytes of space.

But that is not what you bought the E220 for. You want to use it as a modem. You need to change a couple things in your kernel to get it all working. First, add a line to /sys/dev/usb/usbdevs:

    /* HP products */
    product HP2 C500                0x6002  PhotoSmart C500

    /* HUAWEI products */
    product HUAWEI MOBILE           0x1001  Huawei Mobile
   +product HUAWEI E220             0x1003  Huawei E220 HSDPA USB Modem

    /* IBM Corporation */
    product IBM USBCDROMDRIVE       0x4427  USB CD-ROM Drive
And to /sys/dev/usb/usba.c:
    { USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3G },
    /* Option GlobeTrotter 3G QUAD */
    { USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GQUAD },
    /* Huawei Mobile */
    { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE },
   +{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 },
    { 0, 0 }
    };
See the FreeBSD PR usb/118686 for a full patch.

Second, you have to disable the umass(4) device from your kernel configuration and rebuild a new kernel. Will this break things? Most likely, specially when you have USB disks and sticks. But you will load it as a module, which will undo the damage you just did to it. In your /boot/loader.conf, add the following lines:

    ubsa_load="YES"
    umass_load="YES"

ubsa(4) is the USB support for Belkin serial adapter. That sounds more like a modem. Next, reboot the machine and see if all modules are loaded correctly:

    # kldstat
    Id Refs Address    Size     Name
     1   20 0xc0400000 72e17c   kernel
     2    1 0xc0b2f000 e6a4     if_iwi.ko
     3    3 0xc0b3e000 2f9c     firmware.ko
     4    1 0xc0b41000 6cdc     ugen.ko
     5    1 0xc0b48000 75b4     umass.ko
     6    1 0xc0b50000 7958     ng_ubt.ko
     7    2 0xc0b58000 cb78     netgraph.ko
     8    1 0xc0b65000 2ef0     ubsa.ko
     9    2 0xc0b68000 4374     ucom.ko
    10    1 0xc0b6d000 5c304    acpi.ko
    11    1 0xc4868000 30000    iwi_bss.ko

Next, plugin your E220 and see what happens:

    ucom0: HUAWEI Technologies HUAWEI Mobile, rev 1.10/0.00, addr 2
    ucom0: Could not find interrupt in
    device_attach: ucom0 attach returned 6

Yes! No! Something is wrong. But a little bit of finger skill will resolve it:

At the USB modem side of the USB cable (not the computer side!), carefully pull the cable from the modem and when you see this on your screen, plug it back in:

    ucom0: at uhub1 port 1 (addr 2) disconnected
    ucom0: HUAWEI Technologies HUAWEI Mobile, rev 1.10/0.00, addr 2

It's loaded! If it doesn't work at the first go, try it a couple of times more. Once you are without the dreaded "Couldn't find interrupt in" message you are a happy person.

Check /dev/cuaaU0, it exists! If you have comms/minicom installed, you can do this:

    OK
    ATI
    Manufacturer: huawei
    Model: E220
    Revision: 11.117.06.00.100
    IMEI: 358191018517800
    +GCAP: +CGSM,+DS,+ES
    OK

And if you dial out, you will end up with a whooping 7.2Mbps connection;

    OK
    ATDT *90#
    CONNECT 7200000

Now it is time to train ppp(1). Add this to your /etc/ppp/ppp.conf:

    three:
	set device /dev/cuaU0
	set speed 57600
	set phone *99\#
	set authname
	set authkey
	set ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0
	set vj slotcomp off
	add default HISADDR

And dial:

    $ ppp three
    ppp> dial
    Ppp>
    PPp>

That's not good, there should be three capital P's... Going through the PPP log, you will see that the IPCP layer doesn't get initialized properly. Why? No idea. How to resolve it? Put your USB modem in a windows machine, run it once there and put it back into your FreeBSD machine. Why? No idea. It works. The USB modem didn't work with under MacOS/X neither until I did this trick. Why? No idea. It works.

Dial again:

    $ ppp three
    ppp> dial
    Ppp>
    PPp>
    PPP>

    $ ifconfig tun0
    tun0: flags=8051 mtu 1500
	    inet 119.11.32.164 --> 10.0.0.2 netmask 0xffffffff
	    Opened by PID 22997

    $ ping www.freebsd.org
    PING www.freebsd.org (69.147.83.33): 56 data bytes
    64 bytes from 69.147.83.33: icmp_seq=0 ttl=48 time=477.662 ms
    64 bytes from 69.147.83.33: icmp_seq=1 ttl=51 time=416.606 ms
    ^C
    --- www.freebsd.org ping statistics ---
    3 packets transmitted, 2 packets received, 33% packet loss
    round-trip min/avg/max/stddev = 416.606/447.134/477.662/30.528 ms

Your console and /var/log/messages will be spammed with "kernel: ucom0: usba_request: STALLED" messages for some reason, but it works.


Show 2 comments | Share on Facebook | Share on Twitter

Hypnocube needs maintenance

Posted on 2007-12-11 09:00:00
Tags: Electronics, Hypnocube

Something was wrong with the Hypnocube I build earlier, but I couldn't put my fingers on it: Sometimes areas of one colour had some strange shades over them, sometimes too many LEDs seem to be on etc.

The smart people who designed the Hypnocube did put a test pattern as the first fifteen seconds of animations, which can be used for checking when you build it (LIGHT! LIGHT! IT LIGHTS UP!) or when you suspect issues (all red... all green... all blue... wait, one blue missing. And then 64 LEDs showing individually... wait, why are there more on when this row is being shown?).

The symptons were: one LED didn't show the blue colour, and when that square of LEDs was tested, there were strange artifacts (for a better word) in the other squares.

Getting the one LED removed was kind of playing Doctor Bibber (or like the game is known in the English world with the very imaginatative name: Operation) but this time not with a set of tweezers, but with a hot iron which could do more damage to my favourite toy than a drunk chirurg with a blunt scalpel could do. Getting the new LED in was even worse, this time I had to hold the hot legs of the LED to get it stable and cooled down.

But at the end, everything got back in and the self-tests went fine. And my animations are smooth again!

When I talked to the people who made the Hypnocube about the broken LED, they replied with:

Sorry you had problems.
Sorry?!? It's half of the fun of self build kits! Try fixing a toy you get from one of these "Made in China" cheapie shops here in Australia and then you will know what "feeling sorry" means.


No comments | Share on Facebook | Share on Twitter

FreeBSD FTP mirrors quality

Posted on 2007-12-06 17:00:00, modified on 2007-12-06 19:30:00
Tags: FreeBSD

At Statistics for FTP FreeBSD mirrors I have made an overview of how good the FreeBSD FTP mirrors are. Not a full overview, just for the ISO images directories, but it will give an indication of the quality of the mirroring.

For Australia is shows that at this moment in time ftp3.au.freebsd.org, or mirror.pacific.net.au, is the only one who is nicely mirroring everything, the rest is running behind or doing partly mirroring.

Scripts are available from the URL linked to above.


No comments | Share on Facebook | Share on Twitter

src/share/zoneinfo updated to 2007j

Posted on 2007-12-04 10:00:00, modified on 2008-01-06 19:00:00
Tags: FreeBSD, zoneinfo, iso3166

Commit of the day for src/share/zoneinfo:

MFV of tzdata2007j

Timezone data changes in this import:
- Add America/St_Barthelemy (BL) and America/Marigot (MF)
- Venezuela will move to -4:30 on 9 December 2007 instead of 31 December 2007
and of src/share/misc/iso3166:
Update with data from Newsletter VI-1 2007-09-21:

- Added SAINT BARTHELEMY (BL) and SAINT MARTIN (MF).

This will be availabe in FreeBSD >7.0, >6.3 and >5.5 and in the ports collection (as misc/zoneinfo) once the ports freeze has been lifted or use ports/118409 to update your system earlier.

Note: the iso3166 and the zoneinfo updates are MFCed into RELENG_7_0 and RELENG_6_3 so it will be available for the releases of 7.0 and 6.3.


No comments | Share on Facebook | Share on Twitter

Hypnocube is finished!

Posted on 2007-12-02 09:00:00
Tags: Happiness, Electronics, Hypnocube

About a month ago I ordered a kit of the Hypnocube (Things that go blink in the night). Having not touched a soldering iron in say eight years, AU$ 200.- was quite a big amount of money to spend on it, but it was worth it. A nice piece of electronics is now sitting next to the TV.

The score so far:

  • Four hours of soldering time.
  • One and a half hours of non-soldering time.
  • Forty centimeters of duct tape.
  • Quite some amount of soldering tin.
  • One carton box formerly filled with mango to make the jig out.
Little Dirk has managed to watch the test pattern (which shows up when you power it up) about ten times in five minutes, after which I moved it out of his range.

Quotes from family and friends:

  • Naomi: Insiders is a show I normally watch with full attention, but today I spend my whole time watching that silly cube.
  • Naomi: You should have waited for the 8x8x8 version.
  • Dirk: Red. And Green. And Blue. And White!

No comments | Share on Facebook | Share on Twitter