Re: [open-lighting] Freezing/Delay when using artnet and SPI (but only with some software)

129 views
Skip to first unread message

Simon Newton

unread,
May 7, 2013, 10:37:35 PM5/7/13
to open-l...@googlegroups.com
On Tue, May 7, 2013 at 11:45 AM, <ry...@mediastripe.net> wrote:
> Hello,
>
> I'm having a peculiar issue that has recently popped up when using a certain
> piece of lighting software. I am using OLA on a Raspberry PI to run 120 SPI
> ws2801 pixels. My setup has been working fine for the last month, but
> earlier this week when using lightjams software to run the pixels over
> artnet, I'm having a number of issues that I did not have a few weeks ago.
>
> If I just run OLA "as-is" the pixels do not update but once every 1-2
> seconds. If I run olad -l 4 (log level 4) the pixels then update correctly,
> but there is a 10-second delay in what I see on my computer to what the
> pixels output. This happens only in the lightjams software.

Odd, open up the web UI and hit localhost:9090/debug . Hit refresh a
couple of times and watch the universe-dmx-frames counter to get a
sense of how many frames / second it's sending. My guess is that it's
sending more than ~50 fps so the UDP socket buffers back up.

It would also be helpful if you can send a few seconds of ArtNet data
in a tcpdump.

Simon


>
> If I use Jands Vista to run the pixels, also over artnet to the PI, the
> pixels update without issue - no stuttering and no delay.
>
> I've already re-installed OLA onto a new SD card and start from scratch, but
> that has not helped the issue.
>
> I'm not quite sure where to begin troubleshooting, as I've made no major
> changes to my setup before this started happening.
>
> Any assistance would be greatly appreciated!
>
> Thank you!
>
> --
> 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
>
>

Sean Sill

unread,
May 7, 2013, 10:40:49 PM5/7/13
to open-l...@googlegroups.com
Do you happen to have a wireshark capture of whats going on?


On Tuesday, May 7, 2013 2:45:59 PM UTC-4, ry...@mediastripe.net wrote:
Hello,

I'm having a peculiar issue that has recently popped up when using a certain piece of lighting software. I am using OLA on a Raspberry PI to run 120 SPI ws2801 pixels. My setup has been working fine for the last month, but earlier this week when using lightjams software to run the pixels over artnet, I'm having a number of issues that I did not have a few weeks ago.

If I just run OLA "as-is" the pixels do not update but once every 1-2 seconds. If I run olad -l 4 (log level 4) the pixels then update correctly, but there is a 10-second delay in what I see on my computer to what the pixels output. This happens only in the lightjams software.

ry...@mediastripe.net

unread,
May 7, 2013, 11:31:39 PM5/7/13
to open-l...@googlegroups.com
Thank you for your responses!

Initially, looking at the debug on the Raspberry PI it seemed like it was doing about 25-35 frames/second, but the TCP data from wireshark shows that it can get well above that, not sure if that is what is causing the issue. 

The other thing that really mystifies me is that when I run ola with the "-l 4" switch, the display refreshes, but it is definitely slower than what LightJams is outputting and delayed a few seconds.

Again, any suggestions/help are greatly appreciated!
LightjamsOut0507130.pcapng

Simon Newton

unread,
May 7, 2013, 11:49:24 PM5/7/13
to open-l...@googlegroups.com
On Tue, May 7, 2013 at 8:31 PM, <ry...@mediastripe.net> wrote:
> Thank you for your responses!
>
> Initially, looking at the debug on the Raspberry PI it seemed like it was
> doing about 25-35 frames/second, but the TCP data from wireshark shows that
> it can get well above that, not sure if that is what is causing the issue.
>
> The other thing that really mystifies me is that when I run ola with the "-l
> 4" switch, the display refreshes, but it is definitely slower than what
> LightJams is outputting and delayed a few seconds.

What does

netstat -lun | grep 6454

show while you're seeing the problems?

Simon

ry...@mediastripe.net

unread,
May 8, 2013, 12:34:05 PM5/8/13
to open-l...@googlegroups.com
Simon,

netstat -lun | grep 6454 

comes back with:

udp   164592      0 0.0.0.0:6454            0.0.0.0:*

Simon Newton

unread,
May 8, 2013, 3:12:52 PM5/8/13
to open-l...@googlegroups.com
On Wed, May 8, 2013 at 9:34 AM, <ry...@mediastripe.net> wrote:
> Simon,
>
> netstat -lun | grep 6454
>
> comes back with:
>
> udp 164592 0 0.0.0.0:6454 0.0.0.0:*

Yup, the UDP Rx buffers are full. It means LightJams is sending ArtNet
faster than OLA can process it and write the data over SPI.

I need to put a rate limiter in place or move the SPI writes to a
separate thread.

Simon

ry...@mediastripe.net

unread,
May 8, 2013, 3:44:07 PM5/8/13
to open-l...@googlegroups.com
Simon,

Thinking about this situation just gave me a *headdesk* moment. I realized I starting having these issues after I added an additional 20 pixels to my setup. I had been running 100 ws2801's and things were working fine. But once I updated the configuration (ola-spi.conf) to reflect the 120 pixels, thats when I starting having issues - I can only guess those extra channels are what was causing the data rate issues. I just changed the setup back to 100 and its working again, and the buffer is staying at 0 when running the lightjams software now.

I really appreciate your help! Thank you again!

Simon Newton

unread,
Sep 19, 2013, 12:47:24 PM9/19/13
to open-lighting
On Wed, May 8, 2013 at 12:44 PM, <ry...@mediastripe.net> wrote:
> Simon,
>
> Thinking about this situation just gave me a *headdesk* moment. I realized I
> starting having these issues after I added an additional 20 pixels to my
> setup. I had been running 100 ws2801's and things were working fine. But
> once I updated the configuration (ola-spi.conf) to reflect the 120 pixels,
> thats when I starting having issues - I can only guess those extra channels
> are what was causing the data rate issues. I just changed the setup back to
> 100 and its working again, and the buffer is staying at 0 when running the
> lightjams software now.
>
> I really appreciate your help! Thank you again!

The new SPI code that I just pushed up doesn't suffer from this
problem. It'll export a variable spi-drops to indicate if updates are
arriving too quickly.

Simon
Reply all
Reply to author
Forward
0 new messages