Monday, 19 November 2018

Why I returned my Pixel 3 XL

In the UK we can return any item we buy online within 2 weeks for any reason.  This is because we don't get to try it out first and it might not live up to our expectations.

I busted my phone 4 months before the Pixel 3 was released and I was really looking forward to the release, so I put up with a (really) crappy phone for those months, partly to justify paying what I expected would be more than I'd usually pay for a phone.

Anyway, the Pixel 3 was announced, I placed my order within an hour or so, basically when the Google store stopped crashing long enough for my order to be accepted.

The phone was an eye watering £869 (that's $1117 using today's exchange rate).  I had to wait until 1st Nov before the actual phone was delivered.  It was agony.

In that time I read loads of really positive reviews about the phone and no negative ones.  So I was really disappointed when the phone arrived and there were a number of small issues with the phone.  I've listed them here because I haven't seen them mentioned anywhere else.

Sorry to say I've returned the phone now.

Things wrong with the Pixel 3

  • The camera isn't that great.
    • Don't get me wrong, it really is OK.  But I paid double what I normally would for this phone, and I expected something twice as good.  Frankly I can't really see any difference in image quality from a phone half that price.
  • Ask Google Assistant "What's the time?", and it doesn't tell you the time, it tells you what alarms you have set!
    • WTF?  Even my Home Mini gets that right.
  • Google Assistant responds when I'm next to my Home Mini.
    • It's supposed to know there is a Home Mini responding and not respond.
  • WiFi drops out as you walk around between transmitters
    • Really annoying.  You have to turn WiFi off then on again to get it to connect to the WiFi transmitter you are sat right next to rather the one it can barely connect to.
  • Minimum screen brightness is way too bright.
    • 3:30 am next to sleeping partner.  Check the time.  Dazzled and wake up partner.  Eyes burning if you want to browse Reddit at that time.
  • Netflix doesn't work, neither does Amazon's Prime Video
    • Again, WTF?  No idea why not.  It always works on all other phones.
  • Now playing isn't consistent
    • I loved the idea of this feature where it tells you what's currently playing.  But even though it did pick up some of the 'background music'.  Sometimes it just didn't, even if you were right next to the speaker.  You had to go via Google Assistant just like all other phones to actually get it to work.
Hopefully they will iron out these issues, but it really looks like the phone is a rush job and released far before it's ready.

Monday, 2 April 2018

Deep Learning capable machine using Amazon Web Services

These are instructions for a complete newbie to setup a cloud computing machine that you can use to explore deep learning.  Instructions are for someone is using Windows.

Amazon Web Services (AWS) provide cloud computing i.e. a server you can run deep learning algorithms on without the hassle of actually having a machine or having to maintain it.

AWS seems to be a standard way people perform deep learning so I thought I'd give it a go.

Deep Learning AMI

AWS give you your choice of server to run, but you need to choose what OS to run on it, and what applications it should have installed on it.  Amazon have an number of combinations of these already setup, installed and ready to roll.  They are loaded as an 'image' and are know as 'Amazon Machine Image's or AMIs.  There are specific Deep Learning AMIs (DLAMI).

Looking online the DLAMIs seem to change names quite rapidly. Certainly I couldn't even find the one the Amazon documentation recommended.

Generally people seem to use Ubuntu, and from the Amazon documentation you should avoid the 'base' version, so I think the one they want everyone to use is:



The Deep Learning documentation includes details on setting everything up and getting started.

Launch Instance

AWS is obviously setup to run loads of parallel jobs based on very similar setups.  Each one of these is called an 'instance'.  I just want to run one instance running the DLAMI.  The stages are:
  1. create an AWS account
  2. setup instance
  3. setup a pair of keys (private/public) 
  4. launch instance
I used these detailed instructions to help me follow these steps.  However note that the AMI described doesn't exist any longer; the instructions to setup the keys are good (great actually).  However the instructions for setting up Jupyter didn't work for me (more details in the next section).

1. Create AWS account
You need to create an AWS account (giving your credit card details).  

2. Setup instance
I was hoping to be able to run this all under AWS' 'free tier' but it seems that I need 75Gb storage to run the DLAMI and you only get 30Gb under the 'free tier', so I am expecting to pay $4.95 if I run the instance for a whole month (current pricing) for the extra storage I need.

Follow the AWS instructions or a user's instructions, but this is a summary:
  • https://console.aws.amazon.com/ec2
  • Launch instance
  • Select 'Deep Learning AMI (Ubuntu) Version 6.0' (actual AMI to use will inevitably change with time, see above)
  • Select 'Free tier eligable' instance type to start off with (cheapest while you're getting to grips with everything)
  • Review and Launch
  • Edit Security Groups
  • Add rule / Custom TCP Rule / TCP / 8888 / Anywhere (this works, but you should change it to 'my IP', but I haven't tested that) [This allows you to access the DLAMI instance remotely from your machine]
  • Review and Launch
  • Launch (prompts you for the key pair)
3. setup a pair of keys (private/public) and
 4. Launch
You need to create a pair of keys to securely access the instance remotely.  If you're repeating this stage and you've set up a pair already you can use them.  Otherwise,
  • Create a new key pair
  • Give a name for the pair it will get a .pem suffix as it downloads
  • 'Launch Instances' actually launches the instance
Note: you are paying for the service from the moment you launch until you terminate.

Connecting to Instance

You now have a DLAMI instance running on AWS, but you now face the challenge of connecting to it so you can use it.

Everyone seems to use Jupyter Notebook as a sort of IDE for running deep learning applications, so that's what I'm going to do.  Once setup you access it through a browser.

The setup stages are:
  1. Download PuTTY
  2. Create PuTTY readable version of the private key
  3. Connect to DLAMI Instance using PuTTY and the private key
  4. Start Jupyter notebook on AWS instance
  5. create a 'tunnel' on PuTTY to allow us to connect to the Jupyter server from the Windows machine.
  6. Access Jupyter Notebook in a browser
However, only follow the 'Converting Your Private Key Using PuTTYgen' and 'Starting a PuTTY Session' of that page. (I didn't need to follow the 'transfer files' instructions, but they may prove useful later).

4. Start Jupyter notebook on AWS instance
Now that the AWS instance can be accessed via PuTTY, Jupyter notebook can be started by typing this command onto the PuTTY terminal: 
   jupyter notebook --no-browser --port=8888
It takes a minute or so and eventually returns the prompt to you, but unnervingly displays 'Killed'

5. Creating a 'tunnel' on PuTTY to allow us to connect to the Jupyter server from the Windows machine
We want to access jupyter notebook via the windows browser.  When we setup the instance we allowed TCP access on port 8888.  Now we need to use PuTTY (running on Windows) to allow the windows browser to access that port.

Follow the AWS instructions to setup the SSH tunnel.  This is a summary:
  • Right click on PuTTY banner | Change settings ...
  • Category | Connections | SSH | Tunnels
    • Source Port: 8888
    • Destination: localport:8888
    • Add
    • Apply
6. Access Jupyter Notebook in Browser
  • https://localhost:8888
  • Waive security checks
  • Note that you can't access it using http, you must use https
  • Enter password 'machinelearningisfun'
    • I think this should work, I setup a different password before I got Jupyter going so I can't confirm it works.
  • You're ready to roll!

Don't forget to Terminate your instance otherwise you will pay Amazon quite a bit.


Friday, 30 March 2018

Increasing the size of the system partition

I have a MINIX NEO Z83-4.  It's a great idea for a small cheap lightweight computer.  Not really got enough SSD to run Windows 10 properly however.  Only 29G.  The EFI System partition was only 64M.

I've always had problems updating Windows 10: basically it always tries and fails to update.  So I'm way behind on security.  Recently I got a scary notice after failing to update saying that my computer couldn't run Windows10 and that this version was being end of lifed in a couple of weeks.  So I thought I should do something about it.

The actual error I got this time from Windows Update was "Couldn't update System Reserve".  Googling around I found this which seems to match my problems:
http://www.minixforum.com/threads/couldnt-update-system-reserve.17218/
That links here as a way of fixing the problem
http://www.minixforum.com/threads/it-is-possible-to-install-windows-creator-update.16565/

I downloaded the partition tool that was suggested https://www.partitionwizard.com/free-partition-manager.html

I tried to follow the original instructions for resizing the partition, but I came across the same problem that others had: I had a 'Reserved Partition' that was unmovable so I couldn't expand the 'EFI System partition'. 

As you can see from the image I have compressed the main windows partition 'Data Partition' and created 386M free space to expand the 'EFI System partition' into, but the highlighted partition is fixed and cannot move.


Reading through the posts some people have deleted this reserved partition (as I was tempted to do) and the computer doesn't boot any more. I found I was able to effectively move the reserved partition using the windows tool 'diskpart' and this then allowed me to expand the EFI System partition.  Here's how:
  1. Delete the 16M Reserved Partition that was preventing me from expanding the EFI System Partition (I recreate it later)
  2. Now I expanded the EFI System Partition using the free partition wizard. Making sure to leave at least 16M free between the EFI System Partition and the Data Partition though because I needed to recreate the Reserved Partition there
  3. Apply the changes you want to make by hitting the 'Apply' button
  4. open a cmd window (hit the windows key, then type 'cmd' and it should highlight cmd, then press enter
  5. I had a play about with diskpart to work out what to do. I just typed help for a list of instructions. To create the reserved partition I did this
  1. list disk
  2. select disk 0 (or the disk number you need to change)
  3. list disk (you should see a '*' next to the disk you need to change)
  4. create partition msr (This is the money shot. msr is 'microsoft reserved partition' and it will create it in the 16M space you have just created.)
  5. Now refresh your partition wizard and you can see it's been created.

I still need to find some more space to actually install the update, but at least the system partition should be large enough now.

Friday, 9 February 2018

Installing free walking maps on Android with OruxMaps (app) and OpenAndroMaps (data)

Using the OruxMaps app and OpenAndroMaps worldwide map data, you get outstanding maps on your phone for free.

The downside is it's a bit fiddly to setup.  So here goes

Install OruxMaps
How hard can this be?  Well bizarrely, you can't just install it from the Google Play store because it 'violates the payments policy'.

  • Google Search 'oruxmaps'
  • Click on 'oruxmaps.com'
  • scroll down to 'Current version (7.2.1)' or later
  • Tap to download OruxMaps7.2.1.apk (.apk files are Application PacKage files used to install applications.  Google play usually deals with all this but you have to download it manually with Oruxmaps)
  • 'This type of file can harm your device.  Do you want to keep it anyway?' click OK
  • Click OK to open OruxMaps7.2.1.apk once downloaded.  (you can also access this from the 'downloads' app.
  • Chrome Security 'Your phone is not allowed to install unknown apps from this source' select 'Settings'. 
  • 'Install unknown apps', select 'Allow from this source' (we will revert it once Oruxmaps is installed to reinstate security).
  • Hit back button 
  • OruxMaps 'Do you want to install this application? It does not require any special access' select 'Install'
  • Select 'Done' when app installed
  • Now reinstate security (may be slightly different on your Android, but make sure you do this step): Settings, Apps & notifications, Advanced, Special app access, Install unknown apps, chrome, deselect to stop unknown apps being downloaded from Chrome.
Open OruxMaps
  • Confirm you understand the software is as is 'OK'
  • Allow access to files your device 'Allow'
  • Confirm that you have noted some 'known problems' 'accept'
  • Choose to donate if you want to (you can do this now or at a later stage when you realise how fantastic a tool that the community are creating here.
  • Authorize access to files you need to do this to access the maps you download

Download and Install Rendertheme
This is where it gets a little unintuitive and is usually the bit where people give up.  Please stay with us :-) 

In addition to the raw map data, you need a 'rendertheme' that tells OruxMaps how to display the raw map data, and of course you need that raw map data.


  • Google 'openandromaps' and go to www.openandromaps.org
  • Sausage menu (3 lines top right), map downloads, countries and regions (Select the map region)
  • Now look for the blue 'Install Rendertheme' bar, and click that.  (We'll come back to downloading the actual maps later)
  • Scroll down to 'Elevate 4', Quick install in Android', 'OruxMaps'.  It should open OruxMaps and install the rendertheme :-)

Download and Install detailed country maps
Now actually install the maps

  • Go to www.openandromaps.org
  • Sausage menu (3 lines top right), map downloads, countries and regions (Select the map region)
  • This time, look for the country/region's map you want, but DON'T download it.
  • Hit the + buttone then hit 'Android Install on Oruxmaps'
  • 'Map loaded OK' should appear shortly after.

Testing and Enable 'Elevate Rendertheme'

  • Enable Airplane mode (ensures you aren't using the internet)
  • Navigate map to the area you have downloaded.  
  • You may need to change maps using the 'Switch Map' icon (second right on the top); select 'OFFLINE' and choose map.  You can see your downloaded map now (hopefully)
You won't see contour lines so you need to enable the 'Elevate Rendertheme'

  • Sausage menu (3 lines top left), Mapsforge theme, Elevate.
Now you should have all the contours and paths you want.  Enjoy!


Basic OruxMaps Usage

  • A very basic map of the world comes pre-installed
  • 'Target' (top right) - turns GPS tracking on/off and locates you on the map
  • Pan with 1 finger
  • Zoom with 2 fingers
  • Sometimes the 'Menu' bizarrely becomes invisible!  Touch the top of the screen and a magic menu appears.

Sunday, 12 November 2017

RiscV Instruction Disassember

Debugging a RiscV processor in a waveform viewer?  You need to disassemble the instructions you see flowing down the pipelines.  To convert the 32bit encodings to sensible assembler instructions you can understand, use this:

RiscV instruction disassembler: updravt.com


Wednesday, 31 May 2017

Creating a virtual Linux machine on Windows


  1. Download virtualbox 
    • https://www.virtualbox.org/
    • Download the latest version of the 'windows host' 'platform package'
  2. Install VirtualBox
    • Use the default settings
    • 'Continue Anyway' on the windows logo warnings
  3. Download Linux *.iso file.  If running 32bit windows download 32bit isoEither
    • If running 32bit windows download 32bit iso
      • Search Internet to find out if running 32bit windows
    • If running 64bit windows download 64bit iso
    • Download either
      • Ubuntu: https://www.ubuntu.com/download/server , or
      • CentOS: https://www.centos.org/download/
  4. Run VirtualBox
  5. Create Virtual Machine
    • New / Name: / Type: Linux / ~Version (Ubuntu or RedHat, 32 or 64) / OK
    • Use defaults for everything else
  6. Use .iso for VM drive so it can boot from it
    • Select VM
      • probably selected already
    • Settings/Storage/Click on 'cd/dvd' image on the 'Empty' line below 'Controller IDE'
    • Attributes/Secondary IDE Master/ Click on CD image to the right
      • Choose virtual optical disc file ... / point to *.iso file /OK
  7. Press Start button to boot from *.iso