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

ls: write error: Device or resource busy #28

Closed
JetseVerschuren opened this issue Nov 20, 2016 · 11 comments
Closed

ls: write error: Device or resource busy #28

JetseVerschuren opened this issue Nov 20, 2016 · 11 comments

Comments

@JetseVerschuren
Copy link

When i try to run pi_startup.sh i get a error:
ls_write_error_device_or_resource_busy

@BenjaminHae
Copy link

BenjaminHae commented Nov 20, 2016

Same here.
I figure it's about the line ls /sys/class/udc > UDC. Before running the script the file /sys/kernel/config/usb_gadget/poisontap/UDC doesn't exist. Afterwards it does. I don't have a clue why the script can create it, but can't write to it.

@samyk
Copy link
Owner

samyk commented Nov 20, 2016

Did you follow the installation instructions in README.md?

@JetseVerschuren
Copy link
Author

Yes i followed the installation instructions at the bottom of readme.md

@samyk
Copy link
Owner

samyk commented Nov 20, 2016

So you're saying pi_startup.sh is already in /etc/rc.local per the instructions, but you're running it a second time as demonstrated in your screenshot? You should only run it once.

@BenjaminHae
Copy link

I followed everything but the addition to rc.local so I could see possible errors when running it manually - as it doesn't work.

It seems to be the same error when the script is executed in rc.local because after booting/sys/kernel/config/usb_gadget/poisontap/UDC exists but is empty.

@samyk
Copy link
Owner

samyk commented Nov 20, 2016

May want to try following https://gist.github.com/jgamblin/459d7db3b4e8441cc210b35abb5d7181 or https://gist.github.com/gbaman/50b6cca61dd1c3f88f41 in case there is something I missed in the installation

@JetseVerschuren
Copy link
Author

It partially works on my ubuntu computer, it only runs when i type 1.0.0.1 in the browser and not all requests are made to the pi zero.
Also windows doesn't recognize the pi as a network adapter.

@JetseVerschuren
Copy link
Author

Why did you use a 128.0.0.0 subnet and not a 0.0.0.0 subnet?

@samyk
Copy link
Owner

samyk commented Nov 20, 2016

What version of Windows?

128.0.0.0 works on every OS I tested where 0.0.0.0 doesn't. I do want to update dhcpd.conf to use a short lease time, and have the subnet dynamically switch between the lower half and upper half of the IPv4 space but haven't had a chance to, where the usb0 interface will hold an IP in both halves.

@JetseVerschuren
Copy link
Author

JetseVerschuren commented Nov 20, 2016

I am using windows 10.
And is it possible to emulate multiple lan adapters?

@combatopera
Copy link

the problem seems to be the one-liner, splitting it worked for me:

name="$(ls /sys/class/udc)"
echo "$name" >UDC

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

4 participants