0

I have a Raspberry Pi 4B with a Bitwizard DMX Hat which uses the serial port. I try to output DMX from the board to a LED light using QLC+ software, but it's not working. I tried some commands and I think I messed something. I read somewhere that the Pi4 have 2 serial bus, and that the default one has changed vs the Pi3. In QLC+, some people say that I just need to check the serial0 in the list, but it's not there.

Right now ls -l /dev is telling that serial1=ttyS0, and there's no ttyAMA0 (continue reading)

Here are the commands I tried:

First I installed i2c tools (because I use another Hat for Relays):

sudo apt-get install i2c-tools -y

I edited /boot/config.txt to uncomment the line "hdmi_force_hotplug=1" because I want to use the Pi headless. And I added the following line at the end of the file :

enable_uart=1

I then configured the board to output DMX (by default it's configured to have only DMX input). I added these lines in the file /etc/init.d/qlcplus just before the line beginning with QLCPLUS_OPTS

echo 18 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio18/direction
echo 1 > /sys/class/gpio/gpio18/value

Next, it seems that we have to disable bluetooth because it uses the serial port, so I added these lines at the end of /boot/config.txt

dtoverlay=pi3-disable-bt
dtoverlay=pi4-disable-bt
dtoverlay=disable-bt

Next I enabled UART

sudo wget https://raw.githubusercontent.com/itemir/rpi_boat_utils/master/uart_control/uart_control
mv uart_control uart_control.sh
sudo chmod -x uart_control.sh
sudo ./uart_control.sh gpio

Next, a website say that I need to disable the Pi Serial interface, in order so it's free to use by the Hat. I entered raspi-config and disabled Serial in the interfaces.

Next I disabled the modem service, so that the UART is free.

sudo systemctl disable hciuart
sudo systemctl disable serial-getty@ttyAMA0.service

Next, I changed the /boot/config.txt file to :

  • Remove line "console=ttyAMA0,115200
  • Add line "init_uart_clock=16000000

I rebooted, and it's not working. In QLC+, I don't know what to select in the outputs. The UART line has no device to it, so I can't select it. I tried ticking the GPIO line but it's not working. And there is no Serial line to tick.

Any help would be much appreciated!

This is the Bitwizard board I use https://bitwizard.nl/shop/DMX-interface-for-Raspberry-pi

=========== UPDATE

So I started over on a fresh Buster install like @Milliways suggested. This time I have not installed third party softwares, except for QLC software and its dependencies.

Here is what I've done

In raspi-config, I enabled serial port without serial console.

In the /boot/config.txt file, I added line dtoverlay=pi3-disable-dt as per the QLC doc for Bitwizard board. The line enable_uart=1 was already active, so no change for that.

I added these lines to /etc/init.d/qlcplus to tell Bitwizard to emit DMX signal

echo 18 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio18/direction
echo 1 > /sys/class/gpio/gpio18/value

In QLC, I selected UART on ttyAMA0 as the device to use.

The link posted by @Milliways was of good help for the last part. Step 5 was required to make it work, so I had to remove console=tty1 from the /boot/cmdline.txt file.

It's working now!

M.Parent
  • 23
  • 4

1 Answers1

1

This post is full of mis-information.
There should NOT be a line "console=ttyAMA0,115200"
You should't have to disable Bluetooth, but if you must do it properly.
There are no differences in default serial (or any of the GPIO functions) between Pi4 and earlier 40 pin models with WiFi.

Downloading random software is risky - it is difficult to see what it would do but it doesn't seem to support Pi4.

To configure serial see How do I make serial work on the Raspberry Pi3 or later, but this should be done through raspi-config

I doubt your system is salvageable, I suggest you start again and follow normal procedures.

You should include a link to the hardware you are using.

Milliways
  • 54,718
  • 26
  • 92
  • 182
  • Well I'm sorry, I just followed instructions on other sites. I'm a long term developer, but noob on linux – M.Parent Mar 10 '20 at 12:20
  • The bluetooth part is an instruction on the QLC documentation specifically about the Bitwizard board. – M.Parent Mar 10 '20 at 12:31
  • I added an update. I started over from a fresh install. It's working! Thank you very much for your help – M.Parent Mar 10 '20 at 15:26