About

Archives

01 Jul - 31 Jul 2006
01 Aug - 31 Aug 2006
01 Sep - 30 Sep 2006
01 Oct - 31 Oct 2006
01 Nov - 30 Nov 2006
01 Dec - 31 Dec 2006
01 Jan - 31 Jan 2007
01 Feb - 28 Feb 2007
01 Mar - 31 Mar 2007
01 Apr - 30 Apr 2007
01 May - 31 May 2007
01 Jun - 30 Jun 2007
01 Jul - 31 Jul 2007
01 Aug - 31 Aug 2007
01 Oct - 31 Oct 2007
01 Nov - 30 Nov 2007
01 Dec - 31 Dec 2007
01 Jan - 31 Jan 2008
01 Feb - 28 Feb 2008
01 Mar - 31 Mar 2008
01 Aug - 31 Aug 2009
01 Sep - 30 Sep 2009
01 Jan - 31 Jan 2010
01 May - 31 May 2010
01 Jun - 30 Jun 2010
01 Aug - 31 Aug 2010
01 Sep - 30 Sep 2010

Links

Search!

Last Comments

Alvaro Oliver (StackBook Part 4 …): Hey! nice post. I just bo…
Tiago Gomes (Let's start again…): ok, now feel happy, you a…
Tiago Gomes (Let's start again…): ok, now feel happy, you a…
ir0nhide (StackBook Part 4.…): Very cool, nice work
Toby (Gigabyte, LCDs, a…): Good stuff, although now …
luke (StackBook part 3 …): what are you planing to u…
Toby (A quick rant...): Bastards
Hugh (StackBook Part 2 …): Nicely done, but you now …
gm (StackBook Part 2 …): Hmm, I plan to go a littl…
luke (StackBook Part 2 …): i cant help but wonder if…

Stuff

Powered by Pivot - 1.40.4: 'Dreadwind' 
XML: RSS Feed 
XML: Atom Feed 

« Some tips... | Home | If a picture is worth… »

More of this

04 01 07 - 21:48 Warning: Long blog post ahead.

So I got the WRAP 2.

A box comes in. Unpack it, and take the box marked WRAP 2E board out. Unwrap the board from the bubble wrap and put it on the desk. Find the small business-card sized bubble wrap package, and take the CM9 card out. Insert the CM9 card into the mini-PCI slot. The one on the top or the bottom is your choice, but I'd reccommend the top.

Anyway, then, remove the two screws from the serial connector, and, holding the board with the connector downwards (so you don't lose the nuts on the other side), screw the screws back in. The board should now be secured to the plate.

Screw the other end (the one without the holes) onto the other end of the case.

Now, take the pigtails (and don't notice that you ordered SMA instead of RP-SMA). Remove the nut and washer off the end. Stick it through the hole, and put the nut back on.

Now, take the other end (I-PEX connector) and push it onto the CM9 card. Optionally, look at your finger, which now has a nice imprint of the back of the plug on it.

Now, plug the power supply in. 3 lights come on on the board, and a few seconds later, all but the left LED went out. Good, the POST all passed. If it didn't, make arrangments about the warranty...

Look around for a good distro. Try various ones (imedia wouldn't install, starOS is too limited, and not free, and i'm NOT running OpenWRT on it! (yes, Kamikaze has an x86 build, and it does work on the WRAP, but no, I'll leave OpenWRT to the R100s... and possibly the AG241, but more on that later.))

I found Voyage. Now, the only CF card image they give you is 64MB. That's not enough space. I plan to use this thing more like a computer than a router - it's going to do different things.

dd the image onto the 256MB CF card. As I have no null-modem cable on hand, I can't see the boot process. I test in qemu, and it boots (although slowly, because qemu is running on PPC).

Put it in the WRAP, and it boots (or so it seems). Look through the DHCP logs of the router, find the odd one out. Ahh, there it is. SSH to it, and get to the shell. Change the password!

Find the wireless card interface (wifi0), and attempt to use iwconfig on it. Huh? WTF? It won't let me.

Refer to the documentation for madwifi... and find that wifi0 is actually not the real interface, you create interfaces off that. Yes, I know, strange way to do things, but it lets you have an AP and a client on the same card, as well as use monitor mode. Yes, all at once. I haven't tried this, so no idea how well it works.

So, after running voyage:~# wlanconfig ath0 create wlandev wifi0 wlanmode sta
ath0
, it seems to work.

Now, find that voyage is debian-based. Add the debian testing repositories (then try to mess with something involving libstdc++ to get kismet to install. I forget what I did, but it was a huge mess and removed parts of dpkg and various other essential system components which I had to scp back to get working.

Anyway, get it going. Then get kismet working. Except, it's out of date!

Let's download the source tarball, compile it, and put it on there.

Now, if I had x86 machines here (no, all powerpc, arm, mipsel, AR7, m68k, whatever you want but x86), I'd just be able to compile it fairly easy. No, this involves a crosscompiler (and I'd love to see compilation of something big on a m68k machine, that'd be fun :D )

I'll just compile on the WRAP, I'm patient.

Install gcc and run out of space. Damn, that 64MB thing. Let's install from the tarball and try again.

Ok, so, take another PowerBook G4, and boot it up into Ubuntu Live (don't want to install Ubuntu permanently, as it was a borrowed machine, and mine's busy doing whatever it does in OS X :) ). Mess with the install script (/dev/sda not /dev/hde please). Watch it install... until it gets to the bootloader bit. chroot gets an error.

The offending line attempts to chroot into the installed system, and run a few things. Uh-oh, architecture difference again... since when could you run x86 binaries on a PPC system? Since they got qemu-user written!

Give it a try, get nothing but errors, give up.

Damn, it's just not behaving...

Ok, let's boot ubuntu up inside qemu, and run the installer within qemu.

qemu -cdrom /dev/cdrom -boot d

D'oh! Why the hell did I just do that? That is NOT going to work. Now, I can't eject this CD... so let's download it. Wait, 600MB on a machine that has 768MB RAM. Not a good idea.

Ahh, Damn Small Linux! That's just 50MB!

Fire up Firefox, realise that machine isn't connecting wirelessly. Wonder why again, and realise. Thanks to damn Broadcom, the bcm43xx driver can't distribute firmware with the driver - it needs to be extracted from their own drivers in order to be used. Stuff that, where's my Cat5 cable.

Ok, so now that that works, let's get on the net. Try and download DSL, but all the mirrors are real slow. Wait, mirror.internode.on.net has it! (go Node!).

Watch DSL download at 1.5MB/s! (~3km from phone exchange, syncs at 14-15mbit).

qemu -cdrom /tmp/dsl.iso

Get half way through the boot, then realise... whoops! Where's the CF card?

qemu -cdrom /tmp/dsl.iso -hda /dev/sda

But wait, which will it boot from. Yes, the HDD. Damnit!

qemu -cdrom /tmp/dsl.iso -hda /dev/sda -boot d

Better!

Get booted up, and realise you forgot the tarball. Wait, it's half installed on the card, let's just do the chrooted steps manually.

So, after editing /etc/lilo.conf, and chrooting right to install, we're good to go.

Boot qemu again, and get greeted by a crapload of permissions errors!

Whoops! Forgot --numeric-owner on tar. It pays to RTFM.

Start again.

Ok, so, after it boots in qemu and has 256MB total space, put the CF card in the WRAP. Grab some source tarballs, and install gcc, subversion and a whole heap of things needed to compile. Damn, out of space!
What!?

Ok, swap to the 512MB card. Do the old tar --numeric-owner thing again, and make a tarball of what's installed. Untar onto the 512MB card, boot DSL, chroot, install lilo etc, test with qemu and run. Put it into the WRAP. Damn, it doesn't work. Uh-oh. I wish I had a serial cable...

Put the 256MB CF back in... it doesn't work. Uh-oh.

Keep fiddling round, wonder if you broke something.

Then find that the DHCP lease has expired, and it's at another IP address! Ahh, good to be back in.

Now, get kismet-devel (not newcore, I'll deal with that later). Try and compile. No go. libpcap is out of date. Get libpcap and compile from source, install, and compile kismet again. Damn, missing more stuff. Compile again, and one of the files gets an error. Out of disk space? df -h repots 121MB. Why does gcc need more than this?

Give up for a few days. Let's test this thing as an ap. Set up madwifi in AP mode, connect, and see how far it goes. OK, nice, it barely works out of the room. Unscrew the case. Hang on, that's better. Barely. But aren't the antennas on the outside of the case?

Unplug the pigtails, no effect on range. Wait, with no antennas, it's the same as with them!?

Try another CM9 card in it...same result.

Try other pigtails, and while removing the antennas, realise one thing. Wait, the antenna and the plug screw together, but they're both sockets.

Look at receipt. Damnit! SMA!? I could have sworn I ordered RP-SMA.

Open up email inbox, first invoice says SMA! Whoops, guess that's what I screw up when I'm in a hurry! Anyone want some I-PEX to SMA pigtails? $5 each (that's about 1/3 of what they cost, I don't want them...)

Rip apart a R100, and steal it's I-PEX to RP-SMA pigtail. Note that it now goes a fairly long way in terms of range. Nice.

Then I start thinking. Dangerous thing to do, I know. If I put a pin in the SMA socket, I'll make it a plug. Search drawers for paperclip suitible, and cut it shorter, stick it in. Screw antennas on, reconnect to I-PEX connectors on card.

Put R100 back together (without disturbing warranty void if removed sticker, that's good hardware design :D)

Note that range is now back to normal. I'll buy some 6dbi antennas for it soon, that's going to be fun.

Anyway, back to Kismet. A few days later, I was reading through the gcc manpage for something, anything that might help. Ahh, -pipe?


-pipe
Use pipes rather than temporary files for communication between the
various stages of compilation. This fails to work on some systems
where the assembler is unable to read from a pipe; but the GNU
assembler has no trouble.


Maybe, maybe. More RAM might be used, though.

vi Makefile, and change CFLAGS to include -pipe. Compilation now succeeds, no out of disk space warning. Kismet installs, and after some fiddling, runs!

The WRAP sure is a nice product - a whole computer on a 10x16cm board, in a nice metal case.

Anyway, here's a conclusion:

1. Install Voyage from x86 Linux if possible. At least now you know how to do it if you will use it on powerpc. This is kind-of unavoidable, as the lilo installer only runs on x86 (what good is lilo on powerpc anyway? it won't boot).

2. Get a serial cable! So much easier! (I've since gone out and bought one.)

3. If you're going to do crazy compiling stuff, get a BIG CF card. Or compile on another machine.

4. Be careful when messing with apt-get and dpkg mirrors.

And you'll have lots of fun if you get a WRAP. Kismet runs great on it, now I just need a serial GPS (don't want to solder to the header points for USB, and modify the board for 5v operation...)

The WRAP makes a nice AP (if you connect the antennas right!), and makes a nice Kismet drone as well. I'll have to try some other apps on it, see how well they do.

If you want to buy one of these devices, I'm a distributor for them now, so, you can buy off me. I'll sell it to you for a good price.

Long blog post over... 1796 words!
No comments

Trackback link: http://gm.stackunderflow.com/blog/pivot/tb.php?tb_id=56

  
Remember personal info?

Emoticons / Textile

To prevent automated comment spam, the answer to this rather simple question is required...

 

  (Register your username / Log in)

Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.

 

Linkdump