philippe44 / AirConnect

Use AirPlay to stream to UPnP/Sonos & Chromecast devices
Other
3.46k stars 217 forks source link

Cross VLAN Connections - Connects, but no audio. (OPNSense and UnRaid) #312

Closed Flyinace2000 closed 3 years ago

Flyinace2000 commented 3 years ago

Is there a restriction on casting Apple Music. It starts the cast to both my Nest Mini and Chromecast Audio but no sound comes out. I’m running AirConnect on my UnRaid server via docker. iPhone is 12 Pro on iOS14

philippe44 commented 3 years ago

No restriction. It's probably a firewall problem

Flyinace2000 commented 3 years ago

Might be right. I thought it was just Apple Music, but just tried PocketCast and the same issue. Volume “beeps” are being passed to my chrome cast audio. Not sure what changed in the past week. My router/firewall is OPNSense and I’ve been using MDNS Repeater so that my IoT devices on the untrusted wifi can broadcast to the trusted wifi. I’ll try joining the the untrusted wifi to see if issue remains.

Flyinace2000 commented 3 years ago

Firewall doesn’t show anything being blocked to/from the chrome cast audio.
https://imgur.com/a/x43q0ZZ

philippe44 commented 3 years ago

How does AirConnect run? What OS/CPU? container?

Flyinace2000 commented 3 years ago

UnRaid 6.8.3 CPU is a i3-9100 w/ 12GB ram Docker using 1activegeek/airconnect

philippe44 commented 3 years ago

Can you post a log? I still suspect it's a NAT/firewall

Flyinace2000 commented 3 years ago

2020-12-11 15:37:37,798 INFO waiting for airupnp-x86-64 to die [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 01-envfile: executing... [cont-init.d] 01-envfile: exited 0. [cont-init.d] 10-adduser: executing... usermod: no changes


_ () | | | | / | | | / \ | | _ \ | | | () | || |__/ || \/

Brought to you by linuxserver.io

To support LSIO projects visit: https://www.linuxserver.io/donate/

GID/UID

User uid: 911 User gid: 911

[cont-init.d] 10-adduser: exited 0. [cont-init.d] 30-install: executing... Checking for valid arch options Proceeding with x86-64 arch --2020-12-11 15:43:09-- https://raw.githubusercontent.com/philippe44/AirConnect/master/bin/airupnp-x86-64 Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.192.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 689816 (674K) [application/octet-stream] Saving to: ‘/bin/airupnp-x86-64’

0K .......... .......... .......... .......... .......... 7% 4.17M 0s 50K .......... .......... .......... .......... .......... 14% 4.42M 0s 100K .......... .......... .......... .......... .......... 22% 22.8M 0s 150K .......... .......... .......... .......... .......... 29% 6.37M 0s 200K .......... .......... .......... .......... .......... 37% 18.7M 0s 250K .......... .......... .......... .......... .......... 44% 73.3M 0s 300K .......... .......... .......... .......... .......... 51% 32.7M 0s 350K .......... .......... .......... .......... .......... 59% 16.2M 0s 400K .......... .......... .......... .......... .......... 66% 16.5M 0s 450K .......... .......... .......... .......... .......... 74% 6.21M 0s 500K .......... .......... .......... .......... .......... 81% 88.6M 0s 550K .......... .......... .......... .......... .......... 89% 77.1M 0s 600K .......... .......... .......... .......... .......... 96% 80.8M 0s 650K .......... .......... ... 100% 171M=0.05s

2020-12-11 15:43:09 (12.4 MB/s) - ‘/bin/airupnp-x86-64’ saved [689816/689816]

--2020-12-11 15:43:09-- https://raw.githubusercontent.com/philippe44/AirConnect/master/bin/aircast-x86-64 Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.128.133, 151.101.192.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 596376 (582K) [application/octet-stream] Saving to: ‘/bin/aircast-x86-64’

0K .......... .......... .......... .......... .......... 8% 3.86M 0s 50K .......... .......... .......... .......... .......... 17% 4.35M 0s 100K .......... .......... .......... .......... .......... 25% 18.8M 0s 150K .......... .......... .......... .......... .......... 34% 6.58M 0s 200K .......... .......... .......... .......... .......... 42% 14.4M 0s 250K .......... .......... .......... .......... .......... 51% 29.2M 0s 300K .......... .......... .......... .......... .......... 60% 17.6M 0s 350K .......... .......... .......... .......... .......... 68% 10.3M 0s 400K .......... .......... .......... .......... .......... 77% 93.1M 0s 450K .......... .......... .......... .......... .......... 85% 66.2M 0s 500K .......... .......... .......... .......... .......... 94% 29.6M 0s 550K .......... .......... .......... .. 100% 166M=0.05s

2020-12-11 15:43:09 (11.5 MB/s) - ‘/bin/aircast-x86-64’ saved [596376/596376]

[cont-init.d] 30-install: exited 1. [cont-init.d] 99-custom-scripts: executing... [custom-init] no custom files found exiting... [cont-init.d] 99-custom-scripts: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. 2020-12-11 15:43:09,683 CRIT Supervisor running as root (no user in config file) 2020-12-11 15:43:09,685 INFO supervisord started with pid 264 2020-12-11 15:43:10,686 INFO spawned: 'airupnp-x86-64' with pid 275 2020-12-11 15:43:10,687 INFO spawned: 'aircast-x86-64' with pid 276 2020-12-11 15:43:11,754 INFO success: airupnp-x86-64 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-11 15:43:11,754 INFO success: aircast-x86-64 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-11 15:57:11,197 INFO exited: aircast-x86-64 (terminated by SIGSEGV; not expected) 2020-12-11 15:57:12,198 INFO spawned: 'aircast-x86-64' with pid 406 2020-12-11 15:57:13,212 INFO success: aircast-x86-64 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-11 16:11:50,611 INFO exited: aircast-x86-64 (terminated by SIGSEGV; not expected) 2020-12-11 16:11:51,612 INFO spawned: 'aircast-x86-64' with pid 496 2020-12-11 16:11:52,628 INFO success: aircast-x86-64 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-12-11 16:29:48,367 INFO exited: aircast-x86-64 (terminated by SIGSEGV; not expected) 2020-12-11 16:29:49,368 INFO spawned: 'aircast-x86-64' with pid 625 2020-12-11 16:29:50,384 INFO success: aircast-x86-64 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) `

Flyinace2000 commented 3 years ago

Also saw these in the UnRaid logs.

Dec 11 15:36:28 HomeServer kernel: br-ca10b681aed9: port 4(veth70eaa5d) entered forwarding state Dec 11 15:36:29 HomeServer avahi-daemon[5910]: Joining mDNS multicast group on interface veth70eaa5d.IPv6 with address fe80::2c79:2cff:fea1:efa8. Dec 11 15:36:29 HomeServer avahi-daemon[5910]: New relevant interface veth70eaa5d.IPv6 for mDNS. Dec 11 15:36:29 HomeServer avahi-daemon[5910]: Registering new address record for fe80::2c79:2cff:fea1:efa8 on veth70eaa5d.*. Dec 11 15:57:11 HomeServer kernel: aircast-x86-64[24375]: segfault at 64008d10 ip 000014b67e01f7b7 sp 000014b675feee40 error 4 in libc-2.27.so[14b67de84000+1e7000] Dec 11 15:57:11 HomeServer kernel: Code: 24 08 4c 89 d3 64 c6 00 01 48 8b 05 4b f7 24 00 48 89 7c 24 18 48 8b 00 4c 8b 3b 41 bd 01 00 00 00 4d 85 ff 0f 84 b0 00 00 00 <49> 8b 17 48 85 c0 48 89 13 0f 85 4a 03 00 00 49 8b 77 f8 4d 8d 47 Dec 11 16:11:50 HomeServer kernel: aircast-x86-64[1340]: segfault at e0008ce0 ip 0000150ffb9467b7 sp 0000150ff39fbe40 error 4 in libc-2.27.so[150ffb7ab000+1e7000] Dec 11 16:11:50 HomeServer kernel: Code: 24 08 4c 89 d3 64 c6 00 01 48 8b 05 4b f7 24 00 48 89 7c 24 18 48 8b 00 4c 8b 3b 41 bd 01 00 00 00 4d 85 ff 0f 84 b0 00 00 00 <49> 8b 17 48 85 c0 48 89 13 0f 85 4a 03 00 00 49 8b 77 f8 4d 8d 47 Dec 11 16:20:36 HomeServer dhcpcd[1783]: br0: Router Advertisement from fe80::a236:9fff:fe30:8b99 Dec 11 16:20:36 HomeServer dhcpcd[1783]: br0: fe80::a236:9fff:fe30:8b99: no longer a default router Dec 11 16:21:25 HomeServer dhcpcd[1783]: br0: Router Advertisement from fe80::a236:9fff:fe30:8b99 Dec 11 16:21:25 HomeServer dhcpcd[1783]: br0: no global addresses for default route Dec 11 16:23:01 HomeServer upnpc: Added port 51820/udp Dec 11 16:28:30 HomeServer usbhid-ups[5180]: nut_libusb_get_string: Pipe error. Dec 11 16:29:48 HomeServer kernel: aircast-x86-64[18411]: segfault at a0008ce0 ip 00001547b446e7b7 sp 00001547b236de40 error 4 in libc-2.27.so[1547b42d3000+1e7000]

philippe44 commented 3 years ago

There is a log created by aircast. I don't know where this docker image puts it. If you can't find it, can you manually start it? Seems to me that @1activegeek is providing explanation on how to do that. Just run ./aricast-x86-64 -f , try to play something and then zip & attach logfile. It will tell me a log of what's happening

Flyinace2000 commented 3 years ago

Got the logs. Stopped container, started, ran debug command below, and started to stream using PocketCast to bedroom speaker

aircast-x86-64 -d all=debug

[10:39:59.868656] main:958 Starting aircast version: v0.2.41.0 (Dec 8 2020 @ 18:41:57) [10:39:59.868698] main:966 no config file, using defaults [10:39:59.868734] Start:716 Binding to 10.0.1.30 [10:39:59.883481] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.883494] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.110, name Google-Cast-Group-4767d3c0876a4902a094e1c2c2f68f1f._googlecast._tcp.local [10:39:59.883503] AddCastDevice:653 [0x694030]: adding renderer (Home group) [10:39:59.883507] AddCastDevice:659 [0x694030]: creating MAC 69403a [10:39:59.883909] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.883915] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [10:39:59.883920] AddCastDevice:653 [0x6949c0]: adding renderer (Living Room Chromecast) [10:39:59.883927] AddCastDevice:659 [0x6949c0]: creating MAC 6949ca [10:39:59.885550] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.885556] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.102, name Google-Home-Mini-09e454f3924d4d4e5618e812d1d8bb30._googlecast._tcp.local [10:39:59.885561] AddCastDevice:653 [0x695350]: adding renderer (Kitchen speaker) [10:39:59.885569] AddCastDevice:659 [0x695350]: creating MAC 69535a [10:39:59.886581] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.886586] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.104, name Chromecast-Audio-1bc695b2d2ed132ebb304f8ac3e21f88._googlecast._tcp.local [10:39:59.886590] AddCastDevice:653 [0x695ce0]: adding renderer (Bedroom speaker) [10:39:59.886597] AddCastDevice:659 [0x695ce0]: creating MAC 695cea [10:39:59.889186] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.889208] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.110, name Google-Nest-Mini-cd361edff4adcdaab26892ca96bc8ab6._googlecast._tcp.local [10:39:59.889216] AddCastDevice:653 [0x696670]: adding renderer (Basement speaker) [10:39:59.889225] AddCastDevice:659 [0x696670]: creating MAC 69667a [10:39:59.889411] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.889415] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [10:39:59.889420] AddCastDevice:653 [0x697000]: adding renderer (Kid's Room) [10:39:59.889426] AddCastDevice:659 [0x697000]: creating MAC 69700a [10:39:59.889580] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.889584] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [10:39:59.889606] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.889609] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-2._googlecast._tcp.local [10:39:59.889617] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.889620] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-1._googlecast._tcp.local [10:39:59.889633] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.889636] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [10:39:59.891717] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.891723] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [10:39:59.892064] mDNSsearchCallback:401 ----------------- round ------------------ [10:39:59.892069] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [10:40:03.313245] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:03.313259] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [10:40:03.313309] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:03.313312] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [10:40:03.313877] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:03.313884] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [10:40:03.315090] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:03.315098] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [10:40:03.319424] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:03.319434] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [10:40:03.319444] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:03.319446] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [10:40:20.320906] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:20.320919] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [10:40:20.324330] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:20.324339] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [10:40:20.324729] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:20.324736] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [10:40:20.327299] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:20.327307] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [10:40:20.329905] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:20.329911] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [10:40:20.329921] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:20.329923] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [10:40:24.299039] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:24.299053] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [10:40:24.301148] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:24.301161] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.104, name Chromecast-Audio-1bc695b2d2ed132ebb304f8ac3e21f88._googlecast._tcp.local [10:40:24.302027] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:24.302037] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [10:40:24.302426] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:24.302435] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [10:40:24.303949] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:24.303959] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [10:40:24.308054] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:24.308068] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.104, name Chromecast-Audio-1bc695b2d2ed132ebb304f8ac3e21f88._googlecast._tcp.local [10:40:24.308084] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:24.308087] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [10:40:24.308095] mDNSsearchCallback:401 ----------------- round ------------------ [10:40:24.308097] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local

1activegeek commented 3 years ago

Correct, there is actually a way to run the container with a command to input the debug mode. Not sure if that command gave what was needed, but you can use the following as an example of how to run it:

docker run -d --name=airconnect --network=host -e "AIRCAST_VAR=-d all=debug" 1activegeek/airconnect

Would run the above that you indicated. I see it was also mentioned to run with -f so just keep in mind you can run anything appended to the end of the regular command using this method. The other thing you should be able to do would be to run:

docker exec -it airconnect(container name) bash

This should drop you to a terminal within the container, and allow you to try and kill or terminate the process, make changes as necessary, and then exit and restart the container or even manually run the command with the binary itself. May require using sudo or elevating permissions depending on platform you're running docker on.

Flyinace2000 commented 3 years ago

Thanks @ 1activegeek

here are the logs from your instructions

Last login: Sat Dec 12 09:20:52 -0500 2020 on /dev/pts/0. root@HomeServer:~# docker run -d --name=airconnect --network=host -e "AIRCAST_VAR=-d all=debug" 1activegeek/airconnect f646511df0a4559019a023124e1299e1214ae0892f14a794c5ef1520abbe52ef root@HomeServer:~# docker exec -it airconnect bash root@HomeServer:/# aircast-x86-64 -d all=debug [18:36:09.134413] main:958 Starting aircast version: v0.2.41.0 (Dec 8 2020 @ 18:41:57) [18:36:09.134475] main:966 no config file, using defaults [18:36:09.134512] Start:716 Binding to 10.0.1.30 [18:36:09.149656] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.149680] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.110, name Google-Cast-Group-4767d3c0876a4902a094e1c2c2f68f1f._googlecast._tcp.local [18:36:09.149693] AddCastDevice:653 [0x6936f0]: adding renderer (Home group) [18:36:09.149700] AddCastDevice:659 [0x6936f0]: creating MAC 6936fa [18:36:09.150070] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.150079] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:36:09.150087] AddCastDevice:653 [0x694080]: adding renderer (Living Room Chromecast) [18:36:09.150098] AddCastDevice:659 [0x694080]: creating MAC 69408a [18:36:09.153571] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.153583] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.102, name Google-Home-Mini-09e454f3924d4d4e5618e812d1d8bb30._googlecast._tcp.local [18:36:09.153592] AddCastDevice:653 [0x694a10]: adding renderer (Kitchen speaker) [18:36:09.153602] AddCastDevice:659 [0x694a10]: creating MAC 694a1a [18:36:09.153778] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.153786] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.110, name Google-Nest-Mini-cd361edff4adcdaab26892ca96bc8ab6._googlecast._tcp.local [18:36:09.153792] AddCastDevice:653 [0x6953a0]: adding renderer (Basement speaker) [18:36:09.153801] AddCastDevice:659 [0x6953a0]: creating MAC 6953aa [18:36:09.153950] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.153957] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:36:09.153963] AddCastDevice:653 [0x695d30]: adding renderer (Kid's Room) [18:36:09.153971] AddCastDevice:659 [0x695d30]: creating MAC 695d3a [18:36:09.154116] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.154124] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:36:09.154136] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.154141] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-2._googlecast._tcp.local [18:36:09.154151] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.154155] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-1._googlecast._tcp.local [18:36:09.154166] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.154171] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.104, name Chromecast-Audio-1bc695b2d2ed132ebb304f8ac3e21f88._googlecast._tcp.local [18:36:09.154176] AddCastDevice:653 [0x6966c0]: adding renderer (Bedroom speaker) [18:36:09.154184] AddCastDevice:659 [0x6966c0]: creating MAC 6966ca [18:36:09.154332] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.154339] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:36:09.157714] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.157729] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:36:09.157742] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:09.157747] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:36:11.324646] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:11.324663] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:36:11.326999] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:11.327009] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:36:11.327443] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:11.327451] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:36:11.329269] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:11.329277] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:36:11.331706] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:11.331715] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:36:11.332026] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:11.332039] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:36:29.308064] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:29.308090] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:36:29.309047] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:29.309056] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:36:29.310139] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:29.310149] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:36:29.312087] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:29.312099] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.104, name Chromecast-Audio-1bc695b2d2ed132ebb304f8ac3e21f88._googlecast._tcp.local [18:36:29.312119] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:29.312124] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:36:29.313208] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:29.313217] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:36:29.313549] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:29.313556] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:36:32.281330] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:32.281352] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:36:32.284199] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:32.284213] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:36:32.284595] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:32.284604] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:36:32.288022] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:32.288032] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:36:32.290644] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:32.290658] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:36:32.293067] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:32.293076] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:36:34.667957] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:34.667975] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:36:34.671346] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:34.671368] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:36:34.671382] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:34.671386] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:36:34.675992] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:34.676125] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:36:34.679429] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:34.679545] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:36:34.679563] mDNSsearchCallback:401 ----------------- round ------------------ [18:36:34.679568] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local

Flyinace2000 commented 3 years ago

I just did another test. I thought I had ALL of my Nest/Google speakers on my untrusted network (10.0.3.1/24). But I actually had two of them on my trusted network (10.0.1.1/24), the. Ultra and Nest Mini (kids room). The ChromeCast Audio was on the untrusted network. Streaming to Trusted from Trusted works. Streaming from Trusted to Untrusted does NOT work. Streaming from untrusted to untrusted does NOT work.

So looks like these IS a firewall issue, just not sure what changed in the past few weeks, firewall and VLANs were set up like this for months.

Flyinace2000 commented 3 years ago

Here are more logs for the previous test. still think its a firewall issue, but happy to have the DEVs review and if they concur we can close this issue. Thanks

[18:37:58.299480] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:38:00.814057] rtsp_thread:364 got RTSP connection 22 [18:38:01.021645] handle_rtsp:412 [0x153948017e80]: challenge +6RVIuOB52t6DtCpV1MopA== [18:38:01.027316] handle_rtsp:405 [0x153948017e80]: received ANNOUNCE

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 4

[18:38:01.032368] handle_rtsp:405 [0x153948017e80]: received SETUP [18:38:01.033226] bind_socket:791 socket binding 27 on port 52560 [18:38:01.033234] hairtunes_init:406 [0x15394c005ed0]: UDP port-0 52560 [18:38:01.033242] bind_socket:791 socket binding 28 on port 60310 [18:38:01.033245] hairtunes_init:406 [0x15394c005ed0]: UDP port-1 60310 [18:38:01.033252] bind_socket:791 socket binding 29 on port 57196 [18:38:01.033256] hairtunes_init:406 [0x15394c005ed0]: UDP port-2 57196 [18:38:01.033264] bind_socket:791 socket binding 30 on port 53559 [18:38:01.033271] hairtunes_init:424 [0x15394c005ed0]: HTTP listening port 53559 [18:38:01.033413] handle_rtsp:505 [0x153948017e80]: http=(53559) audio=(0:52560), timing=(54617:57196), control=(60345:60310) [18:38:01.033416] rtp_request_timing:860 [0x15394c005ed0]: timing request now:2651908765 (port: 54617)

RTSP/1.0 200 OK Transport: RTP/AVP/UDP;unicast;mode=record;control_port=60310;timing_port=57196;server_port=52560 Session: DEADBEEF Audio-Jack-Status: connected; type=analog CSeq: 5

[18:38:01.033464] rtp_request_timing:860 [0x15394c005ed0]: timing request now:2651908765 (port: 54617) [18:38:01.033476] rtp_request_timing:860 [0x15394c005ed0]: timing request now:2651908765 (port: 54617) [18:38:01.037406] handle_rtsp:405 [0x153948017e80]: received RECORD [18:38:01.037418] hairtunes_record:527 [0x15394c005ed0]: record 0 0

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 6

[18:38:01.038423] rtp_thread_func:841 [0x15394c005ed0]: Timing references local:2651908765, remote:83ba64d7d83b1af3 (delta:0, sum:0, adjust:0, gaps:0) [18:38:01.038469] rtp_thread_func:841 [0x15394c005ed0]: Timing references local:2651908765, remote:83ba64d7d83b8e4b (delta:-1, sum:-1, adjust:0, gaps:0) [18:38:01.039504] rtp_thread_func:841 [0x15394c005ed0]: Timing references local:2651908765, remote:83ba64d7d84e213c (delta:-1, sum:-2, adjust:0, gaps:0) [18:38:01.043244] handle_rtsp:405 [0x153948017e80]: received SET_PARAMETER [18:38:01.043261] handle_rtsp:575 [0x153948017e80]: SET PARAMETER volume -11.999999 [18:38:01.043268] CastSetDeviceVolume:333 [0x695d30]: Queuing SET_VOLUME [18:38:01.043272] raop_cb:236 [0x695d30]: Volume[0..1] 0.6000

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 7

[18:38:01.086379] flac_init:220 [0x15394c005ed0]: Using FLAC-0 (0x153944000b20) [18:38:01.086450] buffer_put_packet:643 [0x15394c005ed0]: fill [level:1] [W:22543 R:22543] [18:38:01.087245] rtp_thread_func:759 [0x15394c005ed0]: 1st sync packet received [18:38:01.087268] rtp_thread_func:765 [0x15394c005ed0]: sync packet rtp_latency:2617006425 rtp:2617083600 remote ntp:83ba64d7e0965f52, local time 2651908797 (now:2651908818) [18:38:01.087275] rtp_request_timing:860 [0x15394c005ed0]: timing request now:2651908818 (port: 54617) [18:38:01.087619] handle_rtsp:405 [0x153948017e80]: received FLUSH [18:38:01.087635] hairtunes_flush:497 [0x15394c005ed0]: FLUSH ignored as same as RECORD (22543 - 2617090116) [18:38:01.087641] hairtunes_flush:509 [0x15394c005ed0]: flush 22543 2617090116

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 8

[18:38:01.090320] rtp_thread_func:841 [0x15394c005ed0]: Timing references local:2651908818, remote:83ba64d7e58ea44f (delta:1, sum:-1, adjust:0, gaps:0) [18:38:01.206044] handle_rtsp:405 [0x153948017e80]: received SET_PARAMETER [18:38:01.206091] handle_rtsp:592 [0x153948017e80]: received metadata artist: Taylor Swift album: evermore title: willow

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 9

[18:38:01.231230] handle_rtsp:405 [0x153948017e80]: received SET_PARAMETER

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 10

[18:38:01.582085] rtp_request_resend:896 resend request [W:22606 R:22543 first=22607 last=22607] [18:38:01.582140] buffer_put_packet:630 [0x15394c005ed0]: packet newer seqno:22608 rtptime:2617107484 (W:22606 R:22543) [18:38:01.585532] buffer_put_packet:636 [0x15394c005ed0]: packet recovered seqno:22607 rtptime:2617107132 (W:22608 R:22543)

[18:38:01.676915] CastConnect:365 [0x695d30]: SSL connection opened [0x153948015b40] [18:38:01.676953] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"CONNECT"} [18:38:01.677019] CastLoad:174 [0x695d30]: Queuing LOAD [18:38:01.677025] CastSimple:211 [0x695d30]: Queuing PLAY [18:38:01.677029] CastSetDeviceVolume:333 [0x695d30]: Queuing SET_VOLUME [18:38:01.740832] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"LAUNCH","requestId":1,"appId":"CC1AD845"} [18:38:01.740862] CastSocketThread:763 [0x695d30]: Launching receiver 1

[18:38:01.872433] CastSocketThread:791 [0x695d30]: Receiver launched [18:38:01.872469] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"CONNECT","origin":{}} [18:38:01.872489] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"SET_VOLUME","requestId":2,"volume":{"level":0.6000}} [18:38:01.872497] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"SET_VOLUME","requestId":3,"volume":{"muted":false}} [18:38:01.872501] ProcessQueue:583 [0x695d30]: Processing VOLUME (id:3)

[18:38:01.911309] ProcessQueue:609 [0x695d30]: Processing LOAD (id:4) [18:38:01.911345] SendCastMessage:235 [0x153948015b40]: Cast sending: { "type": "LOAD", "requestId": 4, "sessionId": "a7db3be3-3080-4f0e-8ae1-50560231c049", "currentTime": 0.0, "autoplay": false, "media": { "contentId": "http://10.0.1.30:53559/stream", "streamType": "BUFFERED", "contentType": "audio/flac", "metadata": { "metadataType": 3, "albumArtist": "", "albumName": "", "trackNumber": 0, "title": "Streaming from AirConnect", "artist": "" } } }

[18:38:02.288332] handle_rtsp:405 [0x153948017e80]: received SET_PARAMETER [18:38:02.288380] handle_rtsp:592 [0x153948017e80]: received metadata artist: Taylor Swift album: evermore title: willow

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 11

[18:38:02.292415] handle_rtsp:405 [0x153948017e80]: received SET_PARAMETER

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 12

[18:38:02.522455] CastSocketThread:728 [0x695d30]: type:MEDIA_STATUS (id:0) IDLE

[18:38:02.896332] http_thread_func:1082 [0x15394c005ed0]: got HTTP connection 32 (silent frames 0) [18:38:02.897517] handle_http:1267 [0x15394c005ed0]: received GET HTTP/1.1 Host: 10.0.1.30:53559 Connection: keep-alive User-Agent: Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36 CrKey/1.50.229149 Range: bytes=0- Accept-Encoding: identity;q=1, ;q=0 Accept: /* CAST-DEVICE-CAPABILITIES: {"audio_assistant":true,"bluetooth_supported":true,"display_supported":false,"hi_res_audio_supported":false,"remote_control_input_supported":false,"touch_input_supported":false} Accept-Language: en-US,en;q=0.9

[18:38:02.897560] handle_http:1313 [0x15394c005ed0]: responding: HTTP/1.0 200 OK Server: HairTunes Content-Type: audio/flac Connection: close

[18:38:02.897569] _buffer_get_frame:983 [0x15394c005ed0]: drain [level:220 gap:-60] [W:22763 R:22543] [R:1 S:0 F:0] [18:38:03.051436] rtp_thread_func:765 [0x15394c005ed0]: sync packet rtp_latency:2617093769 rtp:2617170944 remote ntp:83ba64d9db9e6ab9, local time 2651910779 (now:2651910783) [18:38:03.212739] CastSocketThread:728 [0x695d30]: type:MEDIA_STATUS (id:4) PAUSED [18:38:03.212767] CastSocketThread:807 [0x695d30]: Media session id 1 [18:38:03.212815] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"SET_VOLUME","requestId":5,"mediaSessionId":1,"volume":{"level":0.5000,"muted":false}} [18:38:03.274153] CastSocketThread:728 [0x695d30]: type:MEDIA_STATUS (id:5) PAUSED [18:38:03.274181] ProcessQueue:590 [0x695d30]: Processing PLAY (id:6) [18:38:03.274233] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"PLAY","requestId":6,"mediaSessionId":1} [18:38:03.332708] CastSocketThread:728 [0x695d30]: type:MEDIA_STATUS (id:6) PLAYING [18:38:03.332768] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"SET_VOLUME","requestId":7,"volume":{"level":0.6000}} [18:38:03.332795] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"SET_VOLUME","requestId":8,"volume":{"muted":false}} [18:38:03.332799] ProcessQueue:583 [0x695d30]: Processing VOLUME (id:8) [18:38:03.332846] MRThread:288 [0x695d30]: Cast playing [18:38:04.335867] CastSocketThread:728 [0x695d30]: type:MEDIA_STATUS (id:0) PLAYING [18:38:04.336018] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"GET_STATUS","requestId":9,"mediaSessionId":1}

[18:38:04.350175] CastSocketThread:728 [0x695d30]: type:MEDIA_STATUS (id:9) PLAYING [18:38:05.025730] rtp_thread_func:765 [0x15394c005ed0]: sync packet rtp_latency:2617180837 rtp:2617258012 remote ntp:83ba64dbd50ca49a, local time 2651912753 (now:2651912757) [18:38:05.181485] buffer_put_packet:643 [0x15394c005ed0]: fill [level:1] [W:23055 R:23055] [18:38:05.183094] _buffer_get_frame:983 [0x15394c005ed0]: drain [level:4 gap:1743] [W:23059 R:23055] [R:1 S:0 F:0] [18:38:05.350346] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"GET_STATUS","requestId":10,"mediaSessionId":1} [18:38:05.418099] CastSocketThread:728 [0x695d30]: type:MEDIA_STATUS (id:10) PLAYING [18:38:06.053196] rtp_thread_func:765 [0x15394c005ed0]: sync packet rtp_latency:2617225106 rtp:2617302281 remote ntp:83ba64dcd6085b18, local time 2651913757 (now:2651913784) [18:38:06.066096] rtp_request_resend:896 resend request [W:23167 R:23148 first=23168 last=23169] [18:38:06.066150] buffer_put_packet:630 [0x15394c005ed0]: packet newer seqno:23170 rtptime:2617305308 (W:23167 R:23148) [18:38:06.066226] buffer_put_packet:636 [0x15394c005ed0]: packet recovered seqno:23168 rtptime:2617304604 (W:23170 R:23148) [18:38:06.066266] buffer_put_packet:636 [0x15394c005ed0]: packet recovered seqno:23169 rtptime:2617304956 (W:23170 R:23148) [18:38:06.069680] buffer_put_packet:639 [0x15394c005ed0]: packet too late seqno:23168 rtptime:2617304604 (W:23170 R:23171) [18:38:06.069730] buffer_put_packet:639 [0x15394c005ed0]: packet too late seqno:23169 rtptime:2617304956 (W:23170 R:23171) [18:38:06.418364] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"GET_STATUS","requestId":11,"mediaSessionId":1} [18:38:06.455604] handle_rtsp:405 [0x153948017e80]: received TEARDOWN [18:38:06.469446] shutdown_socket:753 closed socket 32

[18:38:06.494541] shutdown_socket:753 closed socket 30 [18:38:06.534419] CastSocketThread:728 [0x695d30]: type:MEDIA_STATUS (id:11) PLAYING

[18:38:06.541845] SendCastMessage:235 [0x153948015b40]: Cast sending: {"type":"STOP","requestId":12,"mediaSessionId":1} [18:38:06.541859] CastStop:245 [0x695d30]: Immediate STOP (id:12)

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 15

[18:38:06.546066] read_line:1219 disconnected on the other end 22 [18:38:06.546121] rtsp_thread:379 RTSP close 22 [18:38:06.639585] CastSocketThread:728 [0x695d30]: type:MEDIA_STATUS (id:12) IDLE

[18:38:09.591495] rtsp_thread:364 got RTSP connection 25 [18:38:09.809116] handle_rtsp:412 [0x15394801b450]: challenge JFc2/BPHSdnp7DHg5XLVzA== [18:38:09.814326] handle_rtsp:405 [0x15394801b450]: received ANNOUNCE

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 4

[18:38:09.819470] handle_rtsp:405 [0x15394801b450]: received SETUP [18:38:09.820222] bind_socket:791 socket binding 27 on port 49258 [18:38:09.820230] hairtunes_init:406 [0x153940005eb0]: UDP port-0 49258 [18:38:09.820240] bind_socket:791 socket binding 28 on port 44320 [18:38:09.820245] hairtunes_init:406 [0x153940005eb0]: UDP port-1 44320 [18:38:09.820254] bind_socket:791 socket binding 29 on port 35263 [18:38:09.820258] hairtunes_init:406 [0x153940005eb0]: UDP port-2 35263 [18:38:09.820268] bind_socket:791 socket binding 30 on port 58653 [18:38:09.820276] hairtunes_init:424 [0x153940005eb0]: HTTP listening port 58653 [18:38:09.820350] rtp_request_timing:860 [0x153940005eb0]: timing request now:2651917552 (port: 64017) [18:38:09.820371] handle_rtsp:505 [0x15394801b450]: http=(58653) audio=(0:49258), timing=(64017:35263), control=(59436:44320) [18:38:09.820380] rtp_request_timing:860 [0x153940005eb0]: timing request now:2651917552 (port: 64017) [18:38:09.820391] rtp_request_timing:860 [0x153940005eb0]: timing request now:2651917552 (port: 64017)

RTSP/1.0 200 OK Transport: RTP/AVP/UDP;unicast;mode=record;control_port=44320;timing_port=35263;server_port=49258 Session: DEADBEEF Audio-Jack-Status: connected; type=analog CSeq: 5

[18:38:09.823132] rtp_thread_func:841 [0x153940005eb0]: Timing references local:2651917552, remote:83ba64e0a1388ca3 (delta:0, sum:0, adjust:0, gaps:0) [18:38:09.824346] rtp_thread_func:841 [0x153940005eb0]: Timing references local:2651917552, remote:83ba64e0a1692bef (delta:-1, sum:-1, adjust:0, gaps:0) [18:38:09.824359] rtp_thread_func:841 [0x153940005eb0]: Timing references local:2651917552, remote:83ba64e0a182d005 (delta:-1, sum:-2, adjust:0, gaps:0) [18:38:09.824433] handle_rtsp:405 [0x15394801b450]: received RECORD [18:38:09.824444] hairtunes_record:527 [0x153940005eb0]: record 0 0

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 6

[18:38:09.828714] handle_rtsp:405 [0x15394801b450]: received SET_PARAMETER [18:38:09.828729] handle_rtsp:575 [0x15394801b450]: SET PARAMETER volume -13.965689 [18:38:09.828738] CastSetDeviceVolume:333 [0x6966c0]: Queuing SET_VOLUME [18:38:09.828743] raop_cb:236 [0x6966c0]: Volume[0..1] 0.5345

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 7

[18:38:09.832757] rtp_thread_func:759 [0x153940005eb0]: 1st sync packet received [18:38:09.832769] rtp_thread_func:765 [0x153940005eb0]: sync packet rtp_latency:1505187563 rtp:1505264738 remote ntp:83ba64e0a3b8b47c, local time 2651917560 (now:2651917564) [18:38:09.832789] rtp_request_timing:860 [0x153940005eb0]: timing request now:2651917564 (port: 64017) [18:38:09.835017] rtp_thread_func:841 [0x153940005eb0]: Timing references local:2651917564, remote:83ba64e0a45941de (delta:0, sum:-2, adjust:0, gaps:0) [18:38:09.856830] flac_init:220 [0x153940005eb0]: Using FLAC-0 (0x153938000b20) [18:38:09.856866] buffer_put_packet:643 [0x153940005eb0]: fill [level:1] [W:4253 R:4253] [18:38:09.857201] rtp_thread_func:759 [0x153940005eb0]: 1st sync packet received [18:38:09.857213] rtp_thread_func:765 [0x153940005eb0]: sync packet rtp_latency:1505188639 rtp:1505265814 remote ntp:83ba64e0a9f84662, local time 2651917585 (now:2651917588) [18:38:09.858570] handle_rtsp:405 [0x15394801b450]: received FLUSH [18:38:09.858583] hairtunes_flush:497 [0x153940005eb0]: FLUSH ignored as same as RECORD (4253 - 1505272333) [18:38:09.858589] hairtunes_flush:509 [0x153940005eb0]: flush 4253 1505272333

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 8

[18:38:09.896830] handle_rtsp:405 [0x15394801b450]: received SET_PARAMETER

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 9

[18:38:09.901768] handle_rtsp:405 [0x15394801b450]: received SET_PARAMETER

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 10

[18:38:09.905195] handle_rtsp:405 [0x15394801b450]: received SET_PARAMETER [18:38:09.905208] handle_rtsp:592 [0x15394801b450]: received metadata artist: Taylor Swift album: evermore title: willow

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 11

[18:38:09.909031] handle_rtsp:405 [0x15394801b450]: received SET_PARAMETER [18:38:09.909046] handle_rtsp:592 [0x15394801b450]: received metadata artist: Taylor Swift album: evermore title: willow

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 12

[18:38:10.444850] CastConnect:365 [0x6966c0]: SSL connection opened [0x153948019110] [18:38:10.444885] SendCastMessage:235 [0x153948019110]: Cast sending: {"type":"CONNECT"} [18:38:10.444933] CastLoad:174 [0x6966c0]: Queuing LOAD [18:38:10.444939] CastSimple:211 [0x6966c0]: Queuing PLAY [18:38:10.444943] CastSetDeviceVolume:333 [0x6966c0]: Queuing SET_VOLUME [18:38:10.483729] SendCastMessage:235 [0x153948019110]: Cast sending: {"type":"LAUNCH","requestId":1,"appId":"CC1AD845"} [18:38:10.483769] CastSocketThread:763 [0x6966c0]: Launching receiver 1

[18:38:11.077527] handle_rtsp:405 [0x15394801b450]: received SET_PARAMETER [18:38:11.077553] handle_rtsp:592 [0x15394801b450]: received metadata artist: Taylor Swift album: evermore title: willow

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 13

[18:38:11.082179] handle_rtsp:405 [0x15394801b450]: received SET_PARAMETER

RTSP/1.0 200 OK Audio-Jack-Status: connected; type=analog CSeq: 14

[18:38:11.478816] CastSocketThread:791 [0x6966c0]: Receiver launched [18:38:11.478841] SendCastMessage:235 [0x153948019110]: Cast sending: {"type":"CONNECT","origin":{}} [18:38:11.478859] SendCastMessage:235 [0x153948019110]: Cast sending: {"type":"SET_VOLUME","requestId":2,"volume":{"level":0.5345}} [18:38:11.478869] SendCastMessage:235 [0x153948019110]: Cast sending: {"type":"SET_VOLUME","requestId":3,"volume":{"muted":false}} [18:38:11.478874] ProcessQueue:583 [0x6966c0]: Processing VOLUME (id:3)

[18:38:11.818894] rtp_thread_func:765 [0x153940005eb0]: sync packet rtp_latency:1505274412 rtp:1505351587 remote ntp:83ba64e29be11340, local time 2651919530 (now:2651919550)

[18:38:12.515422] ProcessQueue:609 [0x6966c0]: Processing LOAD (id:4) [18:38:12.515469] SendCastMessage:235 [0x153948019110]: Cast sending: { "type": "LOAD", "requestId": 4, "sessionId": "bbf12829-485f-46e0-b6f6-076fd0ba98d1", "currentTime": 0.0, "autoplay": false, "media": { "contentId": "http://10.0.1.30:58653/stream", "streamType": "BUFFERED", "contentType": "audio/flac", "metadata": { "metadataType": 3, "albumArtist": "", "albumName": "", "trackNumber": 0, "title": "Streaming from AirConnect", "artist": "" } } } [18:38:12.551793] CastSocketThread:728 [0x6966c0]: type:MEDIA_STATUS (id:0) IDLE

[18:38:12.862585] rtp_thread_func:765 [0x153940005eb0]: sync packet rtp_latency:1505320396 rtp:1505397571 remote ntp:83ba64e3a6d1b398, local time 2651920573 (now:2651920594) [18:38:13.560682] CastSocketThread:728 [0x6966c0]: type:MEDIA_STATUS (id:0) BUFFERING [18:38:13.944894] buffer_put_packet:643 [0x153940005eb0]: fill [level:513] [W:4765 R:4253] [18:38:14.326872] mDNSsearchCallback:401 ----------------- round ------------------ [18:38:14.326890] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:38:14.329411] mDNSsearchCallback:401 ----------------- round ------------------ [18:38:14.329423] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:38:14.329926] mDNSsearchCallback:401 ----------------- round ------------------ [18:38:14.329934] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:38:14.331789] mDNSsearchCallback:401 ----------------- round ------------------ [18:38:14.331799] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.166, name Chromecast-Ultra-f634fae2e73d385a041d6cec2b042c29-3._googlecast._tcp.local [18:38:14.334086] mDNSsearchCallback:401 ----------------- round ------------------ [18:38:14.334096] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45-1._googlecast._tcp.local [18:38:14.334107] mDNSsearchCallback:401 ----------------- round ------------------ [18:38:14.334114] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.1.150, name Google-Nest-Mini-2147c4e73005c5cf3e0091ce5b3d4b45._googlecast._tcp.local [18:38:14.334614] mDNSsearchCallback:401 ----------------- round ------------------ [18:38:14.334622] mDNSsearchCallback:405 [ACTIVE] host 10.0.1.7, srv 10.0.3.104, name Chromecast-Audio-1bc695b2d2ed132ebb304f8ac3e21f88._googlecast._tcp.local [18:38:14.847443] rtp_thread_func:765 [0x153940005eb0]: sync packet rtp_latency:1505408710 rtp:1505485885 remote ntp:83ba64e5a77aa476, local time 2651922576 (now:2651922579) [18:38:14.847486] rtp_request_timing:860 [0x153940005eb0]: timing request now:2651922579 (port: 64017) [18:38:14.850390] rtp_thread_func:841 [0x153940005eb0]: Timing references local:2651922579, remote:83ba64e5a83b6725 (delta:-1, sum:-3, adjust:0, gaps:0) [18:38:16.930632] rtp_thread_func:765 [0x153940005eb0]: sync packet rtp_latency:1505496782 rtp:1505573957 remote ntp:83ba64e7a6bc36c4, local time 2651924573 (now:2651924662) [18:38:17.670940] handle_rtsp:405 [0x15394801b450]: received TEARDOWN

[18:38:17.710276] shutdown_socket:753 closed socket 30 Segmentation fault

Flyinace2000 commented 3 years ago

Closing. Firewall rule to allow certain ports from the untrusted LAN to hit the trusted LAN. Screenshot below. All is working.

image

philippe44 commented 3 years ago

BTW, since version 0.2.40.x, you can limit the ports AirConnect uses

Flyinace2000 commented 3 years ago

BTW, since version 0.2.40.x, you can limit the ports AirConnect uses

So I’d be able to limit that second rules ports? Is there a best practice of how many ports to open for a certain number of devices? Or does that not matter since each device has a unique IP.

philippe44 commented 3 years ago

I've updated the README to give better guidance

Flyinace2000 commented 3 years ago

This look right for the custom config.xml? Idea being to restrict usage to 150 ports. Does the custom config need the device sections or can those be added dynamically?

<?xml version="1.0"?>
<aircast>
<common>
<enabled>1</enabled>
<stop_receiver>0</stop_receiver>
<media_volume>0.5000</media_volume>
<latency></latency>
<drift>0</drift>
<codec>flc</codec>
<metadata>1</metadata>
<artwork></artwork>
</common>
<main_log>info</main_log>
<cast_log>info</cast_log>
<util_log>warn</util_log>
<log_limit>-1</log_limit>
<max_players>32</max_players>
<ports>60100:60250</ports>
Flyinace2000 commented 3 years ago

Also just tried manual running app inside the container w/ the -x flag and got "no config file, using defaults". The file is there.....if this is just me not understanding a concept I'm happy to be directed to a resource to study. Thanks again.

root@HomeServer:/# /bin/aircast-x86-64 -x /config.xml
[20:32:28.978292] main:955 Starting aircast version: v0.2.42.1 (Dec 15 2020 @ 16:13:49)
[20:32:28.978335] main:963 no config file, using defaults
[20:32:28.978370] Start:716 Binding to 10.0.1.30
[20:32:28.987365] AddCastDevice:653 [0x695710]: adding renderer (Kitchen speaker)
[20:32:28.987393] AddCastDevice:659 [0x695710]: creating MAC 69571a
[20:32:28.989814] AddCastDevice:653 [0x6960a0]: adding renderer (Kid's Room)
[20:32:28.989824] AddCastDevice:659 [0x6960a0]: creating MAC 6960aa
[20:32:28.990027] AddCastDevice:653 [0x696a30]: adding renderer (Living Room Chromecast)
[20:32:28.990035] AddCastDevice:659 [0x696a30]: creating MAC 696a3a
[20:32:28.990175] AddCastDevice:653 [0x6973c0]: adding renderer (Bedroom speaker)
[20:32:28.990183] AddCastDevice:659 [0x6973c0]: creating MAC 6973ca
[20:32:28.990320] AddCastDevice:653 [0x697d50]: adding renderer (Basement speaker)
[20:32:28.990327] AddCastDevice:659 [0x697d50]: creating MAC 697d5a
[20:32:28.990474] AddCastDevice:653 [0x6986e0]: adding renderer (Home group)
[20:32:28.990478] AddCastDevice:659 [0x6986e0]: creating MAC 6986ea
1activegeek commented 3 years ago

This look right for the custom config.xml? Idea being to restrict usage to 150 ports. Does the custom config need the device sections or can those be added dynamically?

I believe you are missing a closing </aircast>. I'm just looking at an old file I had once upon a time - honestly don't remember why I had it created, but I do see in mine that there is a closing aircast tag as I noted here. My guess is that the format being incorrect, resulted in a failed read of the file even though it was there - aka "no file" error.

IIRC - the advice is to run the command a certain way to generate a proper config format, then you can modify or add/del/etc. This may be the best course to get a fresh file?

Flyinace2000 commented 3 years ago

My file has the closing tags (at least I think it does, not home right now). The part of later was just the common section before the device specific info.

philippe44 commented 3 years ago

Are you sure the config.xml is in the root folder? That seems odd.

I know it's a bit strange but it's not first-port:last-port but first-port:count :-) (and you can also set that on the command line, don't need a config file).

Flyinace2000 commented 3 years ago

This look right for the custom config.xml? Idea being to restrict usage to 150 ports. Does the custom config need the device sections or can those be added dynamically?

I believe you are missing a closing </aircast>. I'm just looking at an old file I had once upon a time - honestly don't remember why I had it created, but I do see in mine that there is a closing aircast tag as I noted here. My guess is that the format being incorrect, resulted in a failed read of the file even though it was there - aka "no file" error.

IIRC - the advice is to run the command a certain way to generate a proper config format, then you can modify or add/del/etc. This may be the best course to get a fresh file?

So you were partly right :-). I did create my original config using the -I command, but during my (bad) testing I tried to delete the device section of my config and forgot to re-close the section. I have done that and now the config file is accepted. PLUS I just saw @philippe44 response about the config file and the ports being port#:count so I've changed it to 60100:150. Lets see what happens. If that works then I'll just try to use the flag instead of the config file since that's the only change I'm making.

Flyinace2000 commented 3 years ago

@philippe44 Is this the correct format "-a 60100[:150]" or via config below

<?xml version="1.0"?>
<aircast>
<common>
<enabled>1</enabled>
<stop_receiver>0</stop_receiver>
<media_volume>0.5000</media_volume>
<latency></latency>
<drift>0</drift>
<codec>flc</codec>
<metadata>1</metadata>
<artwork></artwork>
</common>
<main_log>info</main_log>
<cast_log>info</cast_log>
<util_log>warn</util_log>
<log_limit>-1</log_limit>
<max_players>32</max_players>
<ports>60100:150</ports>
</aircast>
philippe44 commented 3 years ago

The config is fine but not the command line as the brackets [] are a syntax to indicate an optional parameter, but should not be part of the command (I've just clarified that in the README)

Flyinace2000 commented 3 years ago

The config is fine but not the command line as the brackets [] are a syntax to indicate an optional parameter, but should not be part of the command (I've just clarified that in the README)

Gotchya, so when trying to run w/ -a 60100:150 each render gets a cannot bind error. I get this error no with either firewall rules enable (restricted to 60100 to 60250 or 32788-61000). If I run the program w/o the -a flag and port, then everything binds fine (regardless of which firewall rule is enabled).

root@HomeServer:/bin# aircast-x86-64 -a 60100:150
[22:33:51.244783] main:955 Starting aircast version: v0.2.42.1 (Dec 15 2020 @ 16:13:49)
[22:33:51.244831] main:963 no config file, using defaults
[22:33:51.244869] Start:716 Binding to 10.0.1.30
[22:33:51.374242] AddCastDevice:653 [0x694030]: adding renderer (Kitchen speaker)
[22:33:51.374290] AddCastDevice:659 [0x694030]: creating MAC 69403a
[22:33:51.374489] bind_socket:782 cannot bind socket 10
[22:33:51.374623] AddCastDevice:653 [0x6949c0]: adding renderer (Kid's Room)
[22:33:51.374631] AddCastDevice:659 [0x6949c0]: creating MAC 6949ca
[22:33:51.374752] bind_socket:782 cannot bind socket 12
[22:33:51.377107] AddCastDevice:653 [0x695350]: adding renderer (Living Room Chromecast)
[22:33:51.377123] AddCastDevice:659 [0x695350]: creating MAC 69535a
[22:33:51.377240] bind_socket:782 cannot bind socket 16
[22:33:51.377298] AddCastDevice:653 [0x695ce0]: adding renderer (Bedroom speaker)
[22:33:51.377306] AddCastDevice:659 [0x695ce0]: creating MAC 695cea
[22:33:51.377399] bind_socket:782 cannot bind socket 18
[22:33:51.377452] AddCastDevice:653 [0x696670]: adding renderer (Basement speaker)
[22:33:51.377459] AddCastDevice:659 [0x696670]: creating MAC 69667a
[22:33:51.377564] bind_socket:782 cannot bind socket 20
[22:33:51.377615] AddCastDevice:653 [0x697000]: adding renderer (Home group)
[22:33:51.377619] AddCastDevice:659 [0x697000]: creating MAC 69700a
[22:33:51.377717] bind_socket:782 cannot bind socket 21
root@HomeServer:/bin# aircast-x86-64
[22:48:08.247348] main:955 Starting aircast version: v0.2.42.1 (Dec 15 2020 @ 16:13:49)
[22:48:08.247388] main:963 no config file, using defaults
[22:48:08.247424] Start:716 Binding to 10.0.1.30
[22:48:08.281439] AddCastDevice:653 [0x694030]: adding renderer (Kitchen speaker)
[22:48:08.281460] AddCastDevice:659 [0x694030]: creating MAC 69403a
[22:48:08.282159] AddCastDevice:653 [0x6949c0]: adding renderer (Kid's Room)
[22:48:08.282169] AddCastDevice:659 [0x6949c0]: creating MAC 6949ca
[22:48:08.283061] AddCastDevice:653 [0x695350]: adding renderer (Living Room Chromecast)
[22:48:08.283071] AddCastDevice:659 [0x695350]: creating MAC 69535a
[22:48:08.283799] AddCastDevice:653 [0x695ce0]: adding renderer (Bedroom speaker)
[22:48:08.283810] AddCastDevice:659 [0x695ce0]: creating MAC 695cea
[22:48:08.284527] AddCastDevice:653 [0x696670]: adding renderer (Basement speaker)
[22:48:08.284537] AddCastDevice:659 [0x696670]: creating MAC 69667a
[22:48:08.289103] AddCastDevice:653 [0x697000]: adding renderer (Home group)
[22:48:08.289118] AddCastDevice:659 [0x697000]: creating MAC 69700a
Flyinace2000 commented 3 years ago

Maybe I'm misunderstanding something. A few sources online say that chrome casts need Port: 32768 - 61000. Would this requirement not be change by using AirConnect? If that's the case, then no real reason for me to have AirConnect (or my Firewall) restrict which ports to use.

1activegeek commented 3 years ago

I'm not sure about the specifics of that port usage for Chromecast, but what I will say is that with the added complexity I just saw in the title change (Cross VLAN) - I can tell you there will be difficulty. In most routing setups, handling the UPNP nature of the chromecast devices is troublesome at best. Hopefully OPNSense can be better - but I honestly can't even remember the hoops I jumped through to get mine working. I still can't get to my Chromecasts from my phone when on my secure network, connecting to IoT network on a diff VLAN. I have to connect to a diff wifi just to config them. Just my 2 cents about the head banging you're probably doing about this all. 😄

Flyinace2000 commented 3 years ago

I guess the question I have is what does the port flags (-a or ) do from a functionality perspective. Do they define what ports your program uses to communicate to the device sending audio, or the ports the chrome cast receivers will use? I am suspecting is the ports AirConnect will use. On my network AirConnect lives on UnRaid on the trusted VLAN1 (10.0.1.1/24) and the chrome casts on the untrusted VLAN20 (10.0.3.1/24). My devices that send music (phone, and MacOS desktop) are on the trusted VLAN.

I was understanding the port flags/config to designate what ports the chrome casts would use to communicate. So when I restricted the ports to 60100:150 (60100-60250) and then enabled the firewall rule to only let through 60100-60250 from VLAN20 to VLAN1 I can connect to the chrome cast (and change volume), but streaming audio did not work. But when I change that firewall rule to let through 32768 - 61000 everything works.

Here is my current config to enable cross VLAN audio streaming (trusted to untrusted) using OPNSense and UnRaid

Firewall Rules Screen Shot 2020-12-16 at 7 58 08 AM

UDP Broadcast Relay Screen Shot 2020-12-16 at 7 58 47 AM

philippe44 commented 3 years ago

The -a is really for the incoming (listening) ports I'm opening. I don't set the outgoing port explicitly and that might be the issue. Now, I might have left errors :-)

1activegeek commented 2 years ago

Coming back to this myself as I finally got around to fixing and fully isolating some networks of my own and wanted to share some inputs in case anyone is using my container and/or similar setups - they can take most of what is shared here.

Infra:

Traffic Flow (per @philippe44 guidance in this issue: Source (iPhone) -> AirConnect Server <- Google Home Mini (Chromecast)

Since the traffic is ACTUALLY pulling from the Google Home device, it is pulling from the ports that AirConnect is publishing. Due to the updates made, we can now control what these ports are so as to not require broad open ports. Using the -a command we can specify the Port to start, and subsequently how many ports in total to count from the starting port to use for publishing out the AirConnect service. I stuck with default of 128 for simplicity, and because it doesn't require anything being including -a 50100 for example as I did here. If you want to use more than 128, you will need something like -a 50100:256 which would enable 256 ports (up to 50356 vs 50228 as you see me use below).

  1. On Firewall (UDM Pro), create the following 3 items.
  2. Port and IP Group - Choose Port Group, and specify 50100-50228 and name it AirConnect Ports (adjust this if you specify more than the default of 128 as guided above)
  3. Port and IP Group - Choose IPv4, and specify the IP of the server that is running the AirConnect server, or in my case the host running the docker container and add it. Name this AirConnect Server.
  4. Port and IP Group - Choose IPv4 again, and add each individual IP address from your IoT VLAN that will be used for AirConnect. Name this AirConnect Targets.
  5. Next we will add the Firewall rule as noted below: (due to varying technologies if not UDM, and version differences among even Unifi devices, I'll leave the general terms here for what we need rather than the specific names indicated in UDM console)
    • LAN In for the Rule Type
    • Apply the rule BEFORE predefined rules
    • Action will be to ACCEPT traffic
    • Source - set this to the IP Group that we created earlier for the AirConnect Targets
    • Destination - Set this to the IP Group of the AirConnect server and the AirConnect port group above

Once this is done, add the rule, and ensure that if you have any other rules in your firewall that would block this (i.e. a Block IoT traffic inbound to LAN) that you re-order your rules to have this one applied ABOVE those rules. The best option will be to place this rule directly above the IoT blocking rule.

Once I finished doing this, I was able to stream Apple Music from my iPhone directly to the Google Home Mini devices inside of my network. Originally they had the same issue described above (controls would work, no audio) - this fixes that and narrows the scope of traffic to ensure that no broad port rules are needed to open from the IoT VLAN to your trusted VLAN. It also helps reduce the scope of IP as well by designating only the particular IP of the AirConnect server.

Thank you again @philippe44 for the great work, and adding in the port control option enabling this to be easier. And also thank you to @Flyinace2000 for helping flesh this out before I had to 😛 saving me some time I'm sure.