Home Automation Thread (X-10, Insteon, ...)

Questions that don't fit in any category below may go here
Forum rules
Please note the disclaimer before modifying your Synology Product.

Re: Home Automation Thread (X-10, Insteon, ...)

Postby pomprocker » Mon Oct 04, 2010 5:23 pm

I stopped using my Synology NAS as a home automation server. This is due to the fact that they don't include the usbserial or ftdi_sio modules in their kernel. Every time new firmware comes out it would break this due to a newer kernel, and would have to wait for synology to release their GPL source and toolchain. Also my NAS contains my families files, so I don't really want to put that data at risk. From now on I am no longer modding my DS209 so that I may receive the best support possible from Synology.

If anyone is interested, I am now using a Sheevaplug running Debian Squeeze off an 8GB Class 10 Transcend SDHC card for home automation purposes.
DS209
DSM4.2

http://pomprocker.blogspot.com
Nerd Stuff - Programming, Electronics, Mechanics
User avatar
pomprocker
Knowledgeable
Knowledgeable
 
Posts: 389
Joined: Tue Jun 02, 2009 5:28 pm
Location: Mission Viejo, CA

Re: Home Automation Thread (X-10, Insteon, ...)

Postby chum » Tue Oct 05, 2010 12:52 am

Can you tell us how you went with setting up home automation using the sheeva plug. Did you look at the guruplug?
"The NASman - Storage for your digital future"
http://www.thenasman.com
Synology Model: DS1511+, CS407e
Firmware: 1358, 1285
HDDs: 4 x Samsung HD204UI 2TB
HDDs: 4 x Samsung HD501LJ 500GB
DMAs: 1 x XBMC,1xWDTV Live
User avatar
chum
Knowledgeable
Knowledgeable
 
Posts: 350
Joined: Tue Jun 05, 2007 9:16 am
Location: Perth, Western Australia

Re: Home Automation Thread (X-10, Insteon, ...)

Postby pomprocker » Tue Oct 05, 2010 5:03 pm

I followed the methods of NewIT. They list out the u-boot environment variables for multi booting either off the NAND flash or the SDHC card. The SDHC card seems to be the way to go here. From there I bought the NewIT recommended brand of SDHC card and downloaded their image and used the 'dd' command to put the image on the SDHC card. From there I inserted the card, and rebooted the sheevaplug. Once I was up on the SDHC card filesystem, I ran the usual apt-get update, upgrade, dist-upgrade, autoremove, clean, etc....

Then I did 'apt-get install build-essential' and 'apt-get install wget' then I downloaded heyu from the source and compiled it. Copied over my heyu config files and that was that.

I also removed the apache2 that came with the dist and installed lighttpd to run the heyu php frontend; domus.Link


Still trying to perfect the ALSA setup that I am using for Festival voices as it is a bit slow right now...might stick with Flite.

Setup SSMTP for transferring log mail to my smtp provider


Also, if you're interested in Misterhouse, there are instructions for setting up a 'Misterplug' just google...
DS209
DSM4.2

http://pomprocker.blogspot.com
Nerd Stuff - Programming, Electronics, Mechanics
User avatar
pomprocker
Knowledgeable
Knowledgeable
 
Posts: 389
Joined: Tue Jun 02, 2009 5:28 pm
Location: Mission Viejo, CA

Re: Home Automation Thread (X-10, Insteon, ...)

Postby birger » Wed Oct 06, 2010 3:02 pm

@pomprocker: I just bought some X10 stuff to try to get a setup like yours. I have cm11a. If I understand your posts correctly, I cannot simply use a serial/usb converter to make the cm11a communicate with my DS107+?
Do I need to build a special driver myself? Could you explain to me a little bit about the steps involved?
birger
I'm New!
I'm New!
 
Posts: 1
Joined: Wed Oct 06, 2010 2:58 pm

Re: Home Automation Thread (X-10, Insteon, ...)

Postby pomprocker » Wed Oct 06, 2010 4:56 pm

read this whole thread, check my blog, and download the 3rd party document from Synology. The goal is to compile some loadable modules usbserial.ko and ftdi_sio.ko that you load into your kernel on your NAS. Make sure you get an FTDI based serial converter not Keyspan or Prolific.
DS209
DSM4.2

http://pomprocker.blogspot.com
Nerd Stuff - Programming, Electronics, Mechanics
User avatar
pomprocker
Knowledgeable
Knowledgeable
 
Posts: 389
Joined: Tue Jun 02, 2009 5:28 pm
Location: Mission Viejo, CA

Re: Home Automation Thread (X-10, Insteon, ...)

Postby redhouse » Sun Jan 23, 2011 7:09 pm

After reading Pomprocker's excellent posts and several other publications on the web I decided to order a cheap USB Serial converter from http://www.dealextreme.com. The chip used in the converter was advertised as a pl2303 however after receiving the actual item it appeared that they changed it to the ch341 Winchiphead chip. As already mentioned by Pomprocker, Synology doesn't provide USB serial kernel drivers so you need to compile your own drivers. For those who would like to use their Synology Diskstation to control their X-10 equipment using a CM11A, I thought it would be useful to combine the information already published by Pomprocker with my own steps and experience to create a working system.

I used the following procedure to compile kernel modules for a USB serial converter based on the CH341 chipset. The serial converter is to be used on a Synology DS110j with kernel source Linux-2.6.32 and firmware version 3.0.

First create an Operation Environment for compilation, e.g. virtual machine (VirtualBox) Ubuntu 10.10 Desktop.

After the installation of Ubuntu check in Synaptic Package Manager if the following packages are installed:

libncurses5 libncurses5-dev

Open a browser and download the latest Synology Tool Chain for your platform e.g. gcc421_glibc25_88f628x.tgz for the DS209, DS110j at http://sourceforge.net/projects/dsgpl/files/DSM 3.0 Tool Chains/

Next, download the correct Synology NAS GPL Source for your platform e.g. 1337Branch > synogpl-1337b-6281.tbz for the DS209, DS110j at http://sourceforge.net/projects/dsgpl/files/Synology NAS GPL Source/

Unpack the GPL to your preferred directory e.g. /home/<userdir>:

# tar xvf synogpl-1337b-6281.tbz

Unpack the toolchain package as follows to /usr/local

# tar zxvf gcc421_glibc25_88f628x.tgz -C /usr/local

Edit the Makefile and change the CROSS_COMPILE variable:

# vi /home/<userdir>/source/linux-2.6.32/Makefile
CROSS_COMPILE = /usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-

Setup and loading the kernel config GUI:

# cd /home/<userdir>/source/linux-2.6.32/synoconfigs
# cp 88f6281 ../.config
# make ARCH=arm menuconfig

To compile a module for a ch341 serial converter, lookup and highlight the feature and then press ‘M’

Device Drivers ---> USB support ---> USB Serial Converter support ---> USB Winchiphead ch341..
(press M)

Exit the GUI and start compiling the kernel modules:

# make ARCH=arm modules

The compiled usbserial.ko and ch341.ko drivers can now be found in /home/<userdir>/source/linux-2.6.32/drivers/usb/serial/

The next step is to load the compiled modules into the kernel of the Synology Diskstation, create the devices and make the configuration persistent after a reboot.

Before inserting the USB serial converter, create a shared folder on volume1 (the default Synology volume) e.g. setup. Next, create a folder called “drivers” and transfer or upload the earlier created usbserial.ko and ch341.ko files to this new folder on the DS110j. Use a terminal application, such as PuTTY, to login as root to the DiskStation and load the modules into the kernel as follows:

insmod /volume1/setup/drivers/usbserial.ko
insmod /volume1/setup/drivers/ch341.ko

and create the following devices:

mknod /dev/usb/ttyUSB0 c 188 0
mknod /dev/usb/ttyUSB1 c 188 1

Now plug-in your USB serial converter and run 'dmesg' from the command line to check if everything works. You should see something like this:

[ 25.750000] usb 1-1.2: new full speed USB device using orion-ehci and address 3
[ 25.870000] usb 1-1.2: configuration #1 chosen from 1 choice
[ 25.990000] Got empty serial number. Generate serial number from product.
[ 37.240000] NET: Registered protocol family 5
[ 41.390000] findhostd uses obsolete (PF_INET,SOCK_PACKET)
[ 3747.350000] usbcore: registered new interface driver usbserial
[ 3747.350000] USB Serial support registered for generic
[ 3747.400000] usbcore: registered new interface driver usbserial_generic
[ 3747.400000] usbserial: USB Serial Driver core
[ 3765.600000] USB Serial support registered for ch341-uart
[ 3765.600000] ch341 1-1.2:1.0: ch341-uart converter detected
[ 3765.630000] usb 1-1.2: ch341-uart converter now attached to ttyUSB0
[ 3765.670000] usbcore: registered new interface driver ch341

To make the modules persistent over a reboot, add the following lines to /etc/rc.local:

insmod /volume1/setup/drivers/usbserial.ko
insmod /volume1/setup/drivers/ch341.ko
mknod /dev/usb/ttyUSB0 c 188 0
mknod /dev/usb/ttyUSB1 c 188 1

Next we are going to install Heyu on the DS110j

Heyu is a text-based command line program for remotely controlling lights and appliances in the home or office. The complete source is made available under the free Heyu License. Heyu uses the CM11A computer interface to send and receive X10 control signals over the AC power lines to modules which can turn On, Off, or Dim attached lamps or appliances. It can store a schedule of timed events in the CM11A memory for execution when the computer is turned off or disconnected.

We could compile Heyu from source but luckily there is a precompiled ipkg. To install the package please first install the ipkg bootstrap which can be found here:

http://forum.synology.com/wiki/index.ph ... ,_ipkg_etc

ipkg install heyu

Heyu will install in /opt/bin and /opt/etc/heyu. To make things work go to /opt/etc/heyu and do:

cp x10.conf.sample x10.conf
vi x10.conf

and modify the TTY entry to:

TTY /dev/usb/ttyUSB0 # [serial port device]

Configure the HOUSE code and save the file. Next type:

heyu info

The output should look something like this:

Heyu version 2.8.0
Configuration at /opt/etc/heyu/x10.conf
Powerline interface on /dev/usb/ttyUSB0
Firmware revision Level = 8
Interface battery usage = 1:44 (hh:mm)
Raw interface clock: Tue, Day 017, 22:54:00
(--> Civil Time: Tue 18 Jan 2011 22:54:00 CET)
No schedule has been uploaded by Heyu.
Housecode = M
0 = off, 1 = on, unit 16.......8...4..1
Last addressed device = 0x0020 (0000000001000000)
Status of monitored devices = 0x0130 (0110000001000000)
Status of dimmed devices = 0x0000 (0000000000000000)

Adding domus.Link web front-end to Heyu

domus.Link is a web-based frontend for Heyu. The design focuses on separating configuration from actual controls thus giving the user a simple and user friendly GUI. The primary concern being that anyone with little or no knowledge of home automation systems can easily manage/administer the system.

The first step is to enable Webstation on your Synology box and check that your webpage is showing by entering http://<your DS ip address>/ in your browser.

Next, download the latest release of the domus.Link software go to: http://domus.link.co.pt/

Copy domuslink-1.2.tar.gz to the directory /volume1/web/ on the DS110j. Login to the server with PuTTY and extract the .tar.gz file using the following command:

tar xfvz domuslink-1.2.tar.gz

To set the permissions to the entire domus.Link directory and its subdirectories and files, do the following:

chown -R root domus*
chgrp -R root domus*

Go to the /volume1/web/domus.Link/doc directory and follow the installation instructions.

To use domus.Link together with Heyu do the following:

mkdir /etc/heyu
cp /opt/etc/heyu/x10.conf /etc/heyu/
mkdir /volume1/web/heyu
cp /opt/bin/heyu /volume1/web/heyu/

Next, change the permissions on the directories and files as follows:

chmod 777 /etc/heyu
chmod 777 /etc/heyu/x10.conf
chmod 777 /volume1/web/heyu
chmod 777 /volume1/web/heyu/heyu

Now go to the http://<your DS ipaddress>/domus.Link home page and check the Heyu status on the bottom left. If the status is down, click on it and click on start. If an error message appears, login to your Diskstation with PuTTY, and do the following:

heyu restart
heyu stop

Now select start again on the domus.Link status page. If everything went well, the status should now show Running and the modules should be visible on the home and lights tabs.

Enjoy! :D
redhouse
I'm New!
I'm New!
 
Posts: 3
Joined: Thu Feb 18, 2010 11:19 am

Re: Home Automation Thread (X-10, Insteon, ...)

Postby cryptic76 » Sun Feb 06, 2011 3:39 pm

Hi all,

first off: thanks for the information I found here.
It pointed me in the right direction for what I wanted to achieve.

I thought I'd document the results here as well, as I haven't found anything specific to my case.

I own a DS1010+ (i686, Intel Atom processor) and wondered whether I could get the X10 CM15Pro (or CM15A) working via USB.

Well, turns out I could ;-)

NOTE: I don't know whether this also works on different cpu architectures than the Intel processor that I have.

I won't write a full tutorial with all the steps, but it boils down to the following:

The CM15Pro is supported under linux via Mochad (which allows you to connect to a TCP port and send and receive X10 commands).
http://sourceforge.net/apps/mediawiki/mochad/index.php?title=Main_Page


Mochad is a source tarball and needs to be compiled.
So that means either cross compiling or compiling on the NAS itself.
I chose for the latter.

As I didn't have a compiler installed I had to install one first and in order to do that I needed ipkg,
which also needs to be installed first.

Ipkg can be installed by using the right bootstrap for it.
http://forum.synology.com/wiki/index.php?title=Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc

Then I needed to install a number of package in order to be able to compile.
I found some pointers on what packages I needed here:
http://forum.synology.com/enu/viewtopic.php?f=143&t=16560

Then I tried compiling mochad, but the 1.0 version of libusb was missing (not a typo, I mean 1.0, not the 0.1).
I got the right version from sourceforge (I think a link to it is on the mochad wiki page) and compiled it.

The standard "make install" command put the libraries in /usr/local/lib and from there I copied them to /lib,
where all the others libraries seem to reside (found the libusb 0.1 libraries there too...)

After this mochad did compile. On a normal system udev is available and the make install of mochad adds a rule
to start mochad when the CM15Pro is plugged in.

As udev is not available on the Synology (as far as I could tell), I just started the binary by hand.
It forks in the background and I could connect to it using nc and both see the X10 commands the CM15Pro received
as well as control my lighting with it.

In case it doesn't work or you get a "mochad[30478]: usb_claim_interface failed -6" log message in /var/log/messages,
try rebooting the NAS. Worked for me.

I hope this information is usefull to people trying to achieve the same, as there is not much information to be found
on the CM15.
cryptic76
I'm New!
I'm New!
 
Posts: 1
Joined: Sun Feb 06, 2011 3:19 pm

Re: Home Automation Thread (X-10, Insteon, ...)

Postby RichieC » Mon Feb 07, 2011 2:21 am

Im trying to get heyu working on a ds211j using a cm15pro interface...

If i install mochad to enable the cm15pro is it then possible to get heyu (or any other home automation software) to use the cm15
via mochad? or am i misunderstanding what mochad does?

Sorry for the noob question but i would really like to get this working on my NAS

Many thanks

Rich
RichieC
I'm New!
I'm New!
 
Posts: 1
Joined: Mon Feb 07, 2011 1:26 am

Re: Home Automation Thread (X-10, Insteon, ...)

Postby Lantis » Mon May 09, 2011 11:15 am

Hi all,

I also want to share my experience in installing my CM15Pro to DS410j (Marvel 6281) with mochad. I'm currently running DSM 3.1-1613. Some FYI's that I've discovered while doing this project:

- From all installation of this driver I found in the net, when installing CM15a/CM15Pro to check if the driver is "working" you need to check if it created a device node in /dev or in /dev/usb.

- If you don't have the device node and you have usbhid, some guys are saying that usbhid.ko grabs CM15Pro first before cm15a.ko (since cm15a.ko is loaded last) so the node is not created.

With a proper compile/insmod of cm15a driver, when connected cm15a will not create a usb device (e.g., /dev/cm15a0) primarily because of this: viewtopic.php?p=73282&sid=2cdeb94411851dd26b3887f5dc856dca#p117055

With logs and information enabled in the code, you will see something like this:

[ 88.750000] usb 1-1.2: new low speed USB device using orion-ehci and address 3
[ 88.880000] usb 1-1.2: configuration #1 chosen from 1 choice
[ 88.900000] Got empty serial number. Generate serial number from product.
[ 89.350000] usbcore: registered new interface driver hiddev
[ 89.440000] usbcore: registered new interface driver usbhid
[ 89.440000] usbhid: v2.6:USB HID core driver
[ 90.030000] /home/synology/Downloads/cm15a.c: usb_init : enter
[ 90.030000] /home/synology/Downloads/cm15a.c: probe : enter
[ 90.030000] /home/synology/Downloads/cm15a.c: In Int interval = 10
[ 90.030000] /home/synology/Downloads/cm15a.c: Out Int interval = 10
[ 90.040000] /home/synology/Downloads/cm15a.c: cm15a USB #252 now attached to major 180 minor 252
[ 90.050000] /home/synology/Downloads/cm15a.c: probe : leave, return value 0xc6574bc0 (dev)
[ 90.120000] usbcore: registered new interface driver cm15a
[ 90.120000] /home/synology/Downloads/cm15a.c: X10 CM15A USB Driver v0.031
[ 90.130000] /home/synology/Downloads/cm15a.c: usb_init : leave, return value 0


To check if it really is loaded, cm15a is specified as driver in /proc/bus/usb/devices:

DiskStation> cat /proc/bus/usb/devices

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
B: Alloc= 0/800 us ( 0%), #Int= 2, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 2.06
S: Manufacturer=Linux 2.6.32.12 ehci_hcd
S: Product=Marvell Orion EHCI
S: SerialNumber=orion-ehci.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 4
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=05e3 ProdID=0608 Rev= 6.03
S: Product=USB2.0 Hub
S: SerialNumber=d6a3ebcbfbd5e7a5f6a3
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms

T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0bc7 ProdID=0001 Rev= 1.00
S: Manufacturer=X10 Wireless Technology Inc
S: Product=USB ActiveHome Interface
S: SerialNumber=d1b2d3b5c7a2d6b8f1d1b4d9b6fe9bed
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=00(>ifc ) Sub=00 Prot=00 Driver=cm15a
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
E: Ad=02(O) Atr=03(Int.) MxPS= 8 Ivl=10ms


When running mochad, checking the /var/log/messages will give you the error:

May 9 10:59:11 mochad[7520]: usb_claim_interface failed -6


But then, if you enable INFO and NOTICE logging, actually you will see something like this:

May 9 10:59:11 mochad[7519]: starting
May 9 10:59:11 mochad[7520]: usb_claim_interface failed -6
May 9 10:59:11 mochad[7520]: Found kernel driver 1, trying detach
May 9 10:59:11 mochad[7520]: Found CM15A


If you check mochad.c, it fails for the first time and tries to detach the device who has the interface. Trying for the second time it claims the interface, so mochad is up and running fine!
Lantis
Trainee
Trainee
 
Posts: 18
Joined: Mon May 09, 2011 10:38 am

Re: Home Automation Thread (X-10, Insteon, ...)

Postby Lantis » Tue May 10, 2011 11:09 pm

Just an update-- I can actually run mochad without cm15a insmod. mochad controls the cm15a via usbfs, I've just noticed it took over as the device driver in /proc/bus/usb/devices.
Lantis
Trainee
Trainee
 
Posts: 18
Joined: Mon May 09, 2011 10:38 am

Re: Home Automation Thread (X-10, Insteon, ...)

Postby codedmind » Fri Jun 03, 2011 10:32 am

cryptic76 wrote:Hi all,

first off: thanks for the information I found here.
It pointed me in the right direction for what I wanted to achieve.

I thought I'd document the results here as well, as I haven't found anything specific to my case.

I own a DS1010+ (i686, Intel Atom processor) and wondered whether I could get the X10 CM15Pro (or CM15A) working via USB.

Well, turns out I could ;-)

NOTE: I don't know whether this also works on different cpu architectures than the Intel processor that I have.

I won't write a full tutorial with all the steps, but it boils down to the following:

The CM15Pro is supported under linux via Mochad (which allows you to connect to a TCP port and send and receive X10 commands).
http://sourceforge.net/apps/mediawiki/mochad/index.php?title=Main_Page


Mochad is a source tarball and needs to be compiled.
So that means either cross compiling or compiling on the NAS itself.
I chose for the latter.

As I didn't have a compiler installed I had to install one first and in order to do that I needed ipkg,
which also needs to be installed first.

Ipkg can be installed by using the right bootstrap for it.
http://forum.synology.com/wiki/index.php?title=Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc

Then I needed to install a number of package in order to be able to compile.
I found some pointers on what packages I needed here:
http://forum.synology.com/enu/viewtopic.php?f=143&t=16560

Then I tried compiling mochad, but the 1.0 version of libusb was missing (not a typo, I mean 1.0, not the 0.1).
I got the right version from sourceforge (I think a link to it is on the mochad wiki page) and compiled it.

The standard "make install" command put the libraries in /usr/local/lib and from there I copied them to /lib,
where all the others libraries seem to reside (found the libusb 0.1 libraries there too...)

After this mochad did compile. On a normal system udev is available and the make install of mochad adds a rule
to start mochad when the CM15Pro is plugged in.

As udev is not available on the Synology (as far as I could tell), I just started the binary by hand.
It forks in the background and I could connect to it using nc and both see the X10 commands the CM15Pro received
as well as control my lighting with it.

In case it doesn't work or you get a "mochad[30478]: usb_claim_interface failed -6" log message in /var/log/messages,
try rebooting the NAS. Worked for me.

I hope this information is usefull to people trying to achieve the same, as there is not much information to be found
on the CM15.


Hy there!

What version of libusb you use? i'm trying with 1.0.8 and i get and ldconfig error, i copied from /usr/local/lib to /lib but when i try make of the mochad i get a lot of errors and fail.


synology> make
gcc -g -O2 -o mochad mochad.o decode.o encode.o global.o x10state.o x10_write.o
mochad.o: In function `IntrIn_cb':
/volume1/@tmp/mochad-0.1.11/mochad.c:457: undefined reference to `libusb_submit_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:434: undefined reference to `libusb_free_transfer'
mochad.o: In function `mydaemon':
/volume1/@tmp/mochad-0.1.11/mochad.c:539: undefined reference to `libusb_init'
/volume1/@tmp/mochad-0.1.11/mochad.c:545: undefined reference to `libusb_set_debug'
mochad.o: In function `find_cm15a':
/volume1/@tmp/mochad-0.1.11/mochad.c:384: undefined reference to `libusb_open_device_with_vid_pid'
/volume1/@tmp/mochad-0.1.11/mochad.c:393: undefined reference to `libusb_claim_interface'
mochad.o: In function `alloc_transfers':
/volume1/@tmp/mochad-0.1.11/mochad.c:480: undefined reference to `libusb_alloc_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:486: undefined reference to `libusb_alloc_transfer'
mochad.o: In function `start_transfers':
/volume1/@tmp/mochad-0.1.11/mochad.c:465: undefined reference to `libusb_submit_transfer'
mochad.o: In function `mydaemon':
/volume1/@tmp/mochad-0.1.11/mochad.c:581: undefined reference to `libusb_get_pollfds'
mochad.o: In function `find_cm15a':
/volume1/@tmp/mochad-0.1.11/mochad.c:399: undefined reference to `libusb_kernel_driver_active'
/volume1/@tmp/mochad-0.1.11/mochad.c:405: undefined reference to `libusb_detach_kernel_driver'
/volume1/@tmp/mochad-0.1.11/mochad.c:411: undefined reference to `libusb_claim_interface'
mochad.o: In function `mydaemon':
/volume1/@tmp/mochad-0.1.11/mochad.c:741: undefined reference to `libusb_cancel_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:747: undefined reference to `libusb_cancel_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:753: undefined reference to `libusb_handle_events'
/volume1/@tmp/mochad-0.1.11/mochad.c:762: undefined reference to `libusb_free_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:763: undefined reference to `libusb_free_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:765: undefined reference to `libusb_release_interface'
/volume1/@tmp/mochad-0.1.11/mochad.c:767: undefined reference to `libusb_close'
/volume1/@tmp/mochad-0.1.11/mochad.c:768: undefined reference to `libusb_attach_kernel_driver'
/volume1/@tmp/mochad-0.1.11/mochad.c:769: undefined reference to `libusb_exit'
mochad.o: In function `find_cm15a':
/volume1/@tmp/mochad-0.1.11/mochad.c:386: undefined reference to `libusb_open_device_with_vid_pid'
mochad.o: In function `mydaemon':
/volume1/@tmp/mochad-0.1.11/mochad.c:681: undefined reference to `libusb_handle_events_timeout'
mochad.o: In function `write_usb':
/volume1/@tmp/mochad-0.1.11/mochad.c:501: undefined reference to `libusb_submit_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:503: undefined reference to `libusb_cancel_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:505: undefined reference to `libusb_handle_events'
collect2: ld returned 1 exit status
make: *** [mochad] Error 1
synology>

codedmind
I'm New!
I'm New!
 
Posts: 2
Joined: Fri Jun 03, 2011 10:26 am

Re: Home Automation Thread (X-10, Insteon, ...)

Postby codedmind » Fri Jun 03, 2011 10:38 am

Lantis wrote:Just an update-- I can actually run mochad without cm15a insmod. mochad controls the cm15a via usbfs, I've just noticed it took over as the device driver in /proc/bus/usb/devices.

What is your synology?

I can't install mochad into a ds210j :|
codedmind
I'm New!
I'm New!
 
Posts: 2
Joined: Fri Jun 03, 2011 10:26 am

Re: Home Automation Thread (X-10, Insteon, ...)

Postby WorldSelect » Thu Jul 14, 2011 4:47 am

Do you think this solution could work to connect a MagicJack USB dongle using the call manager software and phone service of www.TokTumi.com?
I have a DS411+.

Thank you in advance.
WorldSelect
I'm New!
I'm New!
 
Posts: 3
Joined: Fri May 06, 2011 11:14 pm

Re: Home Automation Thread (X-10, Insteon, ...)

Postby george20mix » Thu Mar 01, 2012 10:11 pm

Hello!!! i have the same problem that codedmind, any can help us??? thanks.
Hy there!

What version of libusb you use? i'm trying with 1.0.8 and i get and ldconfig error, i copied from /usr/local/lib to /lib but when i try make of the mochad i get a lot of errors and fail.


synology> make
gcc -g -O2 -o mochad mochad.o decode.o encode.o global.o x10state.o x10_write.o
mochad.o: In function `IntrIn_cb':
/volume1/@tmp/mochad-0.1.11/mochad.c:457: undefined reference to `libusb_submit_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:434: undefined reference to `libusb_free_transfer'
mochad.o: In function `mydaemon':
/volume1/@tmp/mochad-0.1.11/mochad.c:539: undefined reference to `libusb_init'
/volume1/@tmp/mochad-0.1.11/mochad.c:545: undefined reference to `libusb_set_debug'
mochad.o: In function `find_cm15a':
/volume1/@tmp/mochad-0.1.11/mochad.c:384: undefined reference to `libusb_open_device_with_vid_pid'
/volume1/@tmp/mochad-0.1.11/mochad.c:393: undefined reference to `libusb_claim_interface'
mochad.o: In function `alloc_transfers':
/volume1/@tmp/mochad-0.1.11/mochad.c:480: undefined reference to `libusb_alloc_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:486: undefined reference to `libusb_alloc_transfer'
mochad.o: In function `start_transfers':
/volume1/@tmp/mochad-0.1.11/mochad.c:465: undefined reference to `libusb_submit_transfer'
mochad.o: In function `mydaemon':
/volume1/@tmp/mochad-0.1.11/mochad.c:581: undefined reference to `libusb_get_pollfds'
mochad.o: In function `find_cm15a':
/volume1/@tmp/mochad-0.1.11/mochad.c:399: undefined reference to `libusb_kernel_driver_active'
/volume1/@tmp/mochad-0.1.11/mochad.c:405: undefined reference to `libusb_detach_kernel_driver'
/volume1/@tmp/mochad-0.1.11/mochad.c:411: undefined reference to `libusb_claim_interface'
mochad.o: In function `mydaemon':
/volume1/@tmp/mochad-0.1.11/mochad.c:741: undefined reference to `libusb_cancel_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:747: undefined reference to `libusb_cancel_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:753: undefined reference to `libusb_handle_events'
/volume1/@tmp/mochad-0.1.11/mochad.c:762: undefined reference to `libusb_free_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:763: undefined reference to `libusb_free_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:765: undefined reference to `libusb_release_interface'
/volume1/@tmp/mochad-0.1.11/mochad.c:767: undefined reference to `libusb_close'
/volume1/@tmp/mochad-0.1.11/mochad.c:768: undefined reference to `libusb_attach_kernel_driver'
/volume1/@tmp/mochad-0.1.11/mochad.c:769: undefined reference to `libusb_exit'
mochad.o: In function `find_cm15a':
/volume1/@tmp/mochad-0.1.11/mochad.c:386: undefined reference to `libusb_open_device_with_vid_pid'
mochad.o: In function `mydaemon':
/volume1/@tmp/mochad-0.1.11/mochad.c:681: undefined reference to `libusb_handle_events_timeout'
mochad.o: In function `write_usb':
/volume1/@tmp/mochad-0.1.11/mochad.c:501: undefined reference to `libusb_submit_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:503: undefined reference to `libusb_cancel_transfer'
/volume1/@tmp/mochad-0.1.11/mochad.c:505: undefined reference to `libusb_handle_events'
collect2: ld returned 1 exit status
make: *** [mochad] Error 1
synology>
george20mix
I'm New!
I'm New!
 
Posts: 2
Joined: Mon Feb 07, 2011 8:29 pm

Re: Home Automation Thread (X-10, Insteon, ...)

Postby tweety7472 » Thu Jul 19, 2012 1:18 pm

Hello,

I hope you can help me

to compile while trying to ftdi driver DS209j with dsm 4, I only get error messages


Code: Select all
root @ :/ dream home/sven/powerpc/source/linux-2.6.24 # make ARCH = powerpc \ CROSS_COMPILE = / modules usr/local/powerpc-linux/bin/powerpc-linux-
   CHK include / linux / version.h
   CHK include / linux / utsrelease.h
   SYMLINK include / asm -> include / asm-powerpc
   CC arch / powerpc / kernel / asm-offsets.s
cc: warning: '-mcpu =' is deprecated, use '-mtune =' or '-march =' instead
cc1: warning: unknown register name: r2 [enabled by default]
arch / powerpc / kernel / asm-offsets.c: 1:0: error: bad value (powerpc) for-mtune = switch
make [1]: *** [arch / powerpc / kernel / asm-offsets.s] Error 1
make: *** [prepare0] Error 2
root @ :/ dream home/sven/powerpc/source/linux-2.6.24 #


System: Dream Linux 5
tweety7472
I'm New!
I'm New!
 
Posts: 1
Joined: Thu Jul 19, 2012 1:05 pm

PreviousNext

Return to General Mods

Who is online

Users browsing this forum: No registered users and 3 guests