Archive for the ‘Technology’ Category

Currently getting 400ms ping times to my wi-fi access point, and about 16k/second to my file server over my ‘150Mbps’ wi-fi connection. Plug in an Ethernet cable, and the ping is down to 0.25ms.

Remind me never to buy another laptop with Realtek wi-fi.

Bought one of these to get faster wi-fi, as the ISP wi-fi is only 2.4GHz 54Mbps (and rarely gets close to it). This means I can now use the ISP wi-fi as a ‘guest’ network that can’t access the other computers in the house, while the rest of us connect to the new router.

To avoid problems, I decided to use the same IP subnets on both routers. I assumed the router wouldn’t have any problem handling that, since it does NAT and both subnets are private. Oh, dear.

First time I plugged the Archer C7 into the ISP router, it went and got a DHCP address from the ISP router… and stopped working. No routing, no web page.

Turns out that it can’t handle having both WAN and LAN on overlapping subnets. Worse, when it does that, it resets its own IP address to the default 192.168.0.1, anyone using static IP configuration suddenly finds their gateway has vanished, and anyone trying to connect to the configured IP address finds it’s not there.

But it gets worse. You can’t even disconnect the WAN cable and reboot the router, because it PERMANENTLY changes the IP address back to the default. Before I realized what it was doing, I ended up resetting it to defaults and restoring the configuration backup I’d previously made (you did make a backup, right?)

Other than this peculiarity, which required me to change the IP address of pretty much every device on the LAN, and the fact that it routes private IP addresses in the first place, it seems to be working fine so far.

So, I gave in a while ago, and replaced my Nexus 7 with an iPad Air 2. The Nexus was the second Android tablet, and the fourth Android device in the house, and it was pretty good while I used it. But I finally got fed up with a number of things.

1. Android’s security nightmare. The Nexus isn’t so bad, since Google ship updates themselves, but my Android phone had several security holes, and I’ve no idea which may or may not have been fixed, or which will ever be fixed, since they have to go through the manufacturer and phone company before they get to me. It’s still on Android 5.0, so who knows if there’ll be any more updates or whether it’s just been abandoned.
2. Android permissions. The ‘install or don’t’ permission model is completely and utterly broken, unless your goal is to let apps spy on your users. I’m heartily sick of every piece-of-crap app wanting every permission under the sun. Google even provided a more sensible permission model a few revisions back, then removed it. Maybe the next release will have one, maybe not. Google would rather rewrite the UI than implement one.
3. Rapid obsolescence. The Nexus was still on sale a year ago, and some sites are still selling it today. But seems like Google are going to abandon it with 5.1. Apple keep supporting old hardware until it’s no longer capable of running the latest OS.
4. Performance. The Nexus has several times the RAM and more CPU power than my girlfriend’s old iPad, yet it feels clunky in comparison. Java may have seemed a good idea for supporting lots of different devices, but it comes with some horrible performance problems.
5. Bugs. Some of the apps I use on a regular basis have become less and less usable with new Android releases, and one hasn’t even been updated since February. Those apps work fine on the iPad.
6. Storage. The Nexus has no SD card slot, and Google has made them useless, anyway. The apps I run that use a lot of space refuse to install on an SD card, and some that do allow you to install them there just crash if you try to run them. That’s not a great reason to switch to an iPad, because they don’t support SD cards at all, but I needed a device with more storage, so I’d have bought something else soon anyway.

So, I’ll keep the Nexus as a throwaway device when I’m travelling, when it won’t have anything particularly important on it. But, at home, I’ll be doing most tablety things on the iPad, instead.

Unless Google get their act together soon, they’re going to throw the mid-range of the mobile market to Microsoft, while Apple keep the high end.

KU was the first time I saw Amazon do something blatantly dumb, that helps push writers to competitors who had no idea how to steal those writers from Amazon.

The problem with companies in general is that, no matter how well they start out, over time people see the bad and dumb things they do and eventually, after enough of them, decide they’ve jumped the shark and become just another big corporation. I reached that point with Google a few years ago. I reached that point with Amazon in the last few weeks… not just KU, but the lousy ‘mobile-friendly’ web site changes that have made the site painful to use on my laptop, farming out many products to third-party sellers that I don’t want to have to deal with, and various other annoyances that have accumulated over time.

Smoke is everywhere today.

This is from the A118 dashcam, but edited and scaled down to 720P to improve upload times.

I’ve only had two problems with this dashcam so far:

  • Sometimes it just doesn’t record. It seems to happen when I start the engine after the dashcam has gone beep. If I start the engine as soon as the gauges have done their thing and gone back to zero, it seems to work fine. I’m guessing it can handle a startup power glitch while the capacitor is charging, but not once it’s booted up.
  • A couple of times, it’s said ‘Card Error’ and refused to record. When that happened, I just turned the ignition off, let it power down, and turned it back on. Then it recorded. This may be due to my accidentally pulling the USB cable from my laptop without thinking a few days ago, which could have corrupted the flash filesystem, as it exports the flash as a raw filesystem. In future, I think I’ll reformat the card every time I access it via USB, just in case.

Also have a temporary rear install, with a second camera. I’ll update on that later.

For installing the dashcam, I largely followed the method here, except I used a USB to Mini-USB cable, with a USB power adapter in the 12V socket:

A simple, non-hardwired dash cam install (B40/A118)

First step was to attach the camera to the windshield with the included double-sided tape, and I made the mistake of putting it on the passenger side. I thought that would prevent it from blocking my view, but it also meant the SD card slot is very hard to reach, as the mirror gets in the way. I had to use a pen to push the card in and out, and ejected it across the car a couple of times. Hence, the best solution was to leave it in permanently, and use the USB cable to copy videos off to my laptop on the few occasions when I need to download one.

Next step was to remove the cover over the windshield pillar. As mentioned in the linked post, you can just grab it in the middle and carefully pull it away. It’s attached more solidly at the bottom, but can be pulled out. Then it hangs from the pillar by a plastic cable, and I just moved it aside rather than disconnect that.

That done, I used a piece of plastic to push the cable into the roof of the car–there’s a hole behind the mirror which is just about the right size for the cable to go through–and along until it reached the pillar. Then dropped it down the hole between the speaker and pillar, and pulled it out into the passenger footwell through one of the holes at the bottom.

Cable installed down pillar.

About half the pillar is taken up by the side curtain airbag, and I didn’t want to risk having the cable interfere with that if it went off. So I used cable ties to attach it to the existing wiring that runs down the pillar. I managed to drop one of the cable ties and it fell down behind the airbag, but fortunately, after I poked it a couple of times, it fell down further until I was able to pull it out.

To reattach the cover, just push it back in at the bottom, then push the sides back into the pillar. Just be careful that the sides go inside the weather stripping on the door frame and not outside. I got a couple of inches at the bottom outside the weather stripping, and had to pull it out again.

Plug into centre console

Dashcam plug

I used the cable clips which came with the camera to run the cable across beneath the glove box, but that’s not really ideal, since there’s not much clearance for passengers’ feet, and they could easily kick it away. I think I’ll have to tape it up.

Then I ended up with about six inches of the ten foot cable left over to plug into the power socket. Just about enough to comfortably plug it into the laptop when I need to.

Dashcam on the windshield

After that, all I had left to do was attach the cable cover. The base was already stuck to the windshield, but the cover was difficult to fit as I’d left too much slack in the cable to the camera, and had to carefully push it in until the cover would actually fit. Since I don’t plan to detach the camera at any point, I should have only left enough cable up there to reach it, and the cover would have fit more easily.

Bought one of these, too, to record some of the crazy stuff the local drivers do around town:

I-Max 1.5″ LCD A118C Dash Cam

It installs easily, using double-sided tape to attach the camera and cable cover to the windshield. It then looks like a pre-installed camera to anyone outside the car, but I still have to hide the wires. I’m going to run a USB cable down to the power socket and used a USB power adapter there, so I don’t have to remove the SD card to get video off the camera, I can just plug it into my laptop and read the files directly.

This is the capacitor model, so there are no worries about the battery wearing out, but it takes a few seconds to start up. It beeps and starts recording before I’ve put on my driving glasses and shifted into drive, so not a big deal. The only real downside is that it doesn’t support parking mode, if someone hits the car in a parking lot.

I installed a Sandisk Ultra 64GB SD card, even though the manufacture claims it only supports 32GB. It was a bit tricky, as the camera initially rejected the card, but when I found the Format option hidden away in the menus I formatted it in the camera and it’s working fine so far. I just haven’t verified that it rolls over and deletes old files when it gets full.

Video images are pretty good in daylight. I haven’t tried it at night yet.

Note that I took this image the first day I had the camera installed, before I realized there’s a protective plastic film over the lens. Removing that eliminated the slight blurriness in places on the image:

Driving along the road

Scaled down video frame capture

Next exercise after I complete the wiring will be figuring out how to install another one at the rear for the moronic tailgaters. There’s a power socket, but, since the camera is attached directly to the windshield, it will either be pointed too low down at the back, or on top of the heated glass elements. There is quite a lot of adjustment on the lens, but I’ve got some thinking to do there.

Bought one of these recently, though I haven’t had much time to fly it yet. One problem I’ve had is that VLC on Linux won’t play the video files correctly from the SD card; I found this page which has a script to transcode and rescale them from their weird aspect ratio, and the files play fine afterwards:

Recoding H107D Videos

However, I did have to replace ‘ffmpeg’ with ‘avconv’ in the script, as it seems Mint no longer ships with ffmpeg, but uses a fork of the code.

One of the things that really bugs me in SF are stories where trained astronauts do really stupid things, or act like wet blankets when something bad happens. I’ve you’ve read anything about astronaut training, or any of their biographies, you know that’s just not going to happen. They’re always expecting the worst to happen, and have a procedure for dealing with it… if not, they’ll try things until they fix it or die, they won’t just stand there screaming.

How is it that I can install Linux from scratch faster than I can install Windows drivers for a new scanner?

Turned up on my Nexus 7 today. No idea what’s changed, but it was a pretty small update.

Neat video from NVIDIA, showing how they can reproduce some famous Apollo 11 images from first principles with computer models and modern GPU power.

https://www.youtube.com/watch?v=O9y_AVYMEUs

Android 5.0.1 just turned up on my Nexus 7. No idea what’s changed, just some bug-fixes, from the look of it.

I did finally get this update on my Nexus 7 a week or two back. Overall, there aren’t that many differences, and it’s still missing real, useful permission controls.

Pros:

Smoother. Kindle app, in particular, doesn’t seem to chug as much when reading books or scrolling through the list of books.

Cons:

Many things now take longer. For example, getting to the settings requires two screen touches instead of one, and logging in requires swiping the screen before you can type the password. The animations are kind of useful, but time consuming.

Ambivalent:

The new look is flatter than the old one. I honestly don’t see why anyone thought it was worth investing all the time to develop, and some apps look much worse with the new look. Seems like change for change’s sake.

So, despite the rumours, seems like Android 5 still isn’t out yet. I’ve been checking the Nexus 7 a couple of times a day, and nothing has shown up. Guess we’ll be waiting a few weeks longer before it’s available to upgrade.

Finally got around to upgrading. So far it works no worse than 16, except my fancy login screen has been replaced with some crappy username/password entry box, and encrypted swap partitions no longer work (apparently the latter is a known bug).

Here’s roughly how I did it:

1. Use the backup tool to save a list of installed applications.
2. Boot up, plug in the USB backup drive and log in to a console terminal.
3. cd /tmp and sudo -i to become root, not in my own home directory.
4. Since I have an encrypted home directory, I now want to unmount /home/emg so nothing can write to the directory while I’m backing it up. So umount /home/emg.
5. Copy /home to the backup drive. This saves an encrypted backup which can be reloaded if everything goes horribly wrong.
6. While doing that, make a list of the partitions on the disk.
7. Unmount the backup drive, unplug it, and reboot on the install disk.
8. Select to install. Select all partitions other than /home, and choose to reformat them and install.
9. Set the hostname and username, and ensure you pick the same password as you had before, so the encrypted home directory will work.
10. Install.
11. Reboot.
12. Edit /etc/fstab to mount the old home partition as /home.
13. Reboot.
14. Log in as yourself, update (in my case, I had to download about 400 upgraded packages) and finish installing the packages you need.
15. Reboot for safety. Job done.

One of the most tedious parts of preparing the paperback print-on-demand version of a book is fixing up the formatting to minimize hyphens, widows and orphans (single lines at the beginning or end of a page), and dangling words on a single line at the end of a paragraph. This is particularly difficult if you’re formatting on the cheap with a word processor rather than a proper page layout tool like InDesign.

Fortunately, LibreOffice includes some useful features which can make your life easier. I would assume other programs like Word will have similar options hidden away in their settings, too.

For example, I added a missing comma to this paragraph which used to be two lines, and it suddenly became three, leaving a dangling word at the end, and creating an orphan where it pushed the final line of the final paragraph on that page onto the next page.

Three-line paragraph

Too many lines

So, how do we fix this? Changing margins would work, but would impact the entire book. Changing font size would work, but would stand out if we reduced it by even half a point. Revising the wording would work, but it’s already about as sparse as it can be.

The answer is in the character formatting:

Width set to 98%

Character format window

The LibreOffice Character Format window has a ‘scale width’ option, which leaves the font height the same, but makes it wider or narrower. If you change this by a few percent, it will change the position of the words, but not be obvious to the reader. In this case, we’re changing it to 98%, for a tiny 2% reduction in character width.

Now only two lines.

Scaled paragraph.

Job done. We’re now back to two lines, and you can’t even see the joins.

Now, let’s look at another option. Instead of scaling the font horizontally, we could scale the entire page vertically.

Here’s the original page, with the evil paragraph which caused all this fuss:

Page with no scaling, and evil paragraph highlighted

Full-size page

So, next, we select all the text on the page, and choose paragraph formatting. If there were some dangling lines at the top of the page where a paragraph was split across a page break, we’d skip them.

Window with line spacing set to 98%

Paragraph Format window

The Paragraph Format window has a line spacing control, which lets you specify spacing as a percentage. In this case, we can set it to 98% to slightly reduce the spacing on this page.

This allows LibreOffice to move the orphan from the next page back to meet the widow on this one:

Page with line spacing scaled to 98%

Modified page

So there’s an alternate way to fix the page, without changing the paragraph. Personally, I prefer the character spacing change as this page will have one more line than the facing page, so the two will seem misaligned. But, it may be useful in some cases where you can’t fix the formatting any other way.