Saturday 7 June 2014

Raspberry Pi Dvorak Keyboard Layout

I prefer not to use the inefficient Victorian keyboard layout known as "QWERTY", dsigned to slow typing speed down, in order to prevent mechanical typewriters from jamming. (an urban myth is also that it allowed the IBM salesman to type the word "TYPEWRITER" using the top row of letters).

Instead I use the more modern (i.e. 1930's) Dvorak layout. :-)

This web page gave me info on how to configure this layout (and perhaps other layouts too).
http://raspberrypi.stackexchange.com/questions/6839/set-keyboard-layout-to-my-language

I did this.

Save a copy of the file, just in case.

sudo cp /etc/default/keyboard /etc/default/keyboard.save

Edit the file
vi /etc/default/keyboard


# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
#XKBLAYOUT="gb"
XKBLAYOUT="dvorak"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"

I then had to reboot the RPi
sudo reboot

The bootup was slow when mapping the keyboard.
I found this advice
http://raspberrypi.stackexchange.com/questions/236/simple-keyboard-configuration


If after remapping your keyboard you get a long delay in boot up during the keyboard mapping phase type the following (once) on the command line:

sudo setupcon

Have to exit x-windows otherwise you get this message
"We are not on the console, the console is left unconfigured"



------------------------

This is a menu driven method of doing the same:
http://raspberrypi.stackexchange.com/questions/236/simple-keyboard-configuration


Use the command:

$ sudo dpkg-reconfigure keyboard-configuration
to reconfigure your keyboard. Then either reboot or

(Note that I chose English UK Dvorak with punctuation or keyboard type).

$ invoke-rc.d keyboard-setup start
to reload the keymap


Have to exit x-windows otherwise you get this message


[....] Setting preliminary keymap...We are not on the console, the console is left unconfigured.
done.

so left xwindows and then reloaded the keymap.




Connect Raspberry Pi to Samsung SyncMaster B1940 Monitor using HDMI to DVI

The Raspberry Pi has an HDMI output for video display, this worked OK with my living room Smart TV.

I've now acquired a Samsung SyncMaster B1940 monitor that was destined for the skip, but is fully working.

It has a VGA input port, I connected a Windows laptop to the monitor using a VGA cable to prove that the monitor was working OK.

It looks like HDMI to VGA adaptors are available for purchase, however the cheaper ones have to be bought online, rather than high street shops.

The Samsung monitor also has a DVI-D input port.  Fortunately this is what the Raspberry Pi needs for HDMI to DVI to work.  I bought a Nikkae HDMI (female) to DVD-D (male) adaptor from my local Maplin store.

When I connected this up, and started up the Raspberry Pi, I got nothing on the monitor screen. It flashed from “digital” to “analog” and back a few times, but that was all.

This blog gave me the answer


I had to connect back to the living room TV so I could edit the config.txt file.

Save the config.txt file, just in case.

sudo cp /boot/config.txt /boot/config.txt.save

Now uncomment the command
hdmi_force_hotplug=1

i.e. change this
# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

to this
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

I connected up to the Samsung again and the Raspberry Pi now displays on the monitor OK.



Getting Raspberry Pi N150 WiFi to work with BT HomeHub 3.0

The Maplin Raspberry Pi Kit comes with a N150 Wi Fi USB Nano dongle.
I have a BT HomeHub 3.0 Broadband Network router (for BT Infinity).

I followed the instructions that came with the kit.
The scan found my Wi Fi Network for the HomeHub, but didn't connect properly.
It seemed to get into a loop of repeatedly connecting and disconnecting.

I found a lot of advice of the internet with slightly different ways and file settings to fix this. In the end this worked for me. (Sorry, but I can't remember the page where I got this advice from).

This file contained these settings:


sudo cat /etc/wpa_supplicant/wpa_supplicant.conf


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

network={
        ssid="Id of my HomeHub a bit like this BTHub3-1ABC, in double quotes"
        psk="My WiFi Password in double quotes"
}

I saved the file (just in case)


sudo cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.save

Then I edited the file as follows:



sudo vi /etc/wpa_supplicant/wpa_supplicant.conf


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

network={
        ssid="Id of my HomeHub a bit like this BTHub3-1ABC, in double quotes"
        psk="My WiFi Password in double quotes"
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=TKIP
        group=TKIP
}

network={
        ssid="id of HomeHub as above"
        psk="WiFi Password as above"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=TKIP
        auth_alg=OPEN
}

I also edited this file

sudo cp /etc/network/interfaces /etc/network/interfaces.save


and commented out the line
iface eth0 inet dhcp


i.e.

sudo vi /etc/network/interfaces


auto lo

iface lo inet loopback
#iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

Then I did this to take down eth0, and restart networking


sudo ifdown eth0
sudo /etc/init.d/networking restart

I wasn't aware that this had worked until another time that I was using the RPi, so perhaps a reboot at this stage finally gets thing working

sudo reboot

When I next followed the instructions to run the wpa_gui tool and scan for a WiFi network, I connected to my HomeHub Wi Fi and to the internet OK.








First Post: Reason for this Blog

One of my Birthday presents this year was a Maplin Raspberry Pi Kit, plus a case in which to house the Raspberry Pi itself.

The kit consists of a Raspberry Pi Model B, full size USB keyboard, USB optical 3 button scroll mouse, powered 4 port USB Hub, 4GB SD card pre-loaded with the Raspbian (Debian Linux) operating system, an N150 Wi Fi USB Nano dongle, 2.1A USB mains adaptor (to power the RPi), USB to Micro USB cable (for the power supply to RPi), and an HDMI cable.

I followed the instructions to connect up the kit, and got the RPi working with the living room Smart TV. At the time the WiFi connected to my BT HomeHub, but wouldn't stay connected. More about this in a later post.

Since then I've acquired a Samsung SyncMaster B1940 monitor that was destined for the skip, but is fully working. I had a little trouble connecting it up, and getting it to work, but that too is now sorted and is working OK. The WiFi connection is working too.

So I've decided to start this Blog, as a means of recording what I've done to get whatever I'm doing with the RPi working, and also to share that information.