newspaint

Documenting Problems That Were Difficult To Find The Answer To

Hyundai Sonata Won’t Start In Drive, Locks Up

I blew my (mental) gasket today in a tense situation in peak hour traffic when I stopped my car (intentionally) but couldn’t get it to start again.

When you turn the engine off while in Drive (D) you can’t actually turn the keys all the way to the “lock” position to remove them. In this situation:

  • the transmission is in D (drive) and can only be moved into N (neutral)
  • you cannot move the transmission into P (park) even with the foot brake applied
  • the keys cannot be removed from the ignition
  • the keys can be twisted into the “start” position but the car won’t start while the transmission is in D (drive)
  • the car will only start again with the transmission in N (neutral)

It is only when the car is running, and the foot is on the brake, that you can put the car in P (park) and switch the car completely off removing the keys.

Believe me, this is so frustrating.

I don’t know if my car has a fault, or if Hyundai want to just put unsuspecting drivers in impossible situations in heavy traffic.

Windows 10 TCP/Internet Slow With Chrome and OpenWRT Router

So I was having issues getting a Windows 10 laptop running Google Chrome connected via wifi to a router running OpenWRT Chaos Calmer 15.05.1.

The Windows 10 laptop would take a long time to establish a connection and then a long time for any data to transfer at an incredibly slow rate.

At first I thought it was Google Chrome but downloaded Firefox and was still having the same issues.

There are many proposed solutions but the commands that appeared to make a magical difference and instantly speed things up were:

netsh interface tcp show global
netsh interface tcp set global autotuning=disabled

At this stage things did not magically get better.

Then I tried:

netsh interface tcp show heuristics
netsh interface tcp set heuristics enabled

Now the Internet suddenly got quicker.

To undo these changes (if they don’t work for you):

netsh interface tcp set global autotuning=normal
netsh interface tcp set heuristics disabled

Also, because I messed around with the MTU on the WiFi interface I had to run the following to restore things to a relatively normal default:

netsh interface ipv4 set subinterface “WiFi” mtu=1458 store=persistent

Adding Huawei E160E To OpenWRT

I wanted to add a Huawei E160E USB 3G modem to OpenWRT but had some trouble getting it to work.

I used documentation from three places:

In this case I used a latest snapshot from the LEDE project. It turns out the router would simply lose networking, I’d be unable to SSH or access it via the web, after several minutes. Perhaps this was because I was forcing kmod’s with a slightly incompatible kernel. In the end I went back to Chaos Calmer 15.05.1 from OpenWRT which seemed to be more stable for me.

It turned out that I needed to add some more packages, specifically:

  • usbutils – to run “lsusb” to see when my USB devices had been detected
  • kmod-usb-uhci – ultimately I needed a kmod to see the USB controller in order to detect attached devices
  • kmod-usb2 – just in case the UHCI controller module above didn’t work

Note that when adding kmods then opkg might reject it with a LEDE build if package slightly out of sync with the kernel build, in which case use –force-depends (don’t do this, it might result in an unstable router):

opkg install --force-depends kmod-usb-uhci

Now, also ensure that the /etc/modules.d/usb-serial has the following line:

usbserial vendor=0x12d1 product=0x140c maxSize=4096

The vendor and product values are taken from the output of lsusb:

# lsusb
Bus 001 Device 002: ID 12d1:140c Huawei Technologies Co., Ltd. E180v

Once connected the signal strength can be obtained on the command line by running:

# comgt -d /dev/ttyUSB3
SIM ready
Waiting for Registration..(120 sec max)
Registered on Home network: "50502",2
Signal Quality: 13,99

The result can be looked up in the table at this link:

Value RSSI dBm Condition
2 -109 Marginal
3 -107 Marginal
4 -105 Marginal
5 -103 Marginal
6 -101 Marginal
7 -99 Marginal
8 -97 Marginal
9 -95 Marginal
10-93OK
11-91OK
12-89OK
13-87OK
14-85OK
15 -83 Good
16 -81 Good
17 -79 Good
18 -77 Good
19 -75 Good
20 -73 Excellent
21 -71 Excellent
22 -69 Excellent
23 -67 Excellent
24 -65 Excellent
25 -63 Excellent
26 -61 Excellent
27 -59 Excellent
28 -57 Excellent
29 -55 Excellent
30 -53 Excellent

How Do I Add A Medicare Service To MyGov With A Linking Code?

So you’ve logged into your MyGov website and you’re attempting to add a Medicare service using a linking code that Medicare has provided you.

You’re confronted with a webpage like this:

  Enter your linking code:

  Select one of the online services you want to link:

  Enter your agency reference number for this online service (no spaces):

Your linking code is straightforward. It is what you were provided with (e.g. G12345678).

The online service you want to link is “Medicare”.

The agency reference number, however, is tricky. It is your 10 digit Medicare card number and your individual reference number without a gap. But what does this mean?

Your Medicare card number is the 10 digits along the top of the card. The individual reference number is the single digit next to your name underneath.

Use the 10 digits from the top plus the single digit next to your name

Use the 10 digits from the top plus the single digit next to your name

So the filled out form will look something like (for this example card):

Entering linking information for MyGov and Medicare

Entering linking information for MyGov and Medicare

Good luck! And if you have a problem you’ll have to call Medicare (not MyGov) on 132011, it took my 19 minutes to get through to an operator.

Turning Off DHCP Server on Netgear Wireless Cable Gateway CGD24N

The Netgear Wireless Cable Gateway model CGD24N supplied by Bigpond in Australia can spend a second life as a simple Ethernet switch. However it assigns DHCP addresses out of the box which can really upset a home network if you’re not expecting it.

Your wireless router might be assigning addresses from one range but you keep finding guest devices assigned something from the 192.168.100.0/24 range.

It’s not that straightforward to find the DHCP on/off switch. The steps to find it are thus:

1. Log in to gateway admin interface, select NAT from menu

Select NAT from menu on left-hand side

Select NAT from menu on left-hand side

2. Turn NAT on, click apply

Select NAT on checkbox, click apply

Select NAT on checkbox, click apply

3. Select LAN IP from left hand menu

Select LAN IP from left hand menu

Select LAN IP from left hand menu

4. Select DHCP no radio button, click apply

Select DHCP no radio button, click apply

Select DHCP no radio button, click apply

How To Change TLS Bind Port In Asterisk

Asterisk doesn’t make it necessarily easy to change the port that TLS is bound to.

In sip.conf I’d set a different port (6000):

tlsbindaddr=0.0.0.0:6000

But when I set sip set debug on I would see a message like the following on answer:

<--- Reliably Transmitting (no NAT) to 5.6.7.8:42849 --->
  P/2.0 200 OK
Via: SIP/2.0/TLS 192.168.1.3:42849;branch=z9hG4bKPjBFu7pgHTfOHCaNamaqTKTq3wenp-G.oY;alias;received=5.6.7.8;rport=42849
From: "myext" ;tag=mQqEvydONdU7yOGgCi2.OiDu8lSfXZuK
To: <sip:test@myhost.com>;tag=as378489ee
Call-ID: tAYfXG5BEF9w8lY.ghupqOtwNyV3J18G
CSeq: 12562 INVITE
Server: Asterisk PBX 13.1.0~dfsg-1.1ubuntu4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:test@1.2.3.4:5061;transport=TLS>
Content-Type: application/sdp
Require: timer
Content-Length: 387

The problem was that the Contact: header was advertising the wrong TLS port to the extension which would then attempt to contact the wrong port in response to the answered call (so no audio would start getting received by the extension).

The solution was to add to sip.conf:

externtlsport=6000

As mentioned in another article if the advertised IP address is wrong in this Contact: header then you may also want to specify:

externip=1.2.3.4

Converting XPS to PDF using MuPDF on Ubuntu Linux

I had a recently generated “.xps” file sent to me and needed it in PDF form for convenient viewing. The following took place on Xubuntu Trusty Tahr 14.04 LTS.

The “xpstopdf” tool failed me with a poorly converted document (just a single rectangle, no text).

Then I installed “mupdf”:

~$ sudo apt-get install mupdf
~$ mupdf mydocument.xps

This it rendered to my satisfaction to the screen. Next I wanted a PDF file!

But when I tried using “mudraw“, the associated tool installed with the “mupdf-tools” Ubuntu package, I got the following error:

~$ sudo apt-get install mupdf-tools
~$ mudraw -o /tmp/mydocument.pdf /tmp/mydocument.xps
error: empty page tree, cannot insert page
error: cannot draw '/tmp/mydocument.xps'

In the end I decided to try compiling the latest version available from MuPDF‘s download page (I downloaded “mupdf-1.9a-source.tar.gz” published 2016-04-21).

~$ wget 'http://mupdf.com/downloads/mupdf-1.9a-source.tar.gz'
~$ tar -xvzf mupdf-1.9a-source.tar.gz
~$ cd mupdf-1.9a-source
~$ sudo apt-get install mesa-common-dev libxcursor-dev libxshmfence-dev libxext-dev libxrandr-dev libxinerama-dev
~$ nice make -j 3
~$ ./build/release/mutool draw -o /tmp/mydocument.pdf /tmp/mydocument.xps

This time my PDF was rendered without any errors!

Adjusting a Sliding Door’s Wheels

So you have a mirrored sliding door and you want to put it on the tracks for the first time; but it doesn’t seem to quite fit. Ideally the wheels should go down and something needs to secure the door to the track above.

First step is to identify the top and bottom of the sliding door. The wheels are at the bottom. We’ll come to the top later.

The wheel looks like the following picture:

Sliding door wheel

Sliding door wheel

What we want to do is twist the screw (left or anti-clockwise to raise, right or clockwise to lower) until the wheel is at the height we want it.

The screw head pushes against the plate to give the wheel height

The screw head pushes against the plate to give the wheel height

So get a plus screwdriver, if that is the kind of screw fitted to your door wheel mechanism, and give it a twist until you get the height you want.

Twist the screwdriver anti-clockwise or left to raise the wheel, clockwise to lower

Twist the screwdriver anti-clockwise or left to raise the wheel, clockwise to lower

Note that if you want to make your door lean you can raise or lower just the one side of the door. The following diagram should make this clearer:

Raising the right wheel makes the door lean left

Raising the right wheel makes the door lean left

Now for the top of the door. You can identify the top of the door by a sliding mechanism designed to push up and fit into the track above the door.

Sliding mechanism at the top to fit into the track above

Sliding mechanism at the top to fit into the track above

Quite simply push this up until you hear a click and the mechanism has settled into place in the elevated position.

Push up the sliding mechanism until you hear it click

Push up the sliding mechanism until you hear it click

It should stick in the elevated position. You can lower it when it comes time to take the door out (for cleaning or replacement).

Sliding mechanism on top of door should stay in place in elevated position

Sliding mechanism on top of door should stay in place in elevated position

Installing OpenRA on Xubuntu 14.04

I had to run the following command after downloading the OpenRA deb file:

sudo apt-get install libsdl2-2.0-0 mono-runtime mono-runtime-sgen liblua5.1-0 mono-runtime-common mono-gac mono-4.0-gac libmono-corlib4.5-cil libmono-security4.0-cil cli-common libmono-system4.0-cil libmono-system-core4.0-cil libmono-system-drawing4.0-cil libmono-system-data4.0-cil libmono-system-numerics4.0-cil libmono-system-runtime-serialization4.0-cil libmono-system-xml-linq4.0-cil libmono-posix4.0-cil libmono-data-tds4.0-cil libmono-system-configuration4.0-cil libmono-system-enterpriseservices4.0-cil libmono-system-transactions4.0-cil libmono-system-xml4.0-cil libgdiplus libmono-system-security4.0-cil libmono-i18n4.0-all

Want to Slow Linux ZFS Flushing/Syncing to Disk Every 5 Seconds?

So you’ve got ZFS on Linux and you notice your hard drive LED light up every 5 seconds. How can you slow that down?

The zfs_txg_timeout parameter is described as:

~# modinfo zfs |grep zfs_txg_timeout
parm:           zfs_txg_timeout:Max seconds worth of delta per txg (int)

You can check the current value of this parameter:

~# cat /sys/module/zfs/parameters/zfs_txg_timeout
5

To verify this is the parameter you want to change, set this to 10 and count the number of seconds between the hard drive light coming on:

~# echo 10 >/sys/module/zfs/parameters/zfs_txg_timeout

Once you know this is the parameter causing the hard drive activity you can tell the ZFS module the default you want it to start with on next boot by editing /etc/modprobe.d/zfs.conf and adding a line similar to the following:

options zfs zfs_txg_timeout=30

Take care when changing this number as it may result in a higher probability of lost data in the event of a power outage.