Installing golang under Linux Debian Wheezy

Now I had a headache installing golang as using via apt-get in wheezy installed an old version which wasn’t compatible with the software I wanted to install. Luckily I manged to stumble upon a tool called Go Version Manager (gvm) installed under the root user so modify to meet your needs.

Continue Reading

Hearing Dog Update

Just had some awesome news from the people at Hearing Dogs, they have found a potential match for me and would like me to visit them so we can meet and see how we get on. He’s a 19 month old black Labrador.

Continue Reading

Embeding Monowall Traffic Graphs Into A Webpage

I had a situation where I needed to embed a monowall interface stats into a webpage so thought i’d do a quick how to.

Create a user group
Login as an admin and navigate to System > User manager > Groups

Click the + to add a new group Choose a group name and description ie ‘stats’ Scroll down and select the field marked Status: Traffic graph status_graph.php

Click ‘Save’ Click the ‘Users’ tab Click the + to add a new user

Add new user details and under the ‘Group Name’ select the group you just created ie ‘stats’

Click ‘Save’ Navigate to Status > Traffic graph Choose the interface you want to monitor.

Right click on the graph and select ‘View Source’ Search the page ‘Ctrl+F’ for the word ’embed’

Put the embed tag into a webpage with the user details and ip address of your monowall device along with your usernam and password ie

src=”stats@YOUR-IP/graph.php?ifnum=re0&ifname=WAN”” >http://stats:stats@YOUR-IP/graph.php?ifnum=re0&ifname=WAN” etc etc

If you enter stats:stats@YOUR-IP/graph.php?ifnum=re0&ifname=WAN directly into a browser a full page will open showing your graph.

Continue Reading

Grive sync API now defunct

I noticed my files were no longer being sync’d using the grive application. Further investigation revealed the following errors. ./grive Reading local directories Synchronizing folders exception: /usr/bin/grive/libgrive/src/protocol/AuthAgent.cc(174): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const string&, const gr::http::Header&) Dynamic exception type: boost::exception_detail::clone_impl [gr::expt::BacktraceTag*] = #0 0xfa1d0 :0 gr::Exception::Exception() #1 0xe1004 :0 gr::http::Error::Error() #2 0xe65f8 :0 gr::AuthAgent::CheckHttpResponse(long, std::string const&, gr::http::Header const&) #3 0xe6098 :0 gr::AuthAgent::Get(std::string const&, gr::DataStream*, gr::http::Header const&) #4 0xc7430 :0 gr::v1::Drive::SyncFolders() #5 0xc7920 :0 gr::v1::Drive::DetectChanges() #6 0xa69d0 :0 Main(int, char**) #7 0xa6f5c :0 main #8 0xa6f5c :0 main #9 0xa6f5c :0 main #10 0xa6f5c :0 main #11 0xa6f5c :0 main #12 0xa6f5c :0 main #13 0xa6f5c :0 main #14 0xa6f5c :0 main #15 0xa6f5c :0 main #16 0xa6f5c :0 main #17 0xa6f5c :0 main #18 0xa6f5c :0 main #19 0xa6f5c :0 main #20 0xa6f5c :0 main #21 0xa6f5c :0 main #22 0xa6f5c :0 main #23 0xa6f5c :0 main #24 0xa6f5c :0 main #25 0xa6f5c :0 main #26 0xa6f5c :0 main #27 0xa6f5c :0 main #28 0xa6f5c :0 main #29 0xa6f5c :0 main #30 0xa6f5c :0 main #31 0xa6f5c :0 main #32 0xa6f5c :0 main #33 0xa6f5c :0 main #34 0xa6f5c :0 main #35 0xa6f5c :0 main #36 0xa6f5c :0 main #37 0xa6f5c :0 main #38 0xa6f5c :0 main #39 0xa6f5c :0 main #40 0xa6f5c :0 main #41 0xa6f5c :0 main #42 0xa6f5c :0 main #43 0xa6f5c :0 main #44 0xa6f5c :0 main #45 0xa6f5c :0 main #46 0xa6f5c :0 main #47 0xa6f5c :0 main #48 0xa6f5c :0 main #49 0xa6f5c :0 main #50 0xa6f5c :0 main #51 0xa6f5c :0 main #52 0xa6f5c :0 main #53 0xa6f5c :0 main #54 0xa6f5c :0 main #55 0xa6f5c :0 main #56 0xa6f5c :0 main #57 0xa6f5c :0 main #58 0xa6f5c :0 main #59 0xa6f5c :0 main #60 0xa6f5c :0 main #61 0xa6f5c :0 main #62 0xa6f5c :0 main #63 0xa6f5c :0 main #64 0xa6f5c :0 main #65 0xa6f5c :0 main #66 0xa6f5c :0 main #67 0xa6f5c :0 main #68 0xa6f5c :0 main #69 0xa6f5c :0 main #70 0xa6f5c :0 main #71 0xa6f5c :0 main #72 0xa6f5c :0 main #73 0xa6f5c :0 main #74 0xa6f5c :0 main #75 0xa6f5c :0 main #76 0xa6f5c :0 main #77 0xa6f5c :0 main #78 0xa6f5c :0 main #79 0xa6f5c :0 main #80 0xa6f5c :0 main #81 0xa6f5c :0 main #82 0xa6f5c :0 main #83 0xa6f5c :0 main #84 0xa6f5c :0 main #85 0xa6f5c :0 main #86 0xa6f5c :0 main #87 0xa6f5c :0 main #88 0xa6f5c :0 main #89 0xa6f5c :0 main #90 0xa6f5c :0 main #91 0xa6f5c :0 main #92 0xa6f5c :0 main #93 0xa6f5c :0 main #94 0xa6f5c :0 main #95 0xa6f5c :0 main #96 0xa6f5c :0 main #97 0xa6f5c :0 main [gr::http::HttpResponseTag*] = 400 [gr::http::UrlTag*] = https://docs.google.com/feeds/default/private/full/-/folder?max-results=50&showroot=true [gr::http::HeaderTag*] = Authorization: Bearer ya29.bQHtYTItwcNwXF1U7yRk9s3lcI5cKxE2y-0vRYSsDKUe4tDh62UMWU9i GData-Version: 3.0 Apparently around the 20th April Google stopped serving the ‘Documents List’ API thus grive now fails. I will now look into alternatives ie drive https://github.com/odeke-em/drive , jdrivesync, http://www.howtogeek.com/196635/an-official-google-drive-for-linux-is-here-sort-of-maybe-this-is-all-well-ever-get/ http://www.webupd8.org/2014/09/gdrive-simple-google-drive-cli-client.html and report back.

Continue Reading

Draytek ARP address mismatch

I’ve previously had an issue with clients not being able to connect and ARP address mismatch showing in the logs.This happens when the source mac address doesn’t match ARP senders mac address. This was resolved by accessing the Draytek via telnet and executing.

ip arp accept 1

Which will return

Accept illegal ARP source mac REPLY packets

Continue Reading

Owncloud Webdav cp: cannot create regular file `/mnt/shared/documents/file.txt’: Invalid argument

trying to cp a file to a webdav mounted owncloud share from my linux machine failed wth the following error

cp: cannot create regular file `/mnt/shared/documents/file.txt': Invalid argument

However I was still able to copy from owncloud to my box. checking /var/www/owncloud/data/owncloud.log showed

{"app":"webdav","message":"Sabre\DAV\Exception\BadRequest: expected filesize 162 got 0","level":4,"time":"2015-04-24T13:15:31+00:00"}

To fix this issue open /etc/davfs2/davfs2.conf and change

# use_locks 1
to
use_locks 0

unmount and remount your share and you should be be able to copy with no errors.

Continue Reading

4.3″ 5V Monitor For The Raspberry Pi

I was looking for a 5v monitor for my Pi for use in the car but the ones are found seemed to be very expensive, undeterred I set about buying a 12v and adapting it to my needs.

I found one on Amazon for £12.46 which seemed to fit the bill perfectly. Described as

BW® 4.3” Color TFT Car Monitor Support 480 x 272 Resolution + Car Rear-view Mirror System Monitor, Mini Monitor for Car / Automobile

Digital color TFT LCD car rearview monitor,4.3 inch TFT LCD Screen Size, 480 x 272 Resolution,16 : 9 Display Format
It is with high quality and good durability,With small appearance,convenient for carry,Support 2-channel video input(V1, V2).
It Support multi-role display,With high definition for good image,With a stand holder which has adhesive sticker in the bottom for sticking it in the car.
It Support automatically startup detection when reserving,It can connect with reversing camera, DVD, VCD etc.
It is installed in the drive foreground,Video system: NTSC / PAL auto switchable,Display black screen on no signal,Visible area: 72 x 53 mm.

Ok so at 480 x 272 not mega resolution but perfectly useable to my console command line based application.

Contents of the box was the monitor with hard wired phono audio and video cables and a socket based power connector with inline fuse. Also was a sperate jack plug with bare red and black wires for connecting to your power source.

I thought I would power it up just to make sure it worked before taking it apart, plugged into my home made bench psu and nothing?

I put my multimeter on it to make sure the psu was working properly and it was?

I then plugged in my Pi and the screen sprung into life.

It seems a 1p bulb is too much to ask for on a £12 monitor.

**** WARNING MAKING THE FOLLOWING CHANGES WILL OBVIOUSLY INVALIDATE ANY WARRANTY ETC, CONTINUE AT YOUR OWN RISK, I ACCEPT NO RESPONSIBILITY IF ANY OF YOUR EQUIPMENT BREAKS/CATCHES FIRE ETC ****

Removing the four small screws on the rear and opening the case revealed a simple circuit board.

After some digging around with the multimeter I found a 5v supply on the CHMC 8AY 1508-AD chip.

I removed the red feed wire from it’s currently location onto the 5v leg of the chip and added some electrical tape for strain relief.

Now time for the test (fingers crossed)

Great it powered up fine.

Wanting to run off a usb cigarette adapter in the car I added a USB connector to the bare red/black wires of the jack plug,

The finished article.

Continue Reading