Hackbook FreeBSD - Wifi

My notebook for this evening’s work states “This fucking computer is insanity”. I’ve clearly picked up the term from tj.

This fucking computer is insanity

I’ve spent a lot of time fucking about with this wifi nonsense. Here’s the compressed overview of how far I’ve got:

I’m loading every module related to ipw and wlan under the sun in /boot/loader.conf:


No idea what half that wlan stuff does, maybe I should read up some…

In /etc/rc.conf I’ve got:

ifconfig_wlan0="WPA DHCP"

The end result in dmesg is this:

ipw0: radio turned off

A quick check of /var/log/messages reveals:

wpa_supplicant[358]: wlan0: CTRL-EVENT-TERMINATING

Time for prodding and analysing. If I put the interface down ifconfig wlan0 down and then bring it back up and scan ifconfig wlan0 up scan I can get a table of 2 results, and the Wifi light pulses on then off quickly. It’s starting and then stopping straight away - almost working! Any further prodding at the card without the down/up cycle responds with nothing.

Looking at for quirks of settings for the TC1100 on LinuxQuestions I stumbled across WMI driver. This brought back painful memories… and maybe gave me a clue.

It turns out that there are switches in the BIOS controlled via a medium called WMI. WMI, as far as I understand it, reveals these BIOS controls to the OS via ACPI commands. One of these is for wifi radio control. It’s entirely plausible, to me, that this is overriding wifi as soon as it detects the card becoming active and turning it off. That would explain why the card stays off.

Digging about FreeBSD, there’s a pair of useful modules - acpi_wmi and acpi_hp. They are for mapping ACPI to WMI, and specifically for the latter on HP laptops (two model names given). Commands are broken out to sysctl, as opposed to linux’s /sys and /proc folders. The TC1100 is HP, we might be on to a winner. I added those modules to /boot/loader.conf and rebooted.

As suggested in the acpi_wmi manpage, there are two GUIDs listed in /dev/wmistat0 - the system is picking up my WMI interface to BIOS! The contents of the file are:

GUID                                  INST EXPE METH STR EVENT OID
{C364AC71-36DB-495A-8494-B439D472A505}   3 NO   NO   NO  NO    BA
{0717B5EE-F466-4110-A554-C5588B8028C0}   1 NO   NO   NO  0x80  -

sysctl wasn’t recognising commands for these as suggested in the acpi_hp manpage - it turns out these GUIDs aren’t recognised by that module.

Digging around in the FreeBSD source code (this got serious really quickly!), these GUIDs don’t appear at all. I guess it’s worth browsing the Linux Source for the module, where one does appear and trying to understand how it differs from the FreeBSD acpi_hp and then write some code. TBH, my code isn’t that good but I’ll maybe find someone who’s competent and ask them nicely.

My journal entry ends simply:

Holy Fuck, I'm just going to use a Dongle

i'm hibby · blog ·