Dell XPS 13, problems with WiFi

A couple of months ago I bought a Dell XPS 13. I’m still very happy with the laptop, particularly given the target use that I have for it, but I have started noticing a list of problems that do bother me more than a little bit.

The first problem is something that I have spoken of in the original post and updated a couple of times: the firmware (“BIOS”) update. While the firmware is actually published through LVFS by Dell, either Antergos or Arch Linux have some configuration issue with EFI and the System Partition, that cause the EFI shim not to be able to find the right capsule. I ended up just running the update manually twice now, since I didn’t want to spare time to fix the packaging of the firmware updater, and trying with different firmware updates is not easy.

Also, while the new firmware updates made the electrical whining noise effectively disappear, making the laptop very nice to use in quiet hotel rooms (not all hotel rooms are quiet), it seems to have triggered more WiFi problems. Indeed, it got to the point that I could not use the laptop at home at all. I’m not sure what exactly was the problem, but my Linksys WRT1900ACv2 seems to trigger known problems with the WiFi card on this model.

At first I thought it would be a problem with using Arch Linux rather than Dell’s own Ubuntu image, that appeared to have separate Qualcomm drivers for the ath10k card. But it turns out the same error pops up repeated in Dell forums and LaunchPad too. A colleague with the same laptop suggested to just replace the card, getting rid of the whole set of problems introduced by the ath10k driver. Indeed, even looking around the Windows users websites, the recommendation appear to be the same: just replace your card.

The funny bit is that I only really noticed this when I came back from my long August trips, because since I bought the laptop, I hadn’t spent more than a few days at home at that point. I have been in Helsinki, Vancouver and Seattle, used the laptop in airports, lounges, hotels and cafes, as well as my office. And none of those places had any issue with my laptop. I used the laptop extensively to livetweet SREcon Europe from the USENIX wireless at the hotel, and it had no problem whatsoever.

My current theory for this is that there is some mostly-unused feature that is triggered by high-performance access point like the one I have at home, that runs LEDE, and as such is not something you’ll encounter in the wild. This also would explain why the Windows sites that I found referencing the problem are suggesting the card replacement — your average Windows user is unlikely to know how to do so or interested in a solution that does not involve shipping the device back to Dell, and to be fair they probably have a point, why on earth are they selling laptops with crappy WiFi cards?

So anyway my solution to this was to order an Intel 8265 wireless card which includes the same 802.11ac dual-band support and Bluetooth 4.2, and is the same format as the ath10k that the laptop comes with. It feels a bit strange having to open up a new laptop to replace a component, but since this is the serviceable version of Dell, it was not a horrible experience (my Vostro laptop still has a terrible 802.11g 2.4GHz-only card on it, but I can’t replace it easily).

Moving onto something else, the USB-C dock is working great, although I found out the hard way that if you ask Plasma, or whatever else it is that I ended up asking it to, not to put the laptop to sleep the moment the lid is closed, if the power is connected (which I need to make sure I can use the laptop “docked” onto my usual work-from-home setup), it also does not go to sleep if the power is subsequently disconnected. So the short version is that I now usually run the laptop without the power connected unless it’s already running low, and I can easily stay a whole day at a conference without charging, which is great!

Speaking of charging, turns out that the Apple 65W USB-C charger also works great with the XPS 13. Unfortunately it comes without a cable, and particularly with Apple USB-C cable your mileage may vary. It seems to be fine with the Google Pixel phone cable though. I have not tried measuring how much power and which power mode it uses, among other things because I wouldn’t know how to query the USB-C controller to get that information. If you have suggestions I’m all ears.

Otherwise the laptop appears to be working great for me. I only wish I could wake it up from sleep without opening it, when using it docked, but that’s also a minor feature.

The remaining problems are software. For instance Plasma sometimes crashes when I dock the laptop, and the new monitor comes online. And I can’t reboot while docked because the external keyboard (connected on the USB-C dock) is not able to type in the password for the full-disk encryption. Again this is a bother but not a big deal.

Siphoning data on public and private WiFi

So you may remember I have been reviewing some cyber-thrillers in the past, and some of them have been pretty bad. After that I actually thought I could write one myself; after all, it couldn’t be as bad as Counting from Zero. Unfortunately the harsh reality is that I don’t know enough diverse people out there to build up new, interesting but most importantly realistic characters. So I shelved the project completely.

But at the same time, I spent a lot of time thinking of interesting things that may happen in a cyber-thriller that fit more into my world view — while Doctorow will take on surveillance, and Russinovich battles terrorists armed with Windows viruses, I would have put my characters in to deal with the more mundane variety of cyber criminals.

One of the things that I thought about is a variant on an old technique, called Wardriving. While this is not a new technique, I think there are a few interesting twists and it would be a little too interesting tool for low-lifers with a little (not a lot) of computer knowledge.

First of all, when wardriving started as what became a fad, the wireless networks out there were vastly unencryped and for the most part underutilized. Things changed, now thanks to WPA a simple pass-by scan of a network does not give you as much data, and changes in the way wireless protocols are implemented have, for a while, made the efforts hard enough.

But things changed over time, so what is the current situation? I have been thinking of how many things you could do with a persistent wardriving, but it wasn’t until I got bored out of my mind on a lounge at an airport that I was able to prove my point. On my own laptop, in a totally passive mode, invisible to any client on the network, a simple tcpdump or Wireshark dump would show a good chunk of information.

For the most part not something that would be highly confidential — namely I was not able to see anything being sent by the other clients of the network, but I was able to see most of the replies coming from the servers; just monitor DNS and clear-text HTTP and you can find a lot of information about who’s around you.

For instance I could tell that there was another person in the lounge waiting for the same flight as me — as they were checking the RTE website, and I doubt any person not Irish or not connected with Ireland would spend time there. Oh and the guy sitting in front of me was definitely Japanese, because once he sat down I could see the replies back from yahoo.co.jp and a few more websites based in Japan.

Let me be clear, I was not doing that with the intention of doxxing somebody. I originally started tcpdump because one of my own servers was refusing me access — the lounge IP range is in multiple DNSBL, I was expecting the traffic on the network to be mostly viruses trying to replicate. What I found instead was that the access point is broadcasting to all connected clients the replies coming in for anyone else. This is not entirely common: usually you need to set your wireless card in promiscuous mode, and many cards nowadays don’t even let you do that.

But if this is the small fries of information I can figure out by looking at a tcpdump trace in a few minutes, you can imagine what you can find if you can sniff a network for a few hours. But spending a few hours tracing a network in the coffee shop at the corner could be suspicious. How can you make it less obvious? Well, here’s an interesting game, although I have not played it if not in my own stories’ drafts.

There are plenty of mobile WiFi devices out there — they take a SIM card and then project a WiFi signal for you to connect your devices to. I have one by Vodafone (although I use it with a bunch of different operators depending on where I’m traveling), and it is very handy, but while it runs Linux I did not even look for the option of rooting it. These are pretty common to find on eBay, second hand, because sometimes they essentially come free with the contract, and people update them fairly often as new features come up. Quite a few can run OpenWRT.

These devices come with a decent battery (mine lasts easily a whole day of use), and if you buy them second hand they are fairly untraceable (does anybody ever record the IMEI/serial number of the devices they sell?), and are ready to connect to mobile networks (although that’s trickier, the SIM is easier to trace.) Mine actually comes with a microSDHC slot, which means you can easily fit a very expensive 128GB microSD card if you want.

Of course it relies a lot on luck and the kind of very broad fishing net that makes it unfeasible for your average asshole to use, but there isn’t much needed — just a single service that shows you your plaintext password on a website, to match to an username, as most people will not use different passwords across services, with very few exceptions.

But let’s make it creepier – yes I’ll insist on making my posts about what I perceive to be a more important threat model than the NSA – instead of playing this on a random coffee shop at the corner, you are looking into a specific someone’s private life, and you’re close enough that you know or can guess their WiFi access point name and password, dropping one of these devices within the WiFi reach is not difficult at all.

The obvious question becomes what can you find with such a trace. Well, in no particular order you can tell the routine of a person quite easily by figuring out which time of the day they are at home (my devices don’t talk to each other that much when I’m not at home), what time they get up for work, and what time they are out of the door. You can tell how often they do their finances (I don’t go to my bank’s site every day, much less often the revenue’s). For some of the people out there you can tell when they have a private moment and what their interests are (yes I admit I went and checked, assuming you can only see the server response, you can still tell the title of the content that is being streamed/downloaded.) You can tell if they are planning a vacation, and in many cases where. You can tell if they are going to see a movie soon.

Creepy enough? Do I need to paint you a picture of that creepy acquaintance that you called in last week to help you set up your home theater, and to which you gave the WiFi password so he could Google up your provider’s setup guide?

How do you defend from this? Well, funnily enough a lot of the things people have been talking before the “Snowden Revelations” help a lo with this: HTTPS Everywhere and even Tor helps with this. While the latter gives you a different set of problems (it may be untraceable but it does not mean it’s secure!), it does obfuscate the data flow out of your network. It does not hide the traffic patterns (so you can still tell when people are in or not, when they wake up, and so on) but it does hide where you’re going, so that your private moments stay private. Unfortunately it is out of the reach of most people.

HTTPS is a compromise: you can’t tell exactly what’s going on, but if your target is going to YouPorn, you can still tell by the DNS reply. It does reduce the surface of attack considerably, though, and does not require that much technical knowledge on the client side. It’s for reasons like this that service providers should use HTTPS — it does not matter if the NSA can break the encryption, your creepy guy is not the NSA, but small parts of the creepy guy’s plan are thwarted by it: the logs can show the target visited the website of a movie theatre chain, but can’t show the replies from the server with the name of the branch or the movie that the target was interested in.

What is not helping us here, right now, with the creepy guys that are so easy to come by, is the absolute paranoia of the security and cryptography community right now. Dark email? Secure text messaging? They are definitely technologies that need to be explored and developed, but they should not be the focus of the threat model for the public. In this, I’m totally agreeing with Mickens.

I was (and a bit am) scared about writing about this, it makes me feel creepy. It gives a very good impression of how easy it is to abuse a bit of technical knowledge to become a horrible person. And with the track record of the technical circle in the past few years, it does scare the hell out of me, pardon the language.

While the rest of the security and technical community keep focusing on the ghost of the NSA, my fears are in the ease of everyday scams and information leaks. I was not surprised of what the various secret agencies out there wanted to do, after all we’ve seen the movies and the TV series. I was surprised of a few of the tools and reaches, but not the intentions. But the abuse power? There’s just as much of it outside of the surveillance community, it’s just that the people who know don’t care – they focus on theoretical problems, on the Chief World Systems, because that’s where the fun and satisfaction is – and the people who are at risk either believe everything is alright, or everything is not alright; they listen to what the media has to say, and the media never paints useful pictures.

Hardware review: Asus WL-300NUL

Some people probably still remember that I used to have an absolute fear of flying and planes altogether. To the point that I have avoided going to the on-site interview of the company I’m now (years later) working for, because it would have taken place in California and I got scared. While I still do not like to travel, I’ve been traveling quite a bit in the past few years, not only back and forth between Venice and Los Angeles, but also within Europe and within other cities in the USA both last year and this.

In particular, TripIt is telling me I’m going to be away from home at least 41 days this year (and this is without including trips that are not scheduled yet, such as a visit back in Italy, and another trip to the United States in November). And most of them are not for personal reason (although some are, luckily). With all of this going on, I’ve started looking at any reasonably cheap option for me to reduce the pains of traveling.

One of these options came to me through a few colleagues, who presented me the Asus WL-330NUL — a tiny wireless router, the almost exact size of the Ethernet adapter that was bundled with my laptop, that provides you with your own, personal WiFi network, routed to another, less-private network, either wireless or wired. An absolute must if you spend a considerable amount of time in hotels.

First of all, the device itself is tiny, as I said it’s almost the exact size of my Ethernet adapter and it can replace it 100%. Indeed, the device has four interfaces (although not the proper term): USB (gadget), Ethernet and two wireless radios; the USB connection is used both for host connectivity and for power: if you connect the router to your computer via USB, it’ll present itself as a cdc_ether device, which Linux supports full well as if it was a standard Ethernet port — if possible, it’s better supported than some of the USB Ethernet adapters out there in the wild.

Once your computer sees the connection via Ethernet, the device itself can be configured to either use a wired or wireless upstream connection — if you choose to use a wired network, which is what I do, as I’ll explain in a moment, then this by itself is going to be already a replacement of the ethernet adapter; indeed at first the device will configure itself to be a simple bridge between USB and Ethernet, although that’s not what I use it for.

Once you configured the wired or wireless upstream connection, you can focus on setting up your own private WiFi network: the second radio can broadcast your own SSID and handle your own 802.11n network, protected with WPA for instance. Since you have a stable SSID/key combination, once you turn the device on, all your gadgets will connect to that network, without requiring manual, device-by-device, configuration.

Even better, since you’re now behind a router, for what the hotel or other provider is concerned, you have a single device: you consume a single IP and a single connection. For networks where you have to login separately for each device every 24 hours (or even every reconnection), this also means you only have to do it from one device, where it’s handy, and everything else will follow.

As I said above, my suggested approach is to always use the wired network if the hotel makes it available (most of the non-economy hotels do). The reason why I’m saying this is that it’s easy to misread the security implications of a device like this. While it is true that it can create your own private WiFi to then route to the hotel wireless, when you do so you add nothing to security, even if your WiFi is WPA2. The reason is simple: the public wireless network from the hotel is still completely unencrypted, so anybody eavesdropping can see what you’re doing, unless you’re using encrypted websites and even then part of your traffic can be inspected, such as which websites you’re consulting. If, on the other hand, you use the wired network, while not totally secure (the hotel and the provider can still see the non-encrypted connections), you’re still stopping a good bunch of people from gathering your data.

Finally, there is one more feature that is important if you travel a lot among hotels of respectable size: all of them use multiple access points for their WiFi networks, even though they broadcast the same SSID (and sometimes they don’t); these access point do not allow you to roam data across them, so if you have two devices, say a Nexus 7 and a Chromecast that you bring with you, they may not be able to talk to each other without a device like this, as they may end up on different APs, and unable to “see” each other on the network, or at least not consistently enough to stream from one to the other. Since with this device you can just connect all the gadgets at the same network and access point, your problem is then solved.

I’ve been using the device for ten days now on two hotels and two airports, and it’s definitely handy. I can’t complain about the range either: I’m now in Pittsburgh’s Bakery Square at the SpringHill Suites and my phone connected fine to it across the square in the Coffee Tree Roaster shop. Oh yeah and my room faces away from the square too.

Also, the power supply (by Asus!) that I bought last year (the original US one that I got with it just died on my, so I bought a different one) comes with a USB charging port by itself, which means I can just WiFi from my laptop even with a single power socket, freeing up the USB port (I only have two and one I use for my smartcard reader). I guess I could probably run this off my Anker battery but I have not tried that yet, as I somehow doubt that the airlines would be okay with me broadcasting my own WiFi on their planes. In any case, this is now part of my essential tools.

My problem with networking

After my two parter on networking, IPv6 and wireless, I got a few questions on why I don just use a cable connection rather than dealing with wireless bridges. The answer is, unfortunately, that I don’t have a clean way to reach with a cable from the point where my ADSL is and where my office is, on the floor above.

This is mostly due to bad wiring in the house: too little space to get cables through, and too many cables already in there. One of the projects we have going on the house now (we’ve been working on a relatively long list of chores that has to be done since neither me nor my mother foresee leaving this house soon), is to rewire the burglar alarm system, in which case, I should get more space for my cables — modern burglar alarms do not require the equivalent of four Ethernet cables running throughout the house.

Unfortunately that is not going to be the end of the trouble. While I might be able to get the one cable running from my office to the basement (where the cable distribution ties up) and from there to the hallway (where the ADSL is), I’m not sure of how many metres of cables that would be. When I wired with cat5e cable between my office and bedroom (for the AppleTV to stream cleanly), I already had to sacrifice Gigabit speed. And I’m not even sure if passing the cable through there will allow the signal to pass cleanly, as it’ll be running together with the mains’ wires — the house is almost thirty years old, I don’t have a chance to get separate connection for the data cable and the power; I’m lucky enough that the satellite cable fits. And I should shorten that.

To be honest, I knew a way around my house if I wanted to pass a cable to reach here already. But the problem with that is that it would require me to go the widest route possible: while my office is stacked on top of the hallway (without a direct connection, that would have been too easy), to get from one to the other, without the alarm rewiring, I would have to get to the opposite side of the house, bring the cable upstairs and then back, using a mixture of passageways designed for telephone, power and aerial wiring; and crawling outside the wall for a few metres as well.

The problem with that solution, beside the huge amount of time that it would require me to invest in it, is that the total cable length is almost certainly over a hundred metres, which is the official physical limit of cat5e Ethernet cables. Of course many people would insist telling me that “it’s okay, there are high chance it would still work” .. sure, and what if it doesn’t? I mean I have to actually make a hole in the wall at one place, then spend more than a day (I’m sure I wouldn’t be able to do this in just a day, already had to deal with my wiring before), with the risk of not getting a clear enough signal for the connection to be established. No thanks.

I also considered the option of going fibre optic. I have no clue about the cabling itself, and I know it requires even more specific tools than the RJ45 plugs to be wired, but I have looked at the prices of the hardware capable of converting the signal between fibre and good old RJ45 cabling… and it’s way out of my range.

Anyway, back on topic of the current plan for getting the cable running. As I said the current “cable hub” is in the basement, which is mostly used as a storage room for my mother’s stuff. She’s also trying to clean that up, so in a (realistically, remote) future I might actually move most of my hardware down there rather than in the office — namely Yamato, the router itself (forwarding the ADSL connection rather than the whole network) and Archer, the NAS. Our basement is not prone to floods, and is generally cool in the summer, definitely cooler than my office is. Unfortunately for that to work out, I’ll probably need a real-life rack, and rackmount chassis, neither of which is really cheap.

Unfortunately with that being, as I said, in the future, if I were to pass the cable next month from there, and the signal wouldn’t be strong enough, the only option I’d have would be to add a repeater. Adding a repeater there, though, is troublesome. As I said in the other posts, and before as well, my area is plagued with a very bad power supply situation. To the point that I have four UPS units in the house, for a total of 3750 VA (which is, technically, probably more than the power provided by supplier). I don’t really like the idea of having to make room for yet another UPS unit just for a repeater; even less so considering that the cables would end up being over my head, on the stairs’ passage (yes it is a stupid position to add a control panel in the first place), and while most repeaters seem to be wall-mountable, UPS units are a different story.

So the only solution I can think for such a situation would be to add a PoE repeater there, if needed, and then relay its power through a switch, either in my office (unlikely) or in the hallway near the router (most likely), behind the UPS. Once again here, the factor is the cost.

Honestly, even though I decided not to get an office after seeing costs jumping higher and higher – having an office would increase my deductibles of course, but between renting the office, daily transportation, twice the power bill, and so on so forth, it’s not the taxes that worry me – I wonder if it is really as cheap as I prospected it to be, to keep working at home.

Sigh. I guess it’s more paid work, less free time next year as well.

The problem with wireless bridging

I want to pick up where I left with my previous post and expand a bit upon the issue with wireless bridging, and why “just use dd-wrt” is not an answer to the problem.

As I said a number of issues I learnt the hard way, by trying to get them to work… and failing. In particular, there is a limitation in 802.11, that even the dd-wrt documentation notes:

Client Bridge mode will only recognize one mac address on the bridged setup, due a limitation in the 802.11 protocol, even if there are multiple clients (with multiple mac addresses) connected to the client router. If you want to bridge a full LAN you must use WDS. The problem is that the 802.11 protocol just supports one MAC address, but in a LAN there is the possibility for more than one MAC address. It may cause ARP table problems, if you connect more than one computer on the far end of a Client Bridge mode setup. You will not be able to, for example, block mac addresses of client of the bridged routers or set access restrictions based on mac addresses in the bridged router

This is actually putting it more bright than it is. Anything relying on proper mac address communication will fail. Indeed, if you wish to use a single DHCP server, your only choice is to run dhrelay on the bridge itself. And that’s not a good idea.

Due to the fact that 802.11 decides where to send the packets depending on the mac address, you only have two choices for this to work: you either go with what OpenRG/Linksys do, and translate addresses at second level (with probably a dhrelay to make sure that dhcp still works), or you do what D-Link did with the DAP-1160 and create a custom work mode, which I guess encapsulates the packets to preserve their addresses (I could probably have tried AP+Bridge mode and sniffed the traffic to find that out but I didn’t care), probably something along the lines of a generic Ethernet-in-Ethernet encapsulation.

Interestingly enough, there is an RFC describing Ethernet-in-IP encapsulation, and then there is a patch for Linux 2.6.10 that implements it .. it would be quite an interesting approach, to have the router listen to an EtherIP device, and have another EtherIP device here to encapsulate the packets.. unfortunately this would still require a very shallow router up here, which is what I’m trying to avoid altogether. And as it happens, looks like the patch never made it to the Kernel, and the author’s website seems to be gone as well (the domain does not have an answering webserver, even though the whois data confirms its registration .. I should try to see if the email address is still valid or not — there is a valid mx record and an answering mail server at least).

I guess I can add this to the long list of projects I’ll work with once I made enough money not to have to work twelve hours a day to pay the bills…

Atheros and drivers

Since the release of kernel 2.6.26 I’ve had some trouble with WiFi since madwifi-ng fails to load, and I’m left with using the ath5k driver that is provided by the kernel. As it turned out, that driver is pretty bad by itself, and I cannot use iSCSI over it.

Luckily, Atheros released the code for their HAL which should mean that ath5k is going to hugely improve over the course of the next few kernel releases, which is an extraordinary thing. I’m really looking forward for 2.6.28 which should improve the situation at least a bit, maybe allowing me finally to use iSCSI over wireless again.

Unfortunately it doesn’t seem like it’s going to take little time, 2.6.27 is not out yet and the e1000e driver is still broken; that would be nice at least to see how the webcam drivers will get once they are merged in the tree (is Skype going to work with them? When I tried them out of a git tree, the 64-to-32 bit IOCTL bridge failed on a few ioctls that caused Skype to fail accessing the webcam).

But who knows, maybe next year we’ll be having Atheros well supported by all the architectures Linux runs on, so one can easily have Atheros-based WiFi routers to work with OpenWRT, which would finally solve my wireless problems here…

I can dream, can’t I?

About wireless and routers

It’s not like my main interest in the IT field is networking hardware. Actually, albeit I like taking care of it on smaller environment, I don’t know much about large scale networking, and I feel “n00b” every time I hear some fellow devs talking about their work in that area.

Unfortunately it seems like lately I need to take care of a few networking issues for myself. Since the kernel 2.6.26 was released I was unable to use madwifi (as I wrote about); I admit I haven’t tested in the past weeks so it might be fixed now, I just didn’t have time/will to check again. In the mean time I’m using the ath5k driver, that seems to work but not as much as I’d need, so I cannot use iSCSI via wireless anymore, which sucks quite a bit when using the laptop.

There is then the problem with my router that created me a few problems. As I wrote, the table for mac address access control has only 32 entries. I thought it was just a limitation of the interface, but as it turns out, 3Com advertise all their routers as capable of supporting up to 32 clients. This mean that it’s quite unlikely that there’s a way to get around that limit in the table, and even less likely that the same class of routers would work for me.

At this point, I have to find a solution. The obvious one would be to use a Fonera to handle the Wireless connection; this way I could just leave wifi open and be done with it. The problem here is that I’d rather not use WPA2 (or, as someone also noted on my blog) the Nintendo DS won’t connect to WiFi, and that I’d like to have at least some sort of access control. An alternative would be to use a Linux-based access point. I do have the WRT54GL that I used to use when the office had not just Enterprise bug also Prakesh, Klothos and Farragut. The problem is that I’d have to update OpenWRT on it almost surely, and I have no clue how the support is nowadays.

The Linux support for Wireless networking in the past years has been quite in flux, but it started to become quite interesting in the past months. The b43 drivers that finally made possible to use at least a small subset of Broadcom wireless cards could probably allow OpenWRT to use a 2.6 kernel on the WRT54GL sooner or later, but I wonder how its access point mode support would be with that driver. For what I gathered, the ath5k is far from being an alterantive for the job.

Talking about wireless problems, it seems like there are problems even with identifying the correct region. Luckily the channel I’m using is available on all regions, so I’m fine for now. Hopefully, Atheros drivers improvements will follow soon, and ath5k will be able to work with iSCSI and all the rest, maybe even with AP mode so that Linux-based wireless routers would become much easier to manage. Of course the best would be if I could get one of them to run Gentoo directly.

See, the embedded part of the networking game is something I actually am interested about ;)

In the mean time I’m considering the option of resuming the WRT54GL with the same function it had before, and passing a shielded ethernet cable between my office and my bedroom, so I could get the PS3, the AppleTV and the laptop (while I’m there) to talk with enterprise through ethernet directly, and leaving the WRT54GL to connect them to the Wireless. It would probably also be healthier as it means less radio waves in general. The problem of this solution is that I’m not sure I have enough space in the cabling areas, and that I’d need two gigabit switches to make sure that the PlayStation3 and the laptop can communicate at the highest speed possible (I’d need one switch in the office, to join the “backbone” cable with Enterprise and the WRT54GL… the internal switch of the WRT is 10/100Mbit, so it would block Gigabit, and one in the bedroom to join PS3, AppleTV and the laptop).

It’s something I should consider, at any rate.

Linux 2.6.26 and iSCSI trouble

I started using iSCSI a few months ago to be able to extend the capacity of my Windows XP virtual machine and Bootcamp with a shared partition. Using a partition on real hardware on the external Hard Drive was not an option as Parallels broke my Bootcamp more than once, and that is tremendously annoying. After that I started using it to share the external HD I bought for the laptop, so that it’s accessible from any place in my house, albeit slowly because it’s accessed through wireless.

Unfortunately the road for iSCSI target support on Linux ain’t exactly bump free. Updating to glibc 2.8 broke the userland tools of iscsitarget, and it took me a fair day to find a way to fix those. With the latest update to Linux 2.6.26, instead, it was the kernel module to (obviously) break.

This time the subversion repository of iscsitarget was updated already, so I decided to just take a snapshot of the repository, so I could get the actual fix from upstream for the glibc 2.8 issue and the fixes for the new kernel. I suppose I could start maintaining iscsitarget myself now ;) Thanks to Nataniel Copa the snapshot also provides a POSIX-compatible init script, which should make it possible to use it with OpenRC and dash. And guess what my alternatives idea would also make easy to do?

Okay so, the problem with the kernel module has been resolved, everything’s fine then? I wish.

The other problem I’m having now is related to another module that failed to build: madwifi-ng. Enterprise is currently connected to the main router through WiFi, using an Atheros 5K-based card (it’s a D-Link card). Now, as madwifi failed to build, I checked the kernel to see whether there was already an alternative in-kernel official driver for this card, and it turns out there is one, Ath5k, that seemed promising. It uses the mac80211 framework and does support my chipset. Cool.

Unfortunately after enabling it (and having it working fine at the first glance) it started disconnecting immediately, causing the connection to stall, and requiring a few restarts. After a few tries I can tell for sure that the problem is related to iSCSI. As soon as Time Machine on the Mac starts to kick in (it works on the iSCSI disk), the connection is lost:

wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:14:7c:ba:a7:2e
wlan0: association frame received from 00:14:7c:ba:a7:2e, but not in associate state - ignored
wlan0: RX authentication from 00:14:7c:ba:a7:2e (alg=0 transaction=2 status=0)
wlan0: authenticated
wlan0: associate with AP 00:14:7c:ba:a7:2e
wlan0: RX AssocResp from 00:14:7c:ba:a7:2e (capab=0x461 status=0 aid=2)
wlan0: associated
wlan0: switched to short barker preamble (BSSID=00:14:7c:ba:a7:2e)
wlan0: No ProbeResp from current AP 00:14:7c:ba:a7:2e - assume out of range
wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:14:7c:ba:a7:2e
wlan0: RX authentication from 00:14:7c:ba:a7:2e (alg=0 transaction=2 status=0)
wlan0: authenticated
wlan0: associate with AP 00:14:7c:ba:a7:2e
wlan0: RX ReassocResp from 00:14:7c:ba:a7:2e (capab=0x461 status=0 aid=2)
wlan0: associated
wlan0: switched to short barker preamble (BSSID=00:14:7c:ba:a7:2e)

For now I resolved connecting the laptop to Enterprise through the Gigabit interface, so that the iSCSI traffic does not pass through wlan0.

I’ll be going out with some friends in less than an hour, so the problem will have to wait till Monday (tomorrow I have friends coming over, and I have different plans for Sunday if I can avoid fixing this for now).

I’m not sure if I should be switching back to madwifi-ng (from SVN unless they release a new version to fix 2.6.26) or if I should report the problem to the kernel developers to see it fixed.

On different notes, yet still related to the kernel, I decided to make some changes to my configuration of the kernel with this release. I switched from the old “good” VesaFB to UVesaFB, even though I didn’t want to use an initramfs image, it works fine and it finally let me see the console decently on my 16:10 monitor (I start to wish I could have two of these rather than one being a 4:3 still… they come useful to have double windows in Emacs with source and header). I also removed the V4L subsystem and the support for BTTV as I removed the TV card from Enterprise, after hmmm more than five years of almost uninterrupted service; I’m using satellite (Sky Italia) in my room nowadays, so I don’t need the card here, I don’t even have the aerial connection in my office anymore.

I want to check if I’m building and loading stupid stuff. I found myself with the nvram driver enabled, yet not loaded at all, I wonder why I had it on at all. I obviously cannot remove the FireWire subsystem (the external HD I talked about before is using FireWire). I hate to have two SATA controllers enabled too, with two different drivers. I hope that, once I get a new box, all four the drives will stay on a single AHCI-enabled controller. I have two ethernet drivers too, the e1000 I use for iSCSI and the skge for the testing/development rig; and two soundcards, the integrated VIA82XX that right now I’m not using at all, and the ICE1712 I actually use. I haven’t disabled the VIA because I’d liek to use that for Skype once I get some decent headphones/mic set.

So anyway, I’ll better get going or I’ll be late again. What happened to me? I was never late before, I’ve started being quite late in the last weeks..

Looking for a wireless PCI card

And once again I have to ask the lazyweb for some help. This time is to decide what hardware to buy, for a wireless PCI card.

I’m cleaning up my office as I write, I removed almost everything from the room, I just have some stuff on the floor to pick up, and as a result I’ll just have the two desks in it. Then it will be time to re-cable it entirely, as I did for my bedroom last september, and finally to put some new furniture in it (not exactly new because they are things that were downstair in the living room before, but new for my office at least).

Right now I only have here my laptop (as I have work’s stuff on it), the external harddisk for the laptop, where most of the data is, the old UPS as it’s slimmer and the harddisk’s PSU does not care about the waveform, and the IP phone, to receive calls, at least for what concerns computer stuff. I removed Enterprise this morning, together with its three monitors, the AV receiver and the bigger UPS.

One thing that this cleanup made me realise is that I only have one box here that is connected to the wired network segment. I gave Prakesh back to the friend who lent it to me for a while, while Farragut and Klothos are turned down for now in my mother’s bedroom, the IP phone is using DECT, while the base connected to the network is downstair together with the ADSL router. Why should I use a Linksys router to connect that? Okay it’s way easier to get network from rescue CDs, but it’s a waste of power at a minimum, as it has its own PSU which is likely to waste energy in heat. Additionally, it’s two more cables in an already messy office.

So I’m pondering adding a PCI wifi card, either to Enterprise or to the new box I’m going to buy as soon as I’m paid. The problem is to find a good card, very well compatible with Linux (Gentoo in particular, but I suppos that is not a problem, at the worst I’ll be working on adding support for it), 802.11n if at all possible, but not requested. I don’t have 802.11n network here, but I have at least two devices that are compatible with that (the MacBook Pro and the AppleTV), and I’d suspect more stuff to come).

If anybody has a suggestion, it would be very kind of you to share it with me :)