Home  5  Books  5  GBEzine  5  News  5  HelpDesk  5  Register  5  GreenBuilding.co.uk
Not signed in (Sign In)

Categories



Green Building Bible, Fourth Edition
Green Building Bible, fourth edition (both books)
These two books are the perfect starting place to help you get to grips with one of the most vitally important aspects of our society - our homes and living environment.

PLEASE NOTE: A download link for Volume 1 will be sent to you by email and Volume 2 will be sent to you by post as a book.

Buy individually or both books together. Delivery is free!


powered by Surfing Waves




Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome to new Forum Visitors
Join the forum now and benefit from discussions with thousands of other green building fans and discounts on Green Building Press publications: Apply now.




    •  
      CommentAuthorSteamyTea
    • CommentTimeDec 31st 2011
     
    Just to stop Damon's thread about iButton logging being hijacked to the Linux crowd, here is a new one.

    Just to give a bit of background, some of use like data logging and some of us like doing it on the cheap.
    I have an old PC that I have installed Puppy 5 on, works well with the hardware.
    I have also downloaded Ubunto 11 Live for play with later.

    What I cant to do is get the iButton reader and my Current Cost energy meter wired into it though the USB serial cables yet.

    So any advice, easy to follow instructions would be gratefully received.
    • CommentAuthorEd Davies
    • CommentTimeDec 31st 2011
     
    Sorry, no idea immediately what needs doing but perhaps it would be worth saying what you have tried and how it went wrong.

    The "lsusb" command is your friend for checking for the basic connection. On Ubuntu and Debian it's in a package called "usbutils". Probably something similar on Puppy.

    http://www.murga-linux.com/puppy/viewtopic.php?p=275608

    Here's how a CurrentCost meter looks on by Ubuntu laptop:


    edavies@bill:~$ lsusb
    Bus 002 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
    Bus 002 Device 002: ID 046d:c001 Logitech, Inc. N48/M-BB48 [FirstMouse Plus]
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


    The CurrentCost is the first line, basically telling you what chip is in the USB-to-serial lead which came with it.

    My 1-wire adapter shows up in very much the same way on my Debian Pogoplug:
    (http://edavies.me.uk/2011/09/ssh-pogoplug/)


    edavies@penelope:~$ lsusb
    Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
    Bus 001 Device 003: ID 4971:ce17 SimpleTech 1TB SimpleDrive II USB External Hard Drive
    Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    • CommentAuthorwookey
    • CommentTimeJan 1st 2012
     
    The standard Dallas 1-wire USB device appears as:
    Bus 003 Device 002: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter
    The Homechip LinkUSB device appears as:
    Bus 006 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
    (i.e its the FTDI 232 serial-io device used in many things, such as JTAG adaptors).

    To read using the Maxim/Dallas device simplest is
    apt-get install digitemp (as root or using sudo)

    /usr/bin/digitemp_DS2490 -w
    • CommentAuthorEd Davies
    • CommentTimeJan 1st 2012
     
    Posted By: wookeyThe standard Dallas 1-wire USB device appears as:


    Good point. The Prolific device I mentioned for 1-wire on my Pogoplug is actually a USB-to-serial adapter I'm using with a serial-to-1-wire adapter (DS9097U) because I couldn't get my USB adapter (DS9490R) to work on Debian. Works fine on Ubuntu and appears there as Wookey says. I wish I could remember these things.
    • CommentAuthorborpin
    • CommentTimeJan 1st 2012 edited
     
    Posted By: JSHarrisI've already said that I've taken a lot of time to research Linux on the web
    As a relative novice to Linux, I can understand the frustrations, but I have usually found the answer. Can you give us an example of where you have come up against a brick wall?
    For instance did
    Posted By: wookeyapt-get install digitemp (as root or using sudo)
    make sense?
    •  
      CommentAuthordjh
    • CommentTimeJan 1st 2012
     
    Posted By: JSHarris
    wookey, I've spent tens of hours searching the web for easy, beginner-level, stuff on Linux. It just isn't there! I'm not ranting, as you put it, simply stating a fact. There are masses of Linux forums and groups around, but all seem to be aimed at people who already understand the fundamental structure of Linux and who use arcane language that means little to an outsider. You mentioned Unix - does that mean that if I get a book on Unix I'll get a better understanding of Linux? If so, why isn't this info available more readily?

    Right, but you need to think about your readers, just as you say Linux writers should. It doesn't tell us anything useful to know how long you have spent looking. It would be more useful to give specific examples of what you have tried and what you are looking for. What have you found that is closest to what you are looking for and why doesn't it match your needs, for example? Then we would have some chance of pointing out either how to improve your searches, or where other resources are. Right now I don't have a clear idea of what you are looking for so I'm not sure what to suggest.

    Linux is similar in many ways to Unix, although there are also many differences. Most of the commands are the same and the API is the same because they all try to follow POSIX (http://en.wikipedia.org/wiki/POSIX). And the various flavours of UNIX are extremely well documented; I'm most familiar with the Solaris docs.

    But rather than buy a UNIX book, I'd be inclined to go to a big bookshop (Heffers, Blackwells, Foyles etc) and browse the Linux section to see if there's anything that suits you. Start with the 100 or so O'Reilly books (http://shop.oreilly.com/category/browse-subjects/operating-systems/linux-unix.do?sortby=bestSellers&sortType=1) but there are plenty of others.

    Oh and there's a command list at http://oreilly.com/linux/command-directory/ A site I use a lot (for man pages mostly) is http://linux.die.net/ And there are lots of manuals like http://ocw.novell.com/suse-linux-enterprise-server-administrators/suse-linux-enterprise-11-fundamentals/3101_all_manual.pdf but I don't know if that's what you're looking for



    Your approach to my posts is pretty typical of that from the Linux community as a whole, without wishing to be rude in any way. I've already said that I've taken a lot of time to research Linux on the web, I've taken the time to download and install Virtual Box and Debian (after a heck of a struggle), I've spent money on buying two machines that came with Linux installed by default. I don't think those actions are anything but those of someone with a commitment to use it, do you? I've explained some of the difficulties new users like me have and how confusing the whole Linux scene seems to be, yet instead of pointing me to a source of useful basic information you've chosen to assume I was ranting when all I've been seeking is some fundamental, beginner-level information.

    I think the whole of that was pretty much uncalled for. As I mentioned earlier, you need to think about what useful information you've given us to help us identify what it is you're looking for and why you haven't found it.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 2nd 2012
     
    After an hour of typing isusb rather than lsusb I have got a list of buses. What I do not have is a description. All I have is a Device XXX: followed by and IDXXXX:XXXX.

    So what now? How do I tell which is my iButton reader or the CC serial cable, or the keyboard, or the mouse?
    •  
      CommentAuthorDamonHD
    • CommentTimeJan 2nd 2012
     
    Clue 1: Adding the -v or --verbose flag to many many Unix/Linux commands will give a lot more detail. See if that helps.

    Rgds

    Damon

    PS. If you use owfs the device's data innards are unpacked for you in a subdirectory of the mount point you specified and you need never poke around directly with lsusb or its ilk (unless something goes wrong).
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 2nd 2012
     
    Been through all switches, could it be a limitation to Puppy, I downloaded Ubunto 11 (something) but it seemed to take forever to run anything from the disk, and I coudl not find the terminal windows icon or other wise.

    So can I download OWFS from somewhere?
    • CommentAuthorborpin
    • CommentTimeJan 2nd 2012
     
    Hi ST. What are you trying to do? OWFS - http://owfs.org/ What are you running Puppy/Ubuntu on?
    • CommentAuthorborpin
    • CommentTimeJan 2nd 2012 edited
     
    Ok (love google) this may help http://owfs.sourceforge.net/dsl.html (edit) This looks old and is not what is says!
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 2nd 2012 edited
     
    Right, sitting here on a fairly old (4-5 year) Hi-Grade laptop.
    Celeron M 1.6 GHz
    RAM 505 MB
    Linux Kernel 2.6.33.2 (i686)
    Puppy Linux 0.52

    I have installed Libra Office (and the JRE)
    VLC (so I can now watch Phycoville)
    and the USBUtils, but cant seem to get it to do anything in BASH (if that is what the terminal window is called, see picking up some lingo already)

    I shall go and have a look at owfs.org and see if I can find the software for the 1Wire.

    Thanks
    • CommentAuthorEd Davies
    • CommentTimeJan 2nd 2012 edited
     
    Posted By: SteamyTeaSo what now? How do I tell which is my iButton reader or the CC serial cable, or the keyboard, or the mouse?


    Pull something out and see what disappears.

    I downloaded Ubunto 11 (something)


    Ubuntu BTW.

    ...and I coudl not find the terminal windows icon or other wise.


    Applications | Accessories | Terminal

    That's for Ubuntu 10.10. Sounds like just the sort of thing they'll have messed with in the more recent versions but it really should be something similar.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 2nd 2012 edited
     
    Shall try and put Ubuntu on the desktop tomorrow. That has a bit more go in it.

    Posted By: Ed DaviesPull something out and see what disappears.


    Managed to get which USB it was in (3) and a device number, so can track it that way.
    Also found the Wizard Wizard useful. Did see something about 'dependencies'. Are these like drivers/patches that need to be installed. Cant find my way back to the screen that told me about them though :confused:

    Edit
    Found it, seems they are like .dll files, is that right?
    •  
      CommentAuthorDamonHD
    • CommentTimeJan 2nd 2012
     
    The nearest equivalent of a Windows .dll on Linux is a .so (shared object) file.

    The runtime-loadable drivers (modules) on my system are .ko (kernel object?) files loaded with modprobe. (Hey, I have written kernel drivers a long long time ago, but not in Linux!)

    Rgds

    Damon
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 2nd 2012
     
    I wrote a programme to move a pointer about in assembly language for a Zilog. Seem to remember it had 158 op codes, one was 'rotate right' Was 1986. It never did find the shortest path to take mind.

    Still if nothing else I am finding my way around the desktop tonight :bigsmile:
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 2nd 2012
     
    Right, I have downloaded the Java based reader software, but not got a clue how to install it (think that is what compile means in Scandinavian Computer Speak).
    Shall have to wait till tomorrow now though, early start for me in morning.
    • CommentAuthorwookey
    • CommentTimeJan 2nd 2012
     
    He's using Puppy, which seems tobe some sort of very stripped down live distro.

    ST, puppy looks like an interesting way to dip your toe in, but you will probably find life more satisfactory after a while if you use a more popular distro which other people are familiar with. Ubuntu is the most obvious candidate.

    The main advantage you get is that software is almost always already packaged so you don't have to download it and compile it before you can use it. Neither OWFS nor digitemp are supplied with/packaged for puppy. Digtemp is available in both Debian and Ubuntu, and OWFS is packaged for the forthcoming releases of both.

    ST. I don't know why you are not getting descriptions from your lsusb output. The IDs are fixed though, so a dallas DS9490R# will always appear as ID: 04fa:2490 (04fa is Dallas, 2490 is the part). That'll be the same ID for the ibutton readers as for the 1-wire adaptor (only the connector and case shape is different).

    You can also get the same info from looking in /sys/bus/usb/devices/ which has an amazing maze of files containing all available subsystem info. It's mostly mysterious rather than helpful, but you'll find things like 'product' and 'manufacturer' in there.
    • CommentAuthorEd Davies
    • CommentTimeJan 3rd 2012 edited
     
    “Dependencies”

    Most Linux distributions have some sort of package manager. For Debian and its derivatives, like Ubuntu, it's apt with lowish level commands like apt-get install. For Red Hat flavoured distributions (Fedora, Yellow Dog, Puppy???) it's rpm. The details are different but the principles are similar.

    There are source code packages but most stuff you install on the more mature distributions is already compiled (so there are packages for different architectures like i386 or ARM). A package may contain more than one program and what you'd often think of as a single program can be distributed as multiple packages; e.g., it's not uncommon to have a command line or GUI program to do some function which is in one package but all the real work is done by a shared library which is in another package (thereby allowing other programs to directly call the library).

    Obviously, packages depend on each other - e.g., the main program in my previous example will depend on the associated library package. This is all handled for you by the package manager: when you ask to install a particular package it'll work out what other packages need to be installed, to whatever depth. It'll also check for version clashes; having a consistent set of versions of packages is one good reason for sticking, as far as possible, with the packages provided with the current version of your distribution.

    The trick is figuring out which package you need to install to get a particular command. Ubuntu has a nice feature; if you type a command at the command line and it's not installed it will give you a list of packages (there might be more than one) which provides the command:


    edavies@bill:~$ r
    The program 'r' is currently not installed. You can install it by typing:
    sudo apt-get install littler


    There's probably a package you can install to make plain Debian systems do this too. ;-)
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 3rd 2012 edited
     
    I have my old desktop booting up with a live CD, Ubuntu 11, when I come to install it to the new HD, what should I use, EXT4? and I think that I get a choice of using single partition or multiple ones, which is most suitable for something that will be connected to the WWW and hopefully be able to connect to other PCs/Network Storage on my local network?
    • CommentAuthorEd Davies
    • CommentTimeJan 3rd 2012
     
    Choice of filesystem is not really a big deal. It's probably best to go with the default. One consideration, though, is that ext4 is not as well supported under Windows and OS X (http://en.wikipedia.org/wiki/Ext4#Compatibility_with_Windows_and_Macintosh) so if you're dual booting or whatever ext4 might be a less good idea. However, when I did dual booting (Ubuntu and XP) I thought it safer to keep the two systems almost completely separate having just a small FAT partition shared between the two.

    Without going mad, there are good arguments for using a couple of partitions. Probably the simplest is to have a relatively small partition (couple of gigs) for the root with all of the operating system and stuff and a larger /home partition for all your stuff. That way, if things get really messed up and you have to reinstall from scratch all your files are left untouched. You'll also need a swap partition, of course.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 3rd 2012
     
    I went with the defaults in the end. Seem to have a problem with the network connection now, worked fine from the live boot disk, now installed it is refusing to connect (oddly had the exact same problem with the latest version of Puppy).
    So until I get that sorted I ma rather stuck, or shall go back to what I was doing yesterday on the laptop.
    Shall play for a while and then go into town.

    The terminal window seems to have to be 'searched' for, is it easy to make an Icon/Alias or whatever they call them on the Linux. Also cant see how to view the file system easily. All seems a bit different from previous versions :confused:
    • CommentAuthorEd Davies
    • CommentTimeJan 3rd 2012 edited
     
    “All seems a bit different from previous versions.”

    Yep, that's why I'm still on Ubuntu 10.10. I'm planning to get a netbook at some time in the not too distant future and will try 11.04 or 11.10 on that but for my main machine for now known is good.

    “...is it easy to make an Icon/Alias or whatever they call them on the Linux.”

    It's easy on 10.10. Right click on the desktop and select “Create Launcher...” or right click on the panel and select “Add to Panel...”.

    Unfortunately, the details will be different on 11.nn. Apart from anything else, <tt>gnome-terminal</tt> won't be there, I think, as they don't use the Gnome desktop manager (at least, not by default).

    “The terminal window seems to have to be 'searched' for...”

    I assume you found something like this:

    https://help.ubuntu.com/community/UsingTheTerminal#Starting_a_Terminal

    Note: “Keyboard Shortcut: Ctl + Alt + T”

    On 10.10 the default terminal window is small, hence the “--geometry 120x40” (dimensions in characters) in my shortcut. I think that geometry switch is a Gnome convention.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 3rd 2012
     
    I have abandoned 11.10 as I just cannot get it to connect to my router. Makes all the right moves, but then just keeps disconnecting.
    So now installing Puppy 5.2 to the HD of the Desktop as I think that will do all I need (it works well on the laptop booting from the disk). I shall play a bit later and get it set up to my liking and then see how I can read of the OW and the CC.
    Still got to find out how to find all the Java bits get installed.
    And sort out that horrible GRUB thingy to make it book from the HD. Seems that it only like it when it is installed to the MBR. Then I have to press a key to get it to boot.
    • CommentAuthorborpin
    • CommentTimeJan 3rd 2012
     
    Posted By: SteamyTeaI have abandoned 11.10 as I just cannot get it to connect to my router. Makes all the right moves, but then just keeps disconnecting.
    Were you connecting wirelessly? I have had loads of problesm with Win 7 & Ubuntu connecting wirelessly. The Realtek chip seems problematic esp if running in mixed mode on the router.
    •  
      CommentAuthordjh
    • CommentTimeJan 3rd 2012
     
    Posted By: Ed DaviesProbably the simplest is to have a relatively small partition (couple of gigs) for the root with all of the operating system and stuff and a larger/homepartition for all your stuff.

    I agree that having separate partitions for root and /home is sensible. But a full-blown linux system nowadays is happier with ten or twenty GB rather than two! It all depends how many applications you finish up installing and whether you keep data in e.g. mysql at the default location etc etc. It can also be useful to keep a spare 10/20 GB partition to load an alternate/upgraded version without risking destroying your working version.

    Posted By: wookeyI don't know why you are not getting descriptions from your lsusb output.

    lsusb uses a file to look up device details. Possibly /usr/share/usb.ids Perhaps that is missing or abbreviated on Puppy?
    • CommentAuthorEd Davies
    • CommentTimeJan 3rd 2012
     
    Posted By: djh: “I agree that having separate partitions for root and /home is sensible. But a full-blown linux system nowadays is happier with ten or twenty GB rather than two!”

    Yes, “a couple”, taken literally, would be a bit optimistic. My '/' partition with Ubuntu and quite a lot else is just under 7 GiB. Ten or twenty would be sensible.

    (On the other hand, my headless Debian Pogoplug only has 569 Mi.)
  1.  
    FWIW here are the notes for future reference that I made after installing OWFS on a debian system a few years ago. I have since used them to install on another identical system, and a couple of other people have also used them.

    N.B.
    a) I am not a Linux expert. This is just the accumulation of things I gathered from various sources and that worked for me. If any of the real experts would care to correct or improve on these notes then I'd be delighted

    b) The download part of the notes refers to a specifc OWFS release. Please replace that with the relevant current version (e.g. by consulting the OWFS page on sourceforge.net).

    c) I was working on a 'headless' computer, so I did all this via SSH, using PuTTY from a Windows box, you might have direct access. So far as I'm aware that should make no difference.

    Here goes. Every thing preceeded by ## is a comment. Most of the rest is stuff you'll need to type on the command line. There are a few exceptions to this. I hope they are reasonably obvious...

    ## Log in as root. ##

    ## First collect some tools, etc. ##

    apt-get install autoconf automake

    apt-get install libtool

    apt-get install fuse-utils libfuse-dev

    apt-get install swig

    ## Now collect and build owfs (1-Wire File System) ##

    cd /usr/local

    wget http://downloads.sourceforge.net/owfs/owfs-2.7p14.tar.gz

    tar -xvvf owfs-2.7p14.tar.gz

    mv owfs-2.7p14 owfs

    cd /usr/local/owfs

    ./bootstrap

    ./configure

    ##
    ## N.B. The next step (i.e. make) can take a long time...
    ##

    make

    make install

    ## Now do a test ##

    ## For a DS9490 USB adaptor that would be:

    perl -MOW -e "OW::init('u'); printf OW::get('');"

    ## For a DS9097U or DS9097 serial adaptor connected to a serial port it would be:

    perl -MOW -e "OW::init('/dev/ttyS0'); printf OW::get('');"

    ## If you have are using a serial adaptor via a USB to serial, then you may need extra steps to reach that?

    ## N.B. replace 0 in above line with relevant serial port number if 0 isn't appropriate.

    ## (For a USB adaptor) Expect something like :

    DEFAULT: Opened USB DS9490 adapter at 002/002.

    ## Now create a data directory where 1-Wire filesystem will be mounted. e.g. ##

    mkdir /home/1wire
    mkdir /home/1wire/mnt

    ## Now manually install fuse ##

    modprobe fuse

    ## Now mount the drive using either ##

    /opt/owfs/bin/owfs /dev/ttyS0 /home/1wire/mnt

    ## or ##

    /opt/owfs/bin/owfs u /home/1wire/mnt

    ## or whatever as appropriate ##

    ## With that you should be able to 'see' the 1-wire devices using

    ls /home/1wire/mnt

    ## Running that here on a test system produced:

    10.A78B94010800 1F.72D303000000 26.D55BB6000000 settings system
    1D.04010E000000 1F.F5D303000000 81.FD4927000000 simultaneous uncached
    1D.5CEB09000000 26.3F59B6000000 alarm statistics
    1F.63D603000000 26.C3A5BC000000 bus.0 structure

    ## For regular use fuse needs to be loaded automatically during reboot, so ##
    ## add a line to /etc/modules using the vi editor

    cd /etc
    vi modules

    ## Then type EXACTLY the following keys:

    G (end of file)
    o (open new line and go into insert mode)
    fuse
    [ESC][ESC]
    :wq[ENTER]

    ## N.B. in the above
    G "means go to end of file"
    o means "open new line and go into insert mode"
    :wq means "write file and quit"

    ## or

    cd /etc
    echo fuse >> modules

    ## OWFS also needs to be mounted automatically during reboot, so ##
    ## create a owfs.init file from the text at the end of these notes, ##
    ## edit the ARGS line in the supplied owfs.init if necessary (e.g. /dev/ttyS0 ##
    ## in place of u if you have a serial adaptor on that port) then copy it ##
    ## to /etc/init.d/owfs, e.g.

    cp /srv/www/myweb/owfs.init /etc/init.d/owfs

    chmod 755 /etc/init.d/owfs

    update-rc.d owfs defaults 99


    # Next bit is the owfs.init mention above
    #! /bin/sh
    # owfs.init

    PATH=/opt/owfs/bin:/bin:/usr/bin:/sbin:/usr/sbin
    DAEMON=/opt/owfs/bin/owfs
    PIDFILE=/var/run/owfs.pid

    # Arguments to owfs
    #
    MOUNT_POINT="/home/1wire/mnt"
    ARGS="u $MOUNT_POINT"

    test -x $DAEMON || exit 0

    case "$1" in
    start)
    echo -n "Starting owfs"
    start-stop-daemon --start --quiet --pidfile $PIDFILE \
    --exec $DAEMON --$ARGS
    echo "."
    ;;
    stop)
    echo -n "Stopping owfs"
    umount $MOUNT_POINT
    echo "."
    ;;
    restart)
    sh $0 stop
    sh $0 start
    ;;
    *)
    echo "Usage: /etc/init.d/owfs {start|stop|restart}"
    exit 1
    ;;
    esac

    exit 0
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 3rd 2012
     
    Bloody Hell

    Going to have to plug a printer in now :bigsmile:

    Thanks, shall look at it after work.
    •  
      CommentAuthorDamonHD
    • CommentTimeJan 3rd 2012
     
    At a glance that looks more or less like my owfs install experience...

    Rgds

    Damon
   
The Ecobuilding Buzz
Site Map    |   Home    |   View Cart    |   Pressroom   |   Business   |   Links   
Logout    

© Green Building Press