Jan

18

LinkUSB(i) and 1-Wire setup

13 years ago, mid-January | 2 Comments

I’ve just configured my monitoring machine to use a LinkUSBi 1-Wire interface and it’s a rather simple process. First of all we’ll setup One Wire File System, or OWFS LinkUSB(i)for short, then we’ll add some udev rules and finally plug in a device and get some readings. Since we need to build OWFS we’re going to need a new libraries and files installed, I’m making the assumption that you already have automake, autoconf, autotools-dev, gcc, g++ installed so you can go ahead and install the libraries we need.

apt-get install libtool libusb-dev fuse-utils libfuse-dev swig python2.6-dev tcl8.4-dev php5-dev

You don’t actually have to have Python, Tcl or php5 installed if you don’t want them they add to the interfaces you can use with OWFS – unless you specifically don’t want them you may as well include them. Once the installs above have completed you’ll need to get a copy of OWFS – be sure to download the latest version of it.

Update : I’ve rolled back to using 2.8p4 since 2.8p5 seems to have some problems with owserver (owfs still works fine).

Once you’ve downloaded you’ll see the file is called something like owfs-2.8p5.tar.gz – this file name is made up of owfs-[version of owfs].tar.gz In my case I have version 2.8p5. Your version may differ, don’t worry about that (unless it’s older!). Now extract the tarball with

tar -zxvf owfs-2.8p5.tar.gz

replacing the file name with whichever version you downloaded. This will extract a lot of files and place them in a directory with the same name as the file you downloaded, minus the ‘.tar.gz’. Move to that directory with

cd owfs-2.8p5

now we need to run the configure and make scripts. First configure, if this fails make sure you have all the dependencies required.

./configure

this will spit out reams of text which really only matters if something goes wrong. The last few lines should be something like this

Current configuration:

Deployment location: /opt/owfs

Compile-time options:
Caching is enabled
USB is enabled
I2C is enabled
HA7Net is enabled
W1 is enabled
Multithreading is enabled
Parallel port DS1410E is enabled
TAI8570 barometer is enabled
Thermocouple is enabled
Zeroconf/Bonjour is enabled
Debug-output is enabled
Profiling is DISABLED
Tracing memory allocation is DISABLED
1wire bus traffic reports is DISABLED

Module configuration:
owlib is enabled
owshell is enabled
owfs is enabled
owhttpd is enabled
owftpd is enabled
owserver is enabled
ownet is enabled
ownetlib is enabled
owtap is enabled
owmon is enabled
owcapi is enabled
swig is enabled
owperl is enabled
owphp is enabled
owpython is DISABLED
owtcl is enabled

Now we build OWFS using make

make

After some churning, spewing output, cpu usage and warning messages (ignore them), which may all take 10 minutes or more depending on your cpu and memory, you should get your prompt back. Finally install owfs – do this as root.

make install

Since we need to mount the OWFS somewhere we create a directory

mkdir /var/lib/1wire

Ok, so now we come to the hardware side of things – I got my LinkUSBi from HomeChip – the ‘i’ variant has it’s own identity which may or may not be useful to you. If I’m honest I accidentally picked the ‘i’ version and could have easily saved 80 pence and gone for the non-‘i’ version without trouble – Quick Note, as I write this Quinten has had some issues that need investigation, he has the non-‘i’ variant – for now I’d stick with the ‘i’ variant that we know works. I’ll update once I get more information about the issue. Turns out that version 2.8p4 of OWFS worked with the LinkUSB for Quinten. The LinkUSB or LinkUSBi is the interface to 1-Wire devices, so now’s the time to plug it in. Be aware that if you have other FTDI devices you might want to set up some udev rules. This is what I have in a file called /etc/udev/rules.d/60-usb-serial.rules


# /etc/udev/rules.d/60-usb-serial.rules
# Determine XBEE, Current Cost and 1wire USB ports

KERNEL=="ttyUSB*", \
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A600eD0C", \
SYMLINK+="1wire"

KERNEL=="ttyUSB*", \
ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", \
SYMLINK+="currentcost"

KERNEL=="ttyUSB*", \
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \
SYMLINK+="xbee"

Since I have 3 USB serial devices, a currentcost unit, some Xbee based wireless 1-wire devices I made and the LinkUSBi, two of which are FTDI I need to identify each so use the ATTRS{serial} to uniquely identify the LinkUSBi via its serial number. You can glean the serial number by using

lsusb -vv

and look at the output for the serial number of device you’re interested it. Once our LinkUSBi is connected and detected we can mount OWFS with

/opt/owfs/bin/owfs -d /dev/1wire -m /var/lib/1wire

Note that I use -d/dev/1wire because my udev rules create a symlink. If you don’t create the symlink then your device will be something like /dev/ttyUSBx – where x = a number. Now we can look at any attached devices with

# ls /var/lib/1wire/
01.BA0E0E140000 28.1842A1020000 alarm bus.0 settings simultaneous statistics structure system uncached

The 01.XXXXXX device is the LinkUSBi and the 20.XXXXX device is a DS18S20 temperature sensor. To read the output of the temperature sensor we simply do

cat /var/lib/1wire/28.1842A1020000/temperature
16.0625

As you can see the temperature is a rather chilly 16.0625 degrees Celsius. Stuart Poulton has some 1-Wire kits available to buy for creating some domestic environment friendly temperature sensors and Quinten has some good pictures of them. Kevin has also got some newer pictures up – thanks for the headsup Kevin.



[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tagged with:
January 18, 2011 20:47

Jun

2

Pictures from Computex 2009

15 years ago, at the start of June | Leave a Comment

Two of my colleagues are in Taipei again attending Computex 2009 this week and the news is that there appear to be a whole lot of netbooks on view. As ever Nick is uploading pictures to Picasa so you can get some idea of what’s about. As the days progress Nick will update the images, but it is a slow, slow process. Keep your eyes peeled for the rest of the week – and make sure you’re not looking at last years’ pictures by mistake ;). Some of you might notice that some things like the Asus Skype phone have been around for a little while. In fact it has been around since September of last year.

Update 1: More pictures are available.

Update 2: Pictures from day 3 are available now.

Update 3: Pictures from day 4 are available now. There are also some shots of Taipei



[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tagged with:
June 2, 2009 10:51

Jun

17

My Acer ‘Macbook’

16 years ago, mid-June | 2 Comments

Over the weekend I decided to take a little look at one of the latest incarnations of OSX to see what all the fuss was about. One of the real problems with OSX is that under normal circumstances you have to shell out at least 399 GBP before you even get to try it out. If you don’t like it or can’t get on with it you’re out nearly 400 big ones and who wants to risk that?

There are of course ways around this and I took the plunge with a Kalyway 10.5.2 iso. My Macbook Pro (15 Inch)laptop is an Acer Aspire 3692 WLMI which originally came with an 80GB hard drive which I have already upgraded to a 160GB drive. Since I was only going to be testing this out I wasn’t about to erase my current linux install. I dusted off the the old 80GB drive and swapped it out with the 160GB drive and kicked off the install. I actually did the install a couple of times to get used to how Mac people do stuff.
Read more…



Tagged with:
June 17, 2008 20:06

Apr

25

The theme of the day…

16 years ago, at the end of April | 6 Comments

So, a couple more changes and updates to my images. First of all I’ve taken out the Oh-puzzles because they don’t work due to this bug – once that’s sorted they’ll go back in.theme changer There’s a new little script too which allows you to switch themes. I’ve removed some of the themes that are installed by default essentially because the panel in the top right dies and never returns if you try to use them. So at the moment you get to pick between Moko, ScaredyCat and the original Openmoko theme, openmoko-standard-2. By default the ScaredyCat theme is active. So, no excuses now. Get designing some killer themes.

The next change is due to a request from Taki asking for tangogps to be preconfigured to use the sd card for map and track storage. So now, by default, maps on my builds are stored in:

/media/card/tangogps/Maps/OSM/

and track logs are stored in

/media/card/tangogps/logs/

This should be a little more useful and wont fill up your flash with tiles.



»crosslinked«

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tagged with:
April 25, 2008 13:25

Apr

22

Just a little easier…

16 years ago, at the end of April | 6 Comments

I’ve made quite a few changes and a couple of additions to my images of late. You may have noticed the new boot logo, the new startup sound and the new theme now there are a couple more goodies. First of all the two new applications, well one application and one script. The Bluetooth Keyboard application (really the script) is a two new applicationssimple shell script that hunts for bluetooth keyboards and connects to the first one it finds. If bluetooth is off it turns it on. If I can get zenity to compile properly this will be a much better script. The next item is the Twitter client, GtkTwitter, It’s very basic but it works pretty well. I had to make a couple of modifications to the icons so you could actually poke them with your fingers.

Next up we have a little script that starts on boot, checks to see if you have the gllin ipk ( gllin_1.0+r350-r0_fic-gta01.ipk ) in the root of your sd card. If it’s there it will automatically get installed for you – Very useful post-flash. The script will also replace the standard gllin script with the one from the tangogps site. Why? Well, because tangogps and gpsd are in the image too! Shortly, I’m hoping to provide a pre-downloaded series of tiles for download too. The good news is now you can have gps and a gps application ready for you immediately. Oh one last thing. If you create a directory on your sd card called local you can create bin and/or sbin directories and have applications run straight from there – all those little utils you need to install again after each flash now have a permanent home.

All of these are part of the image, you do not need to install anything extra, unless you want to 😀

Update: The bluetooth keyboard script is much more wizzy now that I’ve added Zenity to the image and use that so you can now pick the keyboard you want to connect to from the list of devices. I’ve also added some notify calls so that you can see what is going on during the script.



[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tagged with:
April 22, 2008 20:36

keep looking »

Current Electricity Use (15min)


iPhone/Webkit RSS Reader

Links


Tags

1-Wire android api Apple arduino currentcost DDAR development DVD FIC freerunner G1 google Google Phone gphone gprs GPS hardware image image builds inspiration iphone jailbreak kiosk linux Mac monitoring Music neo 1973 Nokia openmoko opensource OSX Pachube personal qtopia rhubarb rikki Rio slimp3 slimserver software tracking Trolltech u-boot


Twitpic


Graphy Stuff






Nasty Spam Monkeys