Personal tools
The Open Lighting Project has moved!

We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.

Difference between revisions of "Linux ArtNet Node"

From wiki.openlighting.org

Jump to: navigation, search
 
(download URL doesn't work anymore, use github sources)
 
(14 intermediate revisions by 12 users not shown)
Line 1: Line 1:
Written by Thomas Hinterberger.
+
Written by Thomas Hinterberger and Simon Newton.
  
 
This HOWTO outlines a method for creating an ArtNetNode on an Intel/AMD32 Computer (minmum proved: PI/200 32 MB Ram/400MB Harddisk ) using an [[Enttec]] [[Open DMX USB]] Interface (not the Pro). For instructions on how to install on to a USB stick see http://d-i.pascal.at/
 
This HOWTO outlines a method for creating an ArtNetNode on an Intel/AMD32 Computer (minmum proved: PI/200 32 MB Ram/400MB Harddisk ) using an [[Enttec]] [[Open DMX USB]] Interface (not the Pro). For instructions on how to install on to a USB stick see http://d-i.pascal.at/
Line 5: Line 5:
 
This howto uses the Debian Sarge Netinstall-CD-Image (100 Mb) - http://www.debian.org/releases/sarge/debian-installer/
 
This howto uses the Debian Sarge Netinstall-CD-Image (100 Mb) - http://www.debian.org/releases/sarge/debian-installer/
  
The computer must be connected to the Internet using DHCP to download the packages.
+
The computer must be connected to the Internet to download the packages. Its easiest if you have a DHCP server on your network (most routers come with this feature).
 +
 
 +
Prerequisites: None. It helps if you know Linux a bit and have installed Debian before, but there is plenty of other documentation for that.
 +
 
 +
== Initial Debian Install ==
  
 
For installation follow:  http://www.howtoforge.com/perfect_setup_debian_sarge (enter linux26 at the boot prompt to install a 2.6 kernel)
 
For installation follow:  http://www.howtoforge.com/perfect_setup_debian_sarge (enter linux26 at the boot prompt to install a 2.6 kernel)
  
choose Node1 as hostname and ArtNet as Domainname
+
Enter something useful for the hostname like "node1", you can leave the domain name blank.
 +
 
 +
Set up a user other than root on the machine.
 +
 
 +
On page 2 of the above guide, for the screen "Debian Software Configuration" , don't check any boxes. We'll install the other packages later.
  
on page 2 of the installation guide "debian software configuration" you choose manual package selection by going there with the courser and use the space tab to select it.
+
On the Configuration Exim v4 you choose "No configuration at this time".
  
On the Configuration Exim v4 you choose no configuration on this time and you will end up with aptitude
+
After the install completes it will present you with a login prompt. It's now time to install the ArtNet software and DMX driver.
  
close aptitude with :q
 
  
log in with your username and password
+
== Installation of Lighting Software ==
  
now you typ to the console with the following convention:
+
Log in with the user name and password you set up previously.
 +
 
 +
now you type to the console with the following convention:
  
 
# command    Type command as root- to get root type 'su' followed by the root password
 
# command    Type command as root- to get root type 'su' followed by the root password
 
$ command    Type command as user - to get user type exit
 
$ command    Type command as user - to get user type exit
  
  $:su
+
Edit the /etc/apt/sources.list file, you'll need to be root to do this:
  #:nano /etc/apt/sources.list
+
 
 +
  $ su
 +
  # nano /etc/apt/sources.list
  
You add the following line:
+
Add add the following line:
  
 
  deb http://www.nomis52.net/data/debian ./
 
  deb http://www.nomis52.net/data/debian ./
  
ctrl (strg) o + enter   to  save
+
If you used nano to edit, you can save the file with ctrl o + enter . Then exit nano with ctrl x.
ctrl x                 to   exit nano
+
 
 +
Update the package lists and install the required software:
 +
 
 +
# apt-get update
 +
# apt-get install kernel-headers-$(uname -r) g++ make libartnet1 artnet-examples
 +
 
 +
Make a note of the version of your kernel-headers that are going to be installed.
  
 +
Exit the root account, and download and compile the dmx_usb driver:
  
  #:apt-get update
+
  # exit
  #:apt-get install kernel-headers-$(uname -r) g++ make libartnet1 artnet-examples
+
$ git clone git://github.com/lowlander/dmx_usb_module.git
 +
$ cd dmx_usb_module
 +
  $ make
 +
$ cd ..
  
before you say yes note the version of your kernel-headers
+
Now we need to install the kernel module. Adjust these lines for your system using the version of kernel headers that were installed.
  
#:exit
+
  $ su
$:wget http://www.erwinrol.com/downloads/software/dmx_usb_module-20040914.tar.gz
+
  # cp dmx_usb_module/dmx_usb.ko /lib/modules/2.6.X-Y-386/kernel/drivers/usb/serial/dmx_usb.ko
  $:tar -zxf dmx_usb_module-20040914.tar.gz
+
  # rm /lib/modules/2.6.X-Y-386/kernel/drivers/usb/serial/ftdi_sio.ko
$:cd dmx_usb_module
+
  # cd /dev
$:make
+
  # mknod -m 666 dmx0 c 180 192
$:cd ..
 
$:su
 
  #:cp dmx_usb_module/dmx_usb.ko /lib/modules/2.6.x-x-386/kernel/drivers/usb/serial/dmx_usb.ko (x-use the noted version of your kernel headers)
 
  #:rm /lib/modules/2.6.x-x-386/kernel/drivers/usb/serial/ftdi_sio.ko
 
  #:cd /dev
 
  #:mknod -m 666 dmx0 c 180 192
 
#:nano /etc/modules
 
  
you ad now the following line:
+
Add the following line to /etc/modules so that the dmx_usb module is loaded on startup:
  
 
   dmx_usb.ko
 
   dmx_usb.ko
  
ctrl (strg) o + enter  to  save
+
Again, you can do this using nano
ctrl x                  to  exit nano
+
 
 +
# nano /etc/modules
  
 +
Finally reboot the machine
  
  #:reboot
+
  # reboot
  
login with your username and password
+
== Starting the Node ==
  
plug in the Enttec Open DMX Interface
+
Login to the machine with your username and password
  
artnet_usb
+
Check that the dmx_usb module is loaded:
  
and the node is working now on Artnet: Universe 0 and Port 0
+
$ lsmod | grep dmx_usb
 +
dmx_usb                11012  0
 +
usbcore              114176  8 dmx_usb,ftdi_sio,usbserial,usb_storage,usbhid,uhci_hcd,ehci_hcd
  
If you enable now Artnet Universe 0 in MagicQ from ChamSys, you have a fully functioning one universe DMX512 interface - this is working much better than MagicQ with the OpenDMX Windows drivers. And you can add as much universes artnet supports.
+
You should see two lines like above. This shows that the driver has been loaded correctly.
  
artnet_usb -v does the same thing, but gives you debug information
 
  
Usage: artnet-usb [OPTIONS]
+
Plug in the Enttec [[Open DMX USB]] Interface. Run dmesg and check that the device was initialized corrected:
Acts as an ArtNet to DMX node using the Enttec Open Usb Interface
 
  
  -a <ip-address>        IP address to listen on (defaults to the address
+
  $ dmesg
                        of the first non loopback interface)
+
    ... heaps of output ...
  -d <dmx-device>        device for dmx output (default /dev/dmx0)
+
  usb 3-1: new full speed USB device using uhci_hcd and address 5
-p <port-address>      port address for output universe (default 0)
+
  usb 3-1: configuration #1 chosen from 1 choice
  -s <subnet-address>    subnet address for output universe (default 0)
+
  /home/simon/dmx_usb_module/dmx_usb.c: DMX USB device now attached to dmx192
  -v                    be verbose (prints data for first four channels)
 
  
The universe address of the port is made up from the subnet address and the
+
Right at the end you should see something like the 3 lines above. This means that the widget has been recognised by the dmx_usb driver.
port address. The four least significat bits are the port address, the four
+
 
most significat are the subnet address.
+
Start the artnet node by running:
 +
 
 +
$ artnet_usb
 +
 
 +
By default the node starts up using ArtNet subnet 0 and port 0, this corresponds to Universe 0 in [[Magic Q PC]]
 +
 
 +
Running artnet_usb with the -v option gives you debug information. The following arguments are supported:
 +
 
 +
  -a <ip-address>        IP address to listen on (defaults to the address
 +
                        of the first non loopback interface)
 +
  -c <config_file>      Config file to use for node name and port settings
 +
  -d <dmx-device>        device for dmx output (default /dev/dmx0)
 +
  -p <port-address>      port address for output universe (default 0)
 +
  -s <subnet-address>    subnet address for output universe (default 0)
 +
  -v                    be verbose (prints data for first four channels)
 +
  -z                    Run in a new process (handles widget disconnects cleanly)
 +
 
 +
The universe address of the port is made up from the ArtNet subnet address and the ArtNet port address. The four least significant bits are the port address, the four most significant are the subnet address.
  
 
For example :
 
For example :
  
artnet-usb -p 3 -s 2
+
$ artnet-usb -p 3 -s 2
  
 
sets the universe address to 0x23
 
sets the universe address to 0x23
 +
 +
 +
== Testing with [[DMX Workshop]] ==
 +
 +
Start DMX Workshop and verify that the node appears in the connected devices list.
 +
 +
 +
== Using the node with [[Magic Q PC]] ==
 +
 +
If you enable now Artnet Universe 0 in Magic Q from ChamSys, you have a fully functioning one universe DMX512 interface. This works much better than MagicQ alone with the Open DMX USB Windows drivers. You can also use as many universes as ArtNet supports (but at the moment only one Open DMX USB device per node is supported)
 +
  
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]

Latest revision as of 02:20, 25 April 2012

Written by Thomas Hinterberger and Simon Newton.

This HOWTO outlines a method for creating an ArtNetNode on an Intel/AMD32 Computer (minmum proved: PI/200 32 MB Ram/400MB Harddisk ) using an Enttec Open DMX USB Interface (not the Pro). For instructions on how to install on to a USB stick see http://d-i.pascal.at/

This howto uses the Debian Sarge Netinstall-CD-Image (100 Mb) - http://www.debian.org/releases/sarge/debian-installer/

The computer must be connected to the Internet to download the packages. Its easiest if you have a DHCP server on your network (most routers come with this feature).

Prerequisites: None. It helps if you know Linux a bit and have installed Debian before, but there is plenty of other documentation for that.

Initial Debian Install

For installation follow: http://www.howtoforge.com/perfect_setup_debian_sarge (enter linux26 at the boot prompt to install a 2.6 kernel)

Enter something useful for the hostname like "node1", you can leave the domain name blank.

Set up a user other than root on the machine.

On page 2 of the above guide, for the screen "Debian Software Configuration" , don't check any boxes. We'll install the other packages later.

On the Configuration Exim v4 you choose "No configuration at this time".

After the install completes it will present you with a login prompt. It's now time to install the ArtNet software and DMX driver.


Installation of Lighting Software

Log in with the user name and password you set up previously.

now you type to the console with the following convention:

  1. command Type command as root- to get root type 'su' followed by the root password

$ command Type command as user - to get user type exit

Edit the /etc/apt/sources.list file, you'll need to be root to do this:

$ su
# nano /etc/apt/sources.list

Add add the following line:

deb http://www.nomis52.net/data/debian ./

If you used nano to edit, you can save the file with ctrl o + enter . Then exit nano with ctrl x.

Update the package lists and install the required software:

# apt-get update
# apt-get install kernel-headers-$(uname -r) g++ make libartnet1 artnet-examples

Make a note of the version of your kernel-headers that are going to be installed.

Exit the root account, and download and compile the dmx_usb driver:

# exit
$ git clone git://github.com/lowlander/dmx_usb_module.git
$ cd dmx_usb_module
$ make
$ cd ..

Now we need to install the kernel module. Adjust these lines for your system using the version of kernel headers that were installed.

$ su
# cp dmx_usb_module/dmx_usb.ko /lib/modules/2.6.X-Y-386/kernel/drivers/usb/serial/dmx_usb.ko
# rm /lib/modules/2.6.X-Y-386/kernel/drivers/usb/serial/ftdi_sio.ko
# cd /dev
# mknod -m 666 dmx0 c 180 192

Add the following line to /etc/modules so that the dmx_usb module is loaded on startup:

 dmx_usb.ko

Again, you can do this using nano

# nano /etc/modules

Finally reboot the machine

# reboot

Starting the Node

Login to the machine with your username and password

Check that the dmx_usb module is loaded:

$ lsmod | grep dmx_usb
dmx_usb                11012  0
usbcore               114176  8 dmx_usb,ftdi_sio,usbserial,usb_storage,usbhid,uhci_hcd,ehci_hcd

You should see two lines like above. This shows that the driver has been loaded correctly.


Plug in the Enttec Open DMX USB Interface. Run dmesg and check that the device was initialized corrected:

$ dmesg
   ... heaps of output ...
usb 3-1: new full speed USB device using uhci_hcd and address 5
usb 3-1: configuration #1 chosen from 1 choice
/home/simon/dmx_usb_module/dmx_usb.c: DMX USB device now attached to dmx192

Right at the end you should see something like the 3 lines above. This means that the widget has been recognised by the dmx_usb driver.

Start the artnet node by running:

$ artnet_usb

By default the node starts up using ArtNet subnet 0 and port 0, this corresponds to Universe 0 in Magic Q PC

Running artnet_usb with the -v option gives you debug information. The following arguments are supported:

 -a <ip-address>        IP address to listen on (defaults to the address
                        of the first non loopback interface)
 -c <config_file>       Config file to use for node name and port settings
 -d <dmx-device>        device for dmx output (default /dev/dmx0)
 -p <port-address>      port address for output universe (default 0)
 -s <subnet-address>    subnet address for output universe (default 0)
 -v                     be verbose (prints data for first four channels)
 -z                     Run in a new process (handles widget disconnects cleanly)

The universe address of the port is made up from the ArtNet subnet address and the ArtNet port address. The four least significant bits are the port address, the four most significant are the subnet address.

For example :

$ artnet-usb -p 3 -s 2

sets the universe address to 0x23


Testing with DMX Workshop

Start DMX Workshop and verify that the node appears in the connected devices list.


Using the node with Magic Q PC

If you enable now Artnet Universe 0 in Magic Q from ChamSys, you have a fully functioning one universe DMX512 interface. This works much better than MagicQ alone with the Open DMX USB Windows drivers. You can also use as many universes as ArtNet supports (but at the moment only one Open DMX USB device per node is supported)