Hi everyone !
For a personal project, I need to send an audio file (.flac) to my JBL speaker, from my RPI terminal. I saw there is a lot of programs (serviio, plex or allconnect on android...) that allow to do it, but I found nothing that I could use to do it myself. And I don't want to retrieve the file from the speaker app, but to send it to the the speaker using terminal.
I was dreaming of something like " $ dnla-app play-file ~/tune.flac 192.168.1.15 ", where 192.168.1.15 is my speaker's IP, but it seems to be way more complicated...
I tried to with PulseAudio, but didn't find any option allowing it.
Anyone has any idea of how I shall proceed ? I know it's quite a vague question, but I spent the whole day looking for it, and nothing...
Thanks !
EDIT 1 : Following http://wiki.jackslab.org/Upnp and other similar posts, I'm trying to use upnp protocols to detect my speaker (and maybe control it), but with no success as for now.
First terminal :
$this->bbcode_second_pass_code('', '
$ cat test.txt
M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: ssdp:discover
MX: 10
ST: ssdp:all')
Second terminal :
$this->bbcode_second_pass_code('', '
$ nc -buvv 239.255.255.250 1900 < test.txt
Connection to 239.255.255.250 1900 port [udp/ssdp] succeeded!
')
Third terminal :
$this->bbcode_second_pass_code('', '
$ sudo tcpdump -vv -A -s 0 -i wlan0 udp port 1900 and host 239.255.255.250
15:56:10.949878 IP (tos 0x0, ttl 1, id 41655, offset 0, flags [DF], proto UDP (17), length 29)
alarmpi.55492 > 239.255.255.250.ssdp: [udp sum ok] UDP, length 1
E.....@...$....~.......l. ..X
15:56:10.950707 IP (tos 0x0, ttl 1, id 41656, offset 0, flags [DF], proto UDP (17), length 29)
alarmpi.55492 > 239.255.255.250.ssdp: [udp sum ok] UDP, length 1
E.....@...$....~.......l. ..X
15:56:11.951350 IP (tos 0x0, ttl 1, id 41732, offset 0, flags [DF], proto UDP (17), length 29)
alarmpi.55492 > 239.255.255.250.ssdp: [udp sum ok] UDP, length 1
E.....@...$....~.......l. ..X
15:56:12.951929 IP (tos 0x0, ttl 1, id 41748, offset 0, flags [DF], proto UDP (17), length 29)
alarmpi.55492 > 239.255.255.250.ssdp: [udp sum ok] UDP, length 1
E.....@...$....~.......l. ..X
15:56:13.952504 IP (tos 0x0, ttl 1, id 41788, offset 0, flags [DF], proto UDP (17), length 29)
alarmpi.55492 > 239.255.255.250.ssdp: [udp sum ok] UDP, length 1
E....<@...$s...~.......l. ..X
15:56:13.960469 IP (tos 0x0, ttl 1, id 41789, offset 0, flags [DF], proto UDP (17), length 114)
alarmpi.55492 > 239.255.255.250.ssdp: [udp sum ok] UDP, length 86
E..r.=@...$....~.......l.^..M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: ssdp:discover
MX: 10
ST: ssdp:all
')
It looks like it's working, but nothing is detected. For the record, my android app detects the speaker and connects it as dlna.
Anyone has an idea of what I'm doing wrong (or an advice about another way to achieve my initial goal?)
Thanks