OWFS Design
OWFS Features
OWFS Software
Examples & Usage
|
1-Wire adapter
ftdi_sio kernel patch for ECLO Adapters
This will depend on the ftdi_sio version you have.
Please check if the ECLO PID and VID are present in the driver
source
files.
grep -r -I "ECLO" /usr/src/linux/drivers/*
If the entries are there, you are home free.
If not, we'll need to patch the
driver source, compile the module, and reload it.
Find the correct directory:
cd /usr/src/linux/drivers/usb/serial
and modify two files: ftdi_sio.h and ftdo_sio.c
----------
ftdi_sio.h
----------
/*
* Eclo COM to 1-Wire USB adapter
*/
#define ECLO_1WIRE_USB_ADAPTER_PID 0xea90 /* Eclo COM to 1-Wire USB
adapter */
#define ECLO_VID 0x0403 /* Eclo VID, same as FTDI VID */
----------
ftdi_sio.c
----------
static struct usb_device_id id_table_FT232BM [] = {
...
{ USB_DEVICE_VER(ECLO_VID,
ECLO_1WIRE_USB_ADAPTER_PID, 0x400, 0xffff) },
...
{ } /* Terminating entry */
};
static struct usb_device_id id_table_combined [] = {
...
{ USB_DEVICE(ECLO_VID, ECLO_1WIRE_USB_ADAPTER_PID) },
...
{ } /* Terminating entry */
};
Basically, we are adding entries to the tables of recognized usb-serial
devices for ECLO's product and vendor ID. The underlying code is
unchanged.
Rebuild the driver:
cd /usr/local/src
make modules
make modules_install
then remove the currently loaded module
rmmod ftdi_sio
and relode the new module
modprobe ftdi_sio
Plug in your adapter and look at the system log
tail /var/log/messages
or
dmesg
for the device assignment.
On my machine I see an entry like:
Jun 11 10:40:10 k2 kernel: usb 2-2.1: new full speed USB device
using address 13
Jun 11 10:40:10 k2 kernel: usb 2-2.1: Product: Eclo COM to 1-Wire USB
adapter
Jun 11 10:40:10 k2 kernel: usb 2-2.1: Manufacturer: Eclo
Jun 11 10:40:10 k2 kernel: usb 2-2.1: SerialNumber: 04000220
Jun 11 10:40:10 k2 kernel: usbserial_generic 2-2.1:1.0: FTDI FT232BM
Compatible converter detected
Jun 11 10:40:10 k2 kernel: usb 2-2.1: FTDI FT232BM Compatible converter
now attached to ttyUSB1
So I can run OWFS with a command like:
/opt/owfs/bin/owfs /dev/ttyUSB1 /mnt/1wire
You may find useful the utility USBView for testing out USB and the
drivers. Please download it at: http://www.kroah.com/linux-usb/
|