Friday, 17 August 2012

Instant wifi - just add "Edimax EW-7811UN"

Archimedes could use one of these with a pivot
Ah, the 3Com OfficeConnect 3CRUSB10075. I remember it well...

About five years ago this would have been sold as a USB wifi adaptor, though its actual purpose was more to test the structural integrity of laptop USB ports. Extending no less than three inches, it was also cleverly more than an inch wide - providing the added bonus of preventing laptops with vertical USB ports from sitting flat.

Slightly larger than the average car's indicator controls, and also slightly easier to hit, it was close to guaranteed that at some point *something* would strike the OfficeConnect a lateral blow, resulting in  two goodly sized pieces of grey plastic, one still securely connected to the USB port.

Of course the unlucky would find themselves with one very large piece of plastic, still securely connected to your USB port, and a usb sized hole in the side of the laptop.

For mild amusement, I plugged it into my Thinkpad (after turning the laptop on its opposing side, then using both hands and alignment rails to guide it into place) and NetBSD's dmesg blurted out:
zyd0 at uhub3 port 1
zyd0: 3COM 3CRUSB10075, rev 2.00/43.30, addr 2
zyd0: HMAC ZD1211, FW 46.05, RF RFMD, PA 0, address 00:0f:cb:c0:8c:d6
zyd0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
zyd0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
If I recall it even came with a cap - which itself was around three times the size of the other USB wifi adaptor in the picture - an Edimax EW-7811UN.
For the princely sum of GBP8.95 delivered this diminutive device provides wifi connectivity without significantly adjusting your machine's centre of gravity:
urtwn0: Realtek 802.11n WLAN Adapter, rev 2.00/2.00, addr 2
urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R, address 80:1f:02:61:13:b0
urtwn0: 1 rx pipe, 2 tx pipes
urtwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
urtwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
I had hoped to provide some benchmarks between the two USB devices and my Thinkpad's built in Intel PRO/Wireless 5100 AGN:
iwn0 at pci3 dev 0 function 0: vendor 0x8086 product 0x4237 (rev. 0x00)
iwn0: interrupting at ioapic0 pin 17
iwn0: MIMO 1T2R, MoW, address 00:16:ea:c5:bb:10
iwn0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
... but unfortunately the OfficeConnect appears to no longer be able to associate with my WPA2 network. Possibly some of its valves have worn out, or maybe a small family of mice have set up residence inside - I would shake it to see if it rattles but I fear I might put my back out...

For reference the PRO/Wireless 5100 reported ttcp rates of 17.2 Mbit/sec send and 16.9 Mbit/sec receive, while the Edimax managed 12.7 Mbit/sec and 12.2 Mbit/sec.

Not earth shattering, but not too bad either.

So what prompted this trip down "USB wifi adaptors the size of vinyl records" memory lane? Someone on a mailing list was running NetBSD on a macbook and it wasn't recognising the wifi. I suggested trying a nano USB wifi dongle, but I wanted to recommend one that worked - so I bought one to see it work.

In the process I found out that while NetBSD-current included the urtwn driver and the firmware, NetBSD-6 BETA2 only had the driver and required a manual download of the firmware, so I submitted a pullup request to get the firmware into the NetBSD-6 release - its always nice to have stuff work Out Of the Box :)

About the only thing bad I could have to say about the Edimax is its use of one of those violently blue LEDs - you know the one's suitable for landing aircraft in heavy fog or signalling direct to the Curiosity rover on Mars. It doesn't have any gaps or transparency in the case - the LED just shines directly through the black plastic (and I suspect the metal USB plug if it was far enough out of the machine).

(some time elapses, as it does)

Now *that* is interesting... in a "random profanity and threatening of inanimate objects" sort of way...

Presumably the OfficeConnect did not appreciate my less than glowing comments about it - that, or possibly because I forgot to use the correct guide rails and block-and-tackle to remove it from the machine - when I unplugged it my laptop hung for a moment and then rebooted.

More deserving of the profanity however, on reboot the laptop hung when probing the CPU. Repeated. Powered off, leaving for a minute and back on and it *still* hung on probing the CPU. Eventually I removed the battery and power cable, held the power button down for 30 seconds, then reassembled and successfully booted.

So it appears the OfficeConnect is capable of deranging the USB hardware on a Thinkpad sufficiently well to require a complete disconnection and draining of all power. Handy... if you like the sensation (albeit briefly) of all blood draining from your face as you consider the prospect of your laptop having just been completely fried.

Things you would prefer not to fall out of your battery
As an added bonus, when I removed the battery I found myself in possession of a small spring and broken black plastic tag, which appear to have fallen out of the battery.

It could be a subtle suggestion that its time to replace the battery, or a somewhat less subtle hint that I really should drop the Thinkpad less..

Anyway, that concludes today's "Fun With WiFi And NetBSD" - and today's top hints are:
  • Edimax make a cheap and usable tiny wifi adaptor
  • If you have an old wifi adaptor large enough use as furniture, just carefully dispose of it
  • While repeatedly dropping a Thinkpad may make it gradually lighter over time, its not a good idea

Saturday, 4 August 2012

Final Dreamcastery nonsense at the end of Retrochallenge 2012

Retrochallenge 2012 has come to an end, so this is a catchup post of the mainly Dreamcast related foolery over the past week.

What every Dreamcast needs
Quite some time ago Kiyoshi IKEHARA designed a DCEXT board enabling connection of an IDE disk and an ISA (typically network) card to NetBSD/dreamcast, (I believe Izumi Tsutsui wrote the code). The patches never made it back into the main NetBSD tree and have just been maintained by Izumi.
 
Now someone is trying to add support for it to DreamShell, an alternative gaming OS for the Dreamcast, so I found a copy of the patches for netbsd-5, tweaked them for current, built a test kernel posted it to their forum.

Annoyingly the email notification of subsequent comments didn't seem to work for me, so I missed the very quick response asking for a kernel with additional debug. Just seen it now, so just built & uploaded it now :)

Elsewhere in my world of retro-challenge I still don't have public IPs for wopr (VAX) and orac (Dreamcast) after the office move, so wopr is very lonely on an internal network and orac is at home (where at least I can poke at it).

Unfortunately my "at home" Dreamcast CD-R burning opportunities are somewhat limited:
  • My thinkpad DVD drive is more than a little unwell. It writes CDs that not even it can read, and had a tendency to just randomly eject at any point during the day. Hence its been replaced by an sata drive bay
  • Michelle has a macbook air, which is beautiful, but optical-drive-less
  • My gaming PC has a blueray drive, and none of the CD-Rs it generates work with the DC. I have a whole stack of coasters that prove adjusting speed, burn options, or switching NetBSD/Windows has no effect
  • I have a Mac-mini which has a drive, but only OSX installed. (thinks). I *could* port dc-burn-netbsd to OSX, or at least the "burn existing ISO" option...
Anyway...

I had a play with telling NetBSD to add unused video ram to the normal kernel memory. Works perfectly on gxemul, but real hardware was a little pickier, so that it going to take some more work (if its possible).

Nick Hudson posted me a Dreamcast serial cable he was now longer using, which enabled me to find out that getty and remote are *really* fussy about using a read-only /dev, so I'm probably going to have to switch my live CD to use the standard tmpfs /dev trick. That is annoying to the tune of around 300K of wasted memory, but not the end of the world.

My current "goal of randomness" is to get the live CD to show a prompt in an xterm. Thats readonly-root-on-iso9660, with misc tmpfs & union mounts, running multi-user in 16M without swap, with the X server and one xterm running.

I've tested it on root-on-nfs without swap, so I think it should be doable... just. I wonder if I should add an option to dc-burn-netbsd to create a root filesystem suitable for testing over NFS - to avoid a fresh coaster per test (and the feeling that I can hear the Dreamcast CD seek mechanism expiring before my ears).

As if the VAX & Dreamcast retro-madness isn't enough I've just collected a PowerBook Duo 270c from someone who ran out of space. 12M RAM, 240M disk, 68030 & a 9" 640x480 screen. Its so *tiny* and cute that I actively want to do something useful with it, unfortunately its only I/O consists of two serial ports and a dock connector.

Did I mention I also picked up a Duo Dock II with it, which has a vast selection of ports, floppy drive, space for an addition disk, an FPU chip, additional VRAM, and two nubus slots. It addresses the "tiny, cute but no ports" aspect of the Duo 270c in a big way. However...

Do not make Dock angry. Dock crush!
  1. It is the size and weight of a small bus. I keep having to check underneath for wheels
  2. The network port does not appear to be fitted - so the *one* thing I need most, it doesn't do
  3. It requires the laptop to be closed and inserted - so I now need to find a an external ADB mouse, keyboard, and a mac compatible monitor (or adaptor)

Don't worry, its Apple approved
There is a beautiful scene from the film Brazil, where Robert De Nero - playing a renegade special forces equipped air conditioning engineer - pulls out a tiny component and says "thats your problem". When asked if he can fix it he says "no, but I can bypass it with *this*" and proceeds to take from his bag what can only be described as a cross between a cybernetic cthulhu and the spinal column of a robot made from valves.

I look at the tiny Duo 270c and the across at the docking station from hell, and think... "Thank you Robert, that will do just fine".