edeca.net logo
  • rss
  • Home
  • Graphics
  • Electronics
    • PCB0002 – LED matrix
  • Computing
    • ROT Util
    • MOTD maker
    • GNU screen config
    • VB6 reverse DNS
    • VB6 RichTextBox control
  • About

The ST7565 display controller

David | February 5, 2012

This post covers the theory of using a graphic LCD based on the ST7565 controller. These are widely available with popular sizes of 132×32 and 128×64, a number cost below £10.

(Image © Electronic Assembly, lcd-module.de)

The tutorial follows the same path I took whilst developing a simple library for a screen I had bought. I set myself the challenge of doing this from scratch, rather than using code from the internet.

Read the rest of this entry »

Comments
No Comments »
Categories
Electronics
Tags
electronics, glcd, st7565
Comments rss Comments rss
Trackback Trackback

Eagle outline for the Evatron PC00 series enclosure

David | December 11, 2011

I found a neat plastic enclosure with a battery compartment that I plan on using for a current project. It is made by Evatron and comes from the PC00 series (I picked a PC003N).

Below is a ZIP file containing the case drawn in Eagle to measurements from the datasheet. A dimension layer is included that makes the most of the internal space.

Download the Eagle board file – free for any use (but credit is nice)

Comments
No Comments »
Categories
Electronics
Tags
eagle, electronics, enclosures
Comments rss Comments rss
Trackback Trackback

Fixing vim from macports

David | December 3, 2011

After installing vim from MacPorts I noticed that neither the arrow keys or backspace work as expected.

The solution is simple, create a ~/.vimrc file with the following contents:

set nocompatible
set bs=2

Reload vim and voila, insert mode behaves as I’d expect it to.

Note that you don’t really need to set nocompatible, simply having a .vimrc file in your home directory does this automatically. I’ve left it in to remember the solution in future.

Thanks to the linux-journal blog and the vim tips wiki for the answers.

Comments
No Comments »
Categories
Uncategorized
Tags
macbook, ports
Comments rss Comments rss

Stupid password rules

David | November 24, 2011

Today I forgot the password for a site I use only occasionally. This is rare, as I have a number of password schemes that I use to create a password unique to each site. After clicking the reset password link, I am confronted with the “password strength checker” below:

This list of rules doesn’t fit very well with my password scheme, primarily because what I computed in my head fails the test for uppercase characters.

Using the phrase “this is an unbelievably long password that would take a very long time to crack” fails this rule too, as well as the tests for a number and punctuation. I’m not suggesting that this is a good password, but it’s certainly better than “aA1!bcde” which passes all the rules. These 8 characters are trivial to brute force on any modern machine even if the underlying software uses a salted hash.

The offending software appears to be Jive, who perhaps need to set some more sensible defaults on their login system.

Comments
1 Comment »
Categories
Computing
Tags
jive, password, security
Comments rss Comments rss
Trackback Trackback

dban on a USB stick

David | November 10, 2011

After a number of unsuccessful attempts to get dban on a USB stick using unetbootin, I found the Universal USB Installer instead. This appears to do a better job, making a bootable installation from the latest preview build of dban.

It helps to remove the USB stick after boot, during the “Waiting for USB devices to register” stage. This is an issue with how dban recognises mass storage on some motherboards, rather than a problem with the USB boot. Unfortunately it doesn’t work properly in WINE right now, presumably because it can’t find the right drives.

Further instructions are available on the pendrivelinux.com homepage, but it is simple enough that you wont need them.

Comments
No Comments »
Categories
Uncategorized
Comments rss Comments rss
Trackback Trackback

Reporting a phishing site, is it worth it?

David | July 3, 2011

So I thought I was being a good internet citizen when I received the following email a week ago:

Dear User;

Please update to our new server click here to begin

http://glacierdesign.ca/phpform/forms/form1.html

Thanks and have a wonderful day.

Webmaster

The site looked like this:

Screenshot of a phishing website

For a while I was confused, after all I run my own email. Did I really need to remind myself of my password? And what had happened to my unlimited quota?

Then I figured it was obviously a phishing email, so I turned to “do no evil” Google to report it. If the site was included on their block list then users of popular browsers would automatically receive a warning if they tried to go to it.

I tried using the Google report phishing form, even filling in the headers and body of the email in the comments box. Unfortunately, a week later the site is still up and presumably conning less savvy users.

Surprised by Google I’ve just tried the badwarebusters.org report feature, let’s hope it works slightly more efficiently!

Comments
No Comments »
Categories
Computing
Comments rss Comments rss
Trackback Trackback

Adding fake ethernet headers to pcap files

David | June 20, 2011

Occasionally I see packet captures which have been saved as Raw IP, which can really mess up many of the tools developed to deal with pcap. Anything based on libnids, including the Perl module I maintain, cannot deal with it and will produce no (or bizarre) results. Wireshark displays these captures just fine, with “Raw packet data – no link information available” just above the IP layer.

There are many situations where packet capture will lack the ethernet header for a good reason, but if you simply want to run it through other tools that deal only with IP and above then adding a fake header is a viable choice.

Fortunately, adding a “fake” ethernet header to these pcap files using tcprewrite (part of the tcpreplay suite) is simple:

$ tcprewrite --dlt=enet --enet-dmac=00:11:22:33:44:55 --enet-smac=66:77:88:99:AA:BB --infile=input.pcap --outfile=output.pcap

Overriding the output data layer type is essential, as is providing the ethernet MAC addresses of the two endpoints. That’s all there is to it.

tcprewrite is available as part of the Debian package tcpreplay.

Comments
No Comments »
Categories
Computing
Tags
linux, pcap, tcp
Comments rss Comments rss
Trackback Trackback

Humax HDR-FOX T2

David | April 24, 2011

I have just purchased a Humax HDR-FOX T2 as an upgrade to my trusty old PVR-9200, after my area was enabled for Freeview HD. What follows is a tiny review based on my experiences.
Read the rest of this entry »

Comments
No Comments »
Categories
General
Tags
freeview, hd, humax
Comments rss Comments rss
Trackback Trackback

BatchPCB

David | April 17, 2011

I have previously raved about BatchPCB, a low cost prototyping service run by SparkFun out of the USA. However, it seems that you now can’t select shipping to the UK (and perhaps other parts of Europe) and they don’t seem to be doing too much about it.

I emailed a few weeks ago and have received no reply, so all I have to go on is a few posts on their forums which confirm I’m not the only one experiencing the issue.

So BatchPCB, unless you can get this fixed I’m afraid I’ll be seeking an alternative. Comments suggesting other cheap PCB fabrication houses welcome, I’ll probably try DorkbotPDX first.

Comments
No Comments »
Categories
Electronics
Tags
batchpcb, pcb
Comments rss Comments rss
Trackback Trackback

Using the Razor view engine with S#arp architecture

David | March 12, 2011

Whilst the Sharp Architecture maintainers have little interest in Razor (see here), I have been using it recently and like the syntax.

Swapping out a default project to use Razor instead of (or in addition to) the default engine isn’t too difficult.

Enabling the view engine

In Global.asax, find the few lines below in Application_Start():

ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new AreaViewEngine());

We need to register Razor here, by adding the line below:

ViewEngines.Engines.Add(new RazorViewEngine());

If you do not plan on using the default view engine then you can comment the existing line and remove all the .aspx files from the Views directory.

Configuring the default layout

Create an empty file called _ViewStart.cshtml in the root of your Views folder:

@{
Layout = "~/Views/Shared/_Layout.cshtml";
}

This code runs before any other view code in this directory or below and sets the default layout so you don’t have to set it manually in every view (see the MVC3 release notes for more information).

Create a basic template

Lastly we need the layout which was referenced above, created as Views/Shared/_Layout.cshtml. You could copy and paste this from a new MVC Razor application, which is what I did to end up with the template below:

<!DOCTYPE html>
<html>
<head>
    <title>MyApp - @ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
</head>
<body>
    <div class="page">
        <div id="header">
            <div id="title">
                <h1>MyApp</h1>
            </div>
           
        </div>

        <div id="main">
            @RenderBody()
            <div id="footer">
            </div>
        </div>
    </div>
</body>
</html>

Conclusion

This is all that should be necessary to enable Razor and start to return basic views from your controllers. From here on you can create views just like in the MVC3 tutorials.

Comments
1 Comment »
Categories
Computing
Tags
mvc, razor, sharp architecture
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Categories

  • Computing
  • Electronics
  • General
  • Perl
  • Photography
  • Uncategorized

Archives

  • February 2012
  • December 2011
  • November 2011
  • July 2011
  • June 2011
  • April 2011
  • March 2011
  • February 2011
  • December 2010
  • November 2010
  • October 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • November 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009

Links

  • My photo gallery
  • Pookey's site

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox