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

Can't add device #163

Closed
ralikaro opened this issue Nov 8, 2023 · 22 comments
Closed

Can't add device #163

ralikaro opened this issue Nov 8, 2023 · 22 comments

Comments

@ralikaro
Copy link

ralikaro commented Nov 8, 2023

Describe the bug.
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Setup device' using Developer mode.
  2. Add IP
  3. Add passphrase
  4. Click finish
  5. Fails to connect and shows a screenshot of the enbling key (which is already enabled).

Expected behavior
Connect to TV

Screenshots
image

Additional context
I have managed to connect to the TV using a different application.
I'm also able to ping my TV, but I get a constant failure to fetch the private key.

Add any other context about the problem here.
This is my first time trying to connect.
Connecting to the same wifi network. The TV and laptop are connected to the same router via a wireless connection.

I have switched from a 5G network to a 2.4G network just to rule this out (not sure if it makes a difference).

@throwaway96
Copy link
Member

Try going to http://<TV IP address>:9991/webos_rsa in a browser on your laptop. If you can't download the file, the problem isn't with Dev Manager.

@ralikaro
Copy link
Author

UPDATE: I managed to resolve this by manually adding the device, and then this will fail, but it will allow me to access the screen, which will allow me to install apps.

After accessing this screen, I follow the process of adding a device again, using the same steps in the first post.

This then connected immediately, without any issues.

@wisukind
Copy link

wisukind commented Nov 26, 2023

Hello,

I have the same problem on my LG TV with WebOS 05.50.15 (software version 4.4.2-11)
I can ping my TV. I have dev mode enabled and key server is ON. Using web-os-dev-manager 1.12.1 always fail to connect. I've tried manually using ares command, but same result.

image

Strange thing; the dev-manager application show port 9922; however on the console under which I started the application, I have the following error message:

image

So although I setup dev-manager to use port 9922, the application seems to try accessing port 9991. And my WebOS TV is not listening on that port:

image

Am I doing something wrong or is my WebOS version not supported ?

image

Thanks a lot

@throwaway96
Copy link
Member

@wisukind

Dev Manager downloads the RSA key from an HTTP server on port 9991. This is what "Key Server" refers to.

Make sure you are using the correct IP address for your TV (which you can confirm by using a web browser to connect to port 3000 via HTTP; you should see "Hello world" if you have SSAP enabled). You can also try disabling and re-enabling Dev Mode to fix the key server.

@wisukind
Copy link

@throwaway96

Thanks for your reply. I am using the correct IP address; confirmed with the below screenshot.

image

I have also tried to remove / re-install developper apps several times; rebooted multiple times and enabled / disabled dev mode as many times, but still no luck. I also tried to root my tv with rootmy.tv but my webos is unfortunately not vulnerable. I'm out of idea.

The only thing I havn't tried so far is to reset my TV to factory settings. Any clue or hints of what else I could try ?

Thanks a lot

@wisukind
Copy link

wisukind commented Nov 27, 2023

Also my nmap scan gives the following results:

xxxx@RiailleBox:~/$ sudo nmap -sV 192.168.1.18
Starting Nmap 7.80 ( https://nmap.org ) at 2023-11-27 12:10 CET
Nmap scan report for lgwebostv-1.home (192.168.1.18)
Host is up (0.00073s latency).
Not shown: 994 closed ports
PORT      STATE SERVICE  VERSION
1761/tcp  open  upnp     LG WebOS upnpd (WebOS 4.1.0; UPnP 1.0)
1863/tcp  open  upnp     Platinum unpnd 1.0.4.9 (arch: i686; UPnP 1.0; DLNADOC 1.50)
3000/tcp  open  http     LG smart TV http service
3001/tcp  open  ssl/http LG smart TV http service
7000/tcp  open  rtsp     AirTunes rtspd 377.25.06
11111/tcp open  vce?
MAC Address: A8:23:FE:4B:6D:13 (LG Electronics)
Service Info: OS: Linux; Device: media device; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 182.28 seconds

And

xxxx@RiailleBox:~/$ nmap -sT -p 9920-9922 192.168.1.18
Starting Nmap 7.80 ( https://nmap.org ) at 2023-11-27 12:13 CET
Nmap scan report for lgwebostv-1.home (192.168.1.18)
Host is up (0.00031s latency).

PORT     STATE  SERVICE
9920/tcp closed unknown
9921/tcp closed unknown
9922/tcp open   unknown

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

I've again tried to disable / enable key server on the TV several times, but same results :-(

@mariotaku
Copy link
Member

Most likely the dev mode app has problems. And to ensure everything's reset, you'll need to first turn off dev mode, let the device reboot, then uninstall the dev mode app and reinstall that.

If you tried that but it still doesn't work, maybe a factory reset will be the only solution. Without root we can't really figure out what's going on :(

@wisukind
Copy link

Thanks guys. I will give it a try and let you know.

@wisukind
Copy link

I tried uninstalling / reinstalling dev mode but no luck. I am discussing the point with LG support forum. Hopefully they may have a solution to provide before trying the factory reset.

Thanks anyway !

@throwaway96
Copy link
Member

@wisukind

I see LG suggested the same thing.

Your TV wasn't previously rooted, right?

@wisukind
Copy link

wisukind commented Dec 4, 2023

No, it wasn't previously rooted.

@wisukind
Copy link

wisukind commented Dec 9, 2023

I have just factory reseted my TV but unfortunately that doesn't fix the issue. It seems to me the developper mode application is bugged for my TV model. Whatever I try port 9991 remains closed and I can't retrieve the private key.

@wisukind
Copy link

wisukind commented Dec 9, 2023

For the sake of reference:

Model: OLED55B8PLA
Serial: 810MACEH4955
WebOS: 4.4.2-11
ESN: LGTV20182=21002062980
Widevine: LGTV18CLGE002032537

@throwaway96
Copy link
Member

throwaway96 commented Dec 11, 2023

@wisukind

Not really necessary (or probably desirable) to post the serial and DRM stuff... The firmware version and SoC/OTAID would be more useful.

@cackslop
Copy link

For the sake of reference:

Model: OLED55B8PLA Serial: 810MACEH4955 WebOS: 4.4.2-11 ESN: LGTV20182=21002062980 Widevine: LGTV18CLGE002032537

How I got rid of "failed to fetch private key":

  • Navigate on your TV to: settings/general/user agreements
  • Uncheck each user agreement option which forces the TV to shutdown and restart. After which, any app you open will force you to re-check the EULA.
  • Then open the developer mode app and click "Key Server".
  • Last step is to fetch the key again

It worked for me and a couple other people, hope it works for you!

@wisukind
Copy link

@cackslop million thanks man !

That actually works. I could install jellyfin with homebrew, which was my initial goal.

Thanks again !!!

@mariotaku mariotaku pinned this issue Dec 19, 2023
@chiragkrishna
Copy link

@cackslop you are the man, thanks a ton man. that worked.

@M-Masry4122
Copy link

For the sake of reference:
Model: OLED55B8PLA Serial: 810MACEH4955 WebOS: 4.4.2-11 ESN: LGTV20182=21002062980 Widevine: LGTV18CLGE002032537

How I got rid of "failed to fetch private key":

  • Navigate on your TV to: settings/general/user agreements
  • Uncheck each user agreement option which forces the TV to shutdown and restart. After which, any app you open will force you to re-check the EULA.
  • Then open the developer mode app and click "Key Server".
  • Last step is to fetch the key again

It worked for me and a couple other people, hope it works for you!

Had the same issue as @wisukind and this fixed it for me.
Big thanks.

@justbest23
Copy link

justbest23 commented Sep 5, 2024

I've been having the same issue now on my TV. It's on the latest WebOS23. I've done all of this below, and I've tried the EULA thing and nothing is working.

PS C:\Users\Troggo> ares-setup-device
name                deviceinfo                connection  profile
------------------  ------------------------  ----------  -------
emulator (default)  [email protected]:6622  ssh         tv

** You can modify the device info in the above list, or add new device.
? Select add
? Enter Device Name: TrogTV
? Enter Device IP address: 192.168.0.14
? Enter Device Port: 9922
? Enter ssh user: prisoner
? Enter description: new device description
? Set default ? Yes
? Save ? Yes
name              deviceinfo                  connection  profile
----------------  --------------------------  ----------  -------
TrogTV (default)  [email protected]:9922  ssh         tv
emulator          [email protected]:6622    ssh         tv

** To connect to TV you need to do following steps:
 1. Turning on Developer Mode following this guide: https://webostv.developer.lge.com/develop/getting-started/developer-mode-app
 2. Launch the Developer Mode app and click the Key Server button in the Developer Mode app
 3. Get the ssh key file from your webOS TV with the following command on your PC
    > ares-novacom --device TrogTV --getkey
    > Enter the passphrase displayed on the Developer Mode app
PS C:\Users\Troggo> ares-novacom --device TrogTV --getkey
SSH Private Key: C:\Users\Troggo\.ssh\TrogTV_webos
input passphrase:900E2B
PS C:\Users\Troggo> ares-device --system-info --device TrogTV
[Info] Set target device : TrogTV
ares-device ERR! uncaughtException Error: Cannot parse privateKey: Malformed OpenSSH private key. Bad passphrase?

I can get the RSA key by running:

PS C:\Users\Troggo> curl http://192.168.0.14:9991/webos_rsa
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,29EAF2B825B0CF48EF4AD05FB1D37C91

quBa5VbWUDbULisDRK0giFoiVcX38E73OHzKNGLUG91jsrgFIYjolyj4Y7esuZ0p
N2+/8TT05vZf2+9w0vVJo5qE1zrE8PIR5Z3V1U2pqJT2n9/qv+p8lOmK7tZp4bdj etc etc etc...

However, I don't get anything at port 3000, 9991, or 9922 in the browser. I get "connection reset", "404 not found", and "Invalid HTTP response" respectively.

At the end of all of this, all I really want to achieve it being able to stop the LG TV from dropping into it's stupid clock/firework screensaver. I have my own media server screensavers that I would like to use instead. LG is so scared of warranty claims that they just refuse to give you any screensaver options.

@mariotaku
Copy link
Member

@justbest23 Dev Mode won't give you access to modify screensaver. However, if you want to use some other apps from homebrew channel, dev mode should still work without having root.

Being able to get private key means that the key server and EULA stuff is working fine. But you may have entered a wrong passphrase.

@justbest23
Copy link

Hi @mariotaku the code is 100% not wrong. It's a 6 character password and it refuses to accept it. Not sure why.

@Hardycore
Copy link

For the sake of reference:
Model: OLED55B8PLA Serial: 810MACEH4955 WebOS: 4.4.2-11 ESN: LGTV20182=21002062980 Widevine: LGTV18CLGE002032537

How I got rid of "failed to fetch private key":

  • Navigate on your TV to: settings/general/user agreements
  • Uncheck each user agreement option which forces the TV to shutdown and restart. After which, any app you open will force you to re-check the EULA.
  • Then open the developer mode app and click "Key Server".
  • Last step is to fetch the key again

It worked for me and a couple other people, hope it works for you!

This works!!!!

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

9 participants