Raspberry PI 4 Install? #6
-
|
I have been trying to run DiscChanger on a Raspberry Pi 4 set-up, but seem to be encountering some serial issues. Wondering if you could provide guidance on where to trouble shoot? Current Configuration: (2) .NET runtimes installed: (a) Microsoft.AspNetCore.App 5.0.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]; (b) Microsoft.NETCore.App 5.0.2 [/usr/share/dotnet/sharedMicrosoft.NETCore.App] (3) DiscChanger installed in /usr/share/dotnet/DiscChanger (4) DVP-CX777ES to CH1 on serial hat PROBLEM: (2) When I attempt to add a new DiscChanger I am able to select /dev/ttySC0 (the appropriate serial connection) (3) When I test the new DiscChanger, the program hangs with no response. Console continues to show service running, but there is no apparent activity (via lights on serial hat board or otherwise) vis a vis serial connection. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
|
Ok, I will try that tomorrow on my Raspberry Pi 4. I have not tested the
latest version on my Pi 4. Depending on your interface, if you do not have
CTS/RTS lines, do not enable the flow control. Also is rs232 enabled in
your changer?
…On Sat, Feb 13, 2021, 6:41 PM crmerrill ***@***.***> wrote:
I have been trying to run DiscChanger on a Raspberry Pi 4 set-up, but seem
to be encountering some serial issues. Wondering if you could provide
guidance on where to trouble shoot?
Current Configuration:
(1) Waveshares 2-CH RS232 HAT. Tested that Serial 1 and Serial 2 can talk
to one another via null cable using python (i.e. hat appears to TX and RX
via python script). For reference:
https://www.waveshare.com/wiki/2-CH_RS232_HAT
(2) .NET runtimes installed: (a) Microsoft.AspNetCore.App 5.0.2
[/usr/share/dotnet/shared/Microsoft.AspNetCore.App]; (b)
Microsoft.NETCore.App 5.0.2 [/usr/share/dotnet/sharedMicrosoft.NETCore.App]
(3) DiscChanger installed in /usr/share/dotnet/DiscChanger
(4) DVP-CX777ES to CH1 on serial hat
PROBLEM:
(1) When I run 'dotnet ./DiscChanger.NET.dll', I am able to navigate to
localhost:5000 and get a configuration page
(2) When I attempt to add a new DiscChanger I am able to select
/dev/ttySC0 (the appropriate serial connection)
(3) When I test the new DiscChanger, the program hangs with no response.
Console continues to show service running, but there is no apparent
activity (via lights on serial hat board or otherwise) vis a vis serial
connection.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALVHMH5NEGAEG55ZNBD4VVLS64EYLANCNFSM4XST4RUA>
.
|
Beta Was this translation helpful? Give feedback.
-
|
Have tried with and without flow control - neither works.
RS-232 appears enabled on the changer, but not sure how to confirm.
On Feb 13, 2021, at 3:51 PM, Hugo Lyppens <notifications@github.com> wrote:
Ok, I will try that tomorrow on my Raspberry Pi 4. I have not tested the
latest version on my Pi 4. Depending on your interface, if you do not have
CTS/RTS lines, do not enable the flow control. Also is rs232 enabled in
your changer?
On Sat, Feb 13, 2021, 6:41 PM crmerrill ***@***.***> wrote:
I have been trying to run DiscChanger on a Raspberry Pi 4 set-up, but seem
to be encountering some serial issues. Wondering if you could provide
guidance on where to trouble shoot?
Current Configuration:
(1) Waveshares 2-CH RS232 HAT. Tested that Serial 1 and Serial 2 can talk
to one another via null cable using python (i.e. hat appears to TX and RX
via python script). For reference:
https://www.waveshare.com/wiki/2-CH_RS232_HAT
(2) .NET runtimes installed: (a) Microsoft.AspNetCore.App 5.0.2
[/usr/share/dotnet/shared/Microsoft.AspNetCore.App]; (b)
Microsoft.NETCore.App 5.0.2 [/usr/share/dotnet/sharedMicrosoft.NETCore.App]
(3) DiscChanger installed in /usr/share/dotnet/DiscChanger
(4) DVP-CX777ES to CH1 on serial hat
PROBLEM:
(1) When I run 'dotnet ./DiscChanger.NET.dll', I am able to navigate to
localhost:5000 and get a configuration page
(2) When I attempt to add a new DiscChanger I am able to select
/dev/ttySC0 (the appropriate serial connection)
(3) When I test the new DiscChanger, the program hangs with no response.
Console continues to show service running, but there is no apparent
activity (via lights on serial hat board or otherwise) vis a vis serial
connection.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALVHMH5NEGAEG55ZNBD4VVLS64EYLANCNFSM4XST4RUA>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#6 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKGQ7ITGZMFY7X6NZCOZVGTS64F7ZANCNFSM4XST4RUA>.
|
Beta Was this translation helpful? Give feedback.
-
|
I tested the current DiscChanger.NET using ASP.NET Core Runtime 5.0.3 and .NET 5.0.3 runtime on my Raspberry Pi 4 and can confirm it works for me. I use in my boot.config: enable_uart=1 This is the serial port /dev/ttyAMA1. I am not sure how UART numbers map to tty numbers, but it is what it is. I wrote some scripts that can help you ascertain the RS232 connection is good before attempting to use DiscChanger.NET (see attached zip file as well). broadcast.sh: poweron.sh: poweron.sh takes 0 or 1 followed by the serial port device. Default is on and /dev/ttyAMA1. Check whether you can turn on&off your changer using this script. The script retries 10 times because the documentation I have specifies that the poweron command needs to be repeated at 100ms intervals until successful. Then run broadcast.sh to enable broadcast mode (DiscChanger.NET uses 2). Broadcast mode tells the changer to send updates to the controller every time something happens (mode change. disc or track change etc.). This script lets you ascertain broadcast messages make it to the Pi. Once these prerequisites are met, you will be in a good position to try DiscChanger.NET again. Please let me know if this helps you to get going. |
Beta Was this translation helpful? Give feedback.
-
|
In testing this on my PI, I noticed a bug in my deserialization code as it recognized /dev/ttyAMA1 (or any Linux serial port device) as an URI instead of a string. This is fixed now. Once you are able to power on/off the changer using the bash script and to see broadcast messages from the changer in a terminal program (hex mode) such as CuteCom (installable from Add/Remove programs in the desktop menu), please download the latest release v1.2 zip file and try it on your Raspberry Pi. Good luck. |
Beta Was this translation helpful? Give feedback.
I tested the current DiscChanger.NET using ASP.NET Core Runtime 5.0.3 and .NET 5.0.3 runtime on my Raspberry Pi 4 and can confirm it works for me. I use in my boot.config:
enable_uart=1
dtoverlay=uart2,ctsrts=on
This is the serial port /dev/ttyAMA1. I am not sure how UART numbers map to tty numbers, but it is what it is.
Be careful hooking it all up with the wires to the serial port adapter. I assume you use a proper adapter chip from Raspberry Pi to RS232 DB9.
I wrote some scripts that can help you ascertain the RS232 connection is good before attempting to use DiscChanger.NET (see attached zip file as well).
broadcast.sh:
#!/bin/bash
MODE=${1:-2} #ONLY use 0, 1 or 2 for cx777es
SP=${2:-…