
deRFusb-* radio sticks
======================
Any recent Linux should detect the deRFusb-* radio sticks right away and
should create a device node called /dev/ttyACM* like /dev/ttyACM0 for the first
stick and /dev/ttyACM1 for the second and so on. You might have other numbers
depending on other USB devices used.

Most distributions deny access to /dev/ttyACM* devices for regular users. For
example in Ubuntu the user must be in the group dialout to have read/write
access to the device. If you experience the situation that you see the device in
deCONZ but cannot connect to it, that is, deCONZ keeps complaining about
Not connected even if you press connect, you most likely do not have
read/write permissions.

1) Check the group the /dev/ttyACM* devices are in

   $ ls l /dev/ttyACM*

This will give an output like:

   crw-rw---- 1 root dialout 166, 0 Sep  6 15:37 /dev/ttyACM0

The output shows that /dev/ttyACM0 is owned by user root and belongs to the
group dialout. 

2) Become a member of dialout group (requires root privileges)

To gain read/write privileges for the device you need to become a member of the
dialout group. The following command puts the user bob into the group dialout.
You need to replace bob with your username.

   $ sudo adduser bob dialout

Note: after adding a user to a new group its necessary for that user to logout
and login again.


deRFmega128 radio modules on FTDI based platforms
=================================================
In order to communicate with a deRF* FTDI device it's neccessary to configure
the FTDI kernel module since it doesn't know deRF* USB device ids.
Follow the steps below to permamently install a deRF* FTDI device:

1) Obtain the USB device id with lsusb command

   $ lsusb

   Bus 001 Device 003: ID 1cf1:001d

The lsusb command shows all connected usb devices. Devices having the vendor id
1cf1 are dresden elektronik devices. In this case 1cf1:001d corresponds to a
deRFnode development board.

2) Create FTDI kernel module configuration (requires root privileges)

Create a file /etc/modprobe.d/ddel.conf

Write your device into the file as follows:

   # deRFnode / gateway
   options ftdi_sio vendor=0x1cf1 product=0x001d

Note: The product field must match the device id obtained in step 1).
Note: Only one FTDI id can be active at a time, others must be commented out.

3) Reload FTDI kernel module (requires root privileges)

Unload module

   $ sudo rmmod ftdi_sio

Load module again to apply new configuration

   $ sudo modprobe ftdi_sio

4) After reconnecting the device to PC USB port a new device should appear
in the directory /dev. The device name should be /dev/ttyUSBx or there x is a
number from 0-9.

Note: It's neccessary to have read/write permissions on the new device, follow
the steps in deRFusb-* radio sticks section above in order to use the device as
regular user.
