DMIDI - dmidid 0.4 Linux / ALSA 0.9 - README
11/03/03

This version of dmidid is based around the IEEE P1639 specification and is 
not backwards compatible with older versions.  This is based on RC1 of the protocol, adding runt packet handling.

Requirements:

You will need a full installation of ALSA 0.9 drivers, libs and tools.   
Details on obtaining ALSA are available at their website: www.alsa-project.org.
A mini installation tutorial is detailed in the MIDI-HOWTO: www.midi-howto.com.

By default the interface eth0 is used and can be changed in the code using
the variable iodevice.

Installation:

After untaring and cd'ing into the directory run the following command to 
compile the executable:

# gcc dmidid.c -o dmidid -Wall -lpthread -lasound

There should be no errors but if there are please email them to phil@plus24.com.
Copy the binary to /usr/local/sbin or to your preferred location.

The binary needs to be run as root to write raw Ethernet packets and run 
with SCHED_FIFO privileges.

Running:

Run the DMIDI application like so:

# /usr/local/sbin/dmidid

dmidid - Linux client - 0.4 (ALSA 0.9)
Transmit Node ID: [ff:ff:ff:ff]
Receive  Node ID: [ff:ff:ff:ff]

The application has started with the default node values set, to run the 
application with your own values use the -r and -t flags like so:

# /usr/local/sbin/dmidid -t 90:00:00:00 -r 90:00:00:00

dmidid - Linux client - 0.4 (ALSA 0.9)
Transmit Node ID: [90:00:00:00]
Receive  Node ID: [90:00:00:00]

Using aconnect, part of alsa-tools, you can now bind the DMIDI interface 
to a MIDI port.

Firstly we see what input and output devices are listed like so (Note: These
values will probably be slightly different on your system):

# aconnect -i 
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 64: 'External MIDI 0' [type=kernel]
    0 'MIDI 0-0        '
client 128: 'DMIDI' [type=user]
    0 'DMIDI - Receive: [90:00:00:00]'

# aconnect -o
client 64: 'External MIDI 0' [type=kernel]
    0 'MIDI 0-0        '
client 65: 'Emu10k1 WaveTable' [type=kernel]
    0 'Emu10k1 Port 0  '
    1 'Emu10k1 Port 1  '
    2 'Emu10k1 Port 2  '
    3 'Emu10k1 Port 3  '
client 128: 'DMIDI' [type=user]
    1 'DMIDI - Transmit [90:00:00:00]'

Now we'll connect the DMIDI receiver to the external MIDI port:

# aconnect 128:0 64:0

And the external MIDI port to the DMIDI transmitter:

# aconnect 64:0 128:1

Using aconnect again we can see the status of the port bindings:

# aconnect -iol
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
	Connecting To: 63:0
client 64: 'External MIDI 0' [type=kernel]
    0 'MIDI 0-0        '
	Connecting To: 128:1        << DMIDI
	Connected From: 128:0       << DMIDI
client 65: 'Emu10k1 WaveTable' [type=kernel]
    0 'Emu10k1 Port 0  '
    1 'Emu10k1 Port 1  '
    2 'Emu10k1 Port 2  '
    3 'Emu10k1 Port 3  '
client 128: 'DMIDI' [type=user]
    0 'DMIDI - Receive: [90:00:00:00]'
	Connecting To: 64:0         << DMIDI
    1 'DMIDI - Transmit [90:00:00:00]'
	Connected From: 64:0        << DMIDI

Ok, installation is now complete - enjoy!


** WARNING ** 

Do not connect the DMIDI transmitter and receiver ports together if you 
are root, you will lock your machine hard!

Testing:

Using tcpdump we can see the DMIDI packets on the network like so (you will 
have to be root to perform this operation):

# tcpdump -xttl ether proto 0x1199
tcpdump: listening on eth0

1046646649.469528 0:4:ac:15:fc:49 Broadcast 1199 27: 
			 9000 0000 ffff ffff ffff bb07 7f
1046646649.469543 0:4:ac:15:fc:49 Broadcast 1199 27: 
			 9000 0000 ffff ffff ffff bb0a 3f
1046646649.469559 0:4:ac:15:fc:49 Broadcast 1199 27: 
			 9000 0000 ffff ffff ffff bb5b 6b
1046646649.469574 0:4:ac:15:fc:49 Broadcast 1199 27: 
			 9000 0000 ffff ffff ffff b907 7f
1046646649.469607 0:4:ac:15:fc:49 Broadcast 1199 27: 
			 9000 0000 ffff ffff ffff b90a 3f
1046646649.469640 0:4:ac:15:fc:49 Broadcast 1199 27: 
			 9000 0000 ffff ffff ffff b95b 31
1046646649.469654 0:4:ac:15:fc:49 Broadcast 1199 27: 
			 9000 0000 ffff ffff ffff bc00 02

Website:
http://www.dmidi.org
