This is information that I've been able to gather on interfacing the Cm15-a to a linux system. I've only tested this specific code using Fedora Linux (FC10 Kernel).
The production code is running on Fedora Core 10, with libusb-1.0, and the 0.1 compatibility layer. (Jan 2009). Eariler versions of libusb may work, as well as other verions of Linux. You can get libusb here.
To provide the USB interface, I've used libusb (starting with version 0.1.8).
Basically, I use 4 calls for the sample application - Acquire the interface, release the interface, read data from the interface, and write data to the interface. The Read and Write use "bulk" mode.
To make use of the libusb interface, you'll need the files,.c's and .h's which provide the four calls I've mentioned. Build and link the demo program befor attempting your own application!
- X10 saying it's ok to post this stuff!
- The following was posted by "X10 Pro" on the X10 Activehome Pro forums, giving the Ok to post the stuff on this website. I use "Coder Since CP290" as my handle on those forums.
- X10 Pro 11/30/2004 04:21 PM
- We aren't able to release the full interface spec yet, but we will be providing more samples in the SDK that don't use a Microsoft dev environment. We know that it's important to you guys to be able to use whatever tools and platform you want to make our stuff work.
- Coder since CP290: I don't see a problem with your linking to your project. It just expands our world a little.
- App requires libusb.
- Not working in demo:
- Extended Command/responses
- Status requests to X10 Pro 2-way modules
- Display a text message when using ahcmd queryplc (not Linux related, but useful)
- Activehome Pro provides a simple utility to send PLC and RF commands, and to query PLC status. When querying status, the status is just a return value from the command. Here's a simple .BAT file which will display a text message based on the status.
- This could be a file like "stat.bat", and could be modified to allow passing the module address as a command line parameter. in this sample, c5 is hard coded.
- @echo off
- ahcmd queryplc c5 on
- IF ERRORLEVEL 1 goto itson
- IF ERRORLEVEL 0 goto itsoff
- echo Unknown Status!
- goto end
- echo Off!
- goto end
- echo On!
Hosted by Eclipse Home Automation.
Content (c) 2002-2018, All rights reserved.
This Site Has Had
hits since 07/21/2006