2
I'm following this and other similar posts, in order to detect my dlna capable speaker with upnp protocols. My phone (android) detects and controls the speaker ; but I would like to do it from my computer and connect it as dlna.
First terminal :
$ cat test.txt
M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: ssdp:discover
MX: 10
ST: ssdp:all
Second terminal :
$ nc -buvv 239.255.255.250 1900 < test.txt
Connection to 239.255.255.250 1900 port [udp/ssdp] succeeded!
Third terminal :
$ 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.
Anyone has an idea of what I'm doing wrong ?
Thanks
Not sure why your low-level discovery is not working, but I can recommend pulseaudio-dlna (available as package in many distros) if you want to stream sound to DLNA capable devices. That should also deal with the discovery for you, without the need to get your hands dirty in the protocols themselves.
– dirkt – 2017-08-13T17:35:16.103Thanks. I tried to make it work the whole day, but with no success. I managed to install pulseaudio and pulseaudio-dlna (not so easy on RPI with archlinux). I managed to make some noise with pulseaudio when my computer is plugged by jack on the speaker, but impossible to push the audio via dlna... I think there may be a simpler way. Any idea ? – jibe – 2017-08-13T22:26:30.027
Huh.
pulseaudio-dlna
worked right out of the box for me. So it might be a problem on the some other level. Do you have any equivalent of Debiangupnp-tools
on Archlinux, so you can dogssdp-discover -i wlan0 --timeout=3
orgupnp-universal-cp
? – dirkt – 2017-08-14T05:24:37.993Can't post the whole answer (links restriction !) But basically, it worked : – jibe – 2017-08-14T11:50:29.763
Can't post the whole answer to gssdp-dicover (links restriction !) But basically, it worked and gave me : (......) resource available USN: uuid:5f9ec1b3-ed59-1900-4530-b8ee6552cc9b Location: http://192.168.1.125:8080/description.xml (.....). That gave me enough to - apparently - achieve my goal !
– jibe – 2017-08-14T12:04:24.217So write up and answer with what you did, and accept it yourself (it's ok to do that). If you can find out why the other method didn't work, that would be a bonus, if someone else has the same problem. – dirkt – 2017-08-14T12:12:15.693