Profile cover photo
Profile photo
Mat Bettinson
10,667 followers -
Geeky linguaphile
Geeky linguaphile

10,667 followers
About
Mat's posts

One of the biggest problems in web development is that it moves so far. Which means that 90% of the hits you get when looking for documentation are years out of date. I don't really understand why websites offering documentation don't expire their old content.

Hacking XPS13 WiFi

I'm going to  come up with a hack to address the  major shortcoming of the otherwise brilliant Dell #XPS13 , the terrible WiFi. I've had a cursory look. The problem would appear to be inauspicious interaction between the bottom metal chassis plate and the antennas. and the shielding effect of carbon fibre. People talk about replacing the wifi module with an Intel unit but that doesn't fix anything, the problem is very clearly that Dell have manufactured lovely case that doesn't have a good place to get a signal through.
The only wifi transparent sections of the case are the plastic on the sides and the keyboard.

I have a couple of ideas. Probably the most elegant is to exit the bottom panel from the wifi module on the back right, and extend one or two quarter wave antennas behind the stand bar on the bottom case, or even removing the rubber bar and putting antennas in there although that would likely result in sub optimal signal when sitting on some surfaces. Another stealth solution would be to affix chip antennas to the outside of the chassis on the back right and back left corners but the problem is with the screen up the top metal chassis sits directly in front of the best place to put them. 

A more radical and decidedly unstealthy option would be to extend a wire out the side of the case to the lid, and then to affix flat F-type antennas to the lid. Those could be large, very high gain and provide potentially spectacular gain and directionality. It would be kind of cute to transform the XPS13 into something that has better wifi than anything else, but it's not going to do much for those expensive sexy looks. 

Listening to radio: The coach of an Australian AFL team was on the radio. The Essendon football club initially got off on doping charges but some anti doping agency appealed and eventually all the players were found guilty. James Hird, the coach, was on the radio continuing to claim that they were all innocent, and that it's all the fault of their sports scientist. This is laughable. All the players failed to declare the injection regime. The anti-doping regime doesn't ask "tell us about any banned things you've been injected with", it asks players what they have ingested, or had injected, full stop. 

Post has attachment
Astonishing university advert

Brilliant and moving. It's not often that a plug for a uni gets over a million views on YouTube. 

Post has attachment
Hover boards explode. Why? Well, the reason is this. They are easy to make so countless factories in China are getting on with it, the sort of places that normally make extremely badly made toys that don't cause any issues other than breaking after five minutes. The problem is that these places often don't have engineers. Now they can acquire lithium cells easily, where as in the past nicad or nimh would have been used. Hover boards need a stack of cells in an arrangement that also has banks in serial. The way to do this properly is to use lithium cell protection circuits and, particularly in this case, some scheme for balancing cells when charging. They won't do any of this. They will use unprotected cells and do some sort of crude CC/CV charge scheme across the entire set. It's even more likely that the cells are reclaimed laptop cells from multiple sources, the sort of thing that's rampant on eBay, such as cells sold as 4000mAH Ultrafires (actually just rewrapped reclaimed throwaways with random capacities from 0 to 2000mAH.

So when the crude charger is looking at total cell pack voltage, its unaware that one shitty cell that used to be in a Dell laptop in Spain before it was recycled via a chop shop in India and sold on to China) has long been charged to capacity and is now comfortably exceeding the maximum cell voltage. It heats up. There's no thermal protection. There's no blow off. Obviously there's no cell balancing as there must be in even a device built with brand new cells. So it heats catastrophically, the cell bulges and ruptures. The electrolyte spontaneously combusts. This heats adjacent cells which cook off in cascade, limited only by the availability of oxygen. Since these are in crudely built metal boxes, the fire is contained at first, until all of the cells inside are cooking off and the case ruptures spraying hot combusting electrolyte. Heaven help anyone that tries to extinguish this with water. Homes are very unlikely to have the means to extinguish a serious lithium battery fire.

There is of course no effective means to regulate the production of electrical equipment in China or in assessing the large volume of personally imported devices that have never seen the inside of any sort of safety compliance lab. The problem isn't limited to hoverboards but this is perhaps a new class of device which is both a commodity toy and therefore expected to be as cheap as possible, and easy enough to make for the cut price toy manufacturing industry, and of course which is dependent on a significantly large pack of lithium batteries.

Post has attachment
Windows 10 activation hell

This is a long post but it's got things you might not know about W10 activation and offers some tips to smooth things for you if you have to do this.

I bought an expensive retail copy of Windows 10 specifically because I'm the sort of person that changes motherboards. This post documents the ridiculously painful process of obtaining of re-activating Windows 10. The important thing to note is this: In the past MS only checked if keys were valid and the painful voice system and human beings would always get you activated. Now their system knows when you have activated a particular key. Unfortunately their systems just haven't caught up with this capability and it ends up just being a pain in the arse.

In case you didn't realise, your free W10 upgrade is no good for a mobo change. MS thinks that's a new computer. Even if you had a retail 7 or 8, when you get the free upgrade, your license is turned into a locked-to-device copy, and is no longer eligible for transfers. So I had no choice but to buy a new WIndows 10 to avoid this. Turns out I would need it almost immediately.

I ended up having to change the mobo on a brand-new PC because it was faulty. Windows helpfully deactivated. This triggered a painful bout of calls to MS technical support. This was the process. I'll tag steps to use short forms for repeats.

#1 Voice menu nonsense to get to the right bit.
#2 Enter massive string of eight groups of numbers.
#3 Get told that it's already activated on another PC. One menu option, 1, "if you believe this is in error..."
#4 Routed to very poor VoIP with distorted hold music. Speak to someone in India. I have to tell them that it's Windows 10. I explain that I've changed the motherboard. She tells me she has 'no access' and transfers me. I end up in #1 but with a super bad VoIP line. Get through #2 but I can barely comprehend #3 so this will not bode well for speaking to a human so I hang up to try again.
#1
#2
Key in one group wrong a couple of times, "I have reason to believe you..." CLICK. Nice.
#1
#2
#3
#4 have chat with support person in India. She can't really understand that it's the same computer with a different motherboard. I must now read out the ridiculously long activation ID on the bad VoIP line, despite the fact I've keyed it in previously. No connection from that system to India apparently.

I finally give her the installation id manually. Now her computer is telling her it's installed on another computer. This goes circular for a bit. Asks me if it could have been installed on another computer. I explain again the motherboard has changed. It's a retail copy of Windows 10 specifically bought for this. I'm on hold. After a short hold she comes back and is satisfied that it's a changed motherboard (ffs!) and then reads out a slightly less ridiculously-long confirmation code. I key this straight into Windows 10. It works, I'm activated.

Seriously Microsoft. If you insist on using this retarded system, why can't you shore up your IT system so the initial voice mail system is integrated with with India so we don't have to rrad out the stupidly long number on a bad VoIP line when we've already keyed it into the phone? And why can't you retrieve the license TYPE so that we have appropriate options when you know it has been activated? E.g. Press 2 if you have changed significant hardware in your pc or you wish to transfer your licence to a new PC.

Anyone would have thought that a tech giant could sort this shit out eh?

Conclusion: If you have to do this yourself, make sure you have a good clear sounding phone and be prepared for the long haul. Get your activation stuff on screen. When you speak to the person in India, make sure they understand you have a retail copy and the motherboard is changed. Do not let them transfer you. If you're trying to 'blag' an activation code for a changed mobo in a free W10 upgrade, it's not going to work. They wont do it. 
Photo

So the bureau of meteorology has been hacked. Maybe an IT refresh will see them move to a proper fucking API for weather data rather than badly formed XML on an ftp server. Still, curious the hysterical 'hundreds of millions' claimed fix cost some bom suit told the ABC. I mean... It still seems to be working. Not an excuse to run out and buy gold plated pie warmers mate!

Erm, has Google finally completely destroyed G+? It looks fucking awful.

Post has attachment
I've been playing with this NodeMCU widget. Previously I tried working with the ridiculously cheap WiFi ESP8266 widgets with Arduino but the AT command firmware was extremely unreliable. These NodeMCU things are basically a custom firmware on the ESP8266 with a Lua interpreter. The module is on a breakout board with a serial chip on it and a USB socket.

I had read mixed reports on the Lua firmware. It's been unreliable for some. However there's another project that ports the Arduino dev kit directly to ESP8266 so you can write raw C on the thing. This is known to work well. This board came from an aussie supplier for $14, available cheaper still from China. I tried the Lua first. I was particularly amazed that the Chinese guys behind NodeMCU have ported u8glib for connecting LCD and OLED displays. They've also ported things like DHT support, 1-Wire and so on.

I set about recreating what I had managed to do with an Arduino nano over the course of a week. Connecting up one of the cute little 1" OLED displays, an SHT11 temp/humid sensor and a motion detector. I added precisely no components, just wiring up those devices to IO pins, no pull-ups or anything. I needed to flash a recent NodeMCU firmware. Got hold of an app called Lualoader that basically is a little smart serial terminal that uploads files to the device and displays serial output.

In the space of a couple of hours I had got reliable measures from the SHT11 sensor, got this printing out to the OLED display, was reading the motion detector state fine. Also connecting to WiFi was trivial in a couple of lines, and a HTTP GET request out sending this data to a server. Not only that, I managed to get the device to deep sleep and it's definitely into the realms of battery powered consumption overall. If you don't deep sleep, it's not really, it draws maybe 30ma sitting there awake, which isn't going to run for weeks on lithium cell.

This is a massive massive thumbs up NodeMCU. I'm conscious of the fact that you have to be careful of writing stuff in Lua not to consume too much heap space but for simple IoT projects with WiFi, i2C and SPI connectivity and even little displays, this really just can't be beat. And if Lua does end up biting you because your code is getting a bit big, then you can always move to the Arduino ESP8266 port (but there's no u8glib for that so far).

Very pleasantly surprised by this. I really hope it kicks off a new class of MCU platform. Hopefully in the future we can have something like this that is a bit less heap-space constrained and is more robust on errors. My biggest complaint is that simple errors result in a hard restart, and often there's no output to serial at all. If they can fix that sort of stuff, this ought to be the new way of doing shit like this. Kids should be playing with these in school!

Post has attachment
Equal thieving opportunity employer.
Photo
Wait while more posts are being loaded