OLA UART native DMX - not showing as output option?

1,028 views
Skip to first unread message

Simon

unread,
Mar 31, 2017, 1:19:47 AM3/31/17
to open-lighting
Just checking why im not seeing the UART native DMX as an output option when i create a Universe. I have enabled it in its config file and it shows green in the web interface.

Also checking that this will work: OLA connected to either node-red or OpenHAB (whats the best input method - OpenHAB is more important than node-red) and output is going through the linked device: http://linksprite.com/wiki/index.php5?title=RS485/GPIO_Shield_for_Raspberry_Pi_V3.0
to this: 

Im thinking it might be disable all other plugins? I also noticed atrnet didnt come up at the time of boot either - seems another user had the same issue

Peter Newman

unread,
Mar 31, 2017, 2:40:24 AM3/31/17
to open-lighting
Does your device show as ls -al /dev/ttyACM0 or something else?

Have you seen these instructions:

Richard Ash

unread,
Apr 1, 2017, 9:51:19 AM4/1/17
to open-lighting
On Thu, 30 Mar 2017 23:40:24 -0700 (PDT)
Peter Newman <peterj...@gmail.com> wrote:

> Does your device show as ls -al /dev/ttyACM0 or something else?
As the OP has a Pi3 (which I've never tested this on) I'm expecting it
to have both /dev/ttyACM0 and /dev/ttyS0. Unfortunately the default
firmware/device tree will have /dev/ttyACM0 connected to the on-board
bluetooth, and /dev/ttyS0 to the external serial port for RS485.

The /dev/ttyS0 UART is the 'lite' one with much less functionality than
the full-fat one used for serial on previous Pis, so I suspect it will
be necessary to re-patch the full-fat UART to the external port (and
disable bluetooth) for this to work properly. To do this means some
messing with device tree overlays in /boot on the Pi, from what I
have read. This is speculation, because I haven't tried to do this
myself (although I do now have a Pi3, it hasn't been out of it's box).

Richard

Arjan van Vught

unread,
Apr 1, 2017, 10:29:11 AM4/1/17
to open-l...@googlegroups.com
For the Raspberry Pi 3 you need to disable Bluetooth and reclaim the PL011 UART.

Add:
dtoverlay=pi3-disable-bt
to your config.txt file in the /boot directory.

Arjan
http://www.raspberrypi-dmx.org/

Op 1-4-2017 om 15:51 schreef Richard Ash:

Peter Newman

unread,
Apr 1, 2017, 6:32:05 PM4/1/17
to open-lighting
According to this, you can also swap them, so BT uses the software UART:
http://spellfoundry.com/2016/05/29/configuring-gpio-serial-port-raspbian-jessie-including-pi-3/

If you use this instead:
pi3-miniuart-bt

Peter Newman

unread,
Apr 1, 2017, 7:02:51 PM4/1/17
to open-lighting

Simon

unread,
Apr 2, 2017, 5:26:13 AM4/2/17
to open-lighting
I've followed the directions on the linksprite page - btw it's /dev/ttyAMA0

Hadn't thought about Bluetooth. So you think that's why it doesn't show as an output?

I'll hook it up tomorrow and try that again.

Simon

unread,
Apr 2, 2017, 11:51:50 PM4/2/17
to open-lighting
Apr  3 03:37:44 relaystation kernel: [    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=1440 bcm2708_fb.fbheight=900 bcm2708_fb.fbswap=1 dma.dmachans=0x7f35 bcm2709.boardrev=0xa22082 bcm2709.serial=0x467705dc bcm2709.uart_clock=16000000 smsc95xx.macaddr=B8:27:EB:77:05:DC vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Apr  3 03:37:44 relaystation kernel: [    0.081532] uart-pl011 3f201000.uart: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
Apr  3 03:37:44 relaystation kernel: [    1.055166] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
Apr  3 03:37:44 relaystation btuart[552]: Can't get port settings: Input/output error
Apr  3 03:37:44 relaystation btuart[552]: Can'
t initialize device: Input/output error
Apr  3 03:37:44 relaystation systemd[1]: hciuart.service: control process exited, code=exited status=1
Apr  3 03:37:44 relaystation systemd[1]: Unit hciuart.service entered failed state.
Apr  3 03:37:47 relaystation kernel: [   72.996665] uart-pl011 3f201000.uart: no DMA platform data
This is the sys log grepded for UART

I still dont see the output available in OLA. Any tips or other commands to run?

Peter Newman

unread,
Apr 3, 2017, 12:17:29 PM4/3/17
to open-lighting
Your UART is ttyAMA0 but OLA's default is ttyACM0.

You need to edit ola-uartdmx.conf to change the "device = /dev/ttyACM0" line, or add more of them to look for your specific UART. When the OLA web UI is running, it will tell you where the config file is stored on your machine (it varies depending on how you installed and launched OLA).

See https://github.com/OpenLightingProject/ola/blob/master/plugins/uartdmx/README.md

Simon .

unread,
Apr 3, 2017, 4:37:27 PM4/3/17
to open-l...@googlegroups.com
I should have specified, the conf file has been edited to enable the UART plugin and run with ttyAMA0.

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

Simon

unread,
Apr 3, 2017, 7:44:51 PM4/3/17
to open-lighting
/dev/ttyAMA0-break = 100
/dev/ttyAMA0-malf = 100
device
= /dev/ttyAMA0
enabled
= true


Thats the ola-uartdmx.conf file. It shows as enabled and active. 

Simon

unread,
Apr 3, 2017, 9:49:40 PM4/3/17
to open-lighting
Ive edited all the conf files and disabled the plugins im not using, so now I only have artnet and uartdmx enabled. In the universe I have it is already setup with artnet in, but when I go to select additional ports there are none listed. Before I disabled the last few they were showing, so it will show inputs and outputs correctly.

Peter Newman

unread,
Apr 4, 2017, 6:52:18 AM4/4/17
to open-lighting
Hmm, can we see some logs then please.

Can you run olad with -l 4 and send over the logs. To do do, start OLA via the init script or however it's normally run, find the relevant command with ps aux | grep -i olad, then stop olad, and run the same command with -l modified to 4, or appended if not currently present on the command line. Then post the output it gives. It may be running with the long option --log-level (if so change that instead), and the syslog option (remove that).

Simon .

unread,
Apr 4, 2017, 6:53:49 AM4/4/17
to open-l...@googlegroups.com
Ok, will do but where will the log be if not in syslog?

--

Peter Newman

unread,
Apr 4, 2017, 7:08:32 AM4/4/17
to open-lighting
STDOUT/STDERR so you can just redirect them into a file. You can filter them from syslog if you'd prefer.


On Tuesday, 4 April 2017 11:53:49 UTC+1, Simon wrote:
Ok, will do but where will the log be if not in syslog?

Simon

unread,
Apr 4, 2017, 5:58:56 PM4/4/17
to open-lighting


UartWidget.cpp:68: Opening serial port /dev/ttyAMA0
UartWidget.cpp:74: Opened serial port /dev/ttyAMA0
UartWidget.cpp:177: Failed to set baud rate to 250k
UartDmxPlugin.cpp:82: Unable to setup device for output, device ignored /dev/ttyAMA0
PluginManager.cpp:112: Started UART native DMX



I'll have a look at the baud rate issue, thanks for pointing me in the right direction.

also I see these errors:
Preferences.cpp:350: Could not open /etc/ola/ola-universe.conf: Permission denied
Preferences.cpp:350: Could not open /etc/ola/ola-port.conf: Permission denied


 But thats as it exits. Just wondering if that could be why it doesnt seem to load the universe propperly until you click reload plugins?

Peter Newman

unread,
Apr 4, 2017, 6:33:14 PM4/4/17
to open-lighting


On Tuesday, 4 April 2017 22:58:56 UTC+1, Simon wrote:


UartWidget.cpp:68: Opening serial port /dev/ttyAMA0
UartWidget.cpp:74: Opened serial port /dev/ttyAMA0
UartWidget.cpp:177: Failed to set baud rate to 250k
UartDmxPlugin.cpp:82: Unable to setup device for output, device ignored /dev/ttyAMA0
PluginManager.cpp:112: Started UART native DMX



I'll have a look at the baud rate issue, thanks for pointing me in the right direction.
That's it trying to set the magic fast DMX speed, which is an extension of the normal parameters. It could just be a permissions issue (of the port or user, although I suspect opening would fail then), it could be the remapping of ports doesn't allow the magic fast options. You could try not doing the remapping and sending some DMX garbage to the Bluetooth device. 

also I see these errors:
Preferences.cpp:350: Could not open /etc/ola/ola-universe.conf: Permission denied
Preferences.cpp:350: Could not open /etc/ola/ola-port.conf: Permission denied


 But thats as it exits. Just wondering if that could be why it doesnt seem to load the universe propperly until you click reload plugins?
We currently only save preferences on exit, so that could be related. Again it's likely to be a permissions issue. If you've got the deb installed, it normally runs as the olad user, who hopefully has access to those files.

Simon .

unread,
Apr 4, 2017, 6:41:40 PM4/4/17
to open-l...@googlegroups.com
I've got the init_uart(can't remember exactly)=1000000 in the config.txt 

Should I set that to 250000 instead?

Anywhere else to set the max speed? Looks to me like I've successfully got Bluetooth out of the way.

/dev/ttyAMA0 is part of the dialout group, and serial0 is owned by root, do I have to change either for rights? Pretty sure pi is part of the dialout group, is there a special ola user?


--

Peter Newman

unread,
Apr 5, 2017, 8:53:18 AM4/5/17
to open-lighting
See the other notes here, you'll need to change it to init_uart_clock=16000000:

If you've installed the .deb of ola, there should be an olad user it runs at via init.d. If you're launching via the command line, obviously that won't happen.


On Tuesday, 4 April 2017 23:41:40 UTC+1, Simon wrote:
I've got the init_uart(can't remember exactly)=1000000 in the config.txt 

Should I set that to 250000 instead?

Anywhere else to set the max speed? Looks to me like I've successfully got Bluetooth out of the way.

/dev/ttyAMA0 is part of the dialout group, and serial0 is owned by root, do I have to change either for rights? Pretty sure pi is part of the dialout group, is there a special ola user?

Simon

unread,
Apr 7, 2017, 7:11:34 PM4/7/17
to open-lighting
Ok, sorry for all the uncertainty, i cant get to the rpi to check or test often. That said, here are a few config's pulled straight off the RPI copy pasted:

/etc/ola/ola-uartdmx.conf
/dev/ttyAMA0-break = 100
/dev/ttyAMA0-malf = 100
device = /dev/ttyAMA0
enabled = true

pi@relaystation:~ $ sudo adduser olad dialout
The user `olad' is already a member of `dialout'.

/boot/config.txt
...
dtparam
=audio=on
enable_uart
=1
init_uart_clock
=16000000

/boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

 $ olad -l 4 --config-dir /etc/ola
PluginManager.cpp:112: Started USB
PluginManager.cpp:108: Trying to start UART native DMX
UartDmxPlugin.cpp:67: Trying to open UART device /dev/ttyAMA0
UartWidget.cpp:68: Opening serial port /dev/ttyAMA0
UartWidget.cpp:74: Opened serial port /dev/ttyAMA0
UartWidget.cpp:177: Failed to set baud rate to 250k
UartDmxPlugin.cpp:82: Unable to setup device for output, device ignored /dev/ttyAMA0
PluginManager.cpp:112: Started UART native DMX
SelectPoller.cpp:160: ss process time was 0.000006
SelectPoller.cpp:160: ss process time was 0.000002
SelectPoller.cpp:160: ss process time was 0.000001
OlaServer.cpp:343: Garbage collecting
SelectPoller.cpp:160: ss process time was 0.000006
SelectPoller.cpp:160: ss process time was 0.000002
SelectPoller.cpp:160: ss process time was 0.000003
DeviceManager.cpp:116: Installed device: ArtNet [192.168.1.100]:2-1
Universe.cpp:499: Full RDM discovery triggered for universe 1
ArtNetNode.cpp:867: Sending ArtTodRequest
PortManager.cpp:154: Patched 2-1-I-0 to universe 1
PluginManager.cpp:112: Started ArtNet
PluginManager.cpp:108: Trying to start SPI
PluginManager.cpp:112: Started SPI
PluginManager.cpp:108: Trying to start Serial USB
PluginManager.cpp:112: Started Serial USB
SelectPoller.cpp:160: ss process time was 0.000002
PluginManager.cpp:108: Trying to start USB
UsbDmxPlugin.cpp:99: libusb debug level set to 0
PluginManager.cpp:112: Started USB
PluginManager.cpp:108: Trying to start UART native DMX
UartDmxPlugin.cpp:67: Trying to open UART device /dev/ttyAMA0
UartWidget.cpp:68: Opening serial port /dev/ttyAMA0
UartWidget.cpp:74: Opened serial port /dev/ttyAMA0
UartWidget.cpp:177: Failed to set baud rate to 250k
UartDmxPlugin.cpp:82: Unable to setup device for output, device ignored /dev/ttyAMA0
PluginManager.cpp:112: Started UART native DMX
SelectPoller.cpp:160: ss process time was 0.000006
SelectPoller.cpp:160: ss process time was 0.000002
SelectPoller.cpp:160: ss process time was 0.000001
OlaServer.cpp:343: Garbage collecting
SelectPoller.cpp:160: ss process time was 0.000004
SelectPoller.cpp:160: ss process time was 0.000002
SelectPoller.cpp:160: ss process time was 0.000003
^CSignalThread.cpp:99: Received signal: Interrupt
HTTPServer.cpp:485: Notifying HTTP server thread to stop
HTTPServer.cpp:487: Waiting for HTTP server thread to exit
HTTPServer.cpp:489: HTTP server thread exited
Preferences.cpp:350: Could not open /etc/ola/ola-universe.conf: Permission denied
Preferences.cpp:350: Could not open /etc/ola/ola-port.conf: Permission denied
SelectPoller.cpp:160: ss process time was 0.000007
SelectPoller.cpp:160: ss process time was 0.000002
pi@relaystation
:~ $


Anything else I can post?


Peter Newman

unread,
Apr 9, 2017, 4:49:41 PM4/9/17
to open-lighting
There are some notes for another device here, ignore the GPI stuff, but perhaps see if some of the additional notes help:

Otherwise we probably need to add some more debug to try and find out what's going on.
Reply all
Reply to author
Forward
0 new messages