Skarsnik / QUsb2snes

A Qt based webserver for usb2snes. Users: go check usb2snes.com
https://skarsnik.github.io/QUsb2snes/
GNU General Public License v3.0
52 stars 33 forks source link

No device list and very few logs on Linux Mint #109

Open kimimaru4000 opened 2 years ago

kimimaru4000 commented 2 years ago

I'm on Linux Mint 20.3 Una and I can't seem to get QUsb2snes to work at all aside from the tray icon. I'm looking to get it working with RetroArch. I followed the steps outlined by enabling Network commands and such.

I have Enable debug logs on and it unfortunately doesn't show much information:

17:21:42              default - Debug: Runing QUsb2Snes version  ""
17:21:42              default - Debug: Compiled against Qt 5.12.8 , running 5.12.8
17:21:42                qt5ct - Debug: D-Bus system tray: yes
17:21:43           RA Factory - Debug: Added new RetroArch host:  "Snes Classic"
17:21:43           RA Factory - Debug: Added new RetroArch host:  "Localhost"
17:21:43             WSServer - Debug: Adding Device Factory  "RetroArch"
17:21:43             WSServer - Debug: WebSocket server started : listenning  QHostAddress(QHostAddress::Any) port :  8080
17:21:43             WSServer - Debug: WebSocket server started : listenning  QHostAddress(QHostAddress::Any) port :  23074

After looking at others' logs on issues, I'm not sure why mine is opening up two WebSocket servers. The device list is empty, and it seems as if nothing is working properly. I have opened/closed RetroArch and the log file stays as-is. I've clicked on "Applications" and selected "Multitroid" and "SMZ3 Multiworld" and they don't show checkmarks or open up any other menus.

Do you have suggestions on how to proceed? My goal is to be able to play a multiworld randomizer. I'm using RetroArch 1.9.10 built from source. Thanks in advance!

TarThoron commented 2 years ago

Qusb doesn't have any interface beyond the tray icon, except for some popups the very first time you open it.

It watches 8080 as the primary port, and 23074 as secondary. Most clients use 8080, but some are moving to 23074 due to congestion on 8080.

Have you enabled Network Commands in RetroArch? Do you have a rom running while attempting to connect? Both are required.

kimimaru4000 commented 2 years ago

Thanks for the quick reply. I just tested with a ROM running in RetroArch, then opened QUsb2snes and there are still no devices in the list. Network Commands is indeed enabled. The log is still the same as well.

TarThoron commented 2 years ago

What does http://usb2snes.com/tester/index.html say?

Skarsnik commented 2 years ago

The debug log is a separate file if that does not output on stdout. I just pushed something that maybe fix this RA issue.

IQGobo commented 2 years ago

I am using Manjaro, but experience the same issue: QUsb2Snes does not show any device while a multiworld rom is loaded in retroarch using bsnes mercury performance.

Using usb2snes.com shows the following:

`App version: 7.42.0

Devices:

RetroArch Localhost: ["1.9.14","RetroArch","T1_P1_Gobo_QhG44xT9S6SL9WBTaZPYLQ","NO_ROM_READ","NO_ROM_WRITE","NO_CONTROL_CMD","NO_FILE_CMD"]`
Skarsnik commented 2 years ago

This actually tell you that the device is here x)

IQGobo commented 2 years ago

That is good to know, but still

Are the flags shown after my ROM file indicating any error? Is QUsb2snes unable to read and write ROM data and cannot use control or file commands?

Are there any additional steps in RetroArch other than enabling the network commands on port 55355 and using the bsnes mercury core? I also tried connecting to berserkermulti.world on our tracker port and searched for online games in RetroArch, but no connection succeeded. This is my output for netstat on those ports, there are only local connections:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:49996         127.0.0.1:8080          ESTABLISHED
tcp6       0      0 :::8080                 :::*                    LISTEN     
tcp6       0      0 :::23074                :::*                    LISTEN     
tcp6       0      0 127.0.0.1:8080          127.0.0.1:49996         ESTABLISHED
udp        0      0 0.0.0.0:55355           0.0.0.0:*
black-sliver commented 2 years ago

No clue regarding the UI problem, but

for issues where the device shows up in the external program (multiworld or tracker or whatever), but does not work, we need a debug log that was created while the external program tried to to its stuff. After enabling the debug log in qusb's context menu and restarting it, the log file should be placed in ~/.local/share/QUsb2Snes/log-debug.txt.

Besides that I am pretty sure samus.link does not work with RA > 1.9.0, because "complex" memory access in the new interface in RA is just broken for everything that is not HIROM. As Linux user you can try to build my bsnes-plus fork over at https://github.com/black-sliver/bsnes-plus to figure out if it's specifically RA that's not working (assuming emunw-pre2 support is not broken yet).

kimimaru4000 commented 2 years ago

What does http://usb2snes.com/tester/index.html say?

It keeps repeating the following:

Connected to websocket
Connection closed
Trying to reconnect

In the bottom text, it says:

App version: 7.42.0
No devices found

I have ports 8080 and 23074 allowed in ufw.

IQGobo commented 2 years ago

for issues where the device shows up in the external program (multiworld or tracker or whatever), but does not work, we need a debug log that was created while the external program tried to to its stuff. After enabling the debug log in qusb's context menu and restarting it, the log file should be placed in ~/.local/share/QUsb2Snes/log-debug.txt.

I think in addition to the menu issue, berserkermulti is broken, as my browser is able to connect to QUsb2snes on port 8080, but the berserker tools do not. As a result, there are no lines in my debug-log that indicate any connection attempts. Will report the connection issue with berserker66, but as a heads up for anyone else here it is: berserker connects to the archipelago host just fine (the log on their website reports the established connection), but the WebUI shows "not connected" for both the SNES device and the server. On the console, this error message is hinting at an issue with legacy websocket code in python:

No ROM detected, awaiting snes connection to authenticate to the multiworld server (/snes)
connection open
connection handler failed
Traceback (most recent call last):
  File "~/.local/lib/python3.10/site-packages/websockets/legacy/server.py", line 231, in handler
    await self.ws_handler(self)
TypeError: websocket_server() missing 1 required positional argument: 'path'
connection closed

Besides that I am pretty sure samus.link does not work with RA > 1.9.0, because "complex" memory access in the new interface in RA is just broken for everything that is not HIROM.

I did notice commits hinting at issues with RA memory access in this repo ;)

As Linux user you can try to build my bsnes-plus fork over at https://github.com/black-sliver/bsnes-plus to figure out if it's specifically RA that's not working (assuming emunw-pre2 support is not broken yet).

I only ever downloaded cores from within RA. Where would I put the files from the output folder to make them work in RA?

black-sliver commented 2 years ago

Oh, dang. Sorry for the late reply. Bsnes-plus is stand-alone, not a RA core.

Not sure how well berserker multi still works. It got replaced by archipelago.gg and had little updates since then. The actual communication is incompatible, so if you use the webhost, i think berserkermulti.world still works (and archipelago.gg doesn't). Will ping them in their discord to maybe update the README to reflect that.

If you want to give archipelago (the multi-game version) a try, checkout their Setup Guides on archipelago.gg. They use a new client.

Skarsnik commented 2 years ago

So, does this issue is resolved? confused

kimimaru4000 commented 2 years ago

It hasn't been resolved for met yet unfortunately. It seems there are problems with RetroArch; however, is the device list supposed to show up only once a connection is made? I was under the presumption that QUsb2snes creates the device which is then to be used by the emulator. Correct me if I'm wrong.

kimimaru4000 commented 2 years ago

I'm still seeing the same issue on RetroArch 1.9.0. I'm not sure what I have to do to get a device to show up. Network Commands is enabled. Logs have not changed.

RetroArch