Search This Blog

Sunday, 11 July 2021

 Transfer Photos from Huawei P10 to Linux


Problem : plug usb cable from PC to phone, phone charges.  Select MTP in developer options, plug in again.. charges again.  lsusb on PC doesn't show phone as device


Solution.

  • USE A PROPER CABLE!!!  Some cables are charging only. 
  • Switch to MTP
  • USE GMTP on PC.

Saturday, 12 December 2020

 Plan for TV Freedom


The goal is to get rid of the set top box supplied by Virgin, and go subscription free

What I need to achieve:

  • wife and child friendly bug free operation.  It should just work
  • freeview channels
  • remote control 
  • simultaneous recording and viewing with local storage of at least 1 TB
  • integrated netflix, iplayer, amazon prime, etc
  • the ability to add on movie archives, etc
I've decided to investigate Kodi on a Pi 4 for this purpose.

My incremental plan then;

  1. Kodi on Pi 4 with HDMI output 
  2. Try Kodi Freeview Addon, or something similar. If this doesn't work consider a tuner.  IPTV Recorder looks like a useful resource.  Would much rather not use the external aerial and stick with IP.
  3. Add external HDD (doesn't seem much point in an SSD as USB 3 interface is the rate limiting step)

Thursday, 28 May 2020

thoughts following WEF AI & Eductation roundtable

Randomly triggered

  • Can we innoculate kids to develop immunity against cyber badness?
  • An artificial kid.  Could we make an AI which would assess online resources / tools not just for factual accuracy, but for the contribution to learning - for being a positive value in development of a kid?  Sacrificial lamb.
  • Are kids excluded by digital poverty from using ML educational tools doubly disadvantaged, as the tool not only learns the indivudal, but learns from the aggregate dataset too - and the disadvantaged are not represented in this dataset (so get left further behind)
  • If we allowed kids complete control over what they learned and when they leanred it, we would have to agree that a universal programme of education is a meaningless concept.  Should we enable kids at a young age to disenfrancise themselves, to blight their future - or indeed, should we just let them feed on a surfeit of what they want, because... why is education desirable?
  • To what extent is education the shaping of tools for the machine, to be used?
  • If technology supplied for our needs, would we need to be educated?
  • And in what?


Wednesday, 24 April 2019

installing and configuring openmediavault and logitech media server on olimex lime2

I want a single board home media server.  It has to run openmediavault and squeezeserver.  It has to be low power but have high transfer rate from storage with direct bus connection of HDD (unlike Pi which overloads its USB for all peripherals).  Solution at the time I bought it : olimex lime2

Here's how to configure it.
  1. Get image (debian : no desktop)  
  2. convert .7z to zip with arepack -e --format=zip *.7z
  3. burn image to sdcard with etcher
  4. edit /etc/hostname and /etc/hosts files
  5. physically install in lime2, connect to ethernet, and power up
  6. connect via ssh (default root password is 1234)
  7. apt get update & upgrade
  8. install openmediavault 
  9. within OMV; mount drives, setup shares, NFS, SMB etc
  10. install logitechmediaserver (see this guide)
  11. do post-install lms config via port 9000

Bingo!

Saturday, 10 November 2018

setting up openmediavault and squeeze server on olimex lime2 SBC

  1. apt-get update
  2. apt-get upgrade
  3. install openmediavault:
    1. https://openmediavault.readthedocs.io/en/latest/installation/on_debian.html
    2. sudo apt-get install openmediavault (not sure why this is necessary)
  4. set up device name
    1. edit /etc/hostname
  5. fix IP address on router
  6. use web interface to mount disks, set up NFS & Samba services
  7. update fstab on remote computer and check mount
  8. install squeeze server

Wednesday, 25 July 2018

Building a low energy media server with Olimex Lime2

Objective : replace my current server (loud, HW RAID0, 2 * 1Tb discs, tower case), with something that is fault tolerant, silent, and consumes a bare minimum of power.

Requirements

  • redundant storage for all my music
  • fast network connection
  • low power consumption

Solution

So, let's do this!

  • Get the Lime2, install Debian on SD Card, connect to ethernet (I'm using Ethernet over power line)
  • Connect via ssh with uname root, password olimex
  • Hey - there it is!  Let's apt-get update and upgrade.
  • So I'll switch it off, and connect the HDD using SATA cable.  The power for the SATA is next to the SATA connector on the Lime2.
  • Now we need to format it.
root@A20-OLinuXino:/dev# fdisk -l

Disk /dev/nand: 7.4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors  Size Id Type
/dev/nand1         63 15550919 15550857  7.4G 83 Linux

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mmcblk0: 7.4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6f20736b

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       2048    34814    32767   16M 83 Linux
/dev/mmcblk0p2      34816 15564799 15529984  7.4G 83 Linux

We need to format the disk and create a file system,  let's go for ext4

root@A20-OLinuXino:/dev# fdisk sda

Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x87e5db31.

Command (m for help): c
DOS Compatibility flag is set (DEPRECATED!)

Command (m for help): c       
DOS Compatibility flag is not set

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-1953525167, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-1953525167, default 1953525167): 

Created a new partition 1 of type 'Linux' and of size 931.5 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Let's create the file system

root@A20-OLinuXino:/dev# mkfs -t ext4 /dev/sda1
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: done                            
Creating filesystem with 244190390 4k blocks and 61054976 inodes
Filesystem UUID: ff9d77c0-dd69-4925-9c6c-36c818ee2578
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
102400000, 214990848

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done   

Wednesday, 17 February 2016

Green spaces de-stress us

People have long thought that there is a health value of exposure to nature beyond the simple benefit of exercise and lowered pollution.

"Controlling for individual and regional covariates, we found that, on average, individuals have both lower mental distress and higher well-being when living in urban areas with more green space." [1]


"Quality of streetscape greenery in neighbourhoods is especially related to health.  The greenery–health relationship is strongly mediated by stress and social cohesion." [2]


"This research has demonstrated that mere exposure to views of nature can improve people's health and well-being by providing restoration from stress and mental fatigue. Moreover, this research has shown that views of nature can improve feelings of neighborhood safety and even lead to decreases in aggression and crime rates" [3]


1. White, Mathew P., et al. "Would you be happier living in a greener urban area? A fixed-effects analysis of panel data." Psychological science (2013): 0956797612464659.
2.  Sjerp de Vries, Sonja M.E. van Dillen, Peter P. Groenewegen, Peter Spreeuwenberg, Streetscape greenery and health: Stress, social cohesion and physical activity as mediators, Social Science & Medicine, Volume 94, October 2013, Pages 26-33, ISSN 0277-9536
3.  Groenewegen, Peter P et al. “Vitamin G: Effects of Green Space on Health, Well-Being, and Social Safety.” BMC Public Health 6 (2006): 149. PMC. Web. 17 Feb. 2016


x