close

Eset Endpoint Security Mazika2day

HowTo: Install OWFS onto Ubuntu 10.04 Server
OWFS, the One Wire Filing System for Linux is a very useful interface for communicating with the Maxim 1-Wire range of devices. Most of the commentaries on how to install OWFS refer to much older versions of Ubuntu than 10.04, this article is an upgraded version to cover the newer versions of the packages concerned. This article covers the installation of OWFS 2.8p2 with Python 2.4 onto Ubuntu Server 10.04 (patched to 05 September 2010).  Later versions will probably require modifications to these instructions.  At the time of writing, these were the latest versions (except for Python). The good news, is that OWFS depends heavily on FUSE (Filesystem in USErspace), which is now included in the later Ubuntu Kernels as standard, as so does not require installation. Assuming you have plain install of a Ubuntu 10.04 LAMP server, and you are logged on with root privileges, the following methods would apply: Patching the base system First of all we need to make sure the system is fullypatched: # apt-get update # apt-get upgrade When prompted, answer ‘y’ to install the updates. Adding additional repositories Because the OWFS depends on Python 2.4 and this is not the version installed with Ubuntu 10.04 (it installs Python 2.6), we must make an older version of Python available to the APT system. To do this, we need to add the following lines to the start of the repository list: /etc/apt/sources.list: deb karmic main restricted universe multiverse deb-src karmic main restricted universe multiverse deb karmic-updates main restricted universe multiverse deb-src karmic-updates main restricted universe multiverse deb karmic-backports main restricted universe multiverse deb-src karmic-backports main restricted universe multiverse deb karmic-security main restricted universe multiverse deb-src karmic-security main restricted universe multiverse Then you need to refresh the lists of packages: # apt-get update This may take while because we have now forced the system to useupdates from both Karmic and Lucid. Install the dependency packages We now can install the OWFS dependency packages with: # apt-get install \ automake \ autoconf \ autotools-dev \ gcc \ g++ \ libtool \ libusb-dev \ fuse-utils \ libfuse-dev \ swig \ python2.4-dev=2.4.6-1ubuntu3.2.9.10.1 \ tcl8.4-dev \ php5-dev Note the ‘=’ sign for the Python install.  This instructs the system to install an old version.  Install as prompted to install this list and any dependency packages not already on the system. Install OWFS Now the dependencies have been installed, we can download, compile and install OWFS itself. First, move the a suitable directory to do all this work in: # cd /usr/src Now we can download the source files from the OWFS web site: # wget You will need to modify the version numbers to match the version you require.  This is the version at the time of writing.  It should not take long to download, and then we can unpack the archive with: # tar zxpf owfs-2.8p2.tar.gz And move intothis new directory to configure and compile: # cd owfs-2.8p2 And configure with: # ./configure This will take a few minutes, which if there are no errors to this point, you can then compile with: # make Again this takes a while to complete.  But once completed without errors, you can install with: # make install The final stages With this version of Ubuntu (10.04), FUSE is already installed an operating.  So there is nothing to do here. Next we need to make a suitable dummy directory onto which the OWFS will be mounted for access.  Create a suitable location with: # mkdir /var/1-Wire Next we need to locate our 1-Wire adapter.  This varies depending on your adapter.  Two types are supported, either a USB device which looks like a serial port and a device that connects to an existing serial port. If yours connects via the serial port, just make a note of which serial port you have plugged it into. For the USB types, we need to identify the port allocated to the adapter.  If you havealready connected the device, disconnect it now and wait about 30seconds. Plug in the USB adapter and wait a few seconds for the device to be registered.  First check the device is present as a USB device with: # lsusb This should provide a list of current USB devices, something like: Bus 002 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC 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 My device (a LinkUSB) is located on Bus 2 @ device 2 (the first item in the list).  Your device will appear differently. Next we need to work out where this device has been mounted.  Use the following command: # dmesg This will return the message log for devices.   This command will display the whole log.  If your USB device was recently connected, then it should be at the end of the log.  For my LinkUSB device, the result at the end of the log was this: usb 2-1: new full speedUSB device using ohci_hcd and address 2 usb 2-1: configuration #1 chosen from 1 choice usbcore: registered new interface driver usbserial USB Serial support registered for generic usbcore: registered new interface driver usbserial_generic usbserial: USB Serial Driver core USB Serial support registered for FTDI USB Serial Device ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected usb 2-1: Detected FT232RL usb 2-1: Number of endpoints 2 usb 2-1: Endpoint 1 MaxPacketSize 64 usb 2-1: Endpoint 2 MaxPacketSize 64 usb 2-1: Setting MaxPacketSize 64 usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0 usbcore: registered new interface driver ftdi_sio ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver From the third line up, you can that the device was installed as ttyUSB0.  This name will be used by the OWFS to communicate with the 1-Wire bus.  Yours will probably be different and you need to make a note of the name in your context. Starting the OWFS Note: Connect up adevice to your 1-Wire bus before starting the OWFS. Now we know where our adapter is located, we just need to start the OWFS with the correct parameters: # /opt/owfs/bin/owfs /dev/ttyUSB0 /var/1-Wire Make sure you change the device name of your adapter discovered above after the /dev/ part of the command line.  If all is well, no errors should be displayed and it is now operational, ready to test. Testing the OWFS Now that the software should be running, you just need to take a look at the 1-Wire mount point: # ls -l /var/1-Wire And you should get something like: total 0 drwxrwxrwx 1 root root  8 2010-08-12 17:51 10.8BBBF5010800 drwxr-xr-x 1 root root  8 2010-08-12 17:49 alarm drwxr-xr-x 1 root root  8 2010-08-12 17:49 bus.0 drwxr-xr-x 1 root root  8 2010-08-12 17:49 settings drwxrwxrwx 1 root root  8 2010-08-12 17:51 simultaneous drwxr-xr-x 1 root root  8 2010-08-12 17:49 statistics drwxr-xr-x 1 root root 30 2010-08-12 17:49 structure drwxr-xr-x 1 root root  8 2010-08-12 17:49 systemdrwxr-xr-x 1 root root  8 2010-08-12 17:49 uncached In this example above, I have one DS18S20 temperature sensor attached.  Temperature sensors are prefixed with 10., So my sensor ID was 10.8BBBF5010800.  Your device will have a different number or ID. As I know it is a temperature sensor, I can display the temperature with the following: # cat /var/1-Wire/10.8BBBF5010800/temperature And at the time, I got the following result: 21.625 Which made the temperature at the time of 21.625 degree Celsius.  And ‘hey presto’, it is all working! And there you have it. Enjoy. deb karmic main restricted universe multiverse deb-src karmic main restricted universe multiverse deb karmic-updates main restricted universe multiverse deb-src karmic-updates main restricted universe multiverse deb karmic-backports main restricted universe multiverse deb-src karmic-backports main restricted universe multiverse deb karmic-security main restricted universe multivers deb karmic mainrestricted universe multiverse deb-src karmic main restricted universe multiverse deb karmic-updates main restricted universe multiverse deb-src karmic-updates main restricted universe multiverse deb karmic-backports main restricted universe multiverse deb-src karmic-backports main restricted universe multiverse deb karmic-security main restricted universe multiverse deb-src karmic-security main restricted universe multiverse e deb-src karmic-security main restricted universe multiverse VN:F [1.9.22_1171] please wait... Rating: 4.5/ 5 (4 votes cast) HowTo: Install OWFS onto Ubuntu 10.04 Server, 4.5 out of 5 based on 4 ratings Related posts: Introduction This article describes how to install a basic LAMP... While planing my move to Orkney, I need to move... Now that you have the basics of your first Virtual... This short little HowTo details the process required to install... I recently had the need to get a USB to...
August 13th, 2010 | Tags: , , | Category: , , ,

endpoint security default password     endpoint security blog

TAGS

CATEGORIES