by agongon » Sat May 25, 2013 5:03 pm
I had some problems with the USB 500 mA limit. Seems that alarm defaults to the "performance" governor on boot. Thus I couldnt boot my beaglebone black via USB if my ethernet cable was plugged in (to much power requirement).
In the end, following this thread I did this:
1. Enable "g_ether" module on boot.
$this->bbcode_second_pass_code('', '# echo g_ether > /etc/modules-load.d/g_ether.conf')
2. Create a new netcfg profile
$this->bbcode_second_pass_code('', '# nano /etc/network.d/ethernet-usb0')
paste content so it looks like this for example. Choose any fixed IP you wish. I chose 192.168.10.2
$this->bbcode_second_pass_quote('', '#')# Change for static
CONNECTION='ethernet'
DESCRIPTION='Conection via USB'
INTERFACE='usb0'
IP='static'
ADDR='192.168.10.2'
##ROUTES=('192.168.0.0/24 via 192.168.1.2')
#GATEWAY='192.168.1.1'
#DNS=('192.168.1.1')
3. Enable new profile
$this->bbcode_second_pass_code('', '# nano /etc/conf.d/netcfg')
Add the new usb0 profile to the "NETWORKS" line.
$this->bbcode_second_pass_quote('', 'N')ETWORKS=(ethernet-eth0 ethernet-usb0)
Now, everytime you boot up with the USB cable conected to your PC, the beagle will via USB to it. Last step is to tell your PC what IP to use. (I use Arch on my desktop)
4. On your desktop check that the USB0 network has been recognized with "ifconfig -a" (after rebooting your beagle) and give it an ip. It should be called usb0, but can have other name depending on your PC.
5. Final check (run this on your desktop)
BTW: if you have problems with power limits, this might not be enough. Consider changing your cpu scaling governor to ondemand (which should be IMO default on bootup)