Category Archives: Computers

Raspberry Pi with Asus VW192T via HDMI to VGA adapter

I want to use the VGA port on my ASUS VW192T monitor for my Pi and use the DVI port for a second screen from my laptop. I got an adapter similar to the Neewer one other people have used. Of course, it didn’t work out of the box, so some custom tweaking was needed.

The ‘tvservice’ commands did not work on a fresh install, so run apt-get update/upgrade and reboot a couple of times to make sure the OS is up to date.

  • Connect to Pi via HDMI-DVI
  • As per this post, a few commands required to discover what the screen supports.
  • ‘tvservice -s’ shows “state 0x120016 [DVI DMT (47) RGB full 16:10], 1440×900 @ 60Hz, progressive”
  • ‘tvservice -m CEA’ shows “Group CEA has 0 modes:”
  • ‘tvservice -m DMT’ shows a nice list of supported modes.”Group DMT has 15 modes:
    mode 4: 640×480 @ 60Hz 4:3, clock:25MHz progressive
    mode 5: 640×480 @ 72Hz 4:3, clock:31MHz progressive
    mode 6: 640×480 @ 75Hz 4:3, clock:31MHz progressive
    mode 8: 800×600 @ 56Hz 4:3, clock:36MHz progressive
    mode 9: 800×600 @ 60Hz 4:3, clock:40MHz progressive
    mode 10: 800×600 @ 72Hz 4:3, clock:50MHz progressive
    mode 11: 800×600 @ 75Hz 4:3, clock:49MHz progressive
    mode 16: 1024×768 @ 60Hz 4:3, clock:65MHz progressive
    mode 17: 1024×768 @ 70Hz 4:3, clock:75MHz progressive
    mode 18: 1024×768 @ 75Hz 4:3, clock:78MHz progressive
    mode 21: 1152×864 @ 75Hz 4:3, clock:108MHz progressive
    mode 35: 1280×1024 @ 60Hz 5:4, clock:108MHz progressive
    mode 36: 1280×1024 @ 75Hz 5:4, clock:135MHz progressive
    (prefer) mode 47: 1440×900 @ 60Hz 16:10, clock:106MHz progressive
    mode 48: 1440×900 @ 75Hz 16:10, clock:136MHz progressive”
  • As in the post, I want an edid.dat file, so did the following: ‘sudo tvservice -d edid.dat’ and ‘sudo edidparser edid.dat’ to view the content, which looks like this

“Enabling fuzzy format match…
Parsing edid.dat…
HDMI:EDID version 1.3, 0 extensions, screen size 43×27 cm
HDMI:EDID features – videodef 0x80 !standby !suspend active off; colour encoding:RGB444|YCbCr444|YCbCr422; sRGB is default colourspace; preferred format is native; does not support GTF
HDMI:EDID found monitor S/N descriptor tag 0xff
HDMI:EDID found monitor range descriptor tag 0xfd
HDMI:EDID monitor range offsets: V min=0, V max=0, H min=0, H max=0
HDMI:EDID monitor range: vertical is 50-75 Hz, horizontal is 30-82 kHz, max pixel clock is 210 MHz
HDMI:EDID monitor range does not support GTF
HDMI:EDID found monitor name descriptor tag 0xfc
HDMI:EDID monitor name is ASUS_VW192T__??
HDMI:EDID found preferred DMT detail timing format: 1440x900p @ 60 Hz (47)
HDMI:EDID established timing I/II bytes are BF EF 80
HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II
HDMI:EDID found DMT format: code 5, 640x480p @ 72 Hz in established timing I/II
HDMI:EDID found DMT format: code 6, 640x480p @ 75 Hz in established timing I/II
HDMI:EDID found DMT format: code 8, 800x600p @ 56 Hz in established timing I/II
HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II
HDMI:EDID found DMT format: code 10, 800x600p @ 72 Hz in established timing I/II
HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II
HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II
HDMI:EDID found DMT format: code 17, 1024x768p @ 70 Hz in established timing I/II
HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II
HDMI:EDID found DMT format: code 36, 1280x1024p @ 75 Hz in established timing I/II
HDMI:EDID standard timings block x 8: 0x8180 714F 9500 950F 0101 0101 0101 0101
HDMI:EDID found DMT format: code 35, 1280x1024p @ 60 Hz (5:4) in standard timing 0
HDMI:EDID found DMT format: code 21, 1152x864p @ 75 Hz (4:3) in standard timing 1
HDMI:EDID found DMT format: code 47, 1440x900p @ 60 Hz (16:10) in standard timing 2
HDMI:EDID found DMT format: code 48, 1440x900p @ 75 Hz (16:10) in standard timing 3
HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023
HDMI:EDID best score mode initialised to DMT (4) 640x480p @ 60 Hz with pixel clock 25 MHz (score 0)
HDMI:EDID best score mode is now DMT (4) 640x480p @ 60 Hz with pixel clock 25 MHz (score 36864)
HDMI:EDID best score mode is now DMT (5) 640x480p @ 72 Hz with pixel clock 31 MHz (score 44236)
HDMI:EDID best score mode is now DMT (6) 640x480p @ 75 Hz with pixel clock 31 MHz (score 46080)
HDMI:EDID best score mode is now DMT (8) 800x600p @ 56 Hz with pixel clock 36 MHz (score 53760)
HDMI:EDID best score mode is now DMT (9) 800x600p @ 60 Hz with pixel clock 40 MHz (score 57600)
HDMI:EDID best score mode is now DMT (10) 800x600p @ 72 Hz with pixel clock 50 MHz (score 69120)
HDMI:EDID best score mode is now DMT (11) 800x600p @ 75 Hz with pixel clock 49 MHz (score 72000)
HDMI:EDID best score mode is now DMT (16) 1024x768p @ 60 Hz with pixel clock 65 MHz (score 94370)
HDMI:EDID best score mode is now DMT (17) 1024x768p @ 70 Hz with pixel clock 75 MHz (score 110100)
HDMI:EDID best score mode is now DMT (18) 1024x768p @ 75 Hz with pixel clock 78 MHz (score 117964)
HDMI:EDID best score mode is now DMT (21) 1152x864p @ 75 Hz with pixel clock 108 MHz (score 174298)
HDMI:EDID best score mode is now DMT (35) 1280x1024p @ 60 Hz with pixel clock 108 MHz (score 182286)
HDMI:EDID best score mode is now DMT (36) 1280x1024p @ 75 Hz with pixel clock 135 MHz (score 196608)
HDMI:EDID best score mode is now DMT (47) 1440x900p @ 60 Hz with pixel clock 106 MHz (score 5258280)
HDMI:EDID DMT mode (48) 1440x900p @ 75 Hz with pixel clock 136 MHz has a score of 219400
HDMI:EDID preferred mode remained as DMT (47) 1440x900p @ 60 Hz with pixel clock 106 MHz
HDMI:EDID has only DVI support and no audio support
edid_parser exited with code 0”

  • Next, jump into Transmit and make a local copy for future reference as I might need it again.
  • Copy edid.dat onto the the boot partition of the SD card and see what happens.

Combinations tried:

hdmi_safe=1 – FAIL

hdmi_edid_file=1 – FAIL

hdmi_force_hotplug=1 – FAIL

+ config_hdmi_boost=4 – FAIL

+hdmi_group=2 – FAIL

+hdmi_drive=2 – FAIL

+hdmi_mode=36 – FAIL

+hdmi_mode=47 – FAIL

Weather Pi – How to setup and log weather data

Here’s a brief step-by-step to help remember what I did to setup a remote weather logging Raspberry Pi.

Required Hardware:

  1. Raspberry Pi
  2. Weather Station
  3. 3G Dongle and SIM
  4. Power Supply

Optional Hardware

  1. Webcam

Setup Process:

  1. Install Occidentalis as per AdaFruit tutorial.
  2. Setup WiFi as per AdaFruit tutorial.
  3. sudo apt-get update and sudo apt-get upgrade, then restart.
  4. Setup RPiMonitor as per this post (or newer).
  5. Add WiFi to RPi Monitor as per my comment on this post.
  6. Optional: Install motion for webcam support
  7. Make a backup image at this point as I had an issue with libusb1.0 and had to start again.
  8. Install and configure pywws and dependencies as per this or more recently this.
  9. Instead of installing downloads via wget, I chose to use the packages already in the repo, so did ‘sudo apt-get install cython’, ‘sudo apt-get install libusb-1.0’. cython-hidapi was the only one I did the long way. I did not change setup.py as libusb-1.0 was already installed in /usr/includes
  10. If there is an issue with this when running ‘sudo python setup.py install’ with the following error: hid-libusb.c:43:20: fatal error: libusb.h: No such file or directory
    compilation terminated.
    error: command ‘gcc’ failed with exit status 1″ try ‘sudo apt-get install libusb-1.0-0-dev’ and try again.
  11. Latest pywws obtained with ‘git clone https://github.com/jim-easterbrook/pywws.git’

Bog standard R-Pi Setup

This is my base setup for Raspberry Pi’s. Seems to be a good starting point, but change things to suit what you want to achieve with your Pi.

Base Setup Process:
  • Download the latest image. Almost any will do – NOOBS, Raspbian and Occidentalis all work fine. I often use Raspbian.
  • Install the imaged onto an SD Card. I usually use the SD Card Builder because it’s quick and easy or setup as per this Adafruit Learning post.
  • Login by SSH – you can find the IP address using PiFinder or check in you routers DHCP tables or maybe Pi Finder.
  • Do the usual stuff for first time config
    sudo raspi-config
    Expand to full SD Card and reboot, set a hostname, set locales etc. It’s important to change the hostname to prevent clashes of ‘raspberrypi’ hostname when there is more than one Pi on the network
  • Update all packages with
    sudo apt-get update
    then
    sudo apt-get upgrade -y.
    Then reboot. Maybe even a couple of times to make sure everything is cool.
  • And don’t forget  to reboot after doing
    sudo rpi-update

That’s it. Takes a little while to do all the upgrades, but then you’re good to go with a fresh base install to do whatever you want with.

There’s a few additional extras that could be worthwhile adding at this point to round things out.

Optional Extras

From here you can now do all sorts of things with your Raspberry Pi, like adding bluetooth support as per this post, because everything is better with bluetooth. Then add BlueProximity for presence detection. Cool.

Or how about a Weather logger?

Adding the Adafruit WebIDE, Google CoderWeb2Py or PiUi is a good idea, particularly for development Pi’s.  Same with adding the Arduino IDE or turning it into a Ninja Block. There is also the Pi Store that makes it easy to install Python games and Apps.