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

error when writing to cfg/usb_gadget/g1/UDC (error : Device or resource busy) #57

Open
poelguedj opened this issue Mar 23, 2021 · 1 comment

Comments

@poelguedj
Copy link

Hello

I am trying to use uMTP-responder on a nanoPi Neo Core with a mini-shield (https://wiki.friendlyarm.com/wiki/index.php/Mini_Shield_for_NanoPi_NEO_Core/Core2) and linux armbian FriendlyArm distribution.

I have build umtprd with the Makefile with no error.
Then I copied the file umtprd into /usr/bin
I copied also the file umtprd.conf (from the subfolder conf) into /etc/umtprd/umtprd.conf
Then I have launched the script umtprd-ffs.sh with the sudo command
But the last line of the script:
ls /sys/class/udc/ > cfg/usb_gadget/g1/UDC
gives an error message : ls: write error: Device or resource busy

Interactively, the shell command ls /sys/class/udc works and returns musb-hdrc.4.auto

But, if I type the command echo musb-hdrc.4.auto >cfg/usb_gadget/g1/UDC, we have the same error:
bash: echo: write error: Device or resource busy

Then the problem occurs when we try to write the standard output into the file cfg/usb_gadget/g1/UDC

Do you have an idea to resolve this issue on the nanopi platform ?

@jfdelnero
Copy link
Member

Maybe the usb interface is already used / initialized by something else ?

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