Closed Zhangdaoning closed 2 years ago
@Zhangdaoning This is interesting as not much changed in those modules from 0.6.3. Just tested 0.7.0 with PS4 and PS5 on Windows and I cannot reproduce this.
Does this happen every time with 0.7.0?
Can you post the versions you have installed for the following packages. Should be in the output of pip freeze
Yes, It happens every time with 0.7.0, and it works well with 0.6.3 every time.
C:\Users\31378>pyremoteplay --register 192.168.108.81
Found Profiles
Select a profile to use:
0: ThundersonicX
1: New Profile
2: Cancel
>> 1
Go to the url below in a web browser, log into your PSN Account, then copy and paste the URL of the page that shows 'redirect'.
https://auth.api.sonyentertainmentnetwork.com/2.0/oauth/authorize?service_entity=urn:service-entity:psn&response_type=code&client_id=ba495a24-818c-472b-b12d-ff231c1b5745&redirect_uri=https://remoteplay.dl.playstation.net/remoteplay/redirect&scope=psn:clientapp&request_locale=en_US&ui=pr&service_logo=ps&layout_type=popup&smcid=remoteplay&prompt=always&PlatformPrivacyWs1=minimal&no_captcha=true&
Enter Redirect URL >https://remoteplay.dl.playstation.net/remoteplay/redirect?code=RHAzrN&cid=6c1f73ee-2093-40d2-a536-bcab1577a4ea
PSN User: Stoehrlip added.
On Remote Play host, Login to your PSN Account: Stoehrlip
Then go to Settings -> Remote Play Connection Settings -> Add Device and enter the PIN shown
>> 13614370
C:\Users\31378>pyremoteplay 192.168.108.81
Found Profiles
Select a profile to use:
0: ThundersonicX
1: Stoehrlip
2: Cancel
>> 1
ERROR:pyremoteplay.protobuf:Enrypted Key not accepted
ERROR:pyremoteplay.stream:RP Launch Spec not accepted
C:\Users\31378>pip freeze
aiohttp==3.8.1
aiosignal==1.2.0
async-timeout==4.0.2
asyncudp==0.6.0
attrs==21.4.0
av==9.2.0
certifi==2022.6.15
cffi==1.15.0
charset-normalizer==2.0.12
click==8.1.3
colorama==0.4.5
construct==2.10.68
cryptography==37.0.3
frozenlist==1.3.0
idna==3.3
imageio==2.19.3
multidict==6.0.2
netifaces==0.11.0
networkx==2.8.4
numpy==1.23.0
opencv-python==4.6.0.66
packaging==21.3
Pillow==9.1.1
protobuf==4.21.2
pycparser==2.21
pycryptodomex==3.15.0
pyee==9.0.4
pygame==2.1.2
pyjerasure==1.0.1
PyOpenGL==3.1.6
pyparsing==3.0.9
pyps4-2ndscreen==1.3.1
pyremoteplay==0.7.0
PySide6==6.3.1
PySide6-Addons==6.3.1
PySide6-Essentials==6.3.1
pytesseract==0.3.9
PyWavelets==1.3.0
pywin32==304
PyYAML==6.0
qimage2ndarray==1.9.0
requests==2.28.0
scikit-image==0.19.3
scipy==1.8.1
shiboken6==6.3.1
sounddevice==0.4.4
tifffile==2022.5.4
typing_extensions==4.2.0
urllib3==1.26.9
windows-curses==2.3.0
yarl==1.7.2
C:\Users\31378>
if i downgrade to 0.6.3, it works...
C:\Users\31378>pip install pyremoteplay==0.6.3 -i https://pypi.tuna.tsinghua.edu.cn/simple/
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting pyremoteplay==0.6.3
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6a/13/5131da02139afa9d7124b05376f0d96f6f5f6787c3e80de5efc6cc59d02d/pyremoteplay-0.6.3-py3-none-any.whl (142 kB)
Requirement already satisfied: wheel in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyremoteplay==0.6.3) (0.37.1)
Requirement already satisfied: pyps4-2ndscreen>=1.2.1 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyremoteplay==0.6.3) (1.3.1)
Requirement already satisfied: pyyaml>=6.0 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyremoteplay==0.6.3) (6.0)
Requirement already satisfied: asyncudp>=0.6.0 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyremoteplay==0.6.3) (0.6.0)
Requirement already satisfied: pyee>=8.1.0 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyremoteplay==0.6.3) (9.0.4)
Requirement already satisfied: cryptography>=3.4.6 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyremoteplay==0.6.3) (37.0.3)
Requirement already satisfied: requests>=2.25.1 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyremoteplay==0.6.3) (2.28.0)
Requirement already satisfied: protobuf>=4.21.1 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyremoteplay==0.6.3) (4.21.2)
Requirement already satisfied: cffi>=1.12 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from cryptography>=3.4.6->pyremoteplay==0.6.3) (1.15.0)
Requirement already satisfied: typing-extensions in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyee>=8.1.0->pyremoteplay==0.6.3) (4.2.0)
Requirement already satisfied: aiohttp>=3.5.4 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (3.8.1)
Requirement already satisfied: construct>=2.9.45 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (2.10.68)
Requirement already satisfied: click>=7.0 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (8.1.3)
Requirement already satisfied: pycryptodomex>=3.7.2 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (3.15.0)
Requirement already satisfied: windows-curses>=2.1.0 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (2.3.0)
Requirement already satisfied: idna<4,>=2.5 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from requests>=2.25.1->pyremoteplay==0.6.3) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from requests>=2.25.1->pyremoteplay==0.6.3) (2022.6.15)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from requests>=2.25.1->pyremoteplay==0.6.3) (2.0.12)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from requests>=2.25.1->pyremoteplay==0.6.3) (1.26.9)
Requirement already satisfied: frozenlist>=1.1.1 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from aiohttp>=3.5.4->pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (1.3.0)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from aiohttp>=3.5.4->pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (1.7.2)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from aiohttp>=3.5.4->pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (4.0.2)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from aiohttp>=3.5.4->pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (6.0.2)
Requirement already satisfied: aiosignal>=1.1.2 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from aiohttp>=3.5.4->pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (1.2.0)
Requirement already satisfied: attrs>=17.3.0 in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from aiohttp>=3.5.4->pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (21.4.0)
Requirement already satisfied: pycparser in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from cffi>=1.12->cryptography>=3.4.6->pyremoteplay==0.6.3) (2.21)
Requirement already satisfied: colorama in c:\users\31378\appdata\local\programs\python\python310\lib\site-packages (from click>=7.0->pyps4-2ndscreen>=1.2.1->pyremoteplay==0.6.3) (0.4.5)
Installing collected packages: pyremoteplay
Attempting uninstall: pyremoteplay
Found existing installation: pyremoteplay 0.7.0
Uninstalling pyremoteplay-0.7.0:
Successfully uninstalled pyremoteplay-0.7.0
Successfully installed pyremoteplay-0.6.3
C:\Users\31378>pyremoteplay 192.168.108.81
Found Profiles
Select a profile to use:
0: ThundersonicX
1: Stoehrlip
2: Cancel
>> 1
WARNING:pyremoteplay.session:Session RECV Malformed Session ID
C:\Users\31378>pip freeze
aiohttp==3.8.1
aiosignal==1.2.0
async-timeout==4.0.2
asyncudp==0.6.0
attrs==21.4.0
av==9.2.0
certifi==2022.6.15
cffi==1.15.0
charset-normalizer==2.0.12
click==8.1.3
colorama==0.4.5
construct==2.10.68
cryptography==37.0.3
frozenlist==1.3.0
idna==3.3
imageio==2.19.3
multidict==6.0.2
netifaces==0.11.0
networkx==2.8.4
numpy==1.23.0
opencv-python==4.6.0.66
packaging==21.3
Pillow==9.1.1
protobuf==4.21.2
pycparser==2.21
pycryptodomex==3.15.0
pyee==9.0.4
pygame==2.1.2
pyjerasure==1.0.1
PyOpenGL==3.1.6
pyparsing==3.0.9
pyps4-2ndscreen==1.3.1
pyremoteplay==0.6.3
PySide6==6.3.1
PySide6-Addons==6.3.1
PySide6-Essentials==6.3.1
pytesseract==0.3.9
PyWavelets==1.3.0
pywin32==304
PyYAML==6.0
qimage2ndarray==1.9.0
requests==2.28.0
scikit-image==0.19.3
scipy==1.8.1
shiboken6==6.3.1
sounddevice==0.4.4
tifffile==2022.5.4
typing_extensions==4.2.0
urllib3==1.26.9
windows-curses==2.3.0
yarl==1.7.2
the only difference is the version of pyremoteplay. 0.6.3 & 0.7.0
@Zhangdaoning Since I can't reproduce this issue, can you clone this repo and checkout the pb-fix
branch and try running the cli again; you can use python -m pyremoteplay <ip address>
. Let me know if it works. I reverted the only change that could cause this.
If it still doesn't work, run this command python -m pyremoteplay <ip address> -t
and post the output.
@Zhangdaoning I forgot to mention. The -t flag will exit as soon as session connects.
Thanks for posting the logs. None of the logs appear to show anything abnormal.
Does 0.7.1 run correctly without the -t flag?
@ktnrg45
0.7.1,works well on ps5. But can not work on ps4 slim.
C:\Users\31378>pyremoteplay 192.168.108.81
Found Profiles
Select a profile to use:
0: Stoehrlip
1: SonicBeatQuest
2: Cancel
>> 0
WARNING:pyremoteplay.session:Session RECV Malformed Session ID
ERROR:pyremoteplay.protobuf:Enrypted Key not accepted
ERROR:pyremoteplay.stream:RP Launch Spec not accepted
Timed out waiting for session to start
C:\Users\31378>pyremoteplay 192.168.108.81 -t
DEBUG:pyremoteplay.ddp:Sending search message
DEBUG:pyremoteplay.ddp:Bound socket to address: (0.0.0.0, 9303)
DEBUG:pyremoteplay.ddp:SENT DDP MSG: SPORT=9303 DEST=('192.168.108.81', 987)
DEBUG:pyremoteplay.ddp:SENT DDP MSG: SPORT=9303 DEST=('192.168.108.81', 9302)
DEBUG:pyremoteplay.ddp:RECV DDP MSG: DPORT=9303 SRC=('192.168.108.81', 52364)
DEBUG:pyremoteplay.device:Status: {'status-code': 200, 'status': 'Ok', 'host-id': 'C863F14FBCA6', 'host-type': 'PS4', 'host-name': 'ps4-G01', 'host-request-port': '997', 'device-discovery-protocol-version': '00020020', 'system-version': '09600011', 'running-app-name': 'NBA 2K22', 'running-app-titleid': 'CUSA28234', 'host-ip': '192.168.108.81'}
DEBUG:asyncio:Using proactor: IocpProactor
Found Profiles
Select a profile to use:
0: Stoehrlip
1: SonicBeatQuest
2: Cancel
>> 0
Starting test...
DEBUG:asyncio:Using proactor: IocpProactor
INFO:pyremoteplay.session:Session Started
DEBUG:pyremoteplay.ddp:Sending search message
DEBUG:pyremoteplay.ddp:Bound socket to address: (0.0.0.0, 9303)
DEBUG:pyremoteplay.ddp:SENT DDP MSG: SPORT=9303 DEST=('192.168.108.81', 987)
DEBUG:pyremoteplay.ddp:SENT DDP MSG: SPORT=9303 DEST=('192.168.108.81', 9302)
DEBUG:pyremoteplay.ddp:RECV DDP MSG: DPORT=9303 SRC=('192.168.108.81', 62912)
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.108.81:9295
DEBUG:urllib3.connectionpool:http://192.168.108.81:9295 "GET /sie/ps4/rp/sess/init HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.108.81:9295
DEBUG:urllib3.connectionpool:http://192.168.108.81:9295 "GET /sie/ps4/rp/sess/ctrl HTTP/1.1" 200 0
DEBUG:pyremoteplay.session:Session Auth Headers: {'Connection': 'keep-alive', 'Pragma': 'no-cache', 'Content-Length': '0', 'RP-Prohibit': '0', 'RP-Device': '0', 'RP-Rssi-Dbm': '0', 'RP-Rssi-Percent': '0', 'RP-Enterkey': 'X', 'RP-Server-Type': 'hIBy05NYUx7vXmx+K9J3dA==', 'RP-SupportCmd': '095000'}
DEBUG:pyremoteplay.session:Server Type: 0
INFO:pyremoteplay.session:Session Auth Success
DEBUG:pyremoteplay.session:Connected
DEBUG:pyremoteplay.session:RECV LOGIN
DEBUG:pyremoteplay.session:Session HB Timeout. Sending HB
DEBUG:pyremoteplay.session:RECV SESSION_ID
WARNING:pyremoteplay.session:Session RECV Malformed Session ID
DEBUG:pyremoteplay.session:Session HB Timeout. Sending HB
DEBUG:pyremoteplay.stream:Connected Stream
DEBUG:pyremoteplay.session:Session RECV invalid Message Type: 22
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=INIT_ACK flag=0>
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=COOKIE_ACK flag=0>
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=DATA_ACK flag=0>
DEBUG:pyremoteplay.stream:TSN=1 GAP_ACKs=0 DUP_TSNs=0
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=DATA flag=1>
DEBUG:pyremoteplay.protobuf:RECV Payload Type: BANG
DEBUG:pyremoteplay.protobuf:RECV Bang
DEBUG:pyremoteplay.stream:Running RTT test...
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=DATA_ACK flag=0>
DEBUG:pyremoteplay.stream:TSN=2 GAP_ACKs=0 DUP_TSNs=0
DEBUG:pyremoteplay.stream:Received waiting TSN ACK
DEBUG:pyremoteplay.stream:Received RTT Echo
DEBUG:pyremoteplay.stream:Received RTT Echo
DEBUG:pyremoteplay.stream:Received RTT Echo
DEBUG:pyremoteplay.stream:Received RTT Echo
DEBUG:pyremoteplay.stream:Received RTT Echo
DEBUG:pyremoteplay.stream:Received RTT Echo
DEBUG:pyremoteplay.stream:Received RTT Echo
DEBUG:pyremoteplay.stream:Received RTT Echo
DEBUG:pyremoteplay.stream:Received RTT Echo
DEBUG:pyremoteplay.stream:Received RTT Echo
DEBUG:pyremoteplay.stream:Stopping RTT Test
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=DATA_ACK flag=0>
DEBUG:pyremoteplay.stream:TSN=3 GAP_ACKs=0 DUP_TSNs=0
DEBUG:pyremoteplay.stream:Received waiting TSN ACK
DEBUG:pyremoteplay.stream:RTT Test Complete
INFO:pyremoteplay.stream:Average RTT: 0.0006005287170410157 ms; Longest RTT: 0.001001596450805664 s
DEBUG:pyremoteplay.stream:Running MTU Test
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=DATA_ACK flag=0>
DEBUG:pyremoteplay.stream:TSN=4 GAP_ACKs=0 DUP_TSNs=0
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=DATA flag=1>
DEBUG:pyremoteplay.protobuf:RECV Payload Type: SENKUSHA
DEBUG:pyremoteplay.stream:MTU at maximum: 1454
DEBUG:pyremoteplay.stream:MTU IN Test Complete
DEBUG:pyremoteplay.stream:MTU IN: 1454
DEBUG:pyremoteplay.stream:Tested network and got MTU: 1454; RTT: 0.6005287170410156ms
DEBUG:pyremoteplay.stream:Stopping Stream
DEBUG:pyremoteplay.stream:Stream Disconnecting
INFO:pyremoteplay.session:Using MTU: 1454; RTT: 0.6005287170410156ms
DEBUG:pyremoteplay.stream:Connected Stream
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=INIT_ACK flag=0>
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=COOKIE_ACK flag=0>
INFO:pyremoteplay.stream_packets:Using bitrate: 2000 kbps
DEBUG:pyremoteplay.stream_packets:Length: 906, Launch Spec JSON: {"sessionId":"sessionId4321","streamResolutions":[{"resolution":{"width":640,"height":360},"maxFps":30,"score":10}],"network":{"bwKbpsSent":2000,"bwLoss":0.001000,"mtu":1454,"rtt":0,"ports":[53,2053]},"slotId":1,"appSpecification":{"minFps":30,"minBandwidth":0,"extTitleId":"ps3","version":1,"timeLimit":1,"startTimeout":100,"afkTimeout":100,"afkTimeoutDisconnect":100},"konan":{"ps3AccessToken":"accessToken","ps3RefreshToken":"refreshToken"},"requestGameSpecification":{"model":"bravia_tv","platform":"android","audioChannels":"5.1","language":"sp","acceptButton":"X","connectedControllers":["xinput","ds3","ds4"],"yuvCoefficient":"bt709","videoEncoderProfile":"hw4.1","audioEncoderProfile":"audio1","adaptiveStreamMode":"resize"},"userProfile":{"onlineId":"psnId","npId":"npId","region":"US","languagesUsed":["en","jp"]},"videoCodec":"avc","dynamicRange":"SDR","handshakeKey":"l8g39cl/fm4PBGv2xewXfw=="}
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=DATA_ACK flag=0>
DEBUG:pyremoteplay.stream:TSN=1 GAP_ACKs=0 DUP_TSNs=0
DEBUG:pyremoteplay.stream:<class 'pyremoteplay.stream_packets.Packet' type=CONTROL chunk=DATA flag=1>
DEBUG:pyremoteplay.protobuf:RECV Payload Type: BANG
DEBUG:pyremoteplay.protobuf:RECV Bang
ERROR:pyremoteplay.protobuf:Enrypted Key not accepted
ERROR:pyremoteplay.stream:RP Launch Spec not accepted
DEBUG:pyremoteplay.session:Session Received Stop Signal
Timed out waiting for session to start
Test Result: Fail
C:\Users\31378>pip freeze
aiohttp==3.8.1
aiosignal==1.2.0
async-timeout==4.0.2
asyncudp==0.6.0
attrs==21.4.0
av==9.2.0
certifi==2022.6.15
cffi==1.15.0
charset-normalizer==2.0.12
click==8.1.3
colorama==0.4.5
construct==2.10.68
cryptography==37.0.3
frozenlist==1.3.0
idna==3.3
imageio==2.19.3
multidict==6.0.2
netifaces==0.11.0
networkx==2.8.4
numpy==1.23.0
opencv-python==4.6.0.66
packaging==21.3
Pillow==9.1.1
protobuf==4.21.2
pycparser==2.21
pycryptodomex==3.15.0
pyee==9.0.4
pygame==2.1.2
pyjerasure==1.0.1
PyOpenGL==3.1.6
pyparsing==3.0.9
pyps4-2ndscreen==1.3.1
pyremoteplay==0.7.1
PySide6==6.3.1
PySide6-Addons==6.3.1
PySide6-Essentials==6.3.1
pytesseract==0.3.9
PyWavelets==1.3.0
pywin32==304
PyYAML==6.0
qimage2ndarray==1.9.0
requests==2.28.1
scikit-image==0.19.3
scipy==1.8.1
shiboken6==6.3.1
sounddevice==0.4.4
tifffile==2022.5.4
typing_extensions==4.2.0
urllib3==1.26.9
windows-curses==2.3.0
yarl==1.7.2
@Zhangdaoning Does it work on the pb-fix branch? (without -t flag)
@ktnrg45 Yes,pb-fix branch works well!both ps4 and ps5 on windows 11.
Could you please merge it into master branch, thank you very much!
C:\Users\31378\Desktop\pyremoteplay-pb-fix>python -m pyremoteplay 192.168.108.81
Found Profiles
Select a profile to use:
0: Stoehrlip
1: SonicBeatQuest
2: Cancel
>> 0
WARNING:pyremoteplay.session:Session RECV Malformed Session ID
Merged and released 0.7.2