Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catt scan unable to find devices #420

Open
diimpp opened this issue Dec 11, 2022 · 10 comments
Open

catt scan unable to find devices #420

diimpp opened this issue Dec 11, 2022 · 10 comments

Comments

@diimpp
Copy link

diimpp commented Dec 11, 2022

Hi,

just installed a catt and it's unable to find devices.
Chromium can cast youtube fine and founds device immediatly, phone casts screen good as well.
Devices are in the same 5G wifi network, I'm trying to cast to samsung tv.

I've tried mkchromecast as well and it can't find anything with No devices found! message.

I've seen such test suggested in another ticket and I'm getting

curl -k "http://192.168.1.2:8008/setup/eureka_info?params=device_info,name"
curl: (7) Failed to connect to 192.168.1.2 port 8008 after 230 ms: Connection refused

I'm on ubuntu 22.04.01, my catt is installed with pip and --user flag.

pip check catt         
No broken requirements found.
$ pip list
Package                Version
---------------------- ---------------
apturl                 0.5.2
arrow                  1.2.3
attrs                  21.2.0
Babel                  2.8.0
blinker                1.4
Brlapi                 0.8.3
Brotli                 1.0.9
casttube               0.2.1
catt                   0.12.9
certifi                2020.6.20
cffi                   1.15.1
chardet                4.0.0
click                  8.0.3
click-didyoumean       0.3.0
colorama               0.4.4
command-not-found      0.3
cryptography           3.4.8
cupshelpers            1.0
dbus-python            1.2.18
defer                  1.0.6
distro                 1.7.0
distro-info            1.1build1
docker                 5.0.3
docker-compose         1.29.2
dockerpty              0.4.1
docopt                 0.6.2
Flask                  2.0.1
httplib2               0.20.2
idna                   3.3
ifaddr                 0.1.7
importlib-metadata     4.6.4
itsdangerous           2.1.0
jeepney                0.7.1
Jinja2                 3.0.3
jsonschema             3.2.0
keyring                23.5.0
language-selector      0.1
launchpadlib           1.10.16
lazr.restfulclient     0.14.4
lazr.uri               1.0.6
louis                  3.20.0
macaroonbakery         1.3.1
MarkupSafe             2.0.1
mkchromecast           0.3.9
more-itertools         8.10.0
mutagen                1.45.1
netifaces              0.11.0
oauthlib               3.2.0
olefile                0.46
pexpect                4.8.0
Pillow                 9.0.1
pip                    22.0.2
protobuf               3.20.3
psutil                 5.9.0
ptyprocess             0.7.0
pycairo                1.20.1
PyChromecast           12.1.4
pycparser              2.21
pycryptodomex          3.11.0
pycups                 2.0.1
PyGObject              3.42.1
PyJWT                  2.3.0
pymacaroons            0.13.0
PyNaCl                 1.5.0
pyparsing              2.4.7
PyQt5                  5.15.6
PyQt5-sip              12.9.1
pyRFC3339              1.1
pyrsistent             0.18.1
python-apt             2.3.0+ubuntu2.1
python-dateutil        2.8.1
python-debian          0.1.43ubuntu1
python-dotenv          0.19.2
pytz                   2022.1
pyxattr                0.7.2
pyxdg                  0.27
PyYAML                 5.4.1
reportlab              3.6.8
requests               2.25.1
SecretStorage          3.3.1
setuptools             59.6.0
six                    1.16.0
ssh-import-id          5.11
systemd-python         234
td-watson              2.1.0
texttable              1.6.4
ubuntu-advantage-tools 27.12
ubuntu-drivers-common  0.0.0
ufw                    0.36.1
unattended-upgrades    0.1
urllib3                1.26.5
wadllib                1.3.6
websocket-client       1.2.3
websockets             9.1
Werkzeug               2.0.2
wheel                  0.37.1
xdg                    5
xkit                   0.0.0
youtube-dl             2021.12.17
yt-dlp                 2022.11.11
zeroconf               0.38.3
zipp                   1.0.0
@diimpp
Copy link
Author

diimpp commented Dec 11, 2022

Tv has several ports open

$ nmap 192.168.1.2
Starting Nmap 7.80 ( https://nmap.org ) at 2022-12-11 22:40 +04
Nmap scan report for 192.168.1.2
Host is up (0.0088s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
8001/tcp open  vcom-tunnel
8002/tcp open  teradataordbms
8080/tcp open  http-proxy
9080/tcp open  glrpc

Nmap done: 1 IP address (1 host up) scanned in 0.23 seconds

What's my next step? How do I debug this?

@diimpp
Copy link
Author

diimpp commented Dec 11, 2022

$ python3.10 -m netdisco
Discovered devices:
Discovered 0 devices
$ catt -d 192.168.1.2 scan
Scanning Chromecasts...
Error: No devices found.

$ catt -d 192.168.1.2 cast  https://www.youtube.com/watch\?v\=dQw4w9WgXcQ
Error: No device found at 192.168.1.2.

@sbradnick
Copy link

If you have one running, have you tried disabling a firewall on the host to ensure it isn't possibly blocking? I use firewalld in openSUSE and I have to allow some inbound ports for it all to work.

rule family="ipv4" source mac="<some chromecast dev mac addr>" port port="32768-60999" protocol="tcp" accept
rule family="ipv4" source mac="<some other chromecast mac addr>" port port="32768-60999" protocol="tcp" accept
rule family="ipv4" destination address="224.0.0.0/24" protocol value="udp" accept

@diimpp
Copy link
Author

diimpp commented Dec 12, 2022

@sbradnick ubuntu seems to use ufw by default and it's disabled for me. Chromium on the PC is able to find and cast to a tv, so my guess it's not a network issue.

$ sudo ufw status
Status: inactive

Is there a way to make a curl request to a TV and get info on whatever chromecast protocols available? Could it be just a older unsupported TV?

@xiota
Copy link

xiota commented Feb 19, 2023

catt compiled from ddc5989 was previously working for me. Stopped working today. Recompiled with 82cd0fe. catt scan intermittently has different outputs:

$ catt scan
Scanning Chromecasts...
Error: No devices found.

$ catt scan
Scanning Chromecasts...
Failed to determine cast type for host <unknown> (<urlopen error [Errno 113] No route to host>) (services:{ServiceInfo(type='mdns', data='SmartTV-4K-xxxxx._googlecast._tcp.local.')})
xxx.xxx.xxx.xxx - xxxxx - Unknown manufacturer SmartTV 4K

$ catt scan
Scanning Chromecasts...
xxx.xxx.xxx.xxx - xxxxx - Hisense SmartTV 4K

After power cycling the device (hold down the power button), catt now seems to be working again. Scanning consistently finds the device.

@skorokithakis
Copy link
Owner

Seems like a problem with the device, if power-cycling fixes it...

@xiota
Copy link

xiota commented Feb 19, 2023

@skorokithakis Probably. Mentioned it so @diimpp and others who have connection problems can try ruling out glitches on the device itself. They're perpetually put in and out of sleep mode, and it seems a good ol' fashioned reboot is occasionally required.

Also, the error message Failed to determine cast type for host may indicate where to look for other problems.

@diimpp
Copy link
Author

diimpp commented Feb 20, 2023

@xiota as far as I understand my issue is not related to connectivity, I can cast from chrome and the same time catt fails to find devices, catt has never worked for me even once in my current setup. If anything, it has something to do with samsung tv device, which is too old or something like that.

@JrdnRgrs
Copy link

I am having similar issues as well. Here are some details about mine, i am running W11 for clarity.

I can run catt scan from my powershell console just fine, but when running in WSL or a docker container (with the net=host option) I just get Error: No devices found.. What is interesting though is that when I run the above mentioned curl command from WSL or the docker container, I can retrieve information about the device, so I know it is at least reachable...

What is very odd to me though is that when I first started trying to use catt, about a day or 2 ago, I had no issues running it in WSL or a docker container.

As far as I'm aware I did not update any local network settings, and havent changed anything at all within docker or WSL... so really not sure what is now causing me to not be able to scan for devices...

@ubeaut
Copy link

ubeaut commented Mar 25, 2023

Hi I am using version 0.12.10 and the scan sometimes doesn't show but after a minute or so it works again. It is very hit and miss.
Is there a command I can use to restart the catt process so it works consistently?
Other than that when it does work it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants