nimaazx wrote:
> if i understand from you and another person in this topic said, we can
> just check tcp port "3483". it is used for connecting to lms. when it is
> connected , We are sure 100% it is known by lms server.
The following mnay be too much for you but you might as well have the
info.
Player discover LMS servers using broadcast on UDP on port 383 -
iognore this if you see references to this.
LMS talks to a player(e.g. squeezelite) using a protocol called
slimproto on a TCP connection on port 3483 of the LMS server. Slimproto
enables player to be told by LMS player to play music from an URL (can
be remote but usually LMS) , vol up , vol down etc. Using slimproto
Player tell LMS when it needs data, buffer empty etc.
To talk to an LMS server a player has to open a TCP connecton from the
player to the LMS server on port 3483. This means if a player is
actively connected to an LMS server there is a TCP connection on the
player to destination port 3483.
The CLI is a totally separate LMS communication. It is supported by LMS
server usually on port 9090 (can be changed in settings). It is intended
to be used by "remote" applications (i.e. not running on LMS server
processor) who want to "talk" to LMS server and get info from the LMS
server about the LMS system, libraries etc.
I don't know what available on pcp. but if LMS is on a server with IP
address 192.168.1.250 then this would be (LMS inserts <LF> betweens
lines of the response which is encoded as %3A). BLue is the user entry,
red is LMS response - use your own IP address and MAC address of player
has been altered.
Code:
--------------------
telnet 192.168.1.250 9090
Trying 192.168.1.250...
Connected to 192.168.1.250.
Escape character is '^]'
players
players count%3A2
players 0 1 connected
players 0 1 connected count%3A2 playerindex%3A0
playerid%3A7x%3Adx%3A3x%3Aax%3A3x%3A7x uuid%3A ip%3A192.168.1.58%3A32806
name%3ASqueezeLite seq_no%3A0 model%3Asqueezelite modelname%3ASqueezeLite
power%3A1 isplaying%3A0 displaytype%3Anone isplayer%3A1 canpoweroff%3A1
connected%3A1 firmware%3Av1.8-589
7x:dx:3x:ax:3x:7x connected ?
7x%3Adx%3A3x%3Aax%3A3x%3A7x connected 1
--------------------
I don't know what is available on pcp but once you understand the CLI
commands then for an application you might find it easier to use "curl"
on port 9000 and using POST request JSON encoded commands instead of
telnet - the CLI command is in the "params"
example command
Code:
--------------------
curl -X POST -d
'{"id":0,"params":["00:04:20:ab:cd:ef",["playlist","index","+1"]],"method":"slim.request"}'
http://yourserver:9000/jsonrpc.js
--------------------
------------------------------------------------------------------------
bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=110118
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix