Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GadgetFS Looping does not reconnect when removed #75

Open
MorganAbrams opened this issue Feb 15, 2022 · 5 comments
Open

GadgetFS Looping does not reconnect when removed #75

MorganAbrams opened this issue Feb 15, 2022 · 5 comments

Comments

@MorganAbrams
Copy link

Hi,

On Compute Module 4, when you have a stable connection with a windows machine. If you remove the connection. Then plug it into a new pc or back into the same machine it will not reconnect.

I've traced it to in here handle_ep0(usb_gadget * ctx). It seems to be going in an infinite loop on trying to reconnect with the timeout.tv_sec

@jfdelnero
Copy link
Member

Are you using the FunctionFs or the GadgetFS mode ?

@MorganAbrams
Copy link
Author

GadgetFS mode

@MorganAbrams
Copy link
Author

So finally got the debug information finally posting now. So I have more information to share.

While running and connected we get these messages

handle_ep0 : Entering...
handle_ep0 : 1 event(s)
handle_ep0 : EP0 CONNECT EVENT
handle_ep0 : Select without timeout

Then repeats below:
handle_ep0 : 1 event(s)
handle_ep0 : EP0 SETUP event
handle_ep0 : Select without timeout

When we disconnect we get the messages:
handle_ep0 : 1 event(s)
handle_ep0 : EP0 SUSPEND event
handle_ep0 : Select without timeout

handle_ep0 : EP0 DISCONNECT event
handle_ep0 : Leaving (ctx_>stop=1)...

Then we get these messages repeating
uMTP Responder : Disconnected
handle_ep0 : Entering...

Then when we plug in again we get these messages
handle_ep0 : 1 event(s)
handle_ep0 : EP0 CONNECT event
handle_ep0 : Select without timeout

Then a repeat of this message 6 times total
handle_ep0 : 1 event(s)
handle_ep0 : EP0 SETUP event
handle_ep0 : Select without timeout

Then after we get this message and it just stops
handle_ep0 : 1 event(s)
handle_ep0 : EP0 SUSPEND event
handle_ep0 : Select without timeout

@jfdelnero
Copy link
Member

Can you try the functionfs mode ?

@MorganAbrams
Copy link
Author

Trying with FunctionFS mode right now. Works perfectly. Can unplug and plug it in anywhere else and connects right away with no issues.

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

No branches or pull requests

2 participants