louis49 / androidtv-remote

MIT License
68 stars 23 forks source link

Losing connection when entering in the search tab #21

Open MiguelRamosF opened 2 years ago

MiguelRamosF commented 2 years ago

Hello

I'm having "Remote connection closed" errors whenever I navigate to the search tab in the laucher screen. I tried this with Nvidia Shield and Google Chromecast so I think it's an issue with all android devices.

Did you get this error too?

louis49 commented 2 years ago

Yes, I had this problem. I never go to this kind of fields, but face this bug during my tests. I think that I would fix this bug when the official specifications will be released by Google and not reserved to some big tech companies - this work come from reverse ingeniering and is not perfect

louis49 commented 2 years ago

I think that change code1 could change rights then fix this bug but never tried : https://github.com/louis49/androidtv-remote/blob/0e82d72ec067b6452e0e2266720ba5e023821bf6/src/remote/RemoteMessageManager.js#L46

MiguelRamosF commented 2 years ago

Changing to what number please?

louis49 commented 2 years ago

That's the thing: I don't know, I don't know what those numbers are - I did some reverse engineering - I never got the official protocol specs which are reserved for certain prestigious Google clients. It would be necessary to test from 0 to 1000 and see the result but I don't have time for that at the moment. If you ever investigate the subject, I'm curious to know the results.

ZhEgor commented 1 year ago

I wrote a crutch: after I set up a successful connection with TV, I start to send anonymous pongs to the TV once every 5 seconds. Maybe this is not the best solution to the problem, but now at least it doesn't disconnect.