Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Add PIN entry if not logged in #10

Closed
AgentOak opened this issue Aug 21, 2019 · 7 comments · Fixed by #20
Closed

Add PIN entry if not logged in #10

AgentOak opened this issue Aug 21, 2019 · 7 comments · Fixed by #20

Comments

@AgentOak
Copy link

Thank you for this cool project! I gave it a try and hit a problem:

I've paired with my PS4 Slim (latest firmware as of now) without any problems and immediately afterwards remote play worked fine. I then turned off my PS4 using Chiaki, turned off the TV and closed Chiaki.

Now, waking it up over network works (I can hear the PS4 beep), and after a few seconds PS4 reappears in the list with State: ready, but it can't connect:
image

Running on Windows 10 x64 1903.

Log:

[2019-08-21 16:29:44:232232] [I] Logging to file C:/Users/Me/AppData/Roaming/Chiaki/Chiaki/log/chiaki_session_2019-08-21_16-29-44-231231.log
[2019-08-21 16:29:44:232232] [I] Chiaki Version 1.0.1
[2019-08-21 16:29:44:232232] [I] Starting session request
[2019-08-21 16:29:44:290290] [I] OpenGL initialized with version "3.2.0 NVIDIA 431.36"
[2019-08-21 16:29:48:735735] [I] Trying to request session from 192.168.1.90:9295
[2019-08-21 16:29:48:735735] [I] Connected to 192.168.1.90:9295
[2019-08-21 16:29:48:736736] [I] Sending session request
[2019-08-21 16:29:48:740740] [V] Session Response Header:
[2019-08-21 16:29:48:740740] [V] offset 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
[2019-08-21 16:29:48:740740] [V]      0 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d HTTP/1.1.200.OK.
[2019-08-21 16:29:48:740740] [V]     10 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 63 6c 6f .Connection:.clo
[2019-08-21 16:29:48:740740] [V]     20 73 65 0d 0a 50 72 61 67 6d 61 3a 20 6e 6f 2d 63 se..Pragma:.no-c
[2019-08-21 16:29:48:740740] [V]     30 61 63 68 65 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 ache..Content-Le
[2019-08-21 16:29:48:740740] [V]     40 6e 67 74 68 3a 20 30 0d 0a 52 50 2d 4e 6f 6e 63 ngth:.0..RP-Nonc
[2019-08-21 16:29:48:740740] [V]     50 <removed>
[2019-08-21 16:29:48:740740] [V]     60 <removed>
[2019-08-21 16:29:48:740740] [V]     70 56 65 72 73 69 6f 6e 3a 20 38 2e 30 0d 0a 0d 0a Version:.8.0....
[2019-08-21 16:29:48:740740] [I] Session request successful
[2019-08-21 16:29:48:750750] [I] Starting ctrl
[2019-08-21 16:29:48:750750] [I] Connected to 192.168.1.90:9295
[2019-08-21 16:29:48:751751] [I] Sending ctrl request
[2019-08-21 16:29:48:755755] [I] Ctrl connected
[2019-08-21 16:29:48:796796] [W] Received Ctrl Message with unknown type 0x4
[2019-08-21 16:29:53:751751] [E] Ctrl has failed, shutting down
[2019-08-21 16:29:53:751751] [I] Ctrl requested to stop
[2019-08-21 16:29:53:751751] [I] Ctrl stopped
[2019-08-21 16:29:53:751751] [I] Session has quit

I've removed the lines containing the RP-Nonce as I wasn't sure if it was secret information, but it was a valid Base64 string.

@thestr4ng3r
Copy link
Owner

This line is interesting:

[W] Received Ctrl Message with unknown type 0x4

I don't remember ever getting 0x4 messages. I'll add some more logging for the next release, so we can debug this better.

@thestr4ng3r
Copy link
Owner

The nonce is not sensitive info btw, it should be random on every connection.

@MuchiMuchiPink
Copy link

MuchiMuchiPink commented Aug 21, 2019

I think this happens when the account registered with isn't logged in. Waking up from rest mode and connecting afterwards works for me.

@AgentOak
Copy link
Author

With v1.0.2:

<cut>
[2019-08-21 21:05:56:674674] [I] Sending ctrl request
[2019-08-21 21:05:56:677677] [I] Ctrl connected
[2019-08-21 21:05:56:719719] [W] Received Ctrl Message with unknown type 0x4
[2019-08-21 21:05:56:719719] [V] offset 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
[2019-08-21 21:06:01:675675] [E] Ctrl has failed, shutting down
[2019-08-21 21:06:01:675675] [I] Ctrl requested to stop
[2019-08-21 21:06:01:675675] [I] Ctrl stopped
[2019-08-21 21:06:01:675675] [I] Session has quit

@AgentOak
Copy link
Author

If I login into my profile on the PS4 itself (entering the 4 digit PIN), then connect via Chiaki it works fine.

There are however some other unknown Ctrl Message types:

[2019-08-21 21:10:00:185185] [I] Sending ctrl request
[2019-08-21 21:10:00:188188] [I] Ctrl connected
[2019-08-21 21:10:00:228228] [W] Received Ctrl Message with unknown type 0x5
[2019-08-21 21:10:00:228228] [V] offset 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
[2019-08-21 21:10:00:228228] [V]      0 00                                              .               
[2019-08-21 21:10:00:228228] [W] Received Ctrl Message with unknown type 0x6
[2019-08-21 21:10:00:228228] [V] offset 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
[2019-08-21 21:10:00:228228] [V]      0 00 01                                           ..              
[2019-08-21 21:10:02:215215] [W] Received presumably invalid Session Id:
[2019-08-21 21:10:02:215215] [W] offset 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f  0123456789abcdef
[2019-08-21 21:10:02:215215] [W]      0 10 49 6e 76 61 6c 69 64 53 65 73 73 69 6f 6e 49 .InvalidSessionI
[2019-08-21 21:10:02:215215] [W]     10 64                                              d               
[2019-08-21 21:10:02:215215] [I] Received valid Session Id: InvalidSessionId
[2019-08-21 21:10:02:215215] [I] Starting Senkusha
[2019-08-21 21:10:02:215215] [I] Takion connecting (version 7)
<no more warnings afterwards>

@thestr4ng3r
Copy link
Owner

I think this happens when the account registered with isn't logged in.

If I login into my profile on the PS4 itself (entering the 4 digit PIN), then connect via Chiaki it works fine.

These are good hints, thanks. I never tried with a PIN-protected user. I'll see what I can do about this.

@thestr4ng3r thestr4ng3r changed the title Can't connect to PS4 after initial pairing Add PIN entry if not logged in Aug 23, 2019
@tjhrulz
Copy link

tjhrulz commented Aug 26, 2019

Was just about to post this issue, glad to see it's already resolved.
Do you plan on doing a release soon? I would love if you could as my usual dev machine I just rebuilt so I have no way to easily build it right now.

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

Successfully merging a pull request may close this issue.

4 participants