USB to serial on Pi, how to confirm it is working?

Hi all,

End goal is to get a Russound CAV6.6 amp working on RPi 3. I have read some good posts on this and will continue, but just cant get there.

I want to confirm that the serial bridge is working. I installed fresh copy of Hassbian, and used ‘pip3 install pyserial’ to install pyserial. ‘python -m serial.tools.list_ports’ shows /dev/ttyUSB0 as a port.

I have added the Russound component, and with help of hoffsta’s posts, configured it for the Russound.

But nothing shows in HA. So I want to try and narrow down what the issues might be. But, I just am too raw to really do that with Python, HA, Raspbian. Grateful for any pointers.

Thank you.

Run single serial command from command line.
If that succeed, go back to HA and verify config

thanks tmjpugh for the prompt reply. Would you be able to suggest any commands to use to test this (sorry for the ignorance)?

Unfortunately no. I am not familiar with device and weak with seral commands.

I do know best way to troubleshoot this is verify connection outside of HA. If this work HA will likely be OK(not gauruntee but serial support is standard like Ethernet and usually work OK in HA if command line is OK)

Thank you. Could anyone think of a way to best confirm it works outside of HA (then move on from there)?

If you read through the home-assistant.log file, shortly after boot-up you should see some entries about the Russound component.

If you get the successful connection message, the serial to USB connection is working properly.

INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.russound_rnet
INFO (Thread-11) [russound.russound] Successfully connected to Russound on xx.xx.xx.xx:xxxx````

Beyond that, I think you're running into the same issue that I am. In my case, the component loads and the connection is made, but then there is an error and the components are never loaded. There's a few more details here if you're interested in seeing if it's the same issue: https://community.home-assistant.io/t/issue-with-russound-rnet-component-after-39-3/15327

If you're able to get the "Successfully connected" message, I'd recommend using the Packet Sender (https://packetsender.com/) to see if you can communicate with the device. It's the work-around I've been using since the component stopped working. The documentation to generate the hex codes is on the github page for the component.

Hope that helps!

Thank you gth758y,

I did see your other thread, but was not sure i have even made it that far.

My log shows
17-04-24 20:48:52 ERROR (Thread-4) [russound.russound] Error trying to connect to Russound controller.
17-04-24 20:48:52 ERROR (Thread-4) [russound.russound] [Errno 111] Connection refused
17-04-24 20:48:52 ERROR (Thread-4) [homeassistant.components.media_player.russound_rnet] Not connected to 127.0.0.1:1337

So not sure I am really getting anywhere. Do you know what might cause this?

For me, I couldn’t ever make it work using the localhost. I had to explicitly call out the IP of the Raspberry Pi to have it connect.

Thanks, I had tried that previously as well, and just tried again, and no luck. What port do you use?

In the other thread you say you use “ser2net” package. Is that different from pyserial that is needed?

The default port ser2net was trying to use was already in use, so I just picked a random one. 6271.

I’m not familiar with pyserial, but it looks like it’s similar to ser2net.

I can dig up my configuration for ser2net if you’re interested in giving that a shot.

I am willing to trying anything at this point. Thanks

Here’s the link that I followed to get it up and running: https://www.packet6.com/configuring-your-raspberry-pi-as-a-console-server/

I just used sudo apt-get install ser2net rather than grabbing the .tar file that the walkthrough mentions.

From, there I followed the steps outlined there until it came time to edit /etc/ser2net.conf. There, I had to make a couple of modifications. My .conf file is below. The rest of the file is commented out.

BANNER:banner:CONSOLE LAB Terminal Server TCP port p device d serial parms srn

TRACEFILE:tr1:/var/log/ser2net/p-Y-M-D-H:i:s.U
6271:telnet:0:/dev/ttyUSB0:19200 8DATABITS NONE 1STOPBIT banner tr=tr1 timestamp

From there HA was able to connect and (at the time) the media player components loaded. I was also able to hit it with the Packet Sender program I linked to before.

HTH

1 Like

Thanks so much - I may give it a shot tomorrow. But realize there still are other issues you are looking at.

No worries, let me know how it turns out and if you need any other ideas.

ok, I tried ser2net, but no luck. Just not sure why serial is not reacting to anything.

stty -F /dev/ttyUSB0 -a
even after reboot put the baud rate at 38400 (it should be 19200). when i set it manually, it still does not send a signal to the CAV - using packetsender.

Hm… I’m pretty much out of ideas. Beyond that, I’ve heard that USB to serial cables are sometimes unreliable – maybe that’s got something to do with it?

Thanks. The cable does work when going from PC to Russound direct, so I would assume that works. I am checking out openHAB too.