Monday, April 30, 2018

Gui Web

Tim Berners-Lee was the real inventor of the gui (www) internet. NOT I REPEAT NOT Al Gore.

Source code:
Cern web server 

Browser advanced
Browser original?

Friday, October 20, 2017

To do this weekend.

Out of Micro sd cards so it is time to get a few more.  Finally have my rpi 0 w to play with. Finally have Pimoroni hammer headers. They do not come with instructions, but that was finally figured out.  Nice they gave you a choice of either female or male headers.

Also have the speaker bonnets, but they do not come with speakers so the ad is misleading,

Only have a few atmel368 chips left. Have a project or two for them.

Have the rpi zero w teathered to my nexus 7 2012.

Using the spi version of the ethernet interface with the rpi zero. Your connection may vary.


Set up a Raspberry Pi Zero headless

If you are using the GUI (Raspian full download) and want to connect your RPi Zero to a keyboard and monitor there are probably easier ways to do this. These notes are for people that want to use a headless (no monitor and GUI) setup ready to connect to your RPi after first boot via SSH from another terminal.

Raspberry Pi Zero W by lespounder, on Flickr

Download Raspbian Lite

wget -O

Download link:

Write Image to SD Card

dd bs=4M if=2017-08-16-raspbian-stretch-lite.img of=/dev/sdb

After this step there should be 2 additional mounts (if not mount the 2 SD card partitions manually).

Set up network interfaces

Create a new config file for the wireless interface.

cd etc/network/interfaces.d/

vim wlan0.conf

Add the following to the new file (if you want to use DHCP – change to static if you want to fix the IP):

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Note: if you want to use ethernet to get updates and etc. add:

auto eth0
iface eth0 inet dhcp

Set up connection details for local wireless network

vim etc/wpa_supplicant/wpa_supplicant.conf

Check the file and ensure the network settings are as per the Wireless Network you are connecting to.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

You could use the clear-text PSK passphrase but I prefer not to do that in configuration files. Create a PSK hash using ‘wpa_passphrase
There could be other config values you might need depending on the network you are connecting to.Ensure there are DNS Servers configured

sudo vim etc/resolv.conf

Add the following to the new file (or your own nameservers):

# Google's public DNS servers

Enable SSH Access

Create an ssh empty file in the mounted boot partition. This is necessary to enable SSH access as SSH is by default disabled on more recent versions of Raspbian.

cd boot/
sudo touch ssh

Boot RPi

Boot the Rpi by powering up and after ~30secs you should be able to connect to the IP assigned. Check your router or ise ‘nmap’ or similar to check the assigned IP:
sudo nmap -p22 -sV
Default login details are
UID: pi
PWD: rasbperry


Running desktop using libreoffice and web server from my rpi0w shown at the side, Allows you to save data much easier and not waste space of the palmtop. Can be done with the RPI3 also. You would not believe what all that little computer can do. (shown: nexus 7 2012 and the raspberry pi zero w).

Friday, May 12, 2017

Odd monitors for the Raspberry Pi.

If you do not have access to hdmi based monitors, any old monitor with composite input used with the old eight bit computers should do fine. You may have to purchase a special cabIe. I like to use my old c=1701. You can even add a digital tuner and use it as a tv.

Some old TV's that do not have composite but do have rf input can be used with a vcr

My favorite is to use an old dvdrom player with composite and audio input. You can always attach a Raspberry Pi to the back of the unit to make it super portable.

Even an old portable tv with composite input can be a choice! In the case though it is only black and white.

Then again you can use your tablet via xrdp to act as a screen for your raspberry Pi.

Last but not least is the old Trs-80 monitor. No sound and is only black and white. You also have to provide a +5 volts line externally..

There is always those inexpensive mini portable monitors, but they may require 12 volts to work. Normally used for automobiles.

Note: for the Raspberry Pi Zero will require adding solder points for the composite output and an audio filter. The specs for this are in an earlier article.

Monday, April 17, 2017

Starting slackware 14.2 in a virtual machine.

Started with Slackware linux and decided to go back and look at it.  In this case, I plan to use qemu to build a virtual machine. You will need to have a stable internet access for this project. You also need to have a fast machine with over a gig of memory.  You will not need to download and burn a cd or dvd.  You will need a floppy, usb, cd, or a network interface card that supports gpxe (ipxe).

You will want to go to romomatic,net to build your image to put on your boot device. Though with Qemu you can just use the image without creating boot media,  Though I do recommend using 256 megabytes of ram. Be sure to set up the virtual drive for your install.

Once you have everything the way you want then you can launch the install.

Eventually you will get to a login and the you can start the the good old install;

AAh, at home again.

Slackware pxeboot script:

dhcp any
chain load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 nomodeset SLACK_KERNEL=huge.s


Normally I am not fond of canned software, but this one might be an exception. Motioneyeos is a raspberry pi implementation for the program Motion. Motion is software to control video capture devices. All control is done via the web. For purposes of this project we used an original raspberry pi. ( There are several releases depending on the unit you have.

First I tried a logitech usb camera clone. The system recognized it immediately. Not like a certain other operating system where you have to load the drivers for almost everything.

Then we added an ipcamera (network ready). After adding the network camera file, it worked just like you would expect. The documentation for the camera did not have the description of the file. Fortunately the Motion software site did have that information.  ( Again no additional drivers were required.

Actual picture is much clearer. For a novice user it is pretty simple. Only exception is shutting the unit down, I did not see a visible icon. Also security could be greater, but for the price of free you can not beat it.

installing motion from scratch:

Let's get your system up to date (might take a while if you have not updated very recently).

$ sudo apt-get update ; sudo apt-get upgrade
$ sudo apt-get dist-upgrade

Now let's install Motion

$ sudo apt-get install motion.

Does the RPi see your camera?  (aka list usb devices attached.)

$ lsusb

Bus 001 Device 004: ID 046d:08a9 Logitech, Inc. Notebook Deluxe

if not, you may need to get a more mainstream camera. usually Logitech sets the standard. I just used a cheap refurbished knickoff. Your output will vary..

Do a little configuration:

$ sudo nano /etc/motion/motion.conf
In here there are a few basic changes that you need to perform:
  • Daemon = OFF to ON
  • webcam_localhost = ON to OFF
You can change other settings but it’s recommend you don’t take more than 2 frames, and you been the default frame pixel size, for stability.

To ensure that the motion service will actually start as a daemon we need to change another configuration setting, so enter the following:

sudo nano /etc/default/motion

Then change the value “start_motion_daemon=no” to “yes”

Let's get started:

Finally you can start the motion service to stream the web cam images

sudo service motion start
Then after about 30 seconds browse to the new web interface, which should be at the below URL (where is your Raspberry PI’s IP address yours may vary)

Hint: if you do not have direct access to your RPi, you can use to find it on the network. Frequently I will hook up the RPi to the network without a keyboard, mouse, or monitor and then remote into the unit,


Note if you want to use an ipcamera it is easy but you have to know about the camera. I ended up going to the zoneminder wiki and found the answer for my camera. Setup is the same, but you have to add two lines to motion.conf.

 netcam_userpass user:password

For us  it was:

 netcam_userpass user:password

I have ZM installed on my Media Server that runs multiple programs including Apache, email server, and Mysql with no issues. I don't know if the earlier stages of Zm was picky like that but its more friendly now neat! do this to my room!
Cool. I also thought of maybe using this for a pod casting setup also.
Awesome. I was easily able to set up a video surveillance system at home and at work.
There are also instructions for installing from source:

Sunday, April 9, 2017

Basic pi setup.


Basic setup


install jessie os
do updates
install vim mc


Check Ethernet & Wifi Before continuing make sure the Ethernet cable is connected in and you can ping out from the Pi:


You will also want to set up your WiFi dongle. run

sudo shutdown -h

now and then plug in the WiFi module when the Pi is off so you don't cause a power surge.

If you have a Pi 3, or any other Pi with built in WiFi, an external WiFi adapter is not required but you can use one if you need a bigger/external antenna.  When it comes back up check with ifconfig -a that you see wlan0 - the WiFi module.

Install software

Next up we install the software onto the Pi that will act as the 'hostap' (host access point). You need internet access for this step so make sure that Ethernet connection is up!

sudo apt-get update
sudo apt-get install hostapd isc-dhcp-server

(You may need to sudo apt-get update if the Pi can't seem to get to the apt-get

repositories) (text above shows udhcpd but that doesnt work as well as isc-dhcp-server, still, the output should look similar) Also install a nice iptables manager with

sudo apt-get install iptables-persistent

You'll get two 'config' screens, say Yes to both

Set up DHCP server

Next we will edit /etc/dhcp/dhcpd.conf, a file that sets up our DHCP server - this allows wifi connections to automatically get IP addresses, DNS, etc. Run this command to edit the file

sudo nano /etc/dhcp/dhcpd.conf

Find the lines that say

option domain-name "";
option domain-name-servers,;

and change them to add a # in the beginning so they say

#option domain-name "";
#option domain-name-servers,;

Find the lines that say

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.

and remove the # so it says

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.

Then scroll down to the bottom and add the following lines

subnet netmask {
option broadcast-address;
option routers;
default-lease-time 600;
max-lease-time 7200;
option domain-name "local";
option domain-name-servers,;

Save the file by typing in Control-X then Y then return  Run

sudo nano /etc/default/isc-dhcp-server

and scroll down to


and update it to say


Or whatever the name of your wifi adapter is! close and save the file  Set up wlan0 for static IP If you happen to have wlan0 active because you set it up,  run

sudo ifdown wlan0

There's no harm in running it if you're not sure Next we will set up the wlan0 connection to be static and incoming. Run

sudo nano /etc/network/interfaces to edit the file

Find the line auto wlan0 and add a # in front of the line, and in front of every line afterwards. If you don't have that line, just make sure it looks like the screenshot below in the end! Basically just remove any old wlan0 configuration settings, we'll be changing them up Depending on your existing setup/distribution there might be more or less text and it may vary a little bit  Add the lines

iface wlan0 inet static

After allow-hotplug wlan0 - see below for an example of what it should look like. Any

other lines afterwards should have a # in front to disable them Save the file (Control-X Y ) Assign a static IP address to the wifi adapter by running

sudo ifconfig wlan0

Configure Access Point

Now we can configure the access point details. We will set up a password-protected

network so only people with the password can connect. Create a new file by running

sudo nano /etc/hostapd/hostapd.conf

Paste the following in, you can change the text afterssid= to another name, that will be the network broadcast name. The password can be changed with the text after


















If you are not using the Adafruit wifi adapters, you may have to change the

driver=rtl871xdrv to say driver=nl80211 or something If you are using the Raspberry Pi 3's internal WiFi adapter, comment out thedriver=rtl871xdrv

 line altogether: Save as usual. Make sure each line has no extra spaces or tabs at the end or beginning - this file is pretty picky!  Now we will tell the Pi where to find this configuration file. Run

sudo nano /etc/default/hostapd

Find the line #DAEMON_CONF="" and edit it so it says


Don't forget to remove the # in front to activate it!

Then save the file

Likewise, run

sudo nano /etc/init.d/hostapd

and find the line


and change it to


Configure Network Address Translation Setting up NAT will allow multiple clients to connect to the WiFi and have all the data 'tunneled' through the single Ethernet IP. (But you should do it even if only one client is going to connect) Run

sudo nano /etc/sysctl.conf

Scroll to the bottom and add


on a new line. Save the file. This will start IP forwarding on boot up Also run

sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward "

to activate it immediately  Run the following commands to create the network translation between the ethernet port  eth0 and the wifi port wlan0

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT

sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT

You can check to see whats in the tables with

sudo iptables -t nat -S

sudo iptables -S

To make this happen on reboot (so you don't have to type it every time) run

sudo sh -c "iptables-save > /etc/iptables/rules.v4"

The iptables-persistent tool you installed at the beginning will automagically reload the configuration on boot for you. update hostapd (maybe) If you are running Raspberry pi kernel 4.4.13-v7+ or greater (check your kernel version with uname -a), you do not need to do this step. if you are using the Raspberry Pi 3 built-in WiFi or are not using RTL8192-like WiFiadapter, then skip this step! before we can run the access point software, we have to update it to a version that supports the WiFi adapter. First get the new version by typing in


Then install it.

Apache2 web server and php:

sudo apt-get install apache2 -y

sudo apt-get install php5 libapache2-mod-php5 -y


Install MariaDB on Raspbian

With the new version of Raspbian, MariaDB is now present in the official repositories, which until now was not the case! To install it, nothing more simple therefore, you just need to run the following command:

sudo apt-get install mariadb-server

If you already have MySQL installed, it is likely that the package manager notifies you of a conflict and asks if it needs to uninstall MySQL. In this case, answer yes. During the installation, MariaDB will configure itself. It’s up to you to provide the administrator account for the database.  This done, it should ask you if you are sure to want to go under MariaDB. Again, answer yes. Once the installation is complete, you will be able to access MariaDB as you did with MySQL, simply with the following command:

mysql -u user -p

Setup gui

sudo apt-get install xinit

sudo apt-get install lxde-core lxterminal lxappearance

sudo apt-get install lightdm

sudo reboot

Web database admin

sudo apt-get install phpmyadmin

Add your own passwords

Remote desktop

sudo apt-get install xrdp


Make sure system sees the bluetooth device


upgrade the system software:

    sudo apt-get update
    sudo apt-get upgrade

Install the bluetooth software:

sudo apt-get install bluetooth blueman bluez python-gobject python-gobject-2

Open a Terminal window and edit the /etc/rc.local file with:

    sudo nano /etc/rc.local

And add the following to the end of the file, just before the exit 0 line:

    sudo hidd -i hci0 --connect 00:07:61:B4:7E:81

replacing the MAC address with the MAC address of your keyboard or computer.

Tuesday, March 7, 2017

Old vcr ir sensor.

An old fashion vcr can be a treasure trove of re-usable spare parts for electronic and robotics. Although they are quickly disappearing, you can still find them in a few thrift stores.

In this case, I rescued the vcr channel ir sensor. Also added extension wires  for use with a breadboard. There is a ton of code out there, but the connections setup is the most vital. There are three basic connections of data, plus, and minus, You will probably have to do a web lookup to get the pinout of the ir sensor.

Then look for the circuit that applies.