Thursday, 8 October 2020

iPhone black screen of death

So your iPhone is stuck with a white Apple logo stuck on a black background. You've searched the Internet and somehow ended up here...

I've found that if you try the following you can get it restart again ok:

1) Put the device into restore mode 

2) Hold down the power button till it reboots

3) Once it starts rebooting try clicking the power button and/or home button for a few seconds at a time

4) It either restarts normally, or try again - go back to step 1/2

I know it seems a bit random but it can work if nothing else does. Though it probably indicates there's a hardware problem with your device if this keeps happening even after you do a full restore or two...

Thursday, 1 October 2020

UKC19TRACING - What is it?

If you've been taken here after scanning a UK COVID venue QR code - your device offering to search for "UKC19TRACING" - then to make use of this QR code you'll need to load the UK NHS COVID19 app on your device so you can "check in" to the visited venue where the QR code is displayed. This is the app that is based on the purportedly privacy preserving Apple and Google Exposure Notification system so in theory your 'check-in' is anonymous and probably preferable to writing down your address/phone at said venue.

On an Apple iPhone/iPad when you scan these QR codes from the lock screen camera it will attempt to search for "UKC19TRACING" - which why you may have arrived here. Curiously this doesn't happen when the device is not locked and instead says "No usable Data found". 

If you extract the content from one of these [big!] QR codes (with one of the many QR code scanning apps) it starts with "UKC19TRACING" and is then followed ":1:" and after that the main section is encoded in JSON Web Signature (JWS) [See RFC7515] format. Basically this consists of the following; after the "UKC19TRACING:1:" part there's three sequences of base64 separated by a dot("."), the second of which contains the venue name and postcode, and the other contain the signature and associated details - see here for more details.

If you're interested in creating a QR code for your venue see the the relevant gov.uk site.

Friday, 30 August 2019

cat: -: No such file or directory

A weird error that took me a while to track down. I came across it in the iproute2 configure script which was setting the TMPDIR environment variable before using a cat heredoc statement (e.g. when you include some data in a shell script which demarked using markers - in this case 'EOF'):
TMPDIR=$(mktemp -d config.XXXXXX)
cat >test.c <<EOF
stuff and more stuff
EOF 
The problem is that the TMPDIR variable is used by the cat command. And in this case the TMPDIR is set to the output of mktemp which creates a temporary directory in the current working directory, but this is not usable by the cat command and results in the above error - it seems that cat command will only accept a TMPDIR if it is in /tmp and fails if it is set to another base directory?! According the man page mktemp is supposed to default to using /tmp but it's not working on Linux - It works fine on MacOS. Anyway so one just need to make the following change:
TMPDIR=$(mktemp -d /tmp/config.XXXXXX)

Monday, 26 March 2018

Fix: Text message (SMS) Not Delivered

So your iPhone/Phone is unable send text messages - It show a red exclamation mark (!) and says Not Delivered - you've tried to send an SMS (Green coloured message boxes) to a few people over a few days and it's still not working. You've tried Settings->General->Reset->Reset Networking Settings Settings->General->Reset->Reset All Settings, restarting your iPhone, pulling the SIM in/out and read Apple's help page  - all to no avail.

Then the problem may be down to an issue with the Short Message Service Centre (SMSC) setting on your phone - which is used when sending SMS messages. It can be checked/modified from the normal Phone app - type in the the following codes into the keypad and hitting the call button to see what the current SMSC setting is:
*#5005*7672#
You should then see a grey box fill the screen with a message:

Setting Interrogation Succeeded
Service Centre Address

Immediately below this text you'll see the number that your phone is using as your SMSC. You can search the Internet for your operator's SMSC and if it doesn't match the one you see above then you can set it to the correct one using the following general code - you'll need replace in the SMSCNUMBER with your operator's SMSC (to the get the plus(+) symbol you need to hold your finger down on the zero key):
**5005*7672*SMSCNUMBER#

 e.g.: For Talk Talk UK:
**5005*7672*+447785011324#
 e.g.: For Vodafone UK:
**5005*7672*+447785016005#
e.g.: For O2 Prepay UK:
**5005*7672*+447802092035#

After you hit the call button it will bring up another grey box saying:

Setting succeeded
Service Centre Address
No Address

This means it's done and SMS/texting should work now - Try it and see!  (If not then revisit my suggestions in the first paragraph).

For other phones (e.g. Android) the above should work, but you can also apparently bring up a special Phone information screen where you can check and modify your SMSC by typing this code on the Phone keypad:
*#*#4636#*#*

The SMSC is usually stored in the SIM card on your phone - for SIM card reader folk (see my other article on SIM readers): it's at EF SMSP (short message service parameters), the full path to the file is 7F10 / 6F42 or using AT commands: AT+CSCA?

As to why the SMSC might have changed - feel free to comment on that!

Monday, 3 July 2017

Websites (e.g. TfL) not working in Firefox

Have you been trying use websites, like Transport for London (TfL) journey planner, in Firefox recently (or for a while) and found that they seem broken - e.g. TfL only shows the bus route?! Well you're not the only one. Since Firefox version 42 Mozilla has enabled Tracking Protection which is generally a very good thing (as there's way too many trackers out there keeping tabs on where/when/what you're up to). Sadly some sites aren't designed to cope with that so they fail to work properly - like TfL and others.

Fortunately it's easy to fix once you know how: When Firefox blocks tracking elements it helpfully puts an additional 'shield' icon in the URL bar to indicate the fact. If you click on the shield icon it shows a button to 'Disable protection for this site' - which disables tracker blocking for that site - you'll then see a line drawn through the shield to indicate this.

One other thing is that if you also use other blocker plugins/extensions in Firefox (e.g. uBlock, Ghostery, AdBlockPlus) you may also need exempt the site in those too.

Thursday, 10 November 2016

Delete pending Calander invites - without notifying sender

So we all get these calendar (iCal) invites which the MacOS/OSX Calendar app then notifies us about in its badge icon and on the '+' button in the app. But what if you don't want to accept or reply to these invites - annoyingly enough there is no way to just delete them without sending some form of notification.

So how to go about getting rid of them? Well there's actually a way to do it - You create a new Calender (File->New Calendar->iCloud) and just leave the default 'untitled' name, then you find those pesky invites and right click on them and assign them to this new 'untitled' calendar. Then you right click on the untitled calendar and select delete - it then finally asks you if you want to delete without notifications! Gone. Done.

Tuesday, 7 June 2016

Regenerate missing modules.dep.bin

If you're seeing a problem with a missing modules.dep.bin or modules.dep file(s) on your Linux/Ubuntu/Arch box (e.g. libkmod: ERROR ../libkmod/libkmod.c:XXX kmod_search_moddep: could not open moddep file '/lib/modules/kernel_release/modules.dep.bin'), then it may be rebuilt using the depmod command:
sudo depmod

Monday, 2 May 2016

Fix Handbrake crash on OSX(10.11) El Capitan

I just tried to use Handbrake (version 0.99) to rip a DVD on OS X 10.11.4 and it crashed halfways through so I ran Handbrake's update (0.10.5) but it still crashed ;( It turns out that OSX El Capitan has removed a software library that is used to decrypt DVDs (libdvdcss) from the system - so if you've got an older dodgier version (of libdvdcss) lying around it works but crashes. Either that or Handbrake fails to find anything on the DVD you're trying to rip, as mentioned on Reddit.

To fix the problem you need to install an up to date version of libdvdcss - either by downloading a slightly old version and copying it into the /usr/loca/lib e.g. if the downloaded library file is in Downloads:
sudo cp ~/Downloads/libdvdcss.2.dylib /usr/local/lib
Or you can build/install the latest version using Macports, homebrew, or from source. If you use Macports then you may need to link the macports installed version to /usr/local/lib (so that Handbrake can find it):
sudo ln -s /opt/local/lib/libdvdcss.2.dylib /usr/local/lib
Now start Handbrake and you should be good to go...