streetpea / chiaki-ng

Next-Generation of Chiaki (the open-source remote play client for PlayStation)
https://streetpea.github.io/chiaki-ng/
GNU Affero General Public License v3.0
1.14k stars 74 forks source link

[BUG] PS5 doesn't appear in device list #397

Closed nicolaspaulson closed 1 month ago

nicolaspaulson commented 2 months ago

Describe the bug Since updating to chiaki-ng (1.8.1) my PS5 can no longer be found in the device list. I have verified that the PS5 and my Steam Deck are on the same network. I've deleted my registered console and registered it manually again (had troubles with connecting with that too) and still can't find the PS5 in the device list.

Debug Log None

To Reproduce Steps to reproduce the behavior:

  1. Open chiaki-ng
  2. Have a registered PS5 in sleep mode
  3. Observe that PS5 does not appear in the device list
  4. Restart PS5, restart Steam Deck, open chiaki-ng again and observe still no PS5

Expected behavior Registered PS5 console should appear in the device list for me to wake from sleep.

Screenshots Unnecessary.

Desktop (please complete the following information):

Additional context Not needed.

nthrow commented 2 months ago

Having the same issue on chiaki-ng 1.8.1 on a SteamDeck OLED running SteamOS 3.5.19 build 20240422.1. Purged and reinstalled Chiaki, reregistered console, got it to work again briefly then the next time I opened the app the console was gone again. I see the PS5 in Settings > Consoles > Registered Consoles, but its not available for launch in the main menu, and selecting "Auto-Connect" in the settings and then closing and reopening the app just hangs on "waiting for console" at next start. My PS5 is at the latest system OS version and is using a static IP address.

streetpea commented 2 months ago

Have you tried manually adding via ip (make sure to wake up console first)

nthrow commented 2 months ago

Yes, it brings me to a register console page again as if the previous device isn't acknowledged in the settings. I've deleted and re-registered the console now multiple times just to have the issue recur. I'm currently downgrading to 1.7.4 and will report back if the issue persists.

streetpea commented 2 months ago

so it looks like I have 2 issues to look at then ;)

nicolaspaulson commented 2 months ago

@streetpea I did manually add via IP with the console ready and awake and it still didn't appear in the list. I just downgraded from main to beta branch (3.7 -> 3.6.9 steamOS) and I am able to find my PS5 in the device list.

streetpea commented 2 months ago

@nicolaspaulson @nthrow can you try this build: https://github.com/streetpea/chiaki-ng/actions/runs/10650055965/artifacts/1878613445 and see if it fixes your 1st issue (not being able to discover the console)?

You can first unzip it to your downloads folder and then make it executable with:

chmod +x ~/Downloads/chiaki-ng.Appimage

and then open it with:

~/Downloads/chiaki-ng.Appimage

Then, close it and you can copy settings from the flatpak with

cp ~/.var/app/io.github.streetpea.Chiaki4deck/config/Chiaki/Chiaki.conf ~/.config/Chiaki/Chiaki.conf

and then you can reopen the appimage and use it to test it out.

streetpea commented 2 months ago

Manual registration is working fine for me on 1.8.1. Are you making sure to select PS5 as console type during registration? Can you open chiaki-ng from the konsole using:

flatpak run io.github.streetpea.Chiaki4deck

and post the output when you try to register?

something along the lines of:

[I] Regist starting search
[I] Regist sending search packet      
[I] Regist received search response from 192.168.1.16
[I] Regist connected to 192.168.1.16, sending request
[I] Regist waiting for response                                     ..              
[I] Regist response payload (decrypted):   
[I] RP-Support Cmd: 0
[I] Regist successfully received response
nicolaspaulson commented 2 months ago

@streetpea manual registration works some of the time for me on 1.8.1 but once registered I still wouldn't see the PS5. I can go back to the main branch of SteamOS tomorrow and try the patch you sent

Sorry, I still plan on getting to this but life has gotten in the way.

nicolaspaulson commented 1 month ago

@streetpea I finally tried this out on the 3.7 main branch of Steam OS and am still unable to find the PS5 in the device list

nicolaspaulson commented 1 month ago

@streetpea I also installed 1.7.4 Chiaki4deck which was previously working for me but it also doesn't work on 3.7 main branch of SteamOS.

streetpea commented 1 month ago

In that case it seems broadcast is broken for you on that branch. It works fine for me on 3.7 main though. @nicolaspaulson can you launch chiaki-ng via the konsole with:

~/Downloads/chiaki-ng.Appimage

and email me the logs with verbose logging enabled at streetpea@proton.me?

streetpea commented 1 month ago

@nicolaspaulson can you post the output of:

ip addr show

In the konsole?

nicolaspaulson commented 1 month ago

@streetpea after opening chiaki-ng via konsole? or just with a fresh konsole?

streetpea commented 1 month ago

Just with a fresh konsole

streetpea commented 1 month ago

@nicolaspaulson can you try this build please https://github.com/streetpea/chiaki-ng/actions/runs/10725775802/artifacts/1897762119 and post verbose logs? it should post more logs about discovery.

streetpea commented 1 month ago

@nicolaspaulson from your logs discovery is sending properly to your only configured broadcast address as configured on your Steam Deck (shown by ip addr show). In other words it is working correctly. What is the private ip for your PlayStation (not sensitive as it’s specific to your network).

nicolaspaulson commented 1 month ago

@streetpea 192.168.1.20 Edit: fixed ip

streetpea commented 1 month ago

It should be on that network then as chiaki-ng is sending a broadcast request to 192.168.1.255. For some reason your router isn’t sending the broadcast to your ps5 when sent from your Steam Deck. There is probably a router setting to fix this. Unfortunately, there isn’t anything to be done from the Chiaki-ng side based on the logs you sent me. Also make sure that ipv4 is enabled on your Steam deck settings so that the package actually leaves your Steam deck

nicolaspaulson commented 1 month ago

@streetpea thank you for your help in debugging. I have IPv4 enabled on my steam deck and IPv6 disabled on my router. Not sure what the deal is but happy to know it's not chiaki-ng

nicolaspaulson commented 1 month ago

on a quick side note: I can connect to my PS5 using the automation script

streetpea commented 1 month ago

You can connect fine using the automation bc it’s directly using the ip vs needing to rely on broadcast to discover the console locally

streetpea commented 1 month ago

@nicolaspaulson my suggestion is to use a manually added connection using your previously registered console instead of registering on the first connection. This is enabled (changed from needing to discover the console to just needing to have it registered) in this build: https://github.com/streetpea/chiaki-ng/actions/runs/10730001840/artifacts/1898981012. Please try it out and see if you are able to successfully add your console via ip and choose your registered console.

@nthrow please also try that if this build https://github.com/streetpea/chiaki-ng/actions/runs/10725775802/artifacts/1897762119 still doesn't work for you

nicolaspaulson commented 1 month ago

@streetpea just gave that build a try. My console is already registered and I tried adding it manually via IP and selecting the registered console in the drop down but I'm not finding it.

streetpea commented 1 month ago

@nicolaspaulson just to confirm when you open the add a console page which initial option is selected [checking if you downloaded the correct appimage]?

If not please redownload https://github.com/streetpea/chiaki-ng/actions/runs/10730001840/artifacts/1898981012 and overwrite your existing appimage with this one and run via konsole with

~/Downloads/chiaki-ng.Appimage

Additionally when you run:

cat ~/.config/Chiaki/Chiaki.conf 

is your console listed with a number such as 1\ that is less than or equal to the size? (i.e., see below) Note: information masked to not give away details about my PS5 [checking if the console is registered in your settings]:

[registered_hosts]
1\ap_bssid=xxxxxx
1\ap_key=
1\ap_name=PS5
1\ap_ssid=
1\console_pin=0000
1\rp_key=@ByteArray(....)
1\rp_key_type=2
1\rp_regist_key=@ByteArray(...)
1\server_mac=@ByteArray(....)
1\server_nickname=Streetpea's PS5
1\target=1000100
size=1

If not please recopy your config file from the flatpak version of chiaki-ng:

cp ~/.var/app/io.github.streetpea.Chiaki4deck/config/Chiaki/Chiaki.conf ~/.config/Chiaki/Chiaki.conf
nicolaspaulson commented 1 month ago

When I open the add a console page the title is Add Manual Console, Host is empty and Registered Consoles defaults to "Select an Option".

My console is indeed listed under the registered hosts like you posted.

streetpea commented 1 month ago

@nicolaspaulson i think I misunderstood you then. So you’re saying after adding the console manually it’s not showing up in the ui then?

nicolaspaulson commented 1 month ago

@streetpea yeah it's not appearing in the UI

streetpea commented 1 month ago

You are clicking the + button and it’s not appearing there when you select the dropdown that initially lists select an option? Or it is appearing there but not in the menu afterward?

nicolaspaulson commented 1 month ago

It appears there, it doesn't appear in the main screen UI

streetpea commented 1 month ago

I see that's weird it shows up fine for me when you

cat ~/.config/Chiaki/Chiaki.conf

Do you see manual_hosts like?:

[manual_hosts]
1\host=192.168.1.16
1\id=1
1\registered=true
1\registered_mac=@ByteArray...)
size=1

or specifically what do you see ... you can just comment out the mac (ip is fine since private anyway in this case)

nicolaspaulson commented 1 month ago
[manual_hosts]
1\host=192.168.1.208
1\id=1
1\registered=true
1\registered_mac=@ByteArray(...)
size=0

I just got a new router today which is why the IP address is different than I've posted before

nicolaspaulson commented 1 month ago

@streetpea I manually changed the config to size=1 and I'm seeing the PS5 in the main UI now, though I see two copies, one discovered in standby state and one manual in ready state

streetpea commented 1 month ago

@nicolaspaulson it should be fixed in this build https://github.com/streetpea/chiaki-ng/actions/runs/10746845200/artifacts/1903558600 you can try deleting and re-adding the console to test.

streetpea commented 1 month ago

Also the console should show up twice. It shows up once as a manual console where you can manage the console and use it without needing discovery. It also shows up via manual discovery which allows you to see the current console state and use the auto-connect feature you can select from the consoles menu in the settings. I would use the manually discovered console as that shows state correctly. I can look at consolidating this view into just 1 entry per console tomorrow.

nicolaspaulson commented 1 month ago

@streetpea thanks again for all your help with this. The latest build you attached worked for me and I successfully added my console again after deleting it.

Edit: misread your comment. Again, I appreciate all your time.

streetpea commented 1 month ago

@nicolaspaulson this build https://github.com/streetpea/chiaki-ng/actions/runs/10748434291/artifacts/1903911464 consolidates the view for manual consoles that are discovered into one discovered + manual pane with all relevant options. It also displays the state for the manual console that can't be discovered as unknown to clarify that the state is unknown not on.

nicolaspaulson commented 1 month ago

@streetpea works like a charm

streetpea commented 1 month ago

@nicolaspaulson since the console can’t be discovered via broadcast due to a network problem and instead can be manually registered to appear appropriately using manual discovery can we close this issue? Or is there something else you would like me to address for this issue?

nicolaspaulson commented 1 month ago

@streetpea we can close it. I am curious why my config had size=0 and why changing it to size=1 made my console appear but thanks for your help

streetpea commented 1 month ago

@nicolaspaulson it worked bc that manual host was leftover from when you had one before it was removed. When the array is removed the size changes but the old entry isn’t deleted in the settings file until a new entry that uses that index is created (it’s basically just ignored until that point). What you did was re-enable that deleted console which you were able to do because it had not been completely removed from the settings file yet.