I'm trying to find where in linux i would be able to setup the network interface for g_ether. Basically I want to run avahi-autoipd and dhcpd on the usb0 interface when it comes up. The problem is that linux isn't as transparent about how all this things are supposed to work. I worked with wince previously and what I want to do was really simple registry options...
So in my /etc/network/interfaces I have set usb0 as manual with custom scripts for up/down.
allow-howplug usb0
iface usb0 inet manual
up /path/to/script
down /path/to/script
When I plug in my device to a host pc, neither is run. I guess i don't really understand how g_ether acts as a network interface since it doesn't seem to know its available, and doesn't run ifup for it. If i run ifup usb0 the scripts will run.
I'm thinking i can create a udev rule, when the usb is plugged in, to run ifup usb0 and ifdown usb0 depending on the state.
Any help would be much appreciated.
There might be an issue with our otg driver, or board... I'm not sure.
It seems regardless of whether or not I've plugged the usb in, the device is always down. That might be why allow-hotplug doesn't work?
# cat carrier
cat: read error: Invalid argument
# cat operstate
down
Hello Kevin,
What board are you using?, because I have seen in the schematics of the i.MX6Solo EVK that the USB OTG share pins with the USB Host so you always begin with the device down, to avoid a hardware issue. If this is the case we can test in a WandBoard. to see if the problem persist.
Have a great day,
Jaime
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------