If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Announcement
Collapse
No announcement yet.
Search skills to create a plugin for Pcp running on Pi4.
Using onboard UARTs will be more complicated to setup unless you know someone has the specific knowledge of UIARTs and PCP.
AFAICT RPi3/4 have 4 UARTs but normally only UART0/1 are enabled from config.txt. So for Raspbian systems, changes are needed to config.txt and the device tree overlay and also need to disable spawning of getty on the enabled UART0 port (usually called /dev/ttyACM0).
You need to check what needs to be done for PCP.
I don't care. As long as I can get serial control... ;-)
Not logical, perhaps more cost effective - maybe.
Using onboard UARTs will be more complicated to setup unless you know someone has the specific knowledge of UIARTs and PCP.
The onboard serial port is often used for serial console on the RPI, but we don't enable that by default. ttyAMA0 is pretty safe to use, provided you never enable the RPI bluetooth (It is disabled by default in pCP) If you want bluetooth, then use a USB serial device.....or use a bluetooth usb device.
The onboard serial port is often used for serial console on the RPI, but we don't enable that by default. ttyAMA0 is pretty safe to use, provided you never enable the RPI bluetooth (It is disabled by default in pCP) If you want bluetooth, then use a USB serial device.....or use a bluetooth usb device.
If nc manages to connected your LMS CLI on port 9090 - no error.
Make sure a player is connected to LMS. Example commands to send. Each command is ended by a <LF> CTRL/J which will tell CLI to process chars up to CTRL/J. Nothing will appear on screen as CLI does not echo char by char - only response to commands.
Make sure a player is connected to LMS. Example commands to send. Each command is ended by a <LF> CTRL/J which will tell CLI to process chars up to CTRL/J. Nothing will appear on screen as CLI does not echo char by char - only response to commands.
player count ?<LF>
player name 0 ?<LF>
Not sure what I'm doing.
After nc...
I write:
player count?
And enter (Terminal send probably <CR><LF>
But I see neither answer on Terminal nor on RS232 side.
[22-01-24 14:42:02.0907] Slim::Utils::Timers::__ANON__ (272) Error: Timer Slim::Networking::SqueezeNetwork::__ANON__ failed:
[22-01-24 14:42:17.8184] Slim::Networking::SqueezeNetwork::_error (431) Unable to login to SN: Timed out waiting for data
[22-01-24 14:42:17.8192] Slim::Networking::SqueezeNetwork::_init_error (156) Unable to login to mysqueezebox.com, sync is disabled: Timed out waiting for data (https://www.mysqueezebox.com)
[22-01-24 14:42:17.8201] Slim::Networking::SqueezeNetwork::_init_error (172) mysqueezebox.com sync init failed: Timed out waiting for data, will retry in 300 (https://www.mysqueezebox.com)
[22-01-24 14:45:28.2695] Slim::Plugin::CLI::Plugin::cli_socket_accept (227) Begin Function
[22-01-24 14:45:28.2709] Slim::Plugin::CLI::Plugin::cli_socket_accept (267) Accepted connection from 192.168.1.120:37219 (1 active connections)
[22-01-24 14:46:52.6578] Slim::Plugin::CLI::Plugin::client_socket_read (315) Begin Function
[22-01-24 14:46:52.6585] Slim::Plugin::CLI::Plugin::client_socket_read (340) Connection with 192.168.1.120:37219 half-closed by peer
[22-01-24 14:46:52.6591] Slim::Plugin::CLI::Plugin::client_socket_close (287) Begin Function
[22-01-24 14:46:52.6599] Slim::Plugin::CLI::Plugin::client_socket_close (305) Closed connection with 192.168.1.120:37219 (0 active connections)
[22-01-24 14:46:53.9903] Slim::Plugin::CLI::Plugin::cli_socket_accept (227) Begin Function
[22-01-24 14:46:53.9917] Slim::Plugin::CLI::Plugin::cli_socket_accept (267) Accepted connection from 192.168.1.120:46821 (1 active connections)
OK - connection made - indicates that "nc" is working. So problem is CLI plugin is not processing data because it has not received a <LF>
My guess the issues is Terminal. I don;t know Terminal. I assumed Terminal was a "console" type applications for Mac and not a TTY simulation and so it may be filtering keystrokes.
You need to investigate Terminal settings. If Terminal in an an Apple system - how is Apple system connected to Pi serial line ?
From my MAC, USB to serial converter. I'm using CoolTerm to receive/send serial datas.
It works because echo "hello" > /dev/ttyAMA0
CoolTerm display "Hello"
But I did everything wrong
I should send player count ? from the RS232 side not from Terminal side!! And... it works !!!
Code:
player count ?
player count 1
player name ?
player name %3F piCorePlayer
I should send player count ? from the RS232 side not from Terminal side!! And... it works !!!
Great. Sometimes the solution is simple once it is found.
I think you'll now have question about how to use CLI (e.g. how to get notification of changes in metadata such as ytrack/artist etc).
I don't have much practical knowledge of CLI but there are users/developers who have made plugins,connections etc making a lot of use of CLI so for any CLI questions I think open a new thread with a title which contains "CLI" to make sure you catch the eyes of those users.
You can use this Apple setup to test & refine CLI commands/response processing before you put into your HA system.
I think you'll now have question about how to use CLI (e.g. how to get notification of changes in metadata such as ytrack/artist etc).
You have right!!! Notification of change will be great.
I thought that I must add:
Code:
nc 192.168.1.120 9090 </dev/ttyAMA0 >/dev/ttyAMA0
into Tweaks "User command"
The output is a little strange;
What does dc%3Aa6%3A32%3A75%3A45%3A0a mean ?
Code:
title ?
dc%3Aa6%3A32%3A75%3A45%3A0a title WOULD%20I%20LIE%20TO%20YOU
it is also curious to see how the spaces are managed with %20 !
Accented chars also: Ga%C3%ABtan
What kind of coding is it ?
Is it possible to configure it to ASCII ?
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment