Announce: UPnPBridge = integrate UPnP/DLNA players with LMS (squeeze2upnp)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PasTim
    Senior Member
    • Nov 2010
    • 3287

    Originally posted by Ron F.
    Hi PasTim,

    I think your use of an individual INPUT rule for each UPnP renderer using the "-s" option makes perfect sense. I am going to experiment using that too.

    I believe the chain, ufw-before-input, are rules that are applied first, before the rules created by using the ufw app are applied.

    I don't have any Airplay or Chromecast players currently, but I will try to look at what might be involved with Chromecast.
    HI Ron F.,

    Thanks. It turns out that Chromecast is much the same as UPnP, including matching the INPUT messages. I had mistakenly left out the Chromecast IP address from the 49152:49158 playing range allowance so it didn't play properly.

    Airplay looks like a challenge for another day, or week. Apple seem to like to do things differently, and prefer not to tell anyone much about it.
    LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
    Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

    Comment

    • Ron F.
      Senior Member
      • May 2006
      • 746

      Originally posted by PasTim
      HI Ron F.,

      Thanks. It turns out that Chromecast is much the same as UPnP, including matching the INPUT messages. I had mistakenly left out the Chromecast IP address from the 49152:49158 playing range allowance so it didn't play properly.

      Airplay looks like a challenge for another day, or week. Apple seem to like to do things differently, and prefer not to tell anyone much about it.
      Hi PasTim,

      I had originally added this rule, ports that might be used by UPnPBridge - 49152:49158, using gufw. In retrospect, in fitting with the rest of the rules we created using iptables; it seems more appropriate to do the same here; I think it can go anywhere and order is not important for this one:

      Code:
      sudo iptables -A INPUT -p udp -m multiport --dports 49152:49158 -j ACCEPT
      If you are running a headless server, then you don't need to filter outgoing packets to get rid of SSDP broadcasts that contain a user-agent. My home server however is also driving my TV via an HDMI cable, so the browser is often running. In the final analysis, as you correctly pointed out, many of the rules I have been testing are optional and probably not necessary. The real improvement is done by using ipset to open INPUT ports temporarily, and only those ports.

      I had an amusing outcome running BubbleUPnP as a media renderer on my mobile phone last night, having added the netfilter module psad to my firewall. After several days doing this, psad decided that the renderer was a bad actor, and created rules it added to iptables on my server to block all further communication with my phone! I don't know if the cause was the app itself, or coincidentally something else running on my Android device. Nevertheless, it appeared that something on my phone had begun a port scan of my server. I am going to figure out what is really going on here.
      Living Room: SB Touch + DIY PSU > CI Audio VDA.2 DAC + VAC.1 PSU > VRX.1 cables > Emotiva XSP-1 Gen 2 preamp + XPA-DR2 amp > Blue Jeans cables > B&W 804 speakers
      Laptop: System76 Galago + Ubuntu 18.04 + Squeezelite + Epiphany/Material Skin > Emotiva Little Ego DAC > Grado PS500 headphones
      Bedroom: RPi Zero W + Squeezelite > miniBOSS DAC HAT > Bose SoundLink Revolve
      Phone: Pixel 6a + Termux/Squeezelite + Material APK > Senn IE80 earbuds
      Server: System76 Meerkat + Pop!_OS 22.04 + LMS 8.5

      Comment

      • philippe_44
        Senior Member
        • May 2008
        • 9343

        Originally posted by PasTim
        Philippe - As to documenting this for others I'm really not sure I know enough to be precise enough to provide reliable solutions to people who know as little or even less than I do. I'd be quite interested to know what others have done on linux to get their systems working. Do they use any firewall at all?
        I don't know, but I suspect they don't.

        On your conversation with Ron F. about CC and AirPlay, CC uses mDNS for discover, so a multicast on port 5353 (from memory) and then a dynamic webserver on port starting 49152 as well. AirPlay is a different anymal, it uses mDNS as well for discovery but then it opens 3 UDP ports for the player to use (data, timing, control) upon streaming start which are random at this point
        LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

        Comment

        • Ron F.
          Senior Member
          • May 2006
          • 746

          Darn it, I forgot that we need to accept TCP packets from the UPnP renderer! I am not sure that we need UDP too, but just in case:

          Code:
          sudo iptables -A INPUT -p udp -m multiport --dports 49152:49158 -j ACCEPT
          sudo iptables -A INPUT -p tcp -m multiport --dports 49152:49158 -j ACCEPT
          Last edited by Ron F.; 2019-08-27, 05:37.
          Living Room: SB Touch + DIY PSU > CI Audio VDA.2 DAC + VAC.1 PSU > VRX.1 cables > Emotiva XSP-1 Gen 2 preamp + XPA-DR2 amp > Blue Jeans cables > B&W 804 speakers
          Laptop: System76 Galago + Ubuntu 18.04 + Squeezelite + Epiphany/Material Skin > Emotiva Little Ego DAC > Grado PS500 headphones
          Bedroom: RPi Zero W + Squeezelite > miniBOSS DAC HAT > Bose SoundLink Revolve
          Phone: Pixel 6a + Termux/Squeezelite + Material APK > Senn IE80 earbuds
          Server: System76 Meerkat + Pop!_OS 22.04 + LMS 8.5

          Comment

          • philippe_44
            Senior Member
            • May 2008
            • 9343

            Originally posted by Ron F.
            Darn it, I forgot that we need to accept TCP packets from the UPnP renderer! I am not sure that we need UDP too, but just in case:

            Code:
            sudo iptables -A INPUT -p udp -m multiport --dports 49152:49158 -j ACCEPT
            sudo iptables -A INPUT -p tcp -m multiport --dports 49152:49158 -j ACCEPT
            No UDP is needed on this range, this is a webserver
            LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

            Comment

            • Ron F.
              Senior Member
              • May 2006
              • 746

              Originally posted by philippe_44
              No UDP is needed on this range, this is a webserver
              Of course, I should have remembered that!
              Living Room: SB Touch + DIY PSU > CI Audio VDA.2 DAC + VAC.1 PSU > VRX.1 cables > Emotiva XSP-1 Gen 2 preamp + XPA-DR2 amp > Blue Jeans cables > B&W 804 speakers
              Laptop: System76 Galago + Ubuntu 18.04 + Squeezelite + Epiphany/Material Skin > Emotiva Little Ego DAC > Grado PS500 headphones
              Bedroom: RPi Zero W + Squeezelite > miniBOSS DAC HAT > Bose SoundLink Revolve
              Phone: Pixel 6a + Termux/Squeezelite + Material APK > Senn IE80 earbuds
              Server: System76 Meerkat + Pop!_OS 22.04 + LMS 8.5

              Comment

              • Ron F.
                Senior Member
                • May 2006
                • 746

                UPnPBridge...

                By the way philippe, your UPnP plugin is working very nicely - a great piece of work.

                -Ron
                Living Room: SB Touch + DIY PSU > CI Audio VDA.2 DAC + VAC.1 PSU > VRX.1 cables > Emotiva XSP-1 Gen 2 preamp + XPA-DR2 amp > Blue Jeans cables > B&W 804 speakers
                Laptop: System76 Galago + Ubuntu 18.04 + Squeezelite + Epiphany/Material Skin > Emotiva Little Ego DAC > Grado PS500 headphones
                Bedroom: RPi Zero W + Squeezelite > miniBOSS DAC HAT > Bose SoundLink Revolve
                Phone: Pixel 6a + Termux/Squeezelite + Material APK > Senn IE80 earbuds
                Server: System76 Meerkat + Pop!_OS 22.04 + LMS 8.5

                Comment

                • philippe_44
                  Senior Member
                  • May 2008
                  • 9343

                  Originally posted by Ron F.
                  By the way philippe, your UPnP plugin is working very nicely - a great piece of work.

                  -Ron
                  Thanks

                  I'm also trying to "recruit" people interested by my new project, that we do with @sle118.

                  Tell me if you are interested at some point https://github.com/philippe44/SqueezeAMP
                  LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

                  Comment

                  • PasTim
                    Senior Member
                    • Nov 2010
                    • 3287

                    Originally posted by philippe_44
                    Thanks

                    I'm also trying to "recruit" people interested by my new project, that we do with @sle118.

                    Tell me if you are interested at some point https://github.com/philippe44/SqueezeAMP
                    Hi Philippe,

                    In the past I might well have been interested. However, I'm having to back off most things to do with music - my hearing is failing fast and music now often sounds distorted - so I try to maintain just a little technical interest in LMS and a few really good plugins like yours. I am finding other types of things to play with instead
                    LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                    Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                    Comment

                    • PasTim
                      Senior Member
                      • Nov 2010
                      • 3287

                      Originally posted by philippe_44
                      I don't know, but I suspect they don't.

                      On your conversation with Ron F. about CC and AirPlay, CC uses mDNS for discover, so a multicast on port 5353 (from memory) and then a dynamic webserver on port starting 49152 as well. AirPlay is a different anymal, it uses mDNS as well for discovery but then it opens 3 UDP ports for the player to use (data, timing, control) upon streaming start which are random at this point
                      Yes, thanks. I had already got the 5353 port, and the 4915n port (configured in the settings page). As you say, airplay seems to use unpredictable high-numbered ports - not the best piece of IT design.
                      LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                      LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                      Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                      Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                      Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                      Comment

                      • Ron F.
                        Senior Member
                        • May 2006
                        • 746

                        Originally posted by philippe_44
                        Thanks

                        I'm also trying to "recruit" people interested by my new project, that we do with @sle118.

                        Tell me if you are interested at some point https://github.com/philippe44/SqueezeAMP
                        Hi Philippe,

                        I am looking at your two projects on Github: SqueezeAMP and Squeezelite-esp32.

                        I have a writeup now for how to configure the Linux iptables firewall for use with UPnPBridge. I will PM it to you and to PasTim for review, and you can post it if you think it is useful.

                        Edit: I forgot to add, please make any changes you feel are appropriate!
                        Last edited by Ron F.; 2019-08-28, 18:56.
                        Living Room: SB Touch + DIY PSU > CI Audio VDA.2 DAC + VAC.1 PSU > VRX.1 cables > Emotiva XSP-1 Gen 2 preamp + XPA-DR2 amp > Blue Jeans cables > B&W 804 speakers
                        Laptop: System76 Galago + Ubuntu 18.04 + Squeezelite + Epiphany/Material Skin > Emotiva Little Ego DAC > Grado PS500 headphones
                        Bedroom: RPi Zero W + Squeezelite > miniBOSS DAC HAT > Bose SoundLink Revolve
                        Phone: Pixel 6a + Termux/Squeezelite + Material APK > Senn IE80 earbuds
                        Server: System76 Meerkat + Pop!_OS 22.04 + LMS 8.5

                        Comment

                        • PiPat
                          Junior Member
                          • Oct 2017
                          • 16

                          Originally posted by Eliboom
                          Hello,

                          Here the settings for my Kef LSX speakers. It works like a charm.

                          Unfortunately i cannot power off the speakers with the controler app und have to use the Kef remote or remote app.
                          LMS server 7.9.1 on Asustor AS604T, squeeze2upnp-x86-static, Squeeze Ctrl.

                          </device>

                          Hi Eliboom, did you solve the issue with power off the speakers with the KEF remote control? I wasn't able to figure it out.

                          Comment

                          • kimon
                            Junior Member
                            • Jun 2017
                            • 5

                            no sound via Roon

                            Hello,

                            My Music server is a Nuc, OS is audio-linux (basically tuned arch linux for newbies).
                            RoonServer is installed, and is working with airplay, roon bridges.
                            I try to send (and play) music with an upnp renderer mounted in my dac.

                            What has been done:
                            Squeeze2upnp compiled.
                            Then:
                            Code:
                            yaourt -U squeeze2upnp-1.20.2-1-x86_64.pkg.tar.xz
                            touch /home/audiolinux/.config/squeeze2upnp.xml
                            ./squeeze2upnp-x86-64-static -Z -i  /home/audiolinux/.config/squeeze2upnp.xml
                            After that, i edited file with roonmode=1. I have now this config file:


                            then
                            Code:
                            ./squeeze2upnp-x86-64-static -Z -x  /home/audiolinux/.config/squeeze2upnp.xml
                            gives:


                            my renderer appears in Roon, but no music plays, timeline isnt incrementing.

                            I think i'm close, perhaps there's something obvious i don't see.
                            Any helping hand will be welcome !

                            Comment

                            • Eliboom
                              Junior Member
                              • Jan 2019
                              • 2

                              Originally posted by PiPat
                              Hi Eliboom, did you solve the issue with power off the speakers with the KEF remote control? I wasn't able to figure it out.
                              Hello PiPat,

                              I still haven't figured it out. Sorry.

                              Comment

                              • philippe_44
                                Senior Member
                                • May 2008
                                • 9343

                                Originally posted by kimon
                                Hello,

                                My Music server is a Nuc, OS is audio-linux (basically tuned arch linux for newbies).
                                RoonServer is installed, and is working with airplay, roon bridges.
                                I try to send (and play) music with an upnp renderer mounted in my dac.

                                What has been done:
                                Squeeze2upnp compiled.
                                Then:
                                Code:
                                yaourt -U squeeze2upnp-1.20.2-1-x86_64.pkg.tar.xz
                                touch /home/audiolinux/.config/squeeze2upnp.xml
                                ./squeeze2upnp-x86-64-static -Z -i  /home/audiolinux/.config/squeeze2upnp.xml
                                After that, i edited file with roonmode=1. I have now this config file:

                                then
                                Code:
                                ./squeeze2upnp-x86-64-static -Z -x  /home/audiolinux/.config/squeeze2upnp.xml
                                gives:

                                my renderer appears in Roon, but no music plays, timeline isnt incrementing.

                                I think i'm close, perhaps there's something obvious i don't see.
                                Any helping hand will be welcome !
                                It probably does not like the flac file sent by Roon. I can't remember exactly, but there might be a problem with that. Use the transcode mode of squeeze2upnp then
                                LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

                                Comment

                                Working...