Monday 22 May 2023

Puzzle solving entries have moved to a new blog.

The puzzle solving entries of this blog have moved to https://puzzlesolvingsmtstyle.blogspot.com/

Check out how to reframe common puzzles into the language of an SMT solver.

For example:






 




Wednesday 26 April 2023

Digital security for your classic or performance car

Digital security for your car and/or motorbike

We all love our classic and performance cars and would be heartbroken if it was lost or stolen. As well as the standard arrangements of immobilisers and car alarms that can be tricky to fit to classic wiring there are a couple of new techniques for protecting your classic car or motorbike. Some initial technology is required as both these techniques work in combination with an Android or Apple iPhone.

Active CCTV

CCTV for your house and garage has come a long way in the last 10 years. The cameras are much more intelligent about recognising when cars or people move within the area of view. If you have house fed power to your garage, you can almost certainly fit CCTV cameras that will constantly monitor the garage inside and out. Cameras can be configured to alert your phone when there is a movement within your garage. Unlike traditional alarm systems an ongoing subscription is not required as monitoring and alerting is done directly to your mobile phone. 
For garages beyond the reach of power and Wi-Fi self sufficient cameras are available that will  send the pictures using a mobile phone signal. Some charges would apply in this case. Separate boxes for recording are also redundant as cameras can store recordings of interest on an included memory chip. The modern camera types are no longer just a passive recording or scanning devices and are available with two way audio and siren trigger. Typically, the price for a powered network enabled camera is about £70.

Reolink battery powered camera with two way audio and siren trigger

Tracking Tags

The second most interesting development to keep your car safe and located is the small tracking AirTags. A small tag about the size of a £2 coin is secreted somewhere on the car. When the car moves beyond defined limits alerts are sent to your phone. The tags provide occasional updates as to the location of the car that can then be tracked and located. These AirTags have a replaceable battery that lasts about a year. The tags work by using the same technology that is used to find lost phones. Whilst they do not have specific GPS receivers, they send their location back to base using any available phone that comes into the range. As there are over 1 billion mobile phones on the planet these days you're never that far away from a mobile phone. 
These tags are great for knowing the last known time and location of a car. There are a couple of little wrinkles when using air tags that are separated from the phone for longer periods of time, however, this type of device can provide an extra layer of security and a recovery for a classic car. The cost for an apple AirTag is about £35 each or £120 for a four pack with no on going subscription apart from what's needed to keep your mobile phone going.  
The dangers of thieves and stalkers planting these tracking tags has been mitigated within the “Find My” tracking system but everyone should be aware of their existence.  

Apple AirTag, about 1 inch / 25mm in Diameter

  

Other more active trackers with live GPS locations are available but come with an ongoing service subscription cost. 





SuperToy waits for the summer driving fun to begin.

Monday 10 April 2023

Cray Research Supercomputer mini videos and other exhibits

During a visit to The Computer Museum of America TCMoA  some time was spent generating mini videos of the Cray Research supercomputers on display. Check out the collection here.

A couple of other exhibits from the Cray-History.net website follow....

Cray Research Supercomputer family tree







Saturday 19 November 2022

Excel rounding feature

** Update 2023 Added When Excel goes ( is used badly ) impacting careers 

I have an Excel spreadsheet that I use for keeping the accounts for a small club. The spreadsheet has one page for income, one page for expenditure and another page that totals up and displays current balances. On the income and expenditure page I add an entry for each transaction. The line starts with a total amount for that transaction and then the same amount spread across various columns depending on which items that transaction relates to. I then sum the columns and they should cross match. The sheet uses simple conditional colouring red and green to indicate when numbers that should add up don't add up. 

I was just about to send a spreadsheet to a new colleague when I noticed one of the red indicators showing and yet despite the numbers appearing to add up correctly. After extracting the relevant numbers into a fresh new spreadsheet, I could see that the difference between the two sums was very very small, a rounding error of  0.0000000000109139 

Excel has a feature where you can set the display precision of numbers typically used for currency, that its two decimal places. However, internally it will work to much higher position unless a certain option is checked for the spreadsheet. That option "set precision as displayed" is supposed to ensure that Excel uses the same precision for calculations and display. This is generally a dangerous option as you can get accumulations of errors through lack of precision in complex sheets. 

On the sheet extract shown below the indicator square has the formula

=IF(SUM(B8:B397)=SUM(E4:T4),"MATCH","FAIL")

The vertical numbers are summed into square C6, and the horizontal numbers summed into D6. Subtracting C6 from D6, gives us the size of the rounding error in square D8. 

Changing the Excel option for  "set precision as display" changes (and clicking on the warning) the value of the displayed rounding error shown in D8 to 0 as one would expect. However, the indicator square remains at FAIL showing that the interior precision is maintained during the above type of test operations.

The fix was to change the indicator to use ABS(C6-D6)> 0.000001 as the test for a match.







On a Mac the option can be found at Excel -> Preferences -> Calculations


Using Excel for Mac 16.67.





Wednesday 10 August 2022

Apple Powerbook 230 - resurrection and other old Apple items

Okay I admit it in a moment of late night madness I bought an old MacBook Duo 230 on eBay. The usual late night buying rules applied I didn't look close enough at the listing and the listing skated over a few fairly essential details. The reason for the purchase, obscured by the late night enthusiasm, was to resurrect some data as part of a computer history investigation project.

I was super optimistic when the package arrived because the laptop floppy disk drive power supply and the essential Duo mini dock all arrived packed with bubble wrap. Obviously sent by somebody who cared for the safe delivery of the system.

Once powered up the system booted and sprung into life. The screen was looking a little fuzzy with artefact lines running out from some corners but was plenty readable and as a bonus the mouse ball worked as well. The hard drive was a little nosy but the main issue was system software, or lack of it, on the machine. The only icons visible on the screen were the disc tools rescue set. This is a small collection of utilities, used to check hard and format disk drives, was just enough boot the machine but provided no applications. 

One more eBay purchase, from ebay seller applefloppiesonline, later and I had a set of floppy discs, MacOS system 7.5, suitable for this machine. 

I had forgotten how long it took to do installs from floppy disks, typically about three or four minutes per floppy disk. If an install fails then the process backs out and you're basically exactly where you started. This happened a couple of times. Was fun for a while to listen to the whirr and click of the floppy drive but playing games of install "Snakes and Ladders" was not really what I was after. 

The floppy disk install eventually worked but I had a lot of trouble reading Install Disk 4. See videos below.

With the system booted off the install disk 1 and reading all the other disks with no trouble, This install a couple of times on Disk 4. This repeated failure issue by trying a few OS installer tricks remembered from back in the day:

  • Copying Install disk 4 contents on to the hard drive then back out on to a spare Floppy drive. 
  • Doing a custom minimal install for the this Mac only. ID4 is needed by all the system install options as it has the control panels files but this choice would minimise the files loaded from ID4.
  • Renaming the system folder. Ater a crash and reboot this didn't seem to make any difference as the install still used that folder. I speculate that the rename action may have cleared some read-only items in the system folder.
Not sure which of the above fixed the issue but we got there in the end. Now the system is up and installed with the utilities and software that it needs I can see that the on-board mini batteries that preserves the date and time between connections has failed which is not unusual for older machines. Also failed is the main battery neither charges nor holds a charge. This limits the machine to running on plugged in power and necessitates resetting the date and time from 2039 back to the current date each time the machine is unplugged.

Ports from Left to right
Built in modem hole ( missing ), Kenington lock, Mic, speaker, Scsi disk, Printer,  External modem , VDU screen, AppleTalk networking, Floppy Disk, Power, on/off switch.

Despite the many connectors on the back of the dual dock there are few that are in used today. Apple desktop bus, for connecting keyboards and mice, has been replaced by the universal serial bus ( USB ). modern screen connections are now VGA or DVI replacing the 25 way pin socket. Most importantly networking has moved on from AppleTalk wiring to CAT5 ethernet.

I guess if I was going to do this again I would consider more carefully in the machine I was going to buy. I probably would've gone for a blue and white G3 as that machine was on the cusp of changing technologies and could use both the older keyboards mice as well as USB. Had Apple talk as well as ethernet. We had that very machine with a USB floppy disk drive that went into the more modern Macs and that would've probably been an easier choice for moving data from old Apple floppy disks to a modern / internet connected system.

What's next for the Duo. The data rescue project has moved on and without a modern network connection this may not be the older machine I am after. Tinkering around with the old technology was kind of fun but without more relevant application software it's hard to show the capabilities of this older machine.

See on YouTube here. Install Fail 1 and Install fail 2

A few photos from the failing installs. 











Finally installed and showing the Memory Control Panel.



The machine I probably should have bought for this project.


Along with one of these ... USB Floppy disks




Just for old times sake the Apple machine we loved the most - The sun flower G4 iMac. This was the second version with the wider flatscreen.



For further reading on old time Apple kit see   



Monday 25 July 2022

Cray Research, Discover, Explore and celebrate

Check out this talk at The National Museum of Computing in the UK held for the 50th anniversary of the founding of Cray Research.

Cray Research : Discover, Explore and Celebrate




If you liked that check out the earlier  Cray Research - A Story of the Supercomputer
produced at CFIMT


Enjoy.

Monday 2 May 2022

Sky domestic broadband DNS stale data and intercept layer.


I have seen that Sky Broadband Consumer service has an intercept layer for all DNS queries which can result in stale data problems when servers change IP addresses. Also DNS queries pointed towards nonexistent DNS server will still succeed but may provide old or incorrect data.


Using the Google dig tool on 

https://toolbox.googleapps.com/apps/dig/

Gives the correct result but the local Sky Broadband command line equivalent look up that is supposed to be using Goggle DNS server ....

% dig  @8.8.8.8  domainname.com MX

Gives a stale out of date answer  hours after the result should have changed.

Given a non-existant DNS server with an address similar to Googles connection is not possible 

% ping 8.8.8.99 

PING 8.8.8.99 (8.8.8.99): 56 data bytes

Request timeout for icmp_seq 0

Request timeout for icmp_seq 1

^C

but DNS look up succeeds 

 

% date; dig  @8.8.8.99  apple.com MX      

Mon  2 May 2022 14:29:38 BST

 

; <<>> DiG 9.10.6 <<>> @8.8.8.99 apple.com MX

; (1 server found)

;; global options: +cmd
......snip 

;; ANSWER SECTION:

apple.com. 3600 IN MX 10 rn-mailsvcp-ppex-lapp15.apple.com.

apple.com. 3600 IN MX 10 rn-mailsvcp-ppex-lapp24.apple.com.

apple.com. 3600 IN MX 10 rn-mailsvcp-ppex-lapp34.apple.com.

apple.com. 3600 IN MX 10 rn-mailsvcp-ppex-lapp35.apple.com.

apple.com. 3600 IN MX 10 rn-mailsvcp-ppex-lapp44.apple.com.

apple.com. 3600 IN MX 10 rn-mailsvcp-ppex-lapp45.apple.com.

apple.com. 3600 IN MX 10 ma1-aaemail-dr-lapp01.apple.com.

.......


Gets you an answer. How is this possible or correct ????

This has the follow on implications :


1) DNS lookup results can be stale or incorrect hours after a change at source.

2) Changing the DNS settings on your PC/Device  makes no difference as the "Sky Results" are used in any case. 

3) All DNS lookups can be recorded / traced at the ISP level.

4) Time to live should be set low on domains that are going to change, then reset after the change has propagated to a longer time, to avoid excessive lookups. This would also avoid any excuse by Sky for keeping stale data when no-one else does.

5) DNS interception by Sky Broadband could be considered a man-in-the middle compromise of the correct functioning of the DNS system. 

6) Of the 6 failures ( lasting over 5 minutes ) of Sky consumer broadband that I have experienced and investigated over the last few years, 3 have been wire to the house failures and 3 have been DNS service failures. The DNS service was designed to be failure resilient by using recursive lookups to higher domains but if all queries are intercepted by an intermediary and that intermediary has a problem the robustness of DNS is compromised.

Only solutions are to use external tools to check against Sky DNS results. Or use a VPN. Not sure if other consumer ISPs have this configuration. A colleague doing the exact same look ups on another ISP server did not see the delay in the domain data being updated.