Raspberry Pi 5 DSP crossover music streamer

My asound.conf file has only two lines
pcm.default pulse
Ctl.default pulse

Sudo raspi-config has pipewire selected, Labwc selected, and audio output to Loopback selected.

On the Pi5 gui desktop audio option (the speaker Icon) I have Loopback Analog Surround 7.1 Output active.
 
Today I connected my Pioneer VSX-32 AV Receiver with ethernet cable to my home network and configured it to use DHCP and obtain an IP address automatically. This is the same network that my RaspberryPi5 is connected to. I use a bash file to power on the VSX-32, set the input to BluRay (where my Pi5 connects with HDMI cable), re-initialize CamillaGUI and CamillaDSP, and play the Radio Paradise main mix with mplayer all with a single command by executing the bash file from the command line.

Your RaspberryPi will need telnet installed for this to work. To my surprise telnet was not included in Raspberry Pi Bookworm by default.

~$ sudo apt-get install telnet

Create a bash file in Linux using the nano text editing program. You can create a script called "scriptexample" from the command line prompt as follows:

~$ sudo nano scriptexample

This will bring up the nano text editor.
Enter the text you want in the nano text editor
Follow the directions at the bottom of the editor screen to save the file with a name and exit.

Make the scriptexample text file executable (chmod) by all users (+x) with the following:
~$ sudo chmod +x scriptexample

Now you can execute the bash file with the following (include the punctuation ./ in front of the filename)
~$ ./scriptexample

The bash file can be edited later without needing to repeat the chmod command.

You can also point a web browser at the Pioneer VSX-32 IP address to bring up its web page which allows a graphical interface.
You can also telnet directly into the Pioneer VSX-32 from the command line.
~$ telnet 192.168.##.##
Trying 192.168.##.##...
Connected to 192.168.##.##.
Escape character is '^]'


give the connection a few seconds. Then you can use the keyboard to enter codes consisting of two characters.
?V
Should elicit a response from the VSX-32 such as
VOL74
Which corresponds to a volume of -43.5dB on the VSX-32 front panel display.
A response of E04 indicates that the command is not recognized.
Enter ctrl+] to break the telnet connection and type quit to exit telnet and return to the command prompt.
^]
telnet> quit

~$

I hope this info is helpful to anyone out there trying to get network automation to work with their Audio equipment. There is still life in these old multi-channel AV Receivers from the early days of HDMI. And these units (with pre-outs!) are available dirt cheap now on Craigslist when they don't have 4K. Combine a vintage +/-2010 HDMI 7.1 AV receiver with a pair of old 3-way (or 2-1/2 way) tower speakers and wire each driver directly to its own channel on the AV receiver and CamillaDSP set up correctly to do the audio crossovers in software and you can really have a surprisingly good sounding system for next to nothing cost wise. Good luck!


The next step is to do the same thing with RaspberryPi5 over a USB adapter to RS-232 connection on the Pioneer VSX-32...
 

Attachments

Connected the Pi5 to the RS-232 port on the Pioneer VSX-32 with a female x female null modem adapter from Amazon and an old USB/RS232 adapter cable. The Pi5 recognized the USB adapter automatically as /dev/ttyUSB0
I installed communication program screen.
Set baud rate with screen /dev/ttyUSB0 9600
Now the Pi5 powers up the VSX-32 with screen /dev/ttyUSB0 PO
All the other commands used over IP work over RS-232.

Use Ctrl+A and K to exit screen and return to the command line.
 
Very cool combination of "vintage" (can't quite make myself call ~2010 era vintage just yet) and modern stuff.

To my surprise telnet was not included in Raspberry Pi Bookworm by default.
It's not really used anymore apart from sometimes connecting to legacy stuff like with your use case. The protocol being unsecured/unencrypted has little place in a modem environment.
 
Yes, agreed on the unsecured nature of telnet.
There were a few bugs in the script file that I attached previously.
FN25 should be 25FN to set the HDMI to BD (BluRay)
0005S should be 0005SR to set the Listening Mode to Pure Direct
Also there is no need in the bash for a break command or a quit command. This is only necessary if you telnet direct from the command line.
 
Success connecting the RPi5 to the Pioneer VSX-32 over RS-232. See bash script below.

#!/bin/bash
#This script sends commands via /dev/ttyUSB0 to VSX-32 RS-232 port from RPi5 with USB-to-RS-232 converter.
#The Pioneer VSX-32 RS-232 port is male. Use female x female null-modem adapter to connect a male RS-232 cable.
SERIAL_PORT="/dev/ttyUSB0" #your USB-to-RS-232 adapter may be assigned a different port depending on your connected devices.
BAUD_RATE=9600 #The Pioneer only communicates at 9600
stty -F "$SERIAL_PORT" $BAUD_RATE raw
sleep 1 #Sleep to allow RS-232 time to wake up and respond after every command
echo "Sending data to $SERIAL_PORT at $BAUD_RATE"
sleep 1
echo -e "\r" > "$SERIAL_PORT" #carriage return
sleep 1
echo -e "PO\r" > "$SERIAL_PORT" #Power On
sleep 1
echo -e "25FN\r" > "$SERIAL_PORT" #Input=BluRay
sleep 1
echo -e "0005SR\r" > "$SERIAL_PORT" #Pure Direct Listening Mode
echo "Data sent." #Confirmation echo to command line