This page last changed on May 26, 2015 by aleksey_z.

On Synology DS214Play DSM5.0 been installed OpenRemote and USB Z-Wave Stick.
To use USB Z-Wave Stick, it was necessary to:
> chown -R root.uucp /var/lock
> chown -R root.dialout /dev/ttyUSB0
After rebooting the server rights directories were preserved, the application starts up, stick work. No matter how much the server restarts (in the past 8 months), it worked.

Updated to Synology DS3615xs DSM5.1. Reinstall the application OpenRemote and USB Z-Wave Stick. To use USB Z-Wave Stick, it was necessary to:
> chown -R root.uucp /var/lock
> chown -R root.dialout /dev/ttyUSB0

By RXTX I get this error:

WARNING: RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.1-7
check_group_uucp (): error testing lock file creation Error details: Permission deniedcheck_lock_status: No permission to create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
check_group_uucp (): error testing lock file creation Error details: Permission deniedcheck_lock_status: No permission to create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL
ERROR main: Serial_Port_RXTX: Failed to configure the serial port [Name: '/dev/ttyUSB0', Communication Layer: RXTX] because it does not exist.
ERROR main: Serial_Port: Failed to open the serial port [COM port: /dev/ttyUSB0, Communication Layer: RXTX].

I found that if i am stop the application OpenRemote, in WinSCP change permissions on the directory /run/lock for 0777 (rwxrwxrwx), the stick begins to work:

INFO 2015-05-26 14: 58: 14,584 (Z-Wave): Serial_Port: Opening the serial port [COM port: /dev/ttyUSB0, Communication Layer: RXTX] ...
INFO 2015-05-26 14: 58: 14,678 (Z-Wave): Serial_Port: The serial port [COM port: /dev/ttyUSB0, Communication Layer: RXTX] has been successfully opened.

BUT! After the server restarts, the rights to the directory /var/lock are rwxrwxrwx, but on /run/lock changed to rwxr-xr-x and the stick is not working.
How can you solve a problem with the rights to a directory /run/lock?

This is Synology specific question and the answer is more probable to be found on their forum. Moreover, this is in fact DSM5 problem, as till DSM4 it was not present.

Posted by aktur at May 27, 2015 07:37

Thanks for your reply.
On DS214Play with DSM 5.0, I did not have this problem. I will look for a solution.

Posted by aleksey_z at May 27, 2015 08:02

Problem solved.
For DSM 5.1U5 and USB Serial Drivers package: http://jadahl.dscloud.me/sspks/packages/UsbSerialDrivers_3.0.2.spk

I edited the file from the usbserial driver on /volume1/@appstore/UsbSerialDrivers/bin/load_usb.sh as follows

#!/bin/sh

/sbin/insmod /volume1/@appstore/UsbSerialDrivers/modules/usbserial.ko
/sbin/insmod /volume1/@appstore/UsbSerialDrivers/modules/ftdi_sio.ko
/sbin/insmod /volume1/@appstore/UsbSerialDrivers/modules/ch341.ko
/sbin/insmod /volume1/@appstore/UsbSerialDrivers/modules/pl2303.ko
/sbin/insmod /volume1/@appstore/UsbSerialDrivers/modules/cp210x.ko
chown -R root.uucp /var/lock
chmod -R g+w /var/lock/
chown -R root.dialout /dev/ttyUSB0

sleep 2
echo $(date +"%D-%T") chmod 777 completed successfuly >> /volume1/@appstore/UsbSerialDrivers/var/logs/UsbSerialDrivers.log

exit 0

this changed the rights every time I boot the nas and my openhab worked without further mods.

Source: http://forum.synology.com/enu/viewtopic.php?f=155&t=82843&hilit=%2Fvar%2Flock+uucp&start=330#p380917

Posted by aleksey_z at May 27, 2015 09:24
Document generated by Confluence on Jun 05, 2016 09:34