Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ethernet disabling in raspberry pi

We are trying to develop an application on raspberry pi. We are planning run Pi using batteries. So we have to reduce the power consumption in Pi. As far as we know, ethernet consumes a lot of current, so is there any way to disable ethernet without disturbing the two usb ports on raspberry pi model B? (Ethernet and usb ports are controlled by a single chip LAN8512). Any help or suggestion would be appreciated.

like image 471
Sarweshkumar C R Avatar asked Dec 05 '22 06:12

Sarweshkumar C R


2 Answers

I do not believe that this stops power to the ethernet port but it is worth a shot.

In Terminal type in sudo ifconfig eth0 down this should disable the ethernet port on the Raspberry Pi. To re-enable the port just type in sudo ifconfig eth0 up

And to view the names of all adapters type in sudo iwlist scan probably a better way of doing this but this has been working for me.

like image 149
Robert Killkelley Avatar answered Dec 08 '22 16:12

Robert Killkelley


Disabling an ethernet interface actually doesn't power down the hardware. You have to disable the chip via bus power. But I'm afraid, that the same chip which contains the ethernet driver also contains the USB driver.

See this question on raspberrypi.stackexchange.com. There is different chip (LAN9512) discussed, but disabling it should be same. I just wonder why you have different chip, maybe different Raspberry Pi's revision?

So to power down the chip, just write 0 to the file /sys/devices/platform/bcm2708_usb/buspower:

echo 0x0 > /sys/devices/platform/bcm2708_usb/buspower

To power it up, write 1 to the same file:

echo 0x1 > /sys/devices/platform/bcm2708_usb/buspower

According to the discussion on the Raspberry Pi site, a consumption of this chip should be around 200 mA, what's about a half of a consumption of whole Raspberry Pi (which is about 400 - 500 mA).

It's also a good idea to turn the networking off before physically disabling the chip:

/etc/init.d/networking stop

like image 31
David Ferenczy Rogožan Avatar answered Dec 08 '22 14:12

David Ferenczy Rogožan