Mister... no USB devices are recognized...

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 135
Joined: Wed Feb 07, 2018 6:13 pm

Re: Mister... no USB devices are recognized...

Postby Locutus73 » Sat Feb 24, 2018 5:27 pm

Sorgelig wrote:Run menu core and connect the console. There you will see messages about received input events.

Got it, I'll report back with results from different dongle/controller combos.

Locutus73

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 135
Joined: Wed Feb 07, 2018 6:13 pm

Re: Mister... no USB devices are recognized...

Postby Locutus73 » Sun Feb 25, 2018 2:42 pm

Sorgelig wrote:Run menu core and connect the console. There you will see messages about received input events.

I did some preliminary (not exhaustive) tests with some of my joypads and dongles. I performed all the tests with a simple 1to1 USB OTG cable, with no USB HUB. I repeated the tests with both current published kernel and with the new one provided in this thread with the same results.
1) DualShock 3 connected through USB: I got the “opened /dev/input/event0”, but no event using the joypad
2) Xbox 360 wireless pad connected through sync and charge cable: nothing, no log message at all
3) WiiU Pro Controller connected through USB: various USB error messages like “usb usb1-port1: Cannot enable. Maybe the USB cable is bad?” and “usb usb1-port1: unable to enumerate USB device”
4) Switch Pro Controller connected through USB: I got the “opened /dev/input/event0” log, but no event using the joypad
5) DualShock 3 wirelessly connected through Mayflash dongle (PS3003): I got the “opened /dev/input/event0” log, and then the event flood. The flood seems related to the analog sticks continuously reporting their position.
6) 8Bitdo arcade stick (the F30 old one, with Sanwa parts) connected through USB: I got the “opened /dev/input/event0” log, and regular events (no flood) on key down and key up
This week I’ll receive a pair of 8bitdo retro receivers (SNES and Mini/Classic) and a pair of their only digital (no analog sticks) pads, the SNES replica and the NES replica. I’ll perform more tests. Eventually I'll buy their SF30 Pro pad (the SNES replica with analog sticks).

Regarding the PS3 event flood, I’m wondering if it’s necessarily clogging MiSTer. I mean, developing in completely different areas, I experienced situations where fast and repeated events seemed to clog the entire system only when each event was producing debug logs. In fact, the logging code clogged the event management; removing the log (or producing only cumulative logs) made the fast events manageable.

Locutus73

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Mister... no USB devices are recognized...

Postby Sorgelig » Sun Feb 25, 2018 5:08 pm

If you will read my recommendation, then you will see that i've told to use exactly menu core, not any core. It means, input log is enabled only in menu core.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Mister... no USB devices are recognized...

Postby Sorgelig » Sun Feb 25, 2018 5:16 pm

Locutus73 wrote:1) DualShock 3 connected through USB: I got the “opened /dev/input/event0”, but no event using the joypad

DualShock 3 connected to USB works on my MiSTer. Part of flooding messages i've blocked by pid/vid. Otherwise it's hard to check PS3 gamepad functionality. With wireless connection through dongle there will be other VID/PID, so all messages will be enabled.

Locutus73 wrote:5) DualShock 3 wirelessly connected through Mayflash dongle (PS3003): I got the “opened /dev/input/event0” log, and then the event flood. The flood seems related to the analog sticks continuously reporting their position.

i don't know what events are passed by 8bitdo. When Dualshock 3 is connected by USB it floods not only by all it's analog sticks events, but also 6-axis accelerator events.

Even if no debug shown in other cores, the amount of rapid events from Dualshock is too much, and every event has to be processed at some levels before dropping, so it definitely takes significant time of MiSTer binary.

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 135
Joined: Wed Feb 07, 2018 6:13 pm

Re: Mister... no USB devices are recognized...

Postby Locutus73 » Sun Feb 25, 2018 6:27 pm

Sorgelig wrote:
Locutus73 wrote:1) DualShock 3 connected through USB: I got the “opened /dev/input/event0”, but no event using the joypad

DualShock 3 connected to USB works on my MiSTer. Part of flooding messages i've blocked by pid/vid. Otherwise it's hard to check PS3 gamepad functionality. With wireless connection through dongle there will be other VID/PID, so all messages will be enabled.

I have to correct myself: I see USB connected DualShock events on MiSTer console, but only after I press the PlayStation button; whatever I do before that doesn’t produce any event. Anyway, I see your event filtering now, but it appears to be partially working. I mean, if I do nothing I see no events (the flood is completely filtered); if I press left d-pad I see the key-down and key-up events correctly (again all flood is filtered), but if I press X button I see the key-down, a myriad of spurious events and, finally, the key-up. Some buttons seems to be completely filtered, others leave spurious events to pass while pressed.


Sorgelig wrote:
Locutus73 wrote:5) DualShock 3 wirelessly connected through Mayflash dongle (PS3003): I got the “opened /dev/input/event0” log, and then the event flood. The flood seems related to the analog sticks continuously reporting their position.

i don't know what events are passed by 8bitdo. When Dualshock 3 is connected by USB it floods not only by all it's analog sticks events, but also 6-axis accelerator events.

The dongle I tested is a Mayflash one, not 8bitdo. I’ll receive a pair of 8bitdo dongles this week. The Mayflash dongle identifies itself as 045e:028e which is USB wired Xbox360 joypad’s identifier. I think 8bitdo dongles will identify themselves in the same way, but I’ll tell you for sure when I receive them. I’m curious to see if other wireless joypad with analog sticks will produce all these events. I can collect data for you, i.e. flooded events with various pad/dongle combos, if you want.

Sorgelig wrote:Even if no debug shown in other cores, the amount of rapid events from Dualshock is too much, and every event has to be processed at some levels before dropping, so it definitely takes significant time of MiSTer binary.

Ok, but please satisfy my curiosity. Are you saying “it definitely takes significant time of MiSTer binary” taking a cautious approach or did you actually determined the processor time taken by DS3 event processing? I mean, even if it takes a significant time (let’s say 50% CPU time) while the rest of MiSTer binary is very light (let’s say 10% CPU time), there could be overhead left, so no harm. It seems to me that DS3 is managed by similarly specced platforms (i.e. old raspberries running emulators). N.B.: I’m reasoning and speculating, not criticizing.

Locutus73

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 135
Joined: Wed Feb 07, 2018 6:13 pm

Re: Mister... no USB devices are recognized...

Postby Locutus73 » Sun Feb 25, 2018 7:09 pm

Sorgelig wrote:If you will read my recommendation, then you will see that i've told to use exactly menu core, not any core. It means, input log is enabled only in menu core.

:?:
I did all my tests in the menu core.

Locutus73

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Mister... no USB devices are recognized...

Postby Sorgelig » Sun Feb 25, 2018 8:05 pm

Locutus73 wrote:Ok, but please satisfy my curiosity. Are you saying “it definitely takes significant time of MiSTer binary” taking a cautious approach or did you actually determined the processor time taken by DS3 event processing? I mean, even if it takes a significant time (let’s say 50% CPU time) while the rest of MiSTer binary is very light (let’s say 10% CPU time), there could be overhead left, so no harm. It seems to me that DS3 is managed by similarly specced platforms (i.e. old raspberries running emulators). N.B.: I’m reasoning and speculating, not criticizing.

MiSTer uses polling mechanism to query FPGA. It's single thread for all kind communications to FPGA, so any significant delay will delay everything like disk i/o, kbd/joy, etc.. Input flood may lead to input latency for example. In worse cases some cores may fail to use disk i/o due to long wait and other problems. 50% for input processing is a lot!
I didn't measure how much CPU load taken by Dualshock flood. And it's hard to measure, actually.

Locutus73 wrote:but if I press X button I see the key-down, a myriad of spurious events and, finally, the key-up. Some buttons seems to be completely filtered, others leave spurious events to pass while pressed.

They are not spurious events. Every dualshock button is kind of "analog" button - every press providing the amount of pressure to button in additional to simple on/off events. Some PS3 games use this feature, for example for car acceleration in racing games - harder you press - faster car will go.
All in all - PS3/PS4 gamepads generate a lot of useless for MiSTer events. Thus simple gamepads are better.

User avatar
Newsdee
Atari God
Atari God
Posts: 1153
Joined: Fri Sep 19, 2014 8:40 am

Re: Mister... no USB devices are recognized...

Postby Newsdee » Mon Feb 26, 2018 1:15 am

Locutus73 wrote:I did all my tests in the menu core.

Check out this thread for more tests:
viewtopic.php?f=117&t=32606

I'm not surprised the Xbox controllers do not work. That said, USB support is better than the MiST. Often a controller might just need a small firmware tweak.

alfishe
Atari freak
Atari freak
Posts: 63
Joined: Wed Jul 19, 2017 8:24 pm

Re: Mister... no USB devices are recognized...

Postby alfishe » Mon Feb 26, 2018 6:18 am

Sorgelig wrote:MiSTer uses polling mechanism to query FPGA. It's single thread for all kind communications to FPGA, so any significant delay will delay everything like disk i/o, kbd/joy, etc.. Input flood may lead to input latency for example. In worse cases some cores may fail to use disk i/o due to long wait and other problems. 50% for input processing is a lot.


Not for long, man, not for long... =)
async event-based codebase is already working with <1ms worse case delay in handling input events.
In such case I wasn't able to consume more than 7% of single core doing weird things on several keyboards, mouse and gamepads simultaneously.

Still lot's of things to develop, including key remapping and other service stuff. And BTW did I mentioned it's C++ 14? =)

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 135
Joined: Wed Feb 07, 2018 6:13 pm

Re: Mister... no USB devices are recognized...

Postby Locutus73 » Mon Feb 26, 2018 10:03 am

I was going to respond to Sorgelig with some async mental ramblings of mine and there you are...
alfishe wrote:Not for long, man, not for long... =)
async event-based codebase is already working with <1ms worse case delay in handling input events.
…with some actual and useful coding instead of chit chat. :cheers:
Elvis would have said “a little less conversation, a little more action, please” to me :lol:



Now, just out of curiosity, is there any form of coordination with these development efforts? I mean, nothing formal, something like “Ehi Sorg, I have an idea, what do you think if I try to implement it?”. I was going to take a look to event management code, but it would have been an useless effort (apart from cultural enrichment) if you didn’t make this post.

Anyway, I’m going to make some tests with various controller/dongle combos; @Sorgelig do you prefer I post my results in the “Joystick testing thread”? It seems a more appropriate location to me.

Locutus73


alfishe
Atari freak
Atari freak
Posts: 63
Joined: Wed Jul 19, 2017 8:24 pm

Re: Mister... no USB devices are recognized...

Postby alfishe » Mon Feb 26, 2018 6:25 pm

Locutus73 wrote:I ]…with some actual and useful coding instead of chit chat. :cheers:
Locutus73


If half-year of hardcore coding is treated as chat... anyway it's public and anyone can watch https://github.com/alfishe/MiSTer
not sure if anyone can contribute (by skills entrypoint restrictions ony)

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 135
Joined: Wed Feb 07, 2018 6:13 pm

Re: Mister... no USB devices are recognized...

Postby Locutus73 » Mon Feb 26, 2018 9:38 pm

alfishe wrote:
Locutus73 wrote:I ]…with some actual and useful coding instead of chit chat. :cheers:
Locutus73


If half-year of hardcore coding is treated as chat...

Nope, reread my post. I meant you came with some actual and useful coding instead of my chit chat.
Maybe I wasn’t clear, I’m not a native English speaker.

Locutus73

alfishe
Atari freak
Atari freak
Posts: 63
Joined: Wed Jul 19, 2017 8:24 pm

Re: Mister... no USB devices are recognized...

Postby alfishe » Mon Feb 26, 2018 11:50 pm

Locutus73 wrote: instead of my chit chat.
Maybe I wasn’t clear, I’m not a native English speaker.
Locutus73


Community is all about chatting =) So let's drink... something to the power of community! =)
I'm not native speaker either.

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 135
Joined: Wed Feb 07, 2018 6:13 pm

Re: Mister... no USB devices are recognized...

Postby Locutus73 » Tue Feb 27, 2018 11:03 am

alfishe wrote:Community is all about chatting =) So let's drink... something to the power of community! =)
I'm not native speaker either.

I’m glad for the clarification.
Now, back to your fork: is there any informal coordination with Sorgelig? Will you merge the sources or are you both working on your own?

Locutus73

alfishe
Atari freak
Atari freak
Posts: 63
Joined: Wed Jul 19, 2017 8:24 pm

Re: Mister... no USB devices are recognized...

Postby alfishe » Tue Feb 27, 2018 9:58 pm

Locutus73 wrote:Now, back to your fork: is there any informal coordination with Sorgelig? Will you merge the sources or are you both working on your own?
Locutus73


Currently there is no active and concurrent development that requires code merge. But if needed - git merge is pretty straightforward process.
Backporting latest changes to totally different codebase bothers way more. But it's temporary thing.

Coordination? Probably only on local targets level only. Current distribution is rather simple. Sorgelig does everything. Lterally =)
I'm doing coverage for Windows SD install tool and do occasional testing here and there. Other maintainers do their work somewhere outside having own repositories.

Locutus73
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 135
Joined: Wed Feb 07, 2018 6:13 pm

Re: Mister... no USB devices are recognized...

Postby Locutus73 » Mon Mar 05, 2018 4:17 pm

Locutus73 wrote:Anyway, I’m going to make some tests with various controller/dongle combos; @Sorgelig do you prefer I post my results in the “Joystick testing thread”? It seems a more appropriate location to me.

As promised, here they are my tests: viewtopic.php?f=117&t=32606&p=340706#p340706

Locutus73

silverfox0786
Atariator
Atariator
Posts: 28
Joined: Thu Mar 30, 2017 3:19 pm
Location: Slough, UK
Contact:

Re: Mister... no USB devices are recognized...

Postby silverfox0786 » Wed Apr 11, 2018 10:16 am

been asked to come on here to report some issues i had from the facebook group.

I was having trouble with keyboard and mose and joypad usb otg

I have found a small solution to this

my issue was the keyboard although was happy with linux original SD Card it did not like MiSTer. After alot of checking teh boot sequence i noticed that my Logitech USB unifing adaptor worked and my K400 Plus Keyboadr works fine in MiSTer.

So it sems Logitech is the go to device for this Unit.

--------------

I do have another issue now though. and need help.
I cannot get my Buffalo SNES Pad to work with MiSTer and cant understand what i have to do. i know with MiST you need the config file. what do i have to do here to get it to work

Thanks

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Mister... no USB devices are recognized...

Postby Sorgelig » Wed Apr 11, 2018 12:50 pm

Sometimes simple switch USB device to another port on hub fixes the compatibility issue.

Did you try to define joystick buttons on OSD menu?


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 4 guests