ola on FG50E as openWRT

30 views
Skip to first unread message

Masakazu Nakano

unread,
Mar 11, 2024, 9:58:35 PMMar 11
to open-lighting
HI there from Japan.

Now I'm trying to make a New Universe connection ola:9090 with FTDI on OpenWRT.

Basically FTDI was connected.

root@OpenWrt:/etc/ola# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux 5.15.137 xhci-hcd xHCI Host Controller
Bus 004 Device 001: ID 1d6b:0003 Linux 5.15.137 vhci_hcd USB/IP Virtual Host Controller
Bus 001 Device 011: ID 0403:6001 FTDI FT232R USB UART
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.137 xhci-hcd xHCI Host Controller
Bus 003 Device 001: ID 1d6b:0002 Linux 5.15.137 vhci_hcd USB/IP Virtual Host Controller


The drirver dmx-usb looks attached well

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 11 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev= 6.00
S:  Manufacturer=FTDI
S:  Product=FT232R USB UART
S:  SerialNumber=B001C5JK
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 90mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=dmx_usb
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms


And state says Active.

root@OpenWrt:/etc/ola# ola_plugin_state -p 13
FTDI USB DMX
Enabled: True
Active: True
Conflicts with:
  Serial USB(5)
  Enttec Open DMX(6)

But ola_dev_info says no FTDI. 

dmesg says.
[ 6348.488538] usb 1-1: new full-speed USB device number 11 using xhci-hcd
[ 6348.567860] ttyS ttyS0: 2 input overrun(s)
[ 6348.748627] /home/mack/openwrt230501/openwrt-a58a866/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/linux-mvebu_cortexa9/dmx_usb_module-19.12.1/dmx_usb.c: DMX USB device now attached to dmx192

What is this cause?

Also I make a similar enviroments on Ubuntu 22.04.
That is works well like this on Device.8.

pls help me.

Best regards,

Mack

E.S. Rosenberg

unread,
Mar 12, 2024, 3:12:14 AMMar 12
to open-l...@googlegroups.com
Hey Mack,

Unless I am too out of it the plugin state suggests that OLA wants to use the FTDI plugin while the other outputs point at usb_dmx which is as far as I recall the same as Serial USB.
Have you disabled the plugins you don't want to use because it seems to me that you may have different conflicting plugins enabled.

HTH.
Eli

Op di 12 mrt 2024 om 03:58 schreef Masakazu Nakano <empla...@gmail.com>:
--
The Open Lighting Project: 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
---
You received this message because you are subscribed to the Google Groups "open-lighting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-lightin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/open-lighting/d437c35f-a636-4590-a58f-04309495740en%40googlegroups.com.

Peter Newman

unread,
Mar 12, 2024, 12:33:09 PMMar 12
to open-lighting
I'd mostly agree with Eli.

Although I think its this dmx_usb driver you've got loaded:


If you're using that driver, you'll want the OpenDMX plugin within OLA instead of the FTDI one. Or remove the dmx_usb one and use the FTDI plugin (and standard Linux driver) directly.

I'm not really sure but I suspect the dmx_usb one may be marginally better timing wise, assuming a kernel process has better access to CPU cycles, but it wouldn't be able to do RDM without a lot of work (unlike Eli's working code for that).

Masakazu Nakano

unread,
Mar 12, 2024, 8:11:47 PMMar 12
to open-l...@googlegroups.com

Hi Eli-san.
Thank you for your reply :)

--- Those configs are work well on Ubuntu 22.04.in no conflicts.

mack@vaio0001:/etc/ola$ cat ola-ftdidmx.conf
enabled = true
frequency = 30

mack@vaio0001:/etc/ola$ cat ola-opendmx.conf
device = /dev/dmx0
enabled = false

mack@vaio0001:/etc/ola$ cat ola-usbdmx.conf
enabled = true
libusb_debug_level = 0
mack@vaio0001:/etc/ola$ cat ola-usbserial.conf
device_dir = /dev
device_prefix = ttyUSB
device_prefix = cu.usbserial-
device_prefix = ttyU
enabled = false
pro_fps_limit = 190
tri_use_raw_rdm = false
ultra_fps_limit = 40

mack@vaio0001:/etc/ola$ cat ola-uartdmx.conf
device = /dev/ttyACM0
enabled = false
mack@vaio0001:/etc/ola$                                                        
                           
--- Those configs aren't works :( on openWRT@Fortigate FG50E.

root@OpenWrt:/etc/ola# cat ola-ftdidmx.conf
enabled = true
frequency = 30
root@OpenWrt:/etc/ola# cat ola-opendmx.conf
device = /dev/dmx0
enabled = false
root@OpenWrt:/etc/ola# cat ola-usbdmx.conf
enabled = true
libusb_debug_level = 4
root@OpenWrt:/etc/ola# cat ola-usbserial.conf
device_dir = /dev
device_prefix = ttyUSB
device_prefix = cu.usbserial-
device_prefix = ttyU
device_prefix = ttyS
device_prefix = dmx
enabled = false
pro_fps_limit = 190
tri_use_raw_rdm = false
ultra_fps_limit = 40
root@OpenWrt:/etc/ola# cat ola-uartdmx.conf
device = /dev/ttyACM0
enabled = false

Both are similar in configuration. just a debug level and device levels are different.

Ubuntu makes /dev/ttyUSB0
but openWRT could not it.just a /dev/dmx0

A different point is just here...

I tried  ln -s /dev/dmx0 ttyUSB0
But that isn't succeded... :(
 
I know both ones say 'Confrcts with' every time following like this.


root@OpenWrt:/etc/ola# ola_plugin_state -p 13
FTDI USB DMX
Enabled: True
Active: True
Conflicts with:
  Serial USB(5)
  Enttec Open DMX(6)

"service olad restart" will make a new config file automatically as case of openWRT... Why??

additional note:
ola-opendmx.conf is bit troublesome...

When I tried to change the state to false. it will make it Active.
root@OpenWrt:/etc/ola# cat ola-opendmx.conf
device = /dev/dmx0
enabled = false

following like this :D

root@OpenWrt:/etc/ola# vi ola-opendmx.conf

root@OpenWrt:/etc/ola# ola_plugin_state -p 13
FTDI USB DMX
Enabled: True
Active: False

Conflicts with:
  Serial USB(5)
  Enttec Open DMX(6)
root@OpenWrt:/etc/ola# service olad restart

root@OpenWrt:/etc/ola# ola_plugin_state -p 13
FTDI USB DMX
Enabled: True
Active: True
Conflicts with:
  Serial USB(5)
  Enttec Open DMX(6)

But ola_dev_info is not coming about FTDI ... I wonder...??

BR

Mack


2024年3月12日(火) 16:12 E.S. Rosenberg <es.ros...@gmail.com>:


--
どうぞ宜しくお願い致します。

合同会社プラスエボリューション
代表取締役 中野正和
※ホテル旅館・越境EC向け通話無料のウェブインターホンサービス「tuuwaボタン」を提供しております。

--- keep it bass,keep it drum.
ubuntu server 14.04 + nginx + mysql + ISPConfig3 + dovecot + postfix + bigbluebutton + Freeswitch + FusionPBX + moodle ( + Blender + Cinelerra + Synfig + openEMR )

Masakazu Nakano

unread,
Mar 12, 2024, 8:43:30 PMMar 12
to open-l...@googlegroups.com
Hi Peter :)

Thank you so much too.

Let me remove the dmx_usb.

root@OpenWrt:/etc/ola# rm ola-opendmx.conf*
root@OpenWrt:/etc/ola# rm ola-usbdmx.conf*

root@OpenWrt:/etc/ola# opkg remove kmod-usb-serial-dmx_usb_module
No packages removed.

and restart the olad...

But ola-usbdmx.conf will make as olad ( maybe not /init.d/olad ) in true automatically...

openWRT and Ubuntu 22.04 ones are same version.

root@OpenWrt:/etc/ola# /usr/bin/olad -v
OLA /usr/bin/olad version: 0.10.8

I checked init.d/olad both ones. FG50E side has a basically one.  

uhmmmm....

BR

Mack

2024年3月13日(水) 1:33 Peter Newman <peterj...@gmail.com>:

Masakazu Nakano

unread,
Mar 13, 2024, 3:57:07 AMMar 13
to open-l...@googlegroups.com
Hi there :)

I got a result as logread

root@OpenWrt:/etc/ola# logread | grep olad

Wed Mar 13 07:21:36 2024 user.info : olad/PluginManager.cpp:195: Trying to start USB
Wed Mar 13 07:21:36 2024 user.info : olad/PluginManager.cpp:200: Started USB
Wed Mar 13 07:21:36 2024 user.info : olad/PluginManager.cpp:195: Trying to start FTDI USB DMX
Wed Mar 13 07:21:36 2024 user.info : olad/PluginManager.cpp:200: Started FTDI USB DMX

But...

root@OpenWrt:/etc/ola# ola_plugin_info
   Id   Plugin Name
--------------------------------------
    1   Dummy
    2   ArtNet
    3   ShowNet
    4   ESP Net
    5   Serial USB
    6   Enttec Open DMX
    7   SandNet
    8   StageProfi
    9   Pathport
   11   E1.31 (sACN)
   12   USB
   13   FTDI USB DMX
   14   OSC
   15   SPI
   16   KiNET
   17   KarateLight
   18   Milford Instruments
   19   Renard
   20   UART native DMX
   21   Open Pixel Control
   22   GPIO
--------------------------------------
root@OpenWrt:/etc/ola# ola_dev_info -p 13
root@OpenWrt:/etc/ola#

-p 13 is no result... Why (?_?

BR

Mack

2024年3月13日(水) 1:33 Peter Newman <peterj...@gmail.com>:
I'd mostly agree with Eli.

E.S. Rosenberg

unread,
Mar 13, 2024, 4:54:29 AMMar 13
to open-l...@googlegroups.com
Hey Mack,

2 things you should check:
1. What is the device ID of the FTDI adapter you have, the FTDI plugin will only work with specific devices (you can also make the olad output much more verbose and catch some more output from the FTDI plugin)
2. I know that on "fullfat" Linux when you start using libftdi the kernel will unload whatever device driver (usb_serial, usb_dmx etc) is currently claiming the FTDI device and make it available to libftdi maybe this doesn't happen on OpenWRT and you need to blacklist some kernel modules?

HTH,
Eli

Op wo 13 mrt 2024 om 09:57 schreef Masakazu Nakano <empla...@gmail.com>:

Masakazu Nakano

unread,
Mar 13, 2024, 5:46:30 AMMar 13
to open-l...@googlegroups.com
HI Eli.

I made a shell script like this one.

--- root@vaio0001:/etc/ola# cat olar.sh
#!/bin/bash

service olad stop && service olad start

ola_plugin_state -p 5 -s disable
ola_plugin_state -p 6 -s disable
ola_plugin_state -p 8 -s disable
ola_plugin_state -p 20 -s disable

ola_plugin_state -p 1 -s enable
ola_plugin_state -p 11 -s enable
ola_plugin_state -p 12 -s enable
ola_plugin_state -p 13 -s enable
---

Running on Ubuntu 22.04 is complete and works well.

This is the result of /bin/ash @ openWRT FG50E

Wed Mar 13 09:06:48 2024 user.debug : plugins/usbdmx/AsyncPluginImpl.cpp:272: USB device added, checking for widget support, vendor 0x1d6b, product 0x0002
Wed Mar 13 09:06:48 2024 user.info : libs/usb/LibUsbThread.cpp:50: -- Starting libusb thread
Wed Mar 13 09:06:48 2024 user.info : common/thread/Thread.cpp:200: Thread , policy SCHED_OTHER, priority 0
Wed Mar 13 09:06:48 2024 user.info : libs/usb/LibUsbThread.cpp:35: ----libusb event thread is running
Wed Mar 13 09:06:48 2024 user.info : olad/PluginManager.cpp:200: Started USB
Wed Mar 13 09:06:48 2024 user.info : olad/PluginManager.cpp:195: Trying to start FTDI USB DMX
Wed Mar 13 09:06:48 2024 user.info : plugins/ftdidmx/FtdiWidget.cpp:133: Found 1 FTDI devices with PID: 24577.
Wed Mar 13 09:06:48 2024 user.warn : plugins/ftdidmx/FtdiWidget.cpp:163: Unable to fetch string information from USB device: libusb_open() failed
Wed Mar 13 09:06:48 2024 user.debug : plugins/ftdidmx/FtdiWidget.cpp:205: Freeing list
Wed Mar 13 09:06:48 2024 user.info : plugins/ftdidmx/FtdiWidget.cpp:133: Found 0 FTDI devices with PID: 24593.
Wed Mar 13 09:06:48 2024 user.debug : plugins/ftdidmx/FtdiWidget.cpp:205: Freeing list
Wed Mar 13 09:06:48 2024 user.info : olad/PluginManager.cpp:200: Started FTDI USB DMX

root@OpenWrt:/etc/ola# lsusb -v -d 0403:6001

Bus 001 Device 007: ID 0403:6001 FTDI FT232R USB UART
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0403
  idProduct          0x6001
  bcdDevice            6.00
  iManufacturer           1 FTDI
  iProduct                2 FT232R USB UART
  iSerial                 3 B001C5JK
  bNumConfigurations      1

This FTDI-UART is works good with OLA and qlcp on Ubuntu 22.04 

Ubuntu 22.04 Says.
Bus 003 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC

And I had checked the USB port with that console cable as loopback 9600 bps on FG50E.
That works well.Because FG50E's USB (serial) port looks no problem...

Uhmmmm....

BR

Mack


2024年3月13日(水) 17:54 E.S. Rosenberg <es.ros...@gmail.com>:

E.S. Rosenberg

unread,
Mar 13, 2024, 6:02:22 AMMar 13
to open-l...@googlegroups.com
Hey Mack,
Have you made sure that no *kernel* driver is using the device? 
ie. if olad/libftdi successfully claims the device /de/vttyUSBx or /dev/ttySx related to the device should disappear.
You may need to blacklist/rmmod the kernel module manually.
HTH,
Eli

Op wo 13 mrt 2024 om 11:46 schreef Masakazu Nakano <empla...@gmail.com>:

Masakazu Nakano

unread,
Mar 13, 2024, 6:56:38 AMMar 13
to open-l...@googlegroups.com
HI Eli

lsmod says right now.
usbserial              28672  4 pl2303,mos7840,ftdi_sio,ch341

root@OpenWrt:/etc/modules.d# ls -lga /dev/tty
tty      ttyS0    ttyS1    ttyUSB0

* There is no /dev/dmx0 too :)

This ftdi_sio is not required,right??


rmmod ftdi_sio   and logread says...

Wed Mar 13 10:36:06 2024 kern.info kernel: [31941.549667] usb 1-1: new full-speed USB device number 10 using xhci-hcd
Wed Mar 13 10:36:06 2024 user.info : libs/usb/HotplugAgent.cpp:172: USB hotplug event: 1:10 @0xb6d507d0 [add]
Wed Mar 13 10:36:06 2024 user.debug : plugins/usbdmx/AsyncPluginImpl.cpp:272: USB device added, checking for widget support, vendor 0x0403, product 0x6001

configs look ok...

root@OpenWrt:/etc/ola# ola_plugin_state -p 12
USB

Enabled: True
Active: True
Conflicts with:
root@OpenWrt:/etc/ola#
root@OpenWrt:/etc/ola# ola_plugin_state -p 13
FTDI USB DMX
Enabled: True
Active: True
Conflicts with:
  Serial USB(5)
  Enttec Open DMX(6)

But not listed up on Universe adder yet...

Other driver issues?

BR

Mack



2024年3月13日(水) 19:02 E.S. Rosenberg <es.ros...@gmail.com>:

E.S. Rosenberg

unread,
Mar 13, 2024, 7:16:46 AMMar 13
to open-l...@googlegroups.com
Hey Mack,
If I understand the last output you sent correctly it looks like the usbdmx driver trying to take the device and not the FTDI driver.
HTH,
Eli

Op wo 13 mrt 2024 om 12:56 schreef Masakazu Nakano <empla...@gmail.com>:

Masakazu Nakano

unread,
Mar 14, 2024, 1:53:48 AMMar 14
to open-l...@googlegroups.com
Hi Eli

Let me build another openWRT environment such as the following.

Hostname OpenWrt
Model Buffalo WZR-HP-AG300H
Architecture Atheros AR7161 rev 2
Target Platform ath79/generic

and rmmod ftdi_sio and run "service olad start"

Result is just the same as the FG50E... :(

one question.

ola_ftdidmx depends on /dev/ttyUSB0 or not??

Has anyone succeeded with FTDI on openWRT ?

BR

Mack

2024年3月13日(水) 20:16 E.S. Rosenberg <es.ros...@gmail.com>:

E.S. Rosenberg

unread,
Mar 14, 2024, 3:21:53 AMMar 14
to open-l...@googlegroups.com
Hey Mack,

As far as I remember when libftdi is active /dev/ttyUSBx is removed from the device pool.
I'll probably dig up my gear in the near future to have another crack at getting the RDM driver in and will be able to test then.
Note that you have 2 levels of drivers:
1. kernel (usbdmx/ftdi_sio/etc)
2. ola

If you want to use libftdi the device needs to be unclaimed or freed at the kernel level and at the ola level (in your last output the OLAd USB driver had already claimed the device).

HTH,
Eli

Op do 14 mrt 2024 om 07:53 schreef Masakazu Nakano <empla...@gmail.com>:

Peter Newman

unread,
Mar 18, 2024, 6:37:54 PMMar 18
to open-lighting
Hi Masakazu,

I was going to point you to how to get olad -l 4 logs, but it looks like logread does it already (here for info):

The error the previous time was:
Wed Mar 13 09:06:48 2024 user.warn : plugins/ftdidmx/FtdiWidget.cpp:163: Unable to fetch string information from USB device: libusb_open() failed

What does it do with your latest changes?

Although equally given you had the dmx_usb Kernel module loaded and it appeared to be working, have you considered ditching FTDI, just going back to that and using the OpenDMX plugin instead, which should all just work fine too (as long as you don't want to experiment with Eli's RDM stuff).

Masakazu Nakano

unread,
Mar 18, 2024, 9:28:30 PMMar 18
to open-l...@googlegroups.com
Hi Peter.

First,  I want to know whether usb_ftdi ( -p 13 ) requires "opkg install kmod-usb-serial-ftdi" or not.

In the success case of ubuntu22.04 says.

mack@vaio0001:/etc/ola$ lsmod | grep ftdi
ftdi_sio               65536  0
usbserial              57344  4 ftdi_sio,ch341

Now I cannot run the -p 13 on openWRT in any environments such as FG50E.

How can I get the deep log by openWRT ?
Is anyone running FTDI on openWRT ??

BR

Mack


2024年3月19日(火) 7:37 Peter Newman <peterj...@gmail.com>:

Peter Newman

unread,
Mar 23, 2024, 8:29:19 PMMar 23
to open-lighting
Hi Mack,

There is no usb_ftdi plugin. Plugin 13 is the ftdidmx one (as mentioned in the FAQ here):

It needs libftdi0 or libftdi1 to function/be built. The kernel module wouldn't on it's own provide libftdi, maybe it pulls in the dependency.

I'm not running OpenWRT at all personally sorry.

As mentioned before, I was going to point you to how to get olad -l 4 logs, but it looks like logread does it already too (here for info):
Reply all
Reply to author
Forward
0 new messages