Why can't I use FTDI as INPUT

362 views
Skip to first unread message

Marcus Richters

unread,
Nov 2, 2014, 8:49:26 AM11/2/14
to open-l...@googlegroups.com
Hi,

what I'm trying is:

Ubuntu with OLA and EIBD

Use "ola_trigger" to send telegramms via EIBD to KNX.

So I need a INPUT device.

So my DMX interfaces are only OUTPUTS:
ENTTEC: Open DMX USB
Stage Line - DMX-510 USB

But I've got some TTL 3V/ 5V5 FTDI FT232R and SN75176 chips

Why can't I use FTDI as INPUT ?

Peter Newman

unread,
Nov 2, 2014, 9:19:16 AM11/2/14
to open-l...@googlegroups.com
From what I can tell, the EIBD/KNX stuff is all home automation? Anyway I guess that's a bit irrelevant, as it's not the main point of your question.

Put simply for the Open DMX USB, no-one has written the code in OLA; the device supports input, hippy on this list has DMX reception code (see http://members.westnet.com.au/rowanmac/opendmx.html ) although due to the lack of microprocessor on the device, it may not be very reliable if the machine running OLA is heavily loaded.

I don't know if the Stage Line even support DMX input.

For a list of devices that receive DMX that OLA supports (and that Simon recommends), see http://www.openlighting.org/ola/get-help/ola-faq/#What_are_the_recommended_USB_Device_to_use_with_OLA
Message has been deleted
Message has been deleted

Marcus Richters

unread,
Nov 4, 2014, 4:42:02 AM11/4/14
to open-l...@googlegroups.com
For receiving DMX:

DMX USB Pro            - 149 €
DMX USB Pro MK II   -  199 €
ultraDMX Micro          -   60  €  for non opto-isolation ... seriously

ultraDMX Pro 80 € sounds fair but no european distributor

http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232R.pdf

128 byte receive buffer and 256 byte transmit
buffer utilising buffer smoothing technology to
allow for high data throughput.

FIFO RX Buffer (128 bytes).
Data sent from the USB host controller to the UART via the USB data OUT
endpoint is stored in the FIFO RX (receive) buffer. Data is removed from the buffer to the UART transmit
register under control of the UART FIFO controller. (Rx relative to the USB interface).

FIFO TX Buffer (256 bytes).
Data from the UART receive register is stored in the TX buffer.
The USB host controller removes data from the FIFO TX Buffer by sending a USB request for data from the device
data IN endpoint. (Tx relative to the USB interface).

UART FIFO Controller.
The UART FIFO controller handles the
transfer of data between the FIFO RX and
TX buffers and the UART transmit and receive registers.

..... so for receiving DMX there is no need for a microcontroller

Marcus Richters

unread,
Nov 4, 2014, 4:52:43 AM11/4/14
to open-l...@googlegroups.com
Correction:

http://shop.dmxking.com/ultraDMX-RDM-Pro_p_16.html

ultraDMX RDM Pro 80 Euro


http://shop.dmxking.com/ultraDMX-Pro_p_17.html

ultraDMX Pro 160 Euro


soooo ... NOPE NOPE and NOPE


Jason Kyle

unread,
Nov 4, 2014, 6:54:05 AM11/4/14
to open-l...@googlegroups.com

Great! Let us know when it’s all working.

--
The Open Lighting Group: open-l...@googlegroups.com, #openlighting (irc.freenode.org)
To unsubscribe from this group, send email to open-lightin...@googlegroups.com
For more options, visit https://groups.google.com/groups/opt_out?hl=en

Marcus Richters

unread,
Nov 4, 2014, 5:10:53 PM11/4/14
to open-l...@googlegroups.com
https://github.com/lowlander/dmx_usb_module/blob/master/dmx_usb.c

#if 0

Read is not yet supported

/**
*/
static ssize_t dmx_usb_read (struct file *file, char *buffer, size_t count, loff_t *ppos)
{
struct dmx_usb_device *dev;
int retval = 0;
int bytes_read;

dev = (struct dmx_usb_device *)file->private_data;

dbg("%s - minor %d, count = %Zd", __FUNCTION__, dev->minor, count);

/* lock this object */
down (&dev->sem);

/* verify that the device wasn't unplugged */
if (!dev->present) {
up (&dev->sem);
return -ENODEV;
}

/* do a blocking bulk read to get data from the device */
retval = usb_bulk_msg (dev->udev,
usb_rcvbulkpipe (dev->udev,
dev->bulk_in_endpointAddr),
dev->bulk_in_buffer,
min (dev->bulk_in_size, count),
&bytes_read, HZ*10);

/* if the read was successful, copy the data to userspace */
if (!retval) {
if (copy_to_user (buffer, dev->bulk_in_buffer+2, bytes_read-2))
retval = -EFAULT;
else
retval = bytes_read;
}

/* unlock the device */
up (&dev->sem);
return retval;
}

#endif

Marcus Richters

unread,
Nov 4, 2014, 5:13:47 PM11/4/14
to open-l...@googlegroups.com
https://github.com/lowlander/dmx_usb_module/blob/master/dmx_usb.c

//static ssize_t dmx_usb_read (struct file *file, char *buffer, size_t count, loff_t *ppos);

Marcus Richters

unread,
Nov 4, 2014, 5:15:18 PM11/4/14
to open-l...@googlegroups.com
root@blub:/dmx-software/dmx_usb_module# make
make -C /lib/modules/3.13.0-39-generic/build SUBDIRS=/dmx-software/dmx_usb_module modules
make[1]: Betrete Verzeichnis '/usr/src/linux-headers-3.13.0-39-generic'
  CC [M]  /dmx-software/dmx_usb_module/dmx_usb.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /dmx-software/dmx_usb_module/dmx_usb.mod.o
  LD [M]  /dmx-software/dmx_usb_module/dmx_usb.ko
make[1]: Verlasse Verzeichnis '/usr/src/linux-headers-3.13.0-39-generic'
gcc -O2 -pipe -Wall dmx_usb_test.c -o dmx_usb_test

 

Marcus Richters

unread,
Nov 4, 2014, 5:26:53 PM11/4/14
to open-l...@googlegroups.com
[15100.938433] usb 4-1: USB disconnect, device number 5
[15100.938683] uhci_hcd 0000:00:1d.2: dma_pool_free buffer-2048, ffff88003631b400/3631b400 (bad dma)
[15100.938690] /dmx-software/dmx_usb_module/dmx_usb.c: DMX USB #1 now disconnected
[15102.259439] usb 4-1: new full-speed USB device number 6 using uhci_hcd
[15102.821474] usb 4-1: New USB device found, idVendor=0403, idProduct=6001
[15102.821482] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15102.821488] usb 4-1: Product: FT232R USB UART
[15102.821492] usb 4-1: Manufacturer: FTDI
[15102.821497] usb 4-1: SerialNumber: A9Y2AY0L
[15102.873593] ftdi_sio 4-1:1.0: FTDI USB Serial Device converter detected
[15102.873662] usb 4-1: Detected FT232RL
[15102.873668] usb 4-1: Number of endpoints 2
[15102.873673] usb 4-1: Endpoint 1 MaxPacketSize 64
[15102.873677] usb 4-1: Endpoint 2 MaxPacketSize 64
[15102.873682] usb 4-1: Setting MaxPacketSize 64
[15102.875622] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0
[15102.886570] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[15102.886667] ftdi_sio 4-1:1.0: device disconnected
[15102.890723] /dmx-software/dmx_usb_module/dmx_usb.c: DMX USB device now attached to dmx1

Marcus Richters

unread,
Nov 4, 2014, 5:29:03 PM11/4/14
to open-l...@googlegroups.com
/* .read = dmx_usb_read, */

Peter Newman

unread,
Nov 4, 2014, 7:14:34 PM11/4/14
to open-l...@googlegroups.com
On Tuesday, 4 November 2014 09:42:02 UTC, Marcus Richters wrote:
<snip>


..... so for receiving DMX there is no need for a microcontroller

Others are far more up on the protocol side than me, but I think the issue is the DMX break isn't just a normal sequence of bytes, so it can be more challenging to detect if you don't have a uC onboard. Clearly it's technically possible, as software already exists, I think the question is simply around the reliability.

Marcus Richters

unread,
Nov 5, 2014, 2:48:00 AM11/5/14
to open-l...@googlegroups.com



Marcus Richters

unread,
Nov 5, 2014, 2:48:57 AM11/5/14
to open-l...@googlegroups.com

Hippy

unread,
Nov 5, 2014, 2:54:49 AM11/5/14
to open-l...@googlegroups.com


Like Jason said...  "Great! Let us know when it’s all working."

On 05/11/2014 5:48 PM, "Marcus Richters" <mar...@richters-it.de> wrote:
Reply all
Reply to author
Forward
0 new messages